インフラ系SEの技術メモ

雑なエンジニアが低信頼性のメモを書いています。参考程度にとどめてください。

(ibmcloud)VPCの情報をCLIで取るために

最初にプラグインが必要

$ ibmcloud is --help
FAILED
'is' is not a registered command. See 'C:\Program Files\IBM\Cloud\bin\ibmcloud.exe help'.

あれっと思いましたが以下が必要でした。

$ ibmcloud plugin install vpc-infrastructure
Looking up 'vpc-infrastructure' from repository 'IBM Cloud'...
Plug-in 'vpc-infrastructure/infrastructure-service 1.2.0' found in repository 'IBM Cloud'
Attempting to download the binary file...
 20.07 MiB / 20.07 MiB [===========================================================================================================================================================] 100.00% 5s
21048832 bytes downloaded
Installing binary...
OK

これができればisが通りました。やったね。

$ ibmcloud is --help
NAME:
        C:\Program Files\IBM\Cloud\bin\ibmcloud.exe is - Manage Virtual Private Cloud infrastructure service
USAGE:
        C:\Program Files\IBM\Cloud\bin\ibmcloud.exe is command [arguments...] [command options]

COMMANDS:
    dedicated-host, dh                                          View details of a host
    dedicated-host-create, dhc                                  Create a host
...