Using VPC Service via CLI
Introduction
BCE CLI accesses VPC services using VPC subcommands to manage resources like VPCs, subnets, and routes.
CLI uses a multi-layer command structure. All commands start with bce, where [options] represents the options supported by BCE CLI, and <service> represents the services supported by CLI (such as BOS and CDN). Each service has multiple specific sub-commands.
1$ bce [options] [<service> <command> [parameters [options]]]
Parameter explanation
| Parameter item | Value | Description |
|---|---|---|
| options | Values for the general option for BCE include -c, -v, -h, -dand --conf-path. | - |
| service | VPC | - |
| command | Commands include (but are not limited to): create-vpc, list-vpc, delete-vpc, show-vpc, update-vpc, create-subnet, list-subnet, delete-subnet, show-subnet, update-subnet, create-route-rule, list-route-rule, delete-route-rule. | For details about each command's functionality, consult the command function description. |
| parameters | Refer to the command function descriptions for details on each parameter. | - |
| +options | -h。 | Options for VPC commands |
General options for CLI
-
View help: Add
-hor--helpafter any command to view help information for that command.Plain Text1$ bce -h 2$ bce vpc -h 3$ bce vpc list-vpc --help -
View/set configuration information (AK, SK, etc.):
-c/--configurePlain Text1$ bce -c [<conf-path>] -
View version information:
-v/--versionPlain Text1 $ bce -v -
View debug information:
-d/--debugPlain Text1 $ bce -d vpc list-vpc
This -d/--debug command cannot be used independently and must be combined with the service.
-
Use a specified configuration file:
--conf-pathPlain Text1 $ bce --conf-path ./conf-sample/ vpc list-vpc
If --conf-path command is not used, the configuration in the user’s home directory ~/.bce is used by default.
