1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| # 用户管理iam oci iam compartment list --all # 列出所有的compartment,可以获取到compartment id,下面很多命令都需要的
# 计算资源compute oci compute instance list --compartment-id=ocidxxxxx # 列出所有的实例 oci compute instance get --instance-id=ocid1.xxxxx # 获取实例详情,但是这里不会返回IP,要获取IP还是得用vinc来弄
# 公网IP,public-ip oci network public-ip list --compartment-id=ocidxxxxx --scope=REGION # 列出所有的公网IP oci network public-ip update --public-ip-id=ocid1.publicip.xxxxxxx --private-ip-id= # 将公网IP与私有IP解绑,解绑后服务器内部kennel oci network public-ip update --public-ip-id=ocid1.publicip.xxxxxxx --private-ip-id=ocid1.privateip.xxxxxx # 将公网IP绑定到指定的私有IP oci network public-ip create --compartment-id={COMPARTMENT_ID} --lifetime=RESERVED --display-name=test # 创建新的reversed ip oci network public-ip delete --public-ip-id=ocid1.publicip.xxxxxxx --force # 删除public ip,加了--force参数就不会询问你了
# 私网IP,private-ip来自于VNIC Details里面的Private IP Address oci network private-ip get --private-ip-id=ocid1.privateip.xxxxxxx
# 获取VNIC详情, VNIC的OCID在VPIC Details里面获取,注意不是那个FQDN oci network vnic get --vnic-id=ocid1.vnic.xxxxx
|