EIPGroup实例
更新时间:2020-07-21
EIPGroup实例是百度智能云上的创建一个EIP共享带宽。 创建EIP共享带宽需要实名认证,若未通过实名认证可以前往百度开放云官网控制台中的安全认证下的实名认证中进行认证,目前仅支持预付费EIP共享带宽的创建
创建实例
使用以下代码可以创建EIPGroup实例
def test_create_eip_group(eip_group_client, eip_count, bandwidth_in_mbps, billing):
response = eip_group_client.create_eip_group(eip_count, bandwidth_in_mbps,
name, billing=billing)
print response
EIP共享带宽的带宽扩容
指定EIP共享带宽的带宽扩容
def test_resize_eip_group_bandwidth(eip_group_client, id, bandwidth_in_mbps):
response = eip_group_client.resize_eip_group_bandwidth(id, bandwidth_in_mbps)
print response
EIP共享带宽EIP数量扩容
用于指定EIP共享带宽EIP数量扩容
def test_resize_eip_group_count(eip_group_client, id, eip_add_count):
response = eip_group_client.resize_eip_group_count(id, eip_add_count)
print response
EIP共享带宽更新
EIP共享带宽更新
def test_update_eip_group(eip_group_client, id, name):
response = eip_group_client.update_eip_group(id, name)
print response
查询EIP共享带宽列表
- 可根据多重条件查询EIP共享带宽列表。
- 若不提供查询条件,则默认查询覆盖所有EIP。
- 返回结果为多重条件交集的查询结果,即提供多重条件的情况下,返回同时满足所有条件的EIP共享带宽。
- 以上查询结果支持marker分页,分页大小默认为1000,可通过maxKeys参数指定。
def test_list_eip_groups(eip_group_client, id, name, status, marker, max_keys):
response = eip_group_client.list_eip_groups(id, name, status, marker, max_keys)
print response
查询EIP共享带宽详情
查询EIP共享带宽详情。
def test_get_eip_group(eip_group_client, id):
response = eip_group_client.get_eip_group(id)
print response
EIP共享带宽续费
- 针对指定EIP共享带宽的续费操作,延长过期时长
- EIP共享带宽扩缩容期间不能进行续费操作。
def test_purchase_reserved_eip_group(eip_group_client, id, billing):
response = eip_group_client.purchase_reserved_eip_group(id, billing=billing)
print response