Can I change the same field on multiple objects at once?
Short answer
Yes; to write the same field to many records, the update-many command in WEB-CLI is used. The command is found in the lb service, lb backend, lb backend-group, lb hc and lb threat-protection resources and in the network ip, waf host-groups and waf options resources. With target selected, a selection is made from the list, and with target all, all the records are targeted; the number of records to be affected is shown and confirmation is asked, and by default, if one of the targets does not pass validation, no record is written. Record-specific fields such as the name, type and listening address are not changed in bulk. In the interface, the Edit button works with a single record; the bulk operations in the interface are Enable, Disable and Delete in the vService list, and turning the module on and off in the WAF, AGS and Bot/DDoS lists.
Problem: The Same Setting Is Changed One by One on Many Objects
The same setting (e.g. X-Forwarded-For, Weight, a profile assignment) needs to be changed on dozens of vServices or Backend Services; editing each record one by one takes time and increases the risk of error.
Solution: Three Methods
If a field value is to be written in bulk, Method 1 is used; if the setting is kept in a profile, Method 2; if only enabling, disabling or deleting is needed, Method 3.
| Your situation | Suitable method |
|---|---|
| I want to write the same field to many records | Method 1: WEB-CLI update-many |
| I want to manage a common setting from a single place | Method 2: Shared profile |
| Enabling, disabling or deleting | Method 3: Interface bulk operations |
Method 1: WEB-CLI update-many Recommended
- How it works
update-manyupdates the given fields on the selected records in a single operation. The default of--onErrorisabort: if one of the targets does not pass validation, no record is written;--onError skipwrites the targets that pass (lb service · Bulk Update). - Where it is openedWEB-CLI
- Requirement CLI access and the modify permission in the relevant area for the user.
- vService type HTTP · L7 TCP · Network (a field is written only to the vService types that carry it)
Step-by-Step Configuration
The target and the field to be changed are written. Example: turning on the X-Forwarded-For header on the vServices to be selected (Target Selection and Confirmation):
lb service update-many target selected --forwardfor truetarget selected opens a selection list: records are marked with the space key, Ctrl+A marks all the visible ones, and typed text filters the list; the selection is confirmed with Enter.
The number of records to be affected is shown; to continue, yes is written (evet in the Turkish interface). If target all was used, it is stated that all the records in the collection will be updated.
In the report at the end of the command, the numbers of updated, unchanged, skipped and failed records are seen. If the field does not exist on a target (e.g. --forwardfor on an L7 TCP vService), that target is skipped.
Instead of the selection list, the targets can also be given in the command; the vService names are selected with Tab. Examples: assigning the same Timeouts profile to two vServices and setting the Weight value of all Backend Services to 10:
lb service update-many target selected --ids.0 <vService-1> --ids.1 <vService-2> --timeout <timeouts-profile>
lb backend update-many target all --weight 10Verification
The result report and the X-Forwarded-For sentence in the Load Balancer Management tab of the target vServices are checked.
Number of updated records = number of selected HTTP vServicesMethod 2: Shared Profile
- How it works All the vServices that use the same profile are updated once the profile is edited (Profiles).
- Where it is opened Configuration Menu → Load Balancer → Profiles (L4-L7 Behavior Sets) → the relevant profile screen
- Requirement The modify permission in the Load Balancer area.
- vService type HTTP · L7 TCP
Step-by-Step Configuration
The profile is clicked in the profile list, and the vServices to be affected are seen in the Used in tab of the preview (How do I understand the impact of changing a profile before I change it ("Used in")?).
While the profile is selected, the Edit button is clicked and the value is changed.
The Edit button at the bottom of the form is clicked; the change is applied to all the vServices that use the profile. If the same profile needs to be assigned to the vServices, update-many is used, as in the --timeout example in Method 1.
Verification
The Load Balancer Management tab of one of the vServices in the Used in tab of the profile is checked.
The profile name in the relevant sentence, with the new valueMethod 3: Interface Bulk Operations
- How it works In the vService list, multiple vServices are enabled and disabled or deleted at the same time; in the WAF, AGS and Bot/DDoS vService lists, on the other hand, that module is turned on and off in bulk on the selected vServices.
- Where it is openedLoad Balancer vService List · WAF, AGS and Bot/DDoS vService lists → toolbar
- Requirement The modify permission in the relevant area.
- vService type HTTP · L7 TCP · Network (WAF and AGS only HTTP)
Step-by-Step Configuration
Steps for enabling, disabling and deleting: Can I enable, disable or delete multiple vServices at the same time?. Binding the WAF, AGS and Bot/DDoS modules: How do I attach WAF, L7 DDoS & Threat Protection and AGS to a vService?
Verification
The Status and module columns in the list are checked.
The operation applied on all the selected vServicesCommon Mistakes
- Selecting multiple rows in the list and pressing Edit. Edit is active only while a single record is selected.
- Changing more records than expected with
target all. It is first tried on a small set withtarget selected. - Taking the "skipped" result on some targets for an error. If the field does not exist in the type of that target, the target is skipped.
- Trying to change record-specific fields such as the name or listening address in bulk. These fields are not found in the
update-manycommand; they are changed record by record withupdate. - Splitting the command into multiple lines. WEB-CLI runs each line as a separate command; a long command is written on a single line.
How it is done in the documentation
