EIP 生命周期常用命令(阿里云示例)
EIP 生命周期常用命令(阿里云示例)
aliyun vpc AllocateEipAddress --RegionId cn-hangzhou --Bandwidth 10 --InternetChargeType PayByTraffic
aliyun vpc AssociateEipAddress --RegionId cn-hangzhou --AllocationId eip-xxxxxxxx --InstanceId i-xxxxxxxx
aliyun vpc DescribeEipAddresses --RegionId cn-hangzhou --EipAddress <EIP>
aliyun vpc UnassociateEipAddress --RegionId cn-hangzhou --AllocationId eip-xxxxxxxx
aliyun vpc ReleaseEipAddress --RegionId cn-hangzhou --AllocationId eip-xxxxxxxx| 动作顺序 | 申请 → 绑定 → 调整带宽 → 解绑 → 释放 |
|---|---|
| 安全前置 | 释放前先查询绑定关系,确认无资源引用 |
| 批量化 | 利用标签与列表接口做资产盘点与筛选 |
释放是不可逆操作,脚本里先断言绑定关系再调用释放接口。