After creating applications and environments, you can run commands to view their configuration information.

Query applications

Run the following command to query applications under the current account. You can view the name, ID, category, and associated environments of each application.

$ wpctl app:list
[OK] Query applications (2s)
+----+--------------------+-----------------------------+-------------+----------+----------------+--------------+
| NO |        NAME        |             ID              | DESCRIPTION | CATEGORY | ENV(S) RUNNING | ENV(S) TOTAL |
+----+--------------------+-----------------------------+-------------+----------+----------------+--------------+
|  1 | ****************** | wa-************************ |             | Java     |              0 |            1 |
|  2 | ****************** | wa-************************ |             | Java     |              0 |            3 |
|  3 | ****************** | wa-************************ |             | Tomcat   |              0 |            1 |
+----+--------------------+-----------------------------+-------------+----------+----------------+--------------+

Query the environments of an application

Run the following command to query the deployment environments of an application:

$ wpctl env:list --app ***
[OK] Query environments (1s)
Environment(s) in application ***
+----+----------+-----------------------------+-------------+------------------------------+---------------+------+----------+
| NO |   NAME   |             ID              | DESCRIPTION |           STACK ID           | PACKAGE LABEL | TYPE |  STATUS  |
+----+----------+-----------------------------+-------------+------------------------------+---------------+------+----------+
|  1 | ***      | we-************************ |             | ws-************************  |    ********** | web  | ABNORMAL |
+----+----------+-----------------------------+-------------+------------------------------+---------------+------+----------+

Query events

You can query all events in a deployment environment at any time. After the env:events command is run and returns an event list, you can press E or B on your keyboard to jump to the first or last page, respectively, or press R to refresh the event list.

wpctl env:events

-- Check events, ctl + c to end --
2019-04-19 09:09:14 PM: The application environment changes to that whose ID is wc-****89c9.
2019-04-19 09:09:14 PM: Environment we-****8981 is bound to VPC vpc-****ouha.
2019-04-19 09:09:15 PM: Environment we-***8981 is bound to VSwitch vsw-****tdfl.
2019-04-19 09:09:23 PM: Start to create instances, quantity: 1.

Query the default deployment environment

Run the wpctl env:info command to query the environment information in the current working directory.

$ wpctl env:info
 (1s)

EnvName:  demo-test-env
EnvId:    we-****
AppId:    wa-****
AppName:  demo-test
Status:   RUNNING
Stack:    Aliyun Linux 2.1903 - Java 8 - Tomcat 8.5
CreateUser:   *****
CreateTime:   2019-05-05 08:25:29 PM
UpdateUser:   *****
UpdateTime:   2019-05-05 08:25:30 PM
Resources:
You can access the application via http://*****

Query deployment package versions

Run the wpctl pkg:list command to query the deployment package versions of an application.

$ wpctl pkg:list
[OK] Query pkgVersion appId:wa-******** (1s)
Package version(s) in application benchmark-provider
+----+--------------------------+------------+-------------+-----------------------------------------------------------------------+
| NO |           ID             |   LABEL    | DESCRIPTION |                             PACKAGESOURCE                             |
+----+--------------------------+------------+-------------+-----------------------------------------------------------------------+
|  1 | wp-****2aeb | 1558353894 |            | resources/benchmark-provider/versions/1558353894/service-provider.jar |
|  2 | wp-****897b | 1558353887 |            | resources/benchmark-provider/versions/1558353887/service-provider.jar |
|  3 | wp-****5e0b | 1558353867 |            | resources/benchmark-provider/versions/1558353867/service-provider.jar |
+----+-----------------------------+------------+-------------+-----------------------------------------------------------------------+

Query the health status of a deployment environment

Run the wpctl env:health command to query the health status of an environment.

$ wpctl env:health
[OK] Describe environment health name demo-test-env (1s)

EnvId:we-5cced6393b331c3b55925679   EnvName:demo-test-env
+----+------------------------+-------------+-----------+------------------+
| NO |       INSTANCEID       | AGENTSTATUS | APPSTATUS | DISCONNECTEDTIME |
+----+------------------------+-------------+-----------+------------------+
|  1 | i-wz91tmwedluum4mldj9z | CONNECTED   | HEALTHY   |                0 |
|  2 | i-wz91tmwedluum4mldj9x | CONNECTED   | HEALTHY   |                0 |
|  3 | i-wz91tmwedluum4mldj9y | CONNECTED   | HEALTHY   |                0 |
|  4 | i-wz91tmwedluum4mldja0 | CONNECTED   | HEALTHY   |                0 |
+----+------------------------+-------------+-----------+------------------+

Query and access the URL of an environment

Run the wpctl env:open env Name/ID command to query and access the URL of an environment.

Note Before running the wpctl env:open env Name/ID command, ensure that a browser is installed in your operating system. When an application is bound to multiple Server Load Balancer (SLB) instances or created on multiple Elastic Compute Service (ECS) instances, you can select a URL to open.
$ webxctl open
+----+----------------+
| NO |       IP       |
+----+----------------+
|  1 | 39.108.253.169 |
|  2 | 39.108.248.175 |
|  3 | 39.108.255.172 |
+----+----------------+
Please choose IP to open[default:1]:

Open the Web+ console

If a browser is installed in your operating system, you can run the $ wpctl env:console command to open the Web+ console.

Note Before running the wpctl env:open env Name/ID command, ensure that a browser is installed in your operating system. When an application is bound to multiple Server Load Balancer (SLB) instances or created on multiple Elastic Compute Service (ECS) instances, you can select a URL to open.
$ wpctl env:console