Can I enable, disable or delete multiple vServices at the same time?
Short answer
Yes. On the Load Balancer vService List screen, multiple vServices are selected with the checkboxes of the rows or with the select-all box in the header, and the Enable, Disable or Delete button in the toolbar is used. Enable and Disable are applied to all the selected vServices without asking for confirmation; Delete asks for a confirmation stating the number of selected vServices and cannot be undone. The box in the header selects not only that page but all the rows in the current search and filter result; for this reason, the number of selected records in Page Information is checked before the operation. The right-click menu applies only to the clicked vService; for bulk operations from the command line, the update-many and delete commands in WEB-CLI are used.
Problem: The Same Operation Is to Be Applied to Many vServices
During maintenance, migration or cleanup, many vServices need to be turned off, turned on or deleted at the same time; performing the operation one by one takes time and increases the risk of error.
Solution: Two Methods
The two methods give the same result; they are applied by selecting in the interface or from the command line.
| Your situation | Suitable method |
|---|---|
| Applying it by selecting in the interface | Method 1: vService list toolbar |
| Applying it from the command line | Method 2: WEB-CLI |
Method 1: vService List Toolbar Recommended
- How it works The Enable, Disable and Delete buttons in the toolbar are applied to all the selected vServices in a single operation.
- Where it is openedLoad Balancer → Load Balancer vService List → toolbar
- Requirement The modify permission in the Load Balancer area. The vService delete permission exists only in the roles with full permission in the Load Balancer area (Admin, Traffic manager, Traffic+WAF manager); the Delete button is also visible in the other roles, but the operation is rejected.
- vService type HTTP · L7 TCP · Network
Step-by-Step Configuration
Configuration Menu → Load Balancer → Load Balancer vService List is opened.
The checkboxes of the rows are checked, or the entire filtered list is selected with the box in the header. The N selected value is checked in the Page Information field below the table.
The Enable, Disable or Delete button in the toolbar is clicked. Enable and Disable are applied immediately.
If Delete was selected, the number of vServices to be deleted is checked in the window that opens and the deletion is confirmed; the deletion cannot be undone. The difference between Disable and Delete: What is the difference between temporarily disabling a vService and deleting it?
Verification
The Status circles of the selected vServices and the total number of records in Page Information are checked.
Gray after Disable, green after Enable; the total number of records decreases after DeleteMethod 2: WEB-CLI
- How it works
lb service update-manyupdates the same field on the selected vServices and asks for confirmation before applying it;lb service deletetakes multiple vServices in the same command (lb service · Bulk Update). - Where it is openedWEB-CLI
- Requirement CLI access for the user and the modify permission in the Load Balancer area.
- vService type HTTP · L7 TCP · Network
Step-by-Step Configuration
The selection list is opened with target selected; the vServices are marked with the space key (Ctrl+A marks all the visible ones) and Enter is pressed. The number of vServices to be affected is shown; yes is typed to continue (evet in the Turkish interface). To turn them back on, the same command is run with --active true:
lb service update-many target selected --active falseThe vService names are selected with Tab and written one after another. This command deletes without asking for confirmation; the names are checked before running it:
lb service delete <vService-1> <vService-2>Verification
After the operation, the status of the vServices is listed: lb service status list
The disabled ones are shown as disabled; the deleted ones are not in the listCommon Mistakes
- Assuming that the operation in the right-click menu will be applied to all the selected rows. The right-click menu applies only to the clicked vService.
- Assuming that Disable will ask for confirmation. Enable and Disable are applied without asking for confirmation.
- Not noticing a selection left over from a previous search. The number of selected records in Page Information is checked before the operation.
- Assuming that the
deletecommand in WEB-CLI will ask for confirmation.lb service deletedeletes the written vServices without asking for confirmation. - Expecting a bulk Reload. Reload exists only for a single vService (What does Reload in the right-click menu do; how is it different from Disable / Enable?).
How it is done in the documentation
