Service Endpoint とは
IBM Cloud の各サービスをプライベートネットワーク経由で利用するための新しい機能です。
https://cloud.ibm.com/docs/services/service-endpoint
ibmcloud コマンドを使う
事前準備
IBM Cloud CLI をインストールします。
有効化されている場合
「Service Endpoint Enabled」が「true」になっています。
$ ibmcloud account show
Retrieving account xxx of xxxxx@example.com...
OK
Account Name: xxx
Account ID: xxxxxxxxxxxx
Account Owner: xxxxxxx@example.com
Account Type: PAYG
Account Status: ACTIVE
Linked Softlayer Account: xxxxxxx
VRF Enabled: true
Service Endpoint Enabled: true
EU Supported false
PoC (Commercial Proof of Concept) false
HIPPA Supported false
有効化されていない場合
「Service Endpoint Enabled」が「false」になっています。
$ ibmcloud account show
Retrieving account xxx of xxxxx@example.com...
OK
Account Name: xxx
Account ID: xxxxxxxxxxxx
Account Owner: xxxxxxx@example.com
Account Type: PAYG
Account Status: ACTIVE
Linked Softlayer Account: xxxxxxx
VRF Enabled: false
Service Endpoint Enabled: false
EU Supported false
PoC (Commercial Proof of Concept) false
HIPPA Supported false
slcli コマンドを使う
事前準備
「slcli」のインストール・アップデート
「slcli」コマンドを使います。必要に応じて、インストール・最新化してください。
Installation — SoftLayer API Python Client latest documentation
IaaS API key の発行・取得
https://cloud.ibm.com/iam#/users から自分のユーザーをクリックします。
スクロールした先、下段の「API keys」から IaaS API key を発行します。
IaaS API key の発行に成功しました。
発行できた IaaS API key の詳細を表示します。
「API user name」と「API key」をメモに保存しておきます。
「slcli」のセットアップ
まずバージョンを確認します。
$ slcli --version
slcli (SoftLayer Command-line), version 5.7.1
先ほど取得した「API user name」と「API key」を使って、セットアップします。
ターゲットとなるアカウントの情報が出てきたかを確認してください。
以上で、完了です。
$ slcli setup
Username [xxxxx]: xxxxx@example.com
API Key or Password [xxxxx]:
Endpoint (public|private|custom) [https://api.softlayer.com/xmlrpc/v3.1]:
Timeout [0]:
:..............:..................................................................:
: name : value :
:..............:..................................................................:
: Username : xxxxx@example.com :
: API Key : xxxxx :
: Endpoint URL : https://api.softlayer.com/xmlrpc/v3.1 :
: Timeout : not set :
:..............:..................................................................:
Are you sure you want to write settings to "/Users/khayama/.softlayer"? [Y/n]: y
Configuration Updated Successfully
有効化されている場合
以下のコマンドを打つと「True」が返ってきます。
$ slcli call-api SoftLayer_Network isConnectedToPrivateEndpointService
True
有効化されていない場合
以下のコマンドを打つと「False」が返ってきます。
$ slcli call-api SoftLayer_Network isConnectedToPrivateEndpointService
False
アカウントが対応していない場合
以下のコマンドを打つとエラーが返ってきます。
$ slcli call-api SoftLayer_Network isConnectedToPrivateEndpointService
SoftLayerAPIError(SoftLayer_Exception_NotReady): User account cannot connect/disconnect to/from Private Endpoint Service
参考
isConnectedToPrivateEndpointService - https://sldn.softlayer.com/