Use VPC Services by CLI
Introduction
The BCE CLI accesses VPC services by the VPC subcommand, and operates VPC, Subnet, Route and other resources.
CLI uses multi-layer command structure, and all commands start with bce
,[options]
represents the options supported by BCE CLI; <service>
indicates the services supported by CLI, such as BOS, CDN etc., and each service has multiple specific sub-commands.
$ bce [options] [<service> <command> [parameters [options]]]
Parameter interpretation
Parameter item | Value | Description |
---|---|---|
options | The value of BCE common Option is taken as -c, -v, -h, -d and --conf-path. | - |
service | VPC | - |
command | Including but 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. | Please see the command function description for the role of each command. |
parameters | Please see the command parameters description for the role of each command. | - |
+options | -h. | Option of VPC command |
Common Option of CLI
-
View Help You can add
-h
or--help
to any command to view the help information for the command.$ bce -h $ bce vpc -h $ bce vpc list-vpc --help
-
View and set the configuration information of AK, SK, etc.
-c/--configure
$ bce -c [<conf-path>]
-
View the version information:
-v/--version
$ bce -v
-
View the debug information:
-d/--debug
$ bce -d vpc list-vpc
The command -d/--debug
cannot be used alone, and must be used in conjunction with service
.
-
Use specified configuration files:
--conf-path
$ bce --conf-path ./conf-sample/ vpc list-vpc
When the command --conf-path
is not used, the configuration under the home directory of user ~/.bce
is used by default.