|
| 1 | +## ovhcloud cloud loadbalancer create |
| 2 | + |
| 3 | +Create a loadbalancer in the given cloud project |
| 4 | + |
| 5 | +### Synopsis |
| 6 | + |
| 7 | +Use this command to create a loadbalancer. |
| 8 | +There are three ways to define the parameters: |
| 9 | + |
| 10 | +1. Using a configuration file: |
| 11 | + |
| 12 | + First you can generate an example of parameters file using the following command: |
| 13 | + |
| 14 | + ovhcloud cloud loadbalancer create <region> --init-file ./params.json |
| 15 | + |
| 16 | + After editing the file to set the correct creation parameters, run: |
| 17 | + |
| 18 | + ovhcloud cloud loadbalancer create <region> --from-file ./params.json |
| 19 | + |
| 20 | + Note that you can also pipe the content of the parameters file. |
| 21 | + |
| 22 | +2. Using your default text editor: |
| 23 | + |
| 24 | + ovhcloud cloud loadbalancer create <region> --editor |
| 25 | + |
| 26 | +3. Using only CLI flags: |
| 27 | + |
| 28 | + ovhcloud cloud loadbalancer create <region> --name my-lb --flavor <flavor_id> |
| 29 | + |
| 30 | + |
| 31 | +``` |
| 32 | +ovhcloud cloud loadbalancer create <region> [flags] |
| 33 | +``` |
| 34 | + |
| 35 | +### Options |
| 36 | + |
| 37 | +``` |
| 38 | + --editor Use a text editor to define parameters |
| 39 | + --flavor string Flavor ID (can be retrieved with 'cloud reference loadbalancer list-flavors <region>') |
| 40 | + --floating-ip string Floating IP ID to associate to the loadbalancer |
| 41 | + --from-file string File containing parameters |
| 42 | + --gateway string Gateway ID to associate to the loadbalancer |
| 43 | + -h, --help help for create |
| 44 | + --init-file string Create a file with example parameters |
| 45 | + --name string Name of the loadbalancer |
| 46 | + --network-id string Network ID |
| 47 | + --replace Replace parameters file if it already exists |
| 48 | + --subnet-id string Subnet ID |
| 49 | +``` |
| 50 | + |
| 51 | +### Options inherited from parent commands |
| 52 | + |
| 53 | +``` |
| 54 | + --cloud-project string Cloud project ID |
| 55 | + -d, --debug Activate debug mode (will log all HTTP requests details) |
| 56 | + -e, --ignore-errors Ignore errors in API calls when it is not fatal to the execution |
| 57 | + -o, --output string Output format: json, yaml, interactive, or a custom format expression (using https://github.com/PaesslerAG/gval syntax) |
| 58 | + Examples: |
| 59 | + --output json |
| 60 | + --output yaml |
| 61 | + --output interactive |
| 62 | + --output 'id' (to extract a single field) |
| 63 | + --output 'nested.field.subfield' (to extract a nested field) |
| 64 | + --output '[id, "name"]' (to extract multiple fields as an array) |
| 65 | + --output '{"newKey": oldKey, "otherKey": nested.field}' (to extract and rename fields in an object) |
| 66 | + --output 'name+","+type' (to extract and concatenate fields in a string) |
| 67 | + --output '(nbFieldA + nbFieldB) * 10' (to compute values from numeric fields) |
| 68 | +``` |
| 69 | + |
| 70 | +### SEE ALSO |
| 71 | + |
| 72 | +* [ovhcloud cloud loadbalancer](ovhcloud_cloud_loadbalancer.md) - Manage loadbalancers in the given cloud project |
| 73 | + |
0 commit comments