How are the lb commands grouped in the Web CLI (service, backend, backend-group, hc, certificate, ...)?
Short answer
The lb branch consists of 26 resource commands corresponding to the screens in the Load Balancer - ADC section: vService and traffic (service, vhost, backend, backend-group, condition, action), profiles (hc, cache, compression, log, notification, page, limits, report, timeouts, trusted-proxy), certificate and TLS (certificate, ca, ssl-security, certificate-request, client-certificate, private-key, pki-profile, pki-issued, acme-dns-provider) and protection (threat-protection). Most of the resources have the same five commands: list, show, add, update and delete. Some resources have additional actions: status and restart in service, CSR and internal CA operations in certificate, create in ca, and update-many in five resources. In the service, certificate, action, condition and hc resources, the type field is written first in the add command.
How Does It Work?
- A command is built with three words: the branch (
lb), the resource (e.g.service) and the action (e.g.list). Tab lists the available words at each step. - Required fields are written right after the action, without
--and in a specific order; optional fields come in the--field valueform; the rules are in the Field writing rules section. - In resources with a type field, the type is written first in the
addcommand; this selection determines the fields that open:service→type,certificate→type,action→type,condition→criteria,hc→checkType. showanddeletetake the record without the field name being written (deletecan take multiple records);updateasks foridfirst. The record name is listed and selected with Tab.
Command Groups
| Resource | Commands | Equivalent in the interface |
|---|---|---|
service | The five commands, update-many, status list, status id, restart | Load Balancer vService List |
vhost | status list, status id, restart | Shared frontend (Virtual Hosting) |
backend · backend-group | The five commands, update-many | Backend Services · Backend Groups (Pools) |
condition · action | The five commands; add asks for the type field first | Conditions (Policy Match) · Actions (Policy Actions) |
hc | The five commands, update-many; add asks for the type field first | Health Checks |
cache · compression · log · notification · page · limits · report · timeouts · trusted-proxy | The five commands | Profiles (L4-L7 Behavior Sets) |
certificate | The five commands, create-csr, issue-internal, renew-internal; add asks for the type field first | SSL/TLS Certificates |
ca | The five commands, create | Certificate Authorities (CA) |
ssl-security · certificate-request · client-certificate · private-key · pki-profile · pki-issued · acme-dns-provider | The five commands | Certificates & PKI screens |
threat-protection | list, show, update, update-many | Bot/DDoS Management |
lb Commands in TR7
- The commands run with the role permission of the user: the
lbbranch is bound to the Load Balancer permission area; the certificate, PKI, ACME andssl-securityresources require the certificate permission (lb · Permission). - There is no separate command for turning a vService on and off; the
--activefield is updated.restartis used for restarting (Can I restart a vService without interruption (soft / hard restart)?):
lb service update id <vService> --active false
lb service update id <vService> --active true
lb service restart poolId <vService>- The
threat-protectionrecord is created together with the vService; for this reason, there are noaddanddeletecommands, and it is only updated. - Actions outside the five commands: The actions outside the five commands. For certificate operations: Can I create a CSR on TR7?
- Writing the fields: How are array / object fields (e.g. listen) entered in the CLI? · Bulk update: Can I change the same field on multiple objects at once?
Common Misconceptions
- "There are separate enable and disable commands for turning a vService on and off." Turning it on and off is done with the
--activefield of thelb service updatecommand. - "The Bot/DDoS record is created with
add." Thethreat-protectionrecord is created together with the vService; it is only updated. - "The certificate commands run with the Load Balancer permission." The certificate and PKI commands are bound to the certificate permission.
- "In the
updatecommand, the record name is written directly." In theupdatecommand,idis written before the record (lb service update id <vService>), followed by the fields to be changed;showanddelete, on the other hand, take the record directly.
How it is done in the documentation
