dcloud lb rules addAdd a host/path rule forwarding to a target group
application type only (400 on lb11/lb21/lb31). Rules apply to the http and https services alike, lowest priority first; a request no rule matches goes to the `default` target group. A rule whose group has no target answers 503 and never falls through to another group (the load balancer’s `application.warnings` says so). The host must be one of the load balancer’s own names. Live within seconds; no provider work. To change a rule, remove it and add it again. The console suggests priority 10, then 10 above the highest.
Synopsis
dcloud lb rules add id --priority priority --target-group targetGroup [flags]Arguments
<id>Requiredstring
Also accepted as
--id. Constraints: uuid
Flags
--priorityRequirednumber
1–1000, evaluated lowest first; unique per load balancer (a taken one is refused). At most 50 rules
Constraints: integer, 1-1000
--hostOptionalstring
One of the load balancer’s own names (its platform name or a name of its https service). Left out: every name it answers to
Constraints: 1-253 chars
--path-prefixOptionalstring
Matches on path segments: /api matches /api, /api/ and /api/v1, not /apix. Left out: any path
Constraints: 1-256 chars, /^\/[^\s?#*]*$/
--target-groupRequiredstring
The target group that serves matching requests
Constraints: /^[a-z0-9]([a-z0-9-]{0,30}[a-z0-9])?$/
Example
dcloud lb rules add id --priority 1 --target-group exampleGenerated from the API description, the same one the API checks requests against and the CLI is built from.