EIPGROUP Instance
EIPGROUG instance is an EIPGROUP created on Baidu AI Cloud. Certification is required for creating an EIPGROUP. Uncertified users can complete certification under Security Certification in the Baidu Open Cloud Official Website Console. Currently, only prepaid EIPGROUP creation is supported
Create EIPGROUP
- Create an EIPGROUP
- Certification is required for creating EIPGROUP. Those who have not passed certification can go to the certification under security certification in the Baidu Open Cloud Official Website Console for certification.
Function declaration
1def create_eip_group(self, eip_count, bandwidth_in_mbps, name=None, client_token=None,
2 billing=None, config=None):
Parameter Meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/ijwvz2zq8
Response Value
Operation succeeded:
1{
2 "id":"eg-xxxxxxxx"
3}
Operation failed:
Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/EIP/s/Fk09snej9
Code example
For specific code examples, please refer to example_create_eip_group.py
Bandwidth scaling up for EIPGROUP
- Bandwidth scale-up for the specified EIPGROUP
Function declaration
1def resize_eip_group_bandwidth(self, id, bandwidth_in_mbps, client_token=None,
2 config=None):
Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Wjwvz2zeb
Response value
Operation succeeded:
There are no special response parameters
Operation failed:
Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/EIP/s/Fk09snej9
Code example
For specific code examples, please refer to example_resize_eip_group_bandwidth.py
Perform scaling up of the EIP count in EIPGROUP
- Used to specify EIPGROUP IP count upgrade
Function declaration
1def resize_eip_group_count(self, id, eip_add_count, client_token=None,
2 config=None):
Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/qjwvz2yol
Response value
Operation succeeded:
There are no special response parameters
Operation failed:
Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/EIP/s/Fk09snej9
Code example
For specific code examples, please refer to example_resize_eip_group_count.py
EIPGROUP update
- EIPGROUP update (currently supporting name modification)
Function declaration
1def update_eip_group(self, id, name, client_token=None, config=None):
Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Sjwvz2xo5
Response Value
Operation succeeded:
There are no special response parameters
Operation failed:
Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/EIP/s/Fk09snej9
Code example
For specific code examples, please refer to example_update_eip_group.py
Query the EIPGROUP list
- Retrieve the EIPGROUP list based on multiple criteria.
- If no specific query criteria are defined, all EIPGROUPs will be queried by default.
- Results are based on the intersection of criteria, meaning when multiple conditions are specified, only EIPGROUPs meeting all conditions are returned.
- The query results support marker-based pagination, with a default page size of 1,000. You can adjust this by setting the maxKeys parameter.
Function declaration
1def list_eip_groups(self, id=None, name=None, status=None, marker=None,
2 max_keys=None, config=None):
Parameter Meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Ujwvz2yd6
Response value
Operation succeeded:
1{
2 "eipgroups": [
3 {
4 id:"eg-xxxxxxxx",
5 name:"test",
6 eips:[
7 {
8 name:"EIPxxxxxxxxxxxxx",
9 eip:"x.x.x.x",
10 eip_id:"ip-xxxxxxxx",
11 status:"available",
12 instance_type:None,
13 instance_id:None,
14 route_type:"BGP",
15 bw_bandwidth_in_mbps:0,
16 domestic_bw_bandwidth_in_mbps:0,
17 bandwidth_in_mbps:20,
18 payment_timing:None,
19 billing_method:None,
20 create_time:"2023-08-29T09:53:48Z",
21 expire_time:None,
22 share_group_id:"eg-xxxxxxxx",
23 eip_instance_type:u"shared",
24 tags:None,
25 region:"bj",
26 pool_type:"public"
27 }
28 ],
29 bandwidth_in_mbps:20,
30 status:"available",
31 route_type:"BGP",
32 tags:None,
33 region:"bj",
34 bw_bandwidth_in_mbps:0,
35 domestic_bw_bandwidth_in_mbps:0,
36 payment_timing:"Postpaid",
37 billing_method:"ByBandwidth",
38 create_time:"2023-08-29T09:53:48Z",
39 expire_time:None
40 }
41 ]
42}
Operation failed:
Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/EIP/s/Fk09snej9
Code example
For specific code examples, please refer to example_list_eip_groups.py
Query EIPGROUP details
- Query EIPGROUP details
Function declaration
1def get_eip_group(self, id, config=None):
Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Zjwvz2xzs
Response value
Operation succeeded:
1{
2 "id": "eg-xxxxxxxx",
3 "name": "test-eipgroup",
4 "eips":[
5 {
6 name:u"EIP1693302827987",
7 eip:u"100.88.0.217",
8 eip_id:u"ip-d9c57824",
9 status:u"available",
10 instance_type:None,
11 instance_id:None,
12 route_type:u"BGP",
13 bw_bandwidth_in_mbps:0,
14 domestic_bw_bandwidth_in_mbps:0,
15 bandwidth_in_mbps:20,
16 payment_timing:None,
17 billing_method:None,
18 create_time:u"2023-08-29T09:53:48Z",
19 expire_time:None,
20 share_group_id:u"eg-e9cc0d33",
21 eip_instance_type:u"shared",
22 tags:None,region:u"bj",
23 pool_type:u"public"}
24 ],
25 bandwidth_in_mbps:20,
26 status:u"available",
27 route_type:u"BGP",
28 tags:None,
29 region:"bj",
30 bw_bandwidth_in_mbps:0,
31 domestic_bw_bandwidth_in_mbps:0,
32 payment_timing:"Postpaid",
33 billing_method:"ByBandwidth",
34 create_time:"2023-08-29T09:53:48Z",
35 expire_time:None
36}
Operation failed:
Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/EIP/s/Fk09snej9
Code example
For specific code examples, please refer to example_get_eip_group.py
EIPGROUP renewal
- Renew operation for the specified EIPGROUP to extend the expiration period
- Scaling operations for EIPGROUP prevent renewal actions from being performed.
Function declaration
1def purchase_reserved_eip_group(self, id, client_token=None, billing=None,
2 config=None):
Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/ljwvz2z0r
Response value
Operation succeeded:
There are no special response parameters
Operation failed:
Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/EIP/s/Fk09snej9
Code example
For specific code examples, please refer to example_purchase_reserved_eip_group.py
EIPGROUP release
- Release the specified EIPGROUP
- Supporting postpayment only
Function declaration
1def delete_eip_group(self, id, client_token=None, config=None):
Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/ukghouoci
Response Value
Operation succeeded:
There are no special response parameters
Operation failed:
Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/EIP/s/Fk09snej9
Code example
For specific code examples, please refer to example_delete_eip_group.py
Migrate EIP into EIPGROUP
- Only postpaid EIPs can be migrated
- The EIPs to be migrated must be of the same Internet connection type as the EIPGROUP
- The EIP being migrated in cannot be bound to a bandwidth package or cross-border acceleration package
- The EIPGROUP count after migration must comply with EIPGROUP quota requirements
Function declaration
1def def eip_group_move_in_eip(self, id, eips, client_token=None, config=None):
Parameter Meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/ukoslf7lm
Response Value
Operation succeeded:
There are no special response parameters
Operation failed:
Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/EIP/s/Fk09snej9
Code example
For specific code examples, please refer to example_eip_group_move_in.py
Migrate EIP from EIPGROUP
- The charge type of the EIPGROUP being moved out must be postpay
- EIPGROUP being removed must not contain any pending orders
- The removed EIP only supports the postpayment
- If the removed EIP is a native EIPGROUP EIP, the bandwidth and billing information of the EIP after removal must be specified
- If the removed EIP was previously a non-native EIP added to EIPGROUP, it is not necessary to specify the bandwidth and billing information after removal. The EIP will revert to its original bandwidth and charge type before being added
Function declaration
1def eip_group_move_out_eip(self, id, move_out_args, client_token=None, config=None):
Parameter meaning
Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Qkoslycn3
Response value
Operation succeeded:
There are no special response parameters
Operation failed:
Throw an exception. For the exception list, refer to https://cloud.baidu.com/doc/EIP/s/Fk09snej9
Code example
For specific code examples, please refer to example_eip_group_move_out.py
