EIP Instance

EIP

  • API Reference
    • API function release records
    • API Service Domain Name
    • API Specifications
    • Appendix 1
    • Bandwidth Package Related Interfaces
      • Adjust the bandwidth of the bandwidth package
      • Create bandwidth package
      • Query bandwidth package details
      • Query bandwidth package list information of users
      • Release bandwidth package
      • Update the automatic release time of the bandwidth package
      • Update the name of the bandwidth package
    • DDoS Basic Protection Related Interfaces
      • Modify DDoS basic protection threshold
      • Query DDoS Basic Protection Attack Records
      • Query DDoS basic protection list
    • EIP Related Interfaces
      • Apply for EIP
      • Bind EIP
      • Disable EIP direct
      • EIP bandwidth scaling
      • EIP renewal has been enabled
      • Enable EIP direct
      • Query EIP list in bucket trash
      • Query EIP list
      • Release EIP
      • Release EIPs in the bucket trash
      • Renew EIP
      • Restore EIPs in the bucket trash
      • Selective release of EIP
      • Unbind EIP
      • Unsubscribe prepaid EIP
      • Update EIP Release Protection Switch
    • Error code
    • General Description
    • Inquiry Related
      • Bandwidth package price inquiry
      • EIP Inquiry
      • EIPGROUP Inquiry
      • Shared Traffic Package Inquiry
    • Interface Overview
    • Overview
    • Prerequisites for use
    • Shared Bandwidth Related Interfaces
      • Bandwidth scaling up for EIPGROUP
      • Create EIPGROUP
      • EIPGROUP IP count upgrade
      • EIPGROUP release
      • EIPGROUP renewal
      • EIPGROUP update
      • Migrate EIP from EIPGROUP
      • Migrate EIP into EIPGROUP
      • Query EIPGROUP details
      • Query the EIPGROUP list
      • Unsubscribe prepaid EIPGROUP
    • Shared Traffic Package Related Interfaces
      • Create a shared traffic package
      • Query shared traffic package details
      • Query shared traffic package list
    • TBSP Related Interfaces
      • Add Protection IP Allow List
      • Add Protocol Blocking
      • Add Region Blocking
      • Bind Protection Object
      • Close Protection IP Cleaning
      • Create TBSP
      • Delete Protection IP Allow List
      • Delete Protection Object
      • Delete Protocol Blocking
      • Delete Region Blocking
      • Modify Protection IP Cleaning Threshold
      • Modify Protection IP Protection Level
      • Open Protection IP Cleaning
      • Query Protection IP Allow List
      • Query Protection IP Cleaning Threshold List
      • Query Protocol Blocking List
      • Query Region Blocking List
      • Query TBSP Details
      • Query TBSP List
      • TBSP Capacity dilatation
      • TBSP renew
  • FAQs
    • Billing class
    • Configuration
    • Consultation
    • Security class
  • Function Release Records
  • Operation guide
    • Address pool
    • Bandwidth package
      • Bandwidth scale-up package
      • Cross-border acceleration package
    • Certification
    • DDoS standard protection
    • EIP Instance
      • Create instance
      • EIP Direct Connect
      • IPv6 Termination
      • Manage Alarms
      • Operation Instance
      • Shift Charge
      • View monitoring
    • EIP Self-Service Diagnostics
      • EIP Instance Diagnosis
    • EIPGROUP
      • Bind cloud resources
      • Manage Shared Bandwidth
      • Purchase Shared Bandwidth
      • View monitoring
    • High Defense EIP
    • Identity and access management
    • Recycle bin
    • Shared traffic package
      • Purchase Shared Traffic Package
      • View Shared Traffic Package
    • Tag Management
    • Traffic Burst Service Package
      • Instance management
      • Monitor alarm
      • Protection Configuration
    • Unblocking Center
  • Product Description
    • Application scenarios
    • Product advantages
    • Product Introduction
    • Usage restrictions
  • Product pricing
    • Bandwidth Package Billing
    • EIP Instance Billing
    • EIPGROUP Billing
    • Shared Traffic Package Billing
    • TBSP Billing
  • SDK
    • GO-SDK
      • DDoS Instance
      • EIP Instance
      • EipBp Instance
      • EIPGROUP Instance
      • EipTp Instance
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
    • Java-SDK
      • EIP Instance
      • EipBP Instance
      • EIPGROUP Instance
      • EipTp Instance
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Version history
    • PHP-SDK
      • EIP Instance
      • EipBP Instance
      • EIPGROUP Instance
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Version history
    • Python-SDK
      • EIP Instance
      • EipBP Instance
      • EIPGROUP Instance
      • EipTp Instance
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Version history
  • Service Level Agreement (SLA)
    • EIP Service Level Agreement SLA
    • TBSP Service Level Agreement SLA
  • Typical Practices
    • Bring Your Own Overseas Public IP Address to the Cloud
    • IPv6 Public Network Access
    • Save Public Network Costs
    • TCP Port 25 Restriction Description
All documents
menu
No results found, please re-enter

EIP

  • API Reference
    • API function release records
    • API Service Domain Name
    • API Specifications
    • Appendix 1
    • Bandwidth Package Related Interfaces
      • Adjust the bandwidth of the bandwidth package
      • Create bandwidth package
      • Query bandwidth package details
      • Query bandwidth package list information of users
      • Release bandwidth package
      • Update the automatic release time of the bandwidth package
      • Update the name of the bandwidth package
    • DDoS Basic Protection Related Interfaces
      • Modify DDoS basic protection threshold
      • Query DDoS Basic Protection Attack Records
      • Query DDoS basic protection list
    • EIP Related Interfaces
      • Apply for EIP
      • Bind EIP
      • Disable EIP direct
      • EIP bandwidth scaling
      • EIP renewal has been enabled
      • Enable EIP direct
      • Query EIP list in bucket trash
      • Query EIP list
      • Release EIP
      • Release EIPs in the bucket trash
      • Renew EIP
      • Restore EIPs in the bucket trash
      • Selective release of EIP
      • Unbind EIP
      • Unsubscribe prepaid EIP
      • Update EIP Release Protection Switch
    • Error code
    • General Description
    • Inquiry Related
      • Bandwidth package price inquiry
      • EIP Inquiry
      • EIPGROUP Inquiry
      • Shared Traffic Package Inquiry
    • Interface Overview
    • Overview
    • Prerequisites for use
    • Shared Bandwidth Related Interfaces
      • Bandwidth scaling up for EIPGROUP
      • Create EIPGROUP
      • EIPGROUP IP count upgrade
      • EIPGROUP release
      • EIPGROUP renewal
      • EIPGROUP update
      • Migrate EIP from EIPGROUP
      • Migrate EIP into EIPGROUP
      • Query EIPGROUP details
      • Query the EIPGROUP list
      • Unsubscribe prepaid EIPGROUP
    • Shared Traffic Package Related Interfaces
      • Create a shared traffic package
      • Query shared traffic package details
      • Query shared traffic package list
    • TBSP Related Interfaces
      • Add Protection IP Allow List
      • Add Protocol Blocking
      • Add Region Blocking
      • Bind Protection Object
      • Close Protection IP Cleaning
      • Create TBSP
      • Delete Protection IP Allow List
      • Delete Protection Object
      • Delete Protocol Blocking
      • Delete Region Blocking
      • Modify Protection IP Cleaning Threshold
      • Modify Protection IP Protection Level
      • Open Protection IP Cleaning
      • Query Protection IP Allow List
      • Query Protection IP Cleaning Threshold List
      • Query Protocol Blocking List
      • Query Region Blocking List
      • Query TBSP Details
      • Query TBSP List
      • TBSP Capacity dilatation
      • TBSP renew
  • FAQs
    • Billing class
    • Configuration
    • Consultation
    • Security class
  • Function Release Records
  • Operation guide
    • Address pool
    • Bandwidth package
      • Bandwidth scale-up package
      • Cross-border acceleration package
    • Certification
    • DDoS standard protection
    • EIP Instance
      • Create instance
      • EIP Direct Connect
      • IPv6 Termination
      • Manage Alarms
      • Operation Instance
      • Shift Charge
      • View monitoring
    • EIP Self-Service Diagnostics
      • EIP Instance Diagnosis
    • EIPGROUP
      • Bind cloud resources
      • Manage Shared Bandwidth
      • Purchase Shared Bandwidth
      • View monitoring
    • High Defense EIP
    • Identity and access management
    • Recycle bin
    • Shared traffic package
      • Purchase Shared Traffic Package
      • View Shared Traffic Package
    • Tag Management
    • Traffic Burst Service Package
      • Instance management
      • Monitor alarm
      • Protection Configuration
    • Unblocking Center
  • Product Description
    • Application scenarios
    • Product advantages
    • Product Introduction
    • Usage restrictions
  • Product pricing
    • Bandwidth Package Billing
    • EIP Instance Billing
    • EIPGROUP Billing
    • Shared Traffic Package Billing
    • TBSP Billing
  • SDK
    • GO-SDK
      • DDoS Instance
      • EIP Instance
      • EipBp Instance
      • EIPGROUP Instance
      • EipTp Instance
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
    • Java-SDK
      • EIP Instance
      • EipBP Instance
      • EIPGROUP Instance
      • EipTp Instance
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Version history
    • PHP-SDK
      • EIP Instance
      • EipBP Instance
      • EIPGROUP Instance
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Version history
    • Python-SDK
      • EIP Instance
      • EipBP Instance
      • EIPGROUP Instance
      • EipTp Instance
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Version history
  • Service Level Agreement (SLA)
    • EIP Service Level Agreement SLA
    • TBSP Service Level Agreement SLA
  • Typical Practices
    • Bring Your Own Overseas Public IP Address to the Cloud
    • IPv6 Public Network Access
    • Save Public Network Costs
    • TCP Port 25 Restriction Description
  • Document center
  • arrow
  • EIP
  • arrow
  • SDK
  • arrow
  • Python-SDK
  • arrow
  • EIP Instance
Table of contents on this page
  • Create EIP
  • EIP bandwidth scaling
  • Bind EIP
  • Unbind EIP
  • Release EIP
  • Query EIP list
  • Renew EIP
  • EIP auto-renewal has been enabled
  • Disable EIP auto-renewal
  • Enable EIP direct
  • Disable EIP direct
  • Query EIP list in bucket trash
  • Selective release of EIP
  • Release EIPs in the bucket trash
  • Restore EIPs in the bucket trash

EIP Instance

Updated at:2025-10-16

Create EIP

  • Apply for an EIP, which can be bound to any BCC or BLB instances.
  • Certification is required for creating EIP. 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

Python
1def create_eip(self, bandwidth_in_mbps, name=None, billing=None,
2               client_token=None, config=None):

Parameter Meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Wjwvz30fv

Response Value

Operation succeeded:

JSON
1{
2    "eip":"180.181.3.133"
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.py

EIP bandwidth scaling

  • Used for scaling the bandwidth of a specified EIP
  • Check the EIP scaling status by querying the EIP list

Function declaration

Python
1def resize_eip(self, eip, new_bandwidth_in_mbps, client_token=None,
2                   config=None):

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Hjwvz325u

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.py

Bind EIP

  • Bind EIP to an instance, such as BCC, BLB, and BBC
  • Binding is supported only for available EIP
  • The bound instance must not have any existing EIP binding relationships
  • The bound instance cannot be in debt status

Function declaration

Python
1def bind_eip(self, eip, instance_type, instance_id, client_token=None,
2                 config=None):

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/9jwvz31gn

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, refer to example_bind_eip.py

Unbind EIP

  • Unbind a specified EIP
  • The unbound EIP must have been bound to any instance

Function declaration

Python
1def unbind_eip(self, eip, client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Djwvz314s

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, refer to example_unbind_eip.py

Release EIP

  • The release of a specified EIP cannot be recovered once it is released
  • If an EIP is bound to any instance, it must be unbound before release

Function declaration

Python
1def release_eip(self, eip, client_token=None, config=None):

Parameter Meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Rjwvz32ig

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_release_eip.py

Query EIP list

  • The EIP list can be filtered using various criteria.
  • To view details of a specific EIP, only the eip parameter is needed.
  • To see EIPs linked to a particular instance type, only the instanceType parameter is required.
  • To view details of EIPs tied to a specific instance, you need to provide both the instanceType and instanceId parameters.
  • If no specific criteria are specified, all EIPs will be listed by default.
  • The returned results are based on the overlap of multiple conditions, meaning that if multiple conditions are set, the query will return only the EIPs that meet all conditions.
  • 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

Python
1def list_eips(self, eip=None, instance_type=None, instance_id=None, status=None,
2              marker=None,  max_keys=1000, config=None):

Parameter Meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Pjwvz30qy

Response value

Operation succeeded:

JSON
1{
2    "eipList": [
3        {
4            "name":"eip-xxxxxxx-1",
5            "eip": "x.x.x.x",
6            "status":"binded",
7            "instanceType": "BCC",
8            "instanceId": "i-xxxxxxx",
9            "bandwidthInMbps": 5,
10            "paymentTiming":"Prepaid",
11            "billingMethod":"ByBandwidth",
12            "createTime":"2023-10-08T08:13:09Z",
13            "expireTime":"2023-12-08T08:13:09Z"
14        },
15        {
16            "name":"eip-xxxxxxx-1",
17            "eip": "x.x.x.x",
18            "status":"binded",
19            "instanceType": "BCC",
20            "instanceId": "i-xxxxxxx",
21            "bandwidthInMbps": 1,
22            "paymentTiming":"Postpaid",
23            "billingMethod":"ByTraffic",
24            "createTime":"2023-09-08T08:13:09Z",
25            "expireTime":null
26        },
27    ],
28    "marker":"eip-xxxxxxx-1",
29    "isTruncated": true,
30    "nextMarker": "eip-DCB50387",
31    "maxKeys": 2
32}

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_eips.py

Renew EIP

  • Renewal operation for specified EIP; extend the expiration period.
  • EIP scaling prevents renewal operations from being executed.

Function declaration

Python
1def purchase_reserved_eip(self, eip, billing=None, client_token=None,
2                              config=None):

Parameter Meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Yjwvz31ty

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.py

EIP auto-renewal has been enabled

  • The EIP charge type is prepay
  • The EIP is not been assigned with shift charge tasks
  • The EIP has not been enabled with auto-renewal function

Function declaration

Python
1def start_auto_renew_eip(self, eip, auto_renew_time_unit=None, auto_renew_time=None,
2                             client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Sk9gykbek

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_start_auto_renew.py

Disable EIP auto-renewal

  • Require EIP to have enabled auto-renewal

Function declaration

Python
1def stop_auto_renew_eip(self, eip, client_token=None, config=None):

Parameter Meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Sk9gykbek

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_stop_auto_renew.py

Enable EIP direct

  • The EIP must have been bound to a BCC, DCC, ENI or BLB instance.
Python
1def direct_eip(self, eip, client_token=None, config=None):

Parameter Meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/aknohnbq1

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_direct_eip.py

Disable EIP direct

  • The EIP direct must have been enabled
Python
1def undirect_eip(self, eip, client_token=None, config=None):

Parameter Meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Pknohwcdb

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_undirect_eip.py

Query EIP list in bucket trash

  • Retrieve details about EIP within the bucket trash of the user account.
  • Allow queries by EIP address or name, supporting fuzzy search for both methods.
  • If no specific criteria are specified, all EIPs will be listed by default.
  • The results returned reflect the intersection of multiple conditions, meaning EIPs meeting all provided criteria are shown.
  • Results support marker-based pagination, with a default page size of 1,000, adjustable via the maxKeys parameter.

Function declaration

Python
1def list_eip_recycle(self, eip=None, name=None, marker=None, max_keys=1000, config=None):

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/dl0anm1j8

Response value

Operation succeeded:

JSON
1{
2    "eipList": [
3        {
4            "name":"eip-xxxxxxx-1",
5            "eip": "x.x.x.x",
6            "eip_id":"ip-xxxxxxxx",
7            "status": "paused",
8            "route_type": "BGP",
9            "bandwidth_in_mbps": 5,
10            "payment_timing":"Prepaid",
11            "billing_method":"ByBandwidth",
12            "recycle_time":"2023-07-08T08:13:09Z",
13            "scheduled_delete_time":"2023-08-08T08:13:09Z"
14        },
15        {
16            "name":"eip-xxxxxxx-2",
17            "eip": "x.x.x.x",
18            "eip_id":"ip-xxxxxxxx",
19            "status": "paused",
20            "route_type": "BGP",
21            "bandwidth_in_mbps": 10,
22            "payment_timing":"Postpaid",
23            "billing_method":"ByBandwidth",
24            "recycle_time":"2023-06-08T08:13:09Z",
25            "scheduled_delete_time":"2023-07-08T08:13:09Z"
26        },
27    ],
28    "marker":"ip-xxxxxxxx",
29    "is_truncated": true,
30    "max_keys": 1000
31}

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_recycle_eip.py

Selective release of EIP

  • Choose to either directly release the specified EIP or move it to the bucket trash. The default option is direct release.
  • EIP instances with expired prepay, postpay-by-traffic, or postpay-by-bandwidth statuses can either be moved to the bucket trash or directly released.
  • Once a specified EIP is released, it cannot be recovered.
  • EIP instances in the bucket trash are retained for 7 days. After this period, they are automatically released and irreversible. During the 7 days, you can manually choose to restore or delete a specific EIP.
  • If an EIP instance is bound to another instance, it must first be unbound before it can be released directly.
  • When an EIP instance enters the bucket trash, all binding relationships are forcibly removed and need to be reconfigured if restored.
  • EIPs in the bucket trash are subject to a quota of 10 per region, retained in reverse chronological order by default. If the number of EIPs in the bucket trash reaches 10, new entries will displace the oldest ones.
  • If the EIP instance in postpay mode incurs debt, the system will automatically release it, regardless of the selected option.

Function declaration

Python
1def optional_delete_eip(self, eip, release_to_recycle=False, client_token=None, config=None):

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/zl0anqxgo

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_optional_delete_eip.py

Release EIPs in the bucket trash

  • Release specified EIPs in the bucket trash.

Function declaration

Python
1def delete_recycle_eip(self, eip, client_token=None, config=None):

Parameter Meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/sl0anla1w

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_recycle_eip.py

Restore EIPs in the bucket trash

  • Restore billing for the specified EIP in the bucket trash
  • If the EIP payment type is prepay, billing will be resumed through renewal, with a renewal duration of 1 month
  • If the EIP payment type is postpayment, the original charge type will be restored

Function declaration

Python
1def restore_recycle_eip(self, eip, client_token=None, config=None):

Parameter Meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/EIP/s/Gl0anfp4g

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_restore_recycle_eip.py

Previous
PHP-SDK
Next
EipBP Instance