dtctl load-balancer batch-update-members
Usage
dtctl load-balancer batch-update-members [flags]
Aliases
bm
Description
Add or replace all members of a pool in a single call by passing a JSON array. Members not included in the array are removed from the pool.
Example
# Replace a pool's members with two backends
dtctl load-balancer batch-update-members --lb-id <lb-id> --pool-id <pool-id> --members '[{"address":"10.0.0.5","compute_server_id":"<vm-id>","protocol_port":80},{"address":"10.0.0.6","compute_server_id":"<vm-id-2>","protocol_port":80}]'
Flags
| Option | Description |
|---|---|
--lb-id, -i | ID of the load balancer (required) |
--members, -m | JSON array of member objects. Each: {"address","compute_server_id","protocol_port"[,"name","weight"]}. Example: '[{"address":"10.0.0.5","compute_server_id":"<vm-id>","protocol_port":80}]' (required) |
--pool-id, -p | ID of the pool (required) |
Related Commands
| Command | Description |
|---|---|
| dtctl load-balancer create-member | Add a member to a pool |
| dtctl load-balancer update-member | Update a member |
| dtctl load-balancer delete-member | Delete a member |
| dtctl load-balancer member-vms | List candidate member VMs on a network |
| dtctl load-balancer members | List members of a pool |
Global Flags
| Option | Description |
|---|---|
--api-url | Send this command to a different API endpoint, e.g. a test environment (default "https://console.dt.net.tr/api/v1") |
--config, -c | Specify a custom config file Default: ~/.config/dtctl/config.yaml |
--no-headers | Omit the column headers, for scripting Default: false |
--output, -o | Output format: text, wide, vertical, json. text fits the terminal, wide never truncates, vertical prints one field per line Default: text |