概要
- cf target, cf orgs, cf spaces コマンドで org や space を切り替える
space (スペース) を切り替える
cf spaces コマンドで org 内の space 一覧を表示。
$ cf spaces
user@example.com として組織 first-org 内のスペースを取得しています...
名前
foo-space
bar-space
cf target -s で使用する space に切り替えることができる。
$ cf target -s bar-space
API エンドポイント https://api.example.com
API バージョン: 2.55.0
ユーザー: user@.example.com
組織: first-org
スペース: bar-space
org (組織) を切り替える
cf orgs コマンドで利用可能な org 一覧を表示。
$ cf orgs
user@example.com として組織を取得しています...
名前
first-org
second-org
cf target -o で使用する org に切り替えることができる。
$ cf target -o second-org
API エンドポイント https://api.example.com
API バージョン: 2.55.0
ユーザー: user@example.com
組織: second-org
スペースがターゲットになっていません、'cf target -s SPACE' を使用してください
org と space を同時に指定することも可能。
$ cf target -o second-org -s bar-space
API エンドポイント https://api.example.com
API バージョン: 2.55.0
ユーザー: user@example.com
組織: second-org
スペース: bar-space
参考資料 (cf target コマンドのリファレンスガイド)
target - Cloud Foundry CLI Reference Guide
名前
target - ターゲットにされた組織またはスペースを設定または表示します使用法
cf target [-o ORG] [-s SPACE]