官术网_书友最值得收藏!

Viewing the account details using rhc

In this recipe, you will learn how to view your account details using rhc.

Getting ready

To complete this recipe, you will need to have rhc installed on your machine. Refer to the Installing the OpenShift rhc command-line client recipe for instructions.

How to do it…

To view the account details, run the rhc account command as follows:

$ rhc account

This is all you need to do to view the account details.

How it works…

The rhc account command shows details about the currently logged-in user. When you run the command, it makes a REST call to the OpenShift REST API using the authentication token generated during rhc setup. The REST API returns a JSON response, which rhc will render in a human-readable format:

$ rhc account
Login openshift.cookbook@gmail.com on openshift.redhat.com
----------------------------------------------------------
 ID: 52b8112ae0b8cdc308000018
 Plan: Free
 Gears Used: 0
 Gears Allowed: 3
 Domains Allowed: 1
 Allowed Gear Sizes: small
 SSL Certificates: no

The account details include whom you are logged in as, which OpenShift server you are connected to, your OpenShift user ID, the OpenShift plan you are using, the number of gears as well as the gear size used and allowed, the number of domains allowed, and whether you can use SSL certificates or not.

You can also view the account details in the web console by navigating to the account web page at https://openshift.redhat.com/app/account.

There's more…

You can also view details of any of your other OpenShift accounts by passing the -l or --rhlogin option. The -l or --rhlogin option is a global option available with every command. When you use -l or --rhlogin, you force the rhc client to use the user-specified login:

$ rhc account --rhlogin user@example.com

You can log out from your current session on the server by using the rhc account-logout command. This ends the user's current session and deletes the authorization token files in the .openshift folder at ~/.openshift:

$ rhc account-logout

You can also use rhc logout as a short alternative to rhc account-logout.

See also

  • The Setting up an OpenShift account using rhc recipe
主站蜘蛛池模板: 青海省| 夏邑县| 惠来县| 鹤岗市| 泰顺县| 虎林市| 佳木斯市| 进贤县| 新巴尔虎右旗| 潞西市| 陆川县| 绩溪县| 中阳县| 六盘水市| 重庆市| 瑞安市| 玛曲县| 宿松县| 牟定县| 铁岭市| 灵川县| 图们市| 施甸县| 青川县| 塘沽区| 都江堰市| 鹤岗市| 凤凰县| 高台县| 永和县| 盱眙县| 雅安市| 玛沁县| 西城区| 锦州市| 河南省| 兴业县| 新余市| 南投市| 铜山县| 磐安县|