Elastic network interface

VPC VPC

  • API Reference
    • ACL-Related Interfaces
      • Add ACL rule
      • Delete ACL rules
      • Query ACL rules
      • Query ACL
      • Update ACL rules
    • API function release records
    • API Overview
    • Appendix
    • Common Headers and Error Responses
    • Dedicated Gateway-Related Interfaces
      • Bind physical dedicated line
      • Create dedicated gateway
      • Create health check for dedicated gateway
      • Query dedicated gateway details
      • Query dedicated gateway list
      • Release dedicated gateway
      • Unbind physical dedicated line
      • Update dedicated gateway
    • Elastic Network Interface-Related Interfaces
      • Add intranet IP to elastic network interface in batches
      • Add Secondary IP Address of Elastic Network Interface
      • Create elastic network interface
      • Delete elastic network interface
      • Delete Intranet IP from elastic network interface in batches
      • Delete Secondary IP Address of Elastic Network Interface
      • Elastic network interface binds to EIP
      • Elastic Network Interface Mounts Cloud Product Instance
      • Elastic network interface unbinds from EIP
      • Elastic Network Interface Unmounts Cloud Product Instance
      • Query elastic network interface list
      • Query elastic network interface status
      • Query the specified elastic network interface
      • Update elastic network interface with enterprise security group
      • Update elastic network interface with regular security group
      • Update elastic network interface
    • Gateway Bandwidth Limiting Rule Related Interfaces
      • Create gateway bandwidth limiting rules
      • Delete Gateway Bandwidth Limiting Rule
      • Modify Gateway Bandwidth Limiting Rule
      • View Gateway Bandwidth Limiting Rule
    • General Description
    • High-Availability Virtual IP Address(HAVIP) Related Interfaces
      • Bind EIP to high-availability virtual IP address
      • Bind instance to high-availability virtual IP address
      • Create high-availability virtual IP address
      • Delete high-availability virtual IP address
      • Query high-availability virtual IP address list
      • Query the specified high-availability virtual IP address
      • Unbind EIP from high-availability virtual IP address
      • Unbind instance from high-availability virtual IP address
      • Update high-availability virtual IP address
    • Interface Overview
    • IPv6 Gateway-Related Interfaces
      • Add IPv6 egress-only policy
      • Bandwidth resizing for IPv6 gateway
      • Create IPv6 gateway bandwidth limiting policy
      • Create IPv6 gateway
      • Delete IPv6 gateway bandwidth limiting policy
      • Delete IPv6 Gateway
      • Delete the IPv6 egress-only policy
      • Query IPv6 gateway bandwidth limiting policy list
      • Query IPv6 gateway
      • Query the IPv6 egress-only policy list
      • Update IPv6 gateway bandwidth limiting policy
      • Update the IPv6 gateway release protection switch
    • NAT Gateway-Related Interfaces
      • Bind DNAT EIP to the NAT gateway
      • Bind SNAT EIP to the NAT gateway
      • Create DNAT rules in batches
      • Create DNAT rules
      • Create NAT gateway
      • Create SNAT rules in batches
      • Create SNAT rules
      • Delete DNAT rules
      • Delete SNAT rules
      • NAT Gateway Binds EIP
      • NAT gateway renewal
      • NAT Gateway Resize
      • NAT Gateway Unbinds EIP
      • Query DNAT rules
      • Query NAT gateway details
      • Query NAT gateway list
      • Query SNAT rules
      • Release NAT gateway
      • Unbind DNAT EIP from the NAT gateway
      • Unbind SNAT EIP from the NAT gateway
      • Update DNAT rules
      • Update NAT Delete Protection Switch
      • Update NAT gateway name
      • Update SNAT rules
    • Network Detection Related Interfaces
      • Create Network Probe
      • Delete network probe
      • Query network probe details
      • Query network probe list.
      • Update probe
    • Parameter Template-Related Interfaces
      • Add IP addresses to the IP address family
      • Add IP addresses to the IP address group
      • Create IP address family
      • Create IP address set
      • Delete IP address family
      • Delete IP address from IP address group
      • Delete IP address set
      • Query IP address family list
      • Query IP address group list
      • Query specified IP address family
      • Query specified IP address group
      • Remove IP address group from IP address family
      • Update IP address family
      • Update IP address set
    • Peering Connections-Related Interfaces
      • Application to process the peering connection
      • Bandwidth resizing for peering connections
      • Create peering connections
      • Disable DNS synchronization for the peering connections.
      • Enable DNS synchronization for the peering connections
      • List of peering connections to be queried.
      • Peering connection renewal
      • Release peering connections
      • Update the local API name and remarks for peering connections
      • Update the peering connection release protection switch
      • View details of peering connection
    • Route Table Related Interfaces
      • Create route rules
      • Delete route rules
      • Primary-standby switch
      • Query route table
      • Query routing rules
      • Update route rules
    • Security Group Related Interfaces
      • Enterprise security group
        • Authorize enterprise security group rules
        • Create enterprise security group
        • Delete enterprise security group rules
        • Delete enterprise security group
        • Query enterprise security group list
        • Update enterprise security group rules
      • Regular security group
        • Authorize regular security group rules
        • Create regular security group
        • Delete regular security group rules
        • Delete regular security group
        • Query regular security group list
        • Revoke regular security group rules
        • Update regular security group rules
        • View security group details
    • Service domain
    • Service Network Interface Card (SNIC)-Related Interfaces
      • Create service network interface card
      • Delete service network interface card
      • Query mountable public services
      • Query service network interface card details
      • Query service network interface card list
      • Update regular security group for service network interface card
      • Update service network interface card with enterprise security group
      • Update the service network interface card
    • Subnet-Related Interfaces
      • Create reserved network segment
      • Create subnet
      • Delete reserved network segment
      • Delete subnet
      • Query specified subnet
      • Query subnet list
      • Query the reserved network segment list
      • Update subnet
    • VPC-Related Interfaces
      • Create VPC
      • Delete VPC
      • Open VPC relay
      • Query IP Usage by Products in VPC
      • Query specified VPC
      • Query VPC intranet IP
      • Query VPC list
      • Shut down VPC relay
      • Update VPC
    • VPN-Related Interfaces
      • Bind EIP
      • Create SSL VPN server
      • Create SSL VPN users in batches
      • Create VPN tunnel
      • Create VPN
      • Delete SSL VPN server
      • Delete SSL VPN user
      • Delete VPN tunnel
      • Query SSL-VPN server
      • Query SSL-VPN user
      • Query VPN details
      • Query VPN List
      • Query VPN tunnels
      • Release VPN
      • Unbind EIP
      • Update SSL VPN server
      • Update SSL VPN user
      • Update VPN release protection switch
      • Update VPN tunnel
      • Update VPN
      • VPN gateway renewal
    • High-Availability Virtual IP Address (HAVIP) Related Interfaces
      • Bind EIP to high-availability virtual IP address
      • Bind instance to high-availability virtual IP address
      • Create high-availability virtual IP address
      • Delete high-availability virtual IP address
      • Query high-availability virtual IP address list
      • Query the specified high-availability virtual IP address
      • Unbind EIP from high-availability virtual IP address
      • Unbind instance from high-availability virtual IP address
      • Update high-availability virtual IP address
  • FAQs
    • Common Questions Overview
    • NAT FAQs
    • Route Table FAQs
    • Service Network Interface Card(SNIC) Common Questions
    • VPC FAQs
    • VPN FAQs
    • Service Network Interface Card (SNIC) Common Questions
  • Function Release Records
  • Operation guide
    • Access control
      • ACL
      • Parameter Template
      • Security group
    • Identity and access management
    • Monitor and Operations
      • NAT Gateway Instance Diagnosis
    • Network Connection
      • Dedicated gateway
      • IPv6 gateway
      • Layer 2 Gateway
      • NAT Gateway
        • Private Network NAT(Network Address Translation) Gateway
        • Public Network NAT(Network Address Translation) Gateway
        • Private Network NAT (Network Address Translation) Gateway
        • Public Network NAT (Network Address Translation) Gateway
      • Peering Connections
      • VPN Gateway
        • GRE VPN Gateway
        • IPsec VPN Gateway
        • SSL VPN Gateway
    • Network Diagnostics
      • Flow log
      • Gateway bandwidth limiting
      • Network probe
      • Path analysis
      • Port verification
      • Traffic monitor
    • Network interface card
      • Elastic network interface
      • High-availability virtual IP address (HAVIP)
      • Service network interface card
    • Network topology
    • Route table
    • Subnet
    • Tag Management
    • Using IPv6
    • VPC
  • Product Description
    • Application scenarios
    • Product advantages
    • Product features
    • Product Introduction
    • Related concepts
    • Usage restrictions
  • Product pricing
  • SDK
    • Go-SDK
      • ACL
      • Dedicated gateway
      • Elastic network interface
      • Exception handling
      • High-availability virtual IP address (HAVIP)
      • Initialization
      • Install the SDK Package
      • IPv6Gateway
      • NAT
      • Network probe
      • Overview
      • Peering Connections
      • Route
      • Security group
        • Enterprise security group
        • Regular security group
      • Service network interface card
      • Subnet
      • VPC
      • VPN
    • Java-SDK
      • ACL
      • Dedicated gateway
      • Elastic network interface
      • Enterprise security group
      • High-availability virtual IP address (HAVIP)
      • Install the SDK Package
      • IPv6 gateway
      • NAT
      • Network probe
      • Overview
      • Parameter Template
      • Peering Connections
      • Regular security group
      • Route
      • Service network interface card
      • Subnet
      • Version history
      • vpc
      • VPN
    • PHP-SDK
      • ACL
      • Install the SDK Package
      • NAT
      • Overview
      • Peering Connections
      • Route
      • Security group
      • Subnet
      • Version history
      • vpc
    • Python-SDK
      • ACL
      • Dedicated gateway
      • Elastic network interface
      • Enterprise security group
      • High-availability virtual IP address (HAVIP)
      • Install the SDK Package
      • IPv6Gateway
      • NAT
      • Network probe
      • Overview
      • Peering Connections
      • Route
      • Security group
      • Service network interface card
      • Subnet
      • Version history
      • VPC
      • VPN
  • Service Level Agreement (SLA)
    • IPv6 Gateway Service Level Agreement SLA
    • NAT(Network Address Translation) Gateway Service Level Agreement SLA
    • Peering Connections Service Level Agreement SLA
    • Service Network Interface Card(SNIC) Service Level Agreement SLA
    • VPN Gateway Service Level Agreement SLA
    • NAT (Network Address Translation) Gateway Service Level Agreement SLA
    • Service Network Interface Card (SNIC) Service Level Agreement SLA
  • Typical Practices
    • Configure Custom Service and Use Service Network Interface Card(SNIC) to Provide Service for Other VPCs
    • HAVIP Combined with Keepalived to Achieve Master-Backup Multi-Machine High Availability
    • Layer 2 Gateway Combined with Dedicated Line Access ET to Build Large Layer 2 Network Between IDC and Cloud VPC
    • Network Layer Security Description
    • Peering Connections Typical Practice
    • Security Group Configuration Practice (Advanced Level)
    • Security Group Configuration Practice (Beginner Level)
    • Typical Practice of Managing Elastic Network Interface Using Terraform
    • Typical Practice of Managing IPsec VPN Gateway Using Terraform
    • Using Keepalived in VPC to Achieve High-Availability Architecture
    • VPC Custom Route Table to Achieve Secure Traffic Mutual Access
    • Windows Using HAVIP to Configure Master-Backup Multi-Machine
    • Configure Custom Service and Use Service Network Interface Card (SNIC) to Provide Service for Other VPCs
  • VPC CLI
    • Configure BCE-CLI
    • Install BCE-CLI
    • Route Table Related Operations
    • Subnet Related Operations
    • Using VPC Service via CLI
    • Version Change Records
    • VPC Related Operations
All documents
menu
No results found, please re-enter

VPC VPC

  • API Reference
    • ACL-Related Interfaces
      • Add ACL rule
      • Delete ACL rules
      • Query ACL rules
      • Query ACL
      • Update ACL rules
    • API function release records
    • API Overview
    • Appendix
    • Common Headers and Error Responses
    • Dedicated Gateway-Related Interfaces
      • Bind physical dedicated line
      • Create dedicated gateway
      • Create health check for dedicated gateway
      • Query dedicated gateway details
      • Query dedicated gateway list
      • Release dedicated gateway
      • Unbind physical dedicated line
      • Update dedicated gateway
    • Elastic Network Interface-Related Interfaces
      • Add intranet IP to elastic network interface in batches
      • Add Secondary IP Address of Elastic Network Interface
      • Create elastic network interface
      • Delete elastic network interface
      • Delete Intranet IP from elastic network interface in batches
      • Delete Secondary IP Address of Elastic Network Interface
      • Elastic network interface binds to EIP
      • Elastic Network Interface Mounts Cloud Product Instance
      • Elastic network interface unbinds from EIP
      • Elastic Network Interface Unmounts Cloud Product Instance
      • Query elastic network interface list
      • Query elastic network interface status
      • Query the specified elastic network interface
      • Update elastic network interface with enterprise security group
      • Update elastic network interface with regular security group
      • Update elastic network interface
    • Gateway Bandwidth Limiting Rule Related Interfaces
      • Create gateway bandwidth limiting rules
      • Delete Gateway Bandwidth Limiting Rule
      • Modify Gateway Bandwidth Limiting Rule
      • View Gateway Bandwidth Limiting Rule
    • General Description
    • High-Availability Virtual IP Address(HAVIP) Related Interfaces
      • Bind EIP to high-availability virtual IP address
      • Bind instance to high-availability virtual IP address
      • Create high-availability virtual IP address
      • Delete high-availability virtual IP address
      • Query high-availability virtual IP address list
      • Query the specified high-availability virtual IP address
      • Unbind EIP from high-availability virtual IP address
      • Unbind instance from high-availability virtual IP address
      • Update high-availability virtual IP address
    • Interface Overview
    • IPv6 Gateway-Related Interfaces
      • Add IPv6 egress-only policy
      • Bandwidth resizing for IPv6 gateway
      • Create IPv6 gateway bandwidth limiting policy
      • Create IPv6 gateway
      • Delete IPv6 gateway bandwidth limiting policy
      • Delete IPv6 Gateway
      • Delete the IPv6 egress-only policy
      • Query IPv6 gateway bandwidth limiting policy list
      • Query IPv6 gateway
      • Query the IPv6 egress-only policy list
      • Update IPv6 gateway bandwidth limiting policy
      • Update the IPv6 gateway release protection switch
    • NAT Gateway-Related Interfaces
      • Bind DNAT EIP to the NAT gateway
      • Bind SNAT EIP to the NAT gateway
      • Create DNAT rules in batches
      • Create DNAT rules
      • Create NAT gateway
      • Create SNAT rules in batches
      • Create SNAT rules
      • Delete DNAT rules
      • Delete SNAT rules
      • NAT Gateway Binds EIP
      • NAT gateway renewal
      • NAT Gateway Resize
      • NAT Gateway Unbinds EIP
      • Query DNAT rules
      • Query NAT gateway details
      • Query NAT gateway list
      • Query SNAT rules
      • Release NAT gateway
      • Unbind DNAT EIP from the NAT gateway
      • Unbind SNAT EIP from the NAT gateway
      • Update DNAT rules
      • Update NAT Delete Protection Switch
      • Update NAT gateway name
      • Update SNAT rules
    • Network Detection Related Interfaces
      • Create Network Probe
      • Delete network probe
      • Query network probe details
      • Query network probe list.
      • Update probe
    • Parameter Template-Related Interfaces
      • Add IP addresses to the IP address family
      • Add IP addresses to the IP address group
      • Create IP address family
      • Create IP address set
      • Delete IP address family
      • Delete IP address from IP address group
      • Delete IP address set
      • Query IP address family list
      • Query IP address group list
      • Query specified IP address family
      • Query specified IP address group
      • Remove IP address group from IP address family
      • Update IP address family
      • Update IP address set
    • Peering Connections-Related Interfaces
      • Application to process the peering connection
      • Bandwidth resizing for peering connections
      • Create peering connections
      • Disable DNS synchronization for the peering connections.
      • Enable DNS synchronization for the peering connections
      • List of peering connections to be queried.
      • Peering connection renewal
      • Release peering connections
      • Update the local API name and remarks for peering connections
      • Update the peering connection release protection switch
      • View details of peering connection
    • Route Table Related Interfaces
      • Create route rules
      • Delete route rules
      • Primary-standby switch
      • Query route table
      • Query routing rules
      • Update route rules
    • Security Group Related Interfaces
      • Enterprise security group
        • Authorize enterprise security group rules
        • Create enterprise security group
        • Delete enterprise security group rules
        • Delete enterprise security group
        • Query enterprise security group list
        • Update enterprise security group rules
      • Regular security group
        • Authorize regular security group rules
        • Create regular security group
        • Delete regular security group rules
        • Delete regular security group
        • Query regular security group list
        • Revoke regular security group rules
        • Update regular security group rules
        • View security group details
    • Service domain
    • Service Network Interface Card (SNIC)-Related Interfaces
      • Create service network interface card
      • Delete service network interface card
      • Query mountable public services
      • Query service network interface card details
      • Query service network interface card list
      • Update regular security group for service network interface card
      • Update service network interface card with enterprise security group
      • Update the service network interface card
    • Subnet-Related Interfaces
      • Create reserved network segment
      • Create subnet
      • Delete reserved network segment
      • Delete subnet
      • Query specified subnet
      • Query subnet list
      • Query the reserved network segment list
      • Update subnet
    • VPC-Related Interfaces
      • Create VPC
      • Delete VPC
      • Open VPC relay
      • Query IP Usage by Products in VPC
      • Query specified VPC
      • Query VPC intranet IP
      • Query VPC list
      • Shut down VPC relay
      • Update VPC
    • VPN-Related Interfaces
      • Bind EIP
      • Create SSL VPN server
      • Create SSL VPN users in batches
      • Create VPN tunnel
      • Create VPN
      • Delete SSL VPN server
      • Delete SSL VPN user
      • Delete VPN tunnel
      • Query SSL-VPN server
      • Query SSL-VPN user
      • Query VPN details
      • Query VPN List
      • Query VPN tunnels
      • Release VPN
      • Unbind EIP
      • Update SSL VPN server
      • Update SSL VPN user
      • Update VPN release protection switch
      • Update VPN tunnel
      • Update VPN
      • VPN gateway renewal
    • High-Availability Virtual IP Address (HAVIP) Related Interfaces
      • Bind EIP to high-availability virtual IP address
      • Bind instance to high-availability virtual IP address
      • Create high-availability virtual IP address
      • Delete high-availability virtual IP address
      • Query high-availability virtual IP address list
      • Query the specified high-availability virtual IP address
      • Unbind EIP from high-availability virtual IP address
      • Unbind instance from high-availability virtual IP address
      • Update high-availability virtual IP address
  • FAQs
    • Common Questions Overview
    • NAT FAQs
    • Route Table FAQs
    • Service Network Interface Card(SNIC) Common Questions
    • VPC FAQs
    • VPN FAQs
    • Service Network Interface Card (SNIC) Common Questions
  • Function Release Records
  • Operation guide
    • Access control
      • ACL
      • Parameter Template
      • Security group
    • Identity and access management
    • Monitor and Operations
      • NAT Gateway Instance Diagnosis
    • Network Connection
      • Dedicated gateway
      • IPv6 gateway
      • Layer 2 Gateway
      • NAT Gateway
        • Private Network NAT(Network Address Translation) Gateway
        • Public Network NAT(Network Address Translation) Gateway
        • Private Network NAT (Network Address Translation) Gateway
        • Public Network NAT (Network Address Translation) Gateway
      • Peering Connections
      • VPN Gateway
        • GRE VPN Gateway
        • IPsec VPN Gateway
        • SSL VPN Gateway
    • Network Diagnostics
      • Flow log
      • Gateway bandwidth limiting
      • Network probe
      • Path analysis
      • Port verification
      • Traffic monitor
    • Network interface card
      • Elastic network interface
      • High-availability virtual IP address (HAVIP)
      • Service network interface card
    • Network topology
    • Route table
    • Subnet
    • Tag Management
    • Using IPv6
    • VPC
  • Product Description
    • Application scenarios
    • Product advantages
    • Product features
    • Product Introduction
    • Related concepts
    • Usage restrictions
  • Product pricing
  • SDK
    • Go-SDK
      • ACL
      • Dedicated gateway
      • Elastic network interface
      • Exception handling
      • High-availability virtual IP address (HAVIP)
      • Initialization
      • Install the SDK Package
      • IPv6Gateway
      • NAT
      • Network probe
      • Overview
      • Peering Connections
      • Route
      • Security group
        • Enterprise security group
        • Regular security group
      • Service network interface card
      • Subnet
      • VPC
      • VPN
    • Java-SDK
      • ACL
      • Dedicated gateway
      • Elastic network interface
      • Enterprise security group
      • High-availability virtual IP address (HAVIP)
      • Install the SDK Package
      • IPv6 gateway
      • NAT
      • Network probe
      • Overview
      • Parameter Template
      • Peering Connections
      • Regular security group
      • Route
      • Service network interface card
      • Subnet
      • Version history
      • vpc
      • VPN
    • PHP-SDK
      • ACL
      • Install the SDK Package
      • NAT
      • Overview
      • Peering Connections
      • Route
      • Security group
      • Subnet
      • Version history
      • vpc
    • Python-SDK
      • ACL
      • Dedicated gateway
      • Elastic network interface
      • Enterprise security group
      • High-availability virtual IP address (HAVIP)
      • Install the SDK Package
      • IPv6Gateway
      • NAT
      • Network probe
      • Overview
      • Peering Connections
      • Route
      • Security group
      • Service network interface card
      • Subnet
      • Version history
      • VPC
      • VPN
  • Service Level Agreement (SLA)
    • IPv6 Gateway Service Level Agreement SLA
    • NAT(Network Address Translation) Gateway Service Level Agreement SLA
    • Peering Connections Service Level Agreement SLA
    • Service Network Interface Card(SNIC) Service Level Agreement SLA
    • VPN Gateway Service Level Agreement SLA
    • NAT (Network Address Translation) Gateway Service Level Agreement SLA
    • Service Network Interface Card (SNIC) Service Level Agreement SLA
  • Typical Practices
    • Configure Custom Service and Use Service Network Interface Card(SNIC) to Provide Service for Other VPCs
    • HAVIP Combined with Keepalived to Achieve Master-Backup Multi-Machine High Availability
    • Layer 2 Gateway Combined with Dedicated Line Access ET to Build Large Layer 2 Network Between IDC and Cloud VPC
    • Network Layer Security Description
    • Peering Connections Typical Practice
    • Security Group Configuration Practice (Advanced Level)
    • Security Group Configuration Practice (Beginner Level)
    • Typical Practice of Managing Elastic Network Interface Using Terraform
    • Typical Practice of Managing IPsec VPN Gateway Using Terraform
    • Using Keepalived in VPC to Achieve High-Availability Architecture
    • VPC Custom Route Table to Achieve Secure Traffic Mutual Access
    • Windows Using HAVIP to Configure Master-Backup Multi-Machine
    • Configure Custom Service and Use Service Network Interface Card (SNIC) to Provide Service for Other VPCs
  • VPC CLI
    • Configure BCE-CLI
    • Install BCE-CLI
    • Route Table Related Operations
    • Subnet Related Operations
    • Using VPC Service via CLI
    • Version Change Records
    • VPC Related Operations
  • Document center
  • arrow
  • VPCVPC
  • arrow
  • SDK
  • arrow
  • Python-SDK
  • arrow
  • Elastic network interface
Table of contents on this page
  • Retrieve Endpoint
  • Retrieve AK/SK
  • Create elastic network interface
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Update elastic network interface
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Delete elastic network interface
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Query elastic network interface list
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Add Intranet IP to elastic network interface
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Delete Intranet IP from elastic network interface
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Query the specified elastic network interface
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Attach elastic network interface to cloud host
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Detach elastic network interface from cloud host
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Elastic network interface binds to EIP
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Elastic network interface unbinds from EIP
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Update elastic network interface with regular security group
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Update elastic network interface with enterprise security group
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Delete Intranet IP from elastic network interface in batches
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Add intranet IP to elastic network interface in batches
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example
  • Query elastic network interface status
  • Function declaration
  • Parameter meaning
  • Response value
  • Operation succeeded:
  • Operation failed:
  • Code example

Elastic network interface

Updated at:2025-10-16

Retrieve Endpoint

Before configuring the endpoint for SDK usage, please refer to the developer guide section on VPC Service Domain Name to understand endpoint-related concepts. Baidu AI Cloud currently supports multiple regions. Please refer to the network product VPC section in Region Selection Guide.

Note: API supports both HTTP and HTTPS calling methods. To enhance data security, it is recommended to call via HTTPS.

Retrieve AK/SK

To use Baidu AI Cloud VPC, you need a valid AK (Access Key ID) and SK (Secret Access Key) for signature authentication. AK/SK are system-generated strings used to identify users and authenticate service access requests. You can retrieve your AK/SK information by following these steps:

  1. Register a Baidu AI Cloud account
  2. Create AK/SK

Create elastic network interface

  • IPv4 and IPv6 private IPs can be assigned. The specified private IP must fall within the subnet of the elastic network interface and must not be in use.
  • Among the specified IPv4 addresses, only one can be defined as the primary IP address, while all others must be secondary IP addresses.
  • When assigning an IPv6 IP address, the subnet associated with the elastic network interface must have an allocated IPv6 segment. All assigned IPv6 addresses are secondary IP addresses.
  • A privateIpAddress value of "" indicates that an IP address will be allocated automatically.
  • When creating an elastic network interface, you can bind it to an existing regular security group or an alternative enterprise security group. The VPC of the security group must match the VPC of the network interface card.

Function declaration

Plain Text
1def create_eni(self, name, subnet_id, security_group_ids=None, enterprise_security_group_ids=None,
2               eni_ip_address_list=None, eni_ipv6_address_list=None, description=None,
3               client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/pkknfara0

Response value

Operation succeeded:

Plain Text
1{
2    "eni_id":"eni-2dn7v328tegp"
3}

Operation failed:

Throw an exception. For the exception list, refer to: https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_create_eni.py

Update elastic network interface

  • Modify the name and description of the elastic network interface.
  • Name, which supports uppercase and lowercase letters, numbers, and special characters such as -, _, / and ., starting with a letter and a length of 1-65
  • Name and description cannot both be empty

Function declaration

Plain Text
1def update_eni(self, eni_id, name=None, description=None, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/pkknfara0

Response value

Operation succeeded:

Plain Text
1There are no special response parameters

Operation failed:

Throw an exception. For the exception list, refer to: https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7

Code example

For specific code examples, refer to example_update_eni.py

Delete elastic network interface

  • Elastic network interfaces that are mounted, in the process of being mounted, or unmounted cannot be deleted.
  • Upon deletion, all private intranet IPs associated with the elastic network interface will be released.

Function declaration

Plain Text
1def delete_eni(self, eni_id, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/ikknfinx7

Response value

Operation succeeded:

Plain Text
1There are no special response parameters

Operation failed:

An exception is thrown; for the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7#Elastic network interface service error codes

Code example

For specific code examples, refer to example_delete_eni.py

Query elastic network interface list

Function declaration

Plain Text
1def list_eni(self, vpc_id, instance_id=None, name=None, private_ip_address_list=None,
2             marker=None, max_keys=None, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/Okknfjt6o

Response value

Operation succeeded:

Plain Text
1{
2    "enis":[
3    {
4        "eniId":"eni-tnj00he350fh",
5        "name":"eni-1",
6        "zoneName":"cn-bj-d",
7        "description":"",
8        "instanceId":"",
9        "macAddress":"fa:20:20:2f:c6:30",
10        "vpcId":"vpc-jm7h2j497ut7",
11        "subnetId":"sbn-d63m7t0bbwt5",
12        "status":"available",
13        "privateIpSet":[
14        {
15            "publicIpAddress":"",
16            "primary":true,
17            "privateIpAddress":"10.0.1.115"
18        },
19        {
20            "publicIpAddress":"",
21            "primary":false,
22            "privateIpAddress":"10.0.1.6"
23        }],
24        "ipv6PrivateIpSet":[],
25        "securityGroupIds":null,
26        "enterpriseSecurityGroupIds":null,
27        "createdTime":"2023-12-06T06:32:46Z"
28    },
29    {
30        "eniId":"eni-2dn7v328tegp",
31        "name":"eni-1",
32        "zoneName":"cn-bj-d",
33        "description":"",
34        "instanceId":"",
35        "macAddress":"fa:20:20:30:08:08",
36        "vpcId":"vpc-jm7h2j497ut7",
37        "subnetId":"sbn-d63m7t0bbwt5",
38        "status":"available",
39        "privateIpSet":[
40        {
41            "publicIpAddress":"",
42            "primary":true,
43            "privateIpAddress":"10.0.1.116"
44        },
45        {
46            "publicIpAddress":"",
47            "primary":false,
48            "privateIpAddress":"10.0.1.7"
49        }],
50        "ipv6PrivateIpSet":[],
51        "securityGroupIds":null,
52        "enterpriseSecurityGroupIds":null,
53        "createdTime":"2023-12-06T07:07:10Z"
54    }],
55    "marker":"eni-tnj00he350fh",
56    "is_truncated":true,
57    "next_marker":"eni-ziqsx63b3nfq",
58    "max_keys":2
59}

Operation failed:

An exception is thrown; for the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7#Elastic network interface service error codes

Code example

For specific code examples, refer to example_list_eni.py

Add Intranet IP to elastic network interface

  • When isIpv6 is set to true, it signifies the addition of an IPv6 private intranet IP. The subnet linked with the elastic network interface must have an assigned IPv6 segment.
  • The privateIpAddress of "" indicates automatic IP address allocation.
  • If a privateIpAddress is specified, it must correspond to an IP address within the subnet.
  • Any additional private intranet IPs assigned will serve as secondary IP addresses.

Function declaration

Plain Text
1def add_private_ip(self, eni_id, private_ip_address, is_ipv6=None, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/Hkknfl4q3

Response value

Operation succeeded:

Plain Text
1{
2    "private_ip_address":"10.0.1.108"
3}

Operation failed:

An exception is thrown; for the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7#Elastic network interface service error codes

Code example

For specific code examples, refer to example_add_private_ip.py

Delete Intranet IP from elastic network interface

  • The primary IP address is not deletable; only secondary IP addresses can be removed.
  • You can specify IPv4 or IPv6 intranet IPs for deletion.

Function declaration

Plain Text
1def delete_private_ip(self, eni_id, private_ip_address, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/jkknfm534

Response value

Operation succeeded:

Plain Text
1There are no special response parameters

Operation failed:

An exception is thrown; for the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7#Elastic network interface service error codes

Code example

For specific code examples, refer to example_delete_private_ip.py

Query the specified elastic network interface

Function declaration

Plain Text
1def get_eni_details(self, eni_id, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/6kknfn5m8

Response value

Operation succeeded:

Plain Text
1{
2    "eni-id":"eni-477g9akswgjv",
3    "name":"PYTHON_SDK_TEST_UPDATE",
4    "zone_name":"cn-bj-d",
5    "description":"PYTHON sdk update",
6    "instance_id":"",
7    "mac_address":"fa:20:20:2f:b2:ae",
8    "vpc_id":"vpc-jm7h2j497ut7",
9    "subnet_id":"sbn-d63m7t0bbwt5",
10    "status":"available",
11    "private_ip_set":[
12    {
13        "public_ip_address":"",
14        "primary":true,
15        "private_ip_address":"10.0.1.100"
16    }],
17    "ipv6Private_ip_set":[
18    {
19        "public_ip_address":"",
20        "primary":false,
21        "private_ip_address":"240c:4081:8005:5e04::2"
22    }],
23    "security_group_ids":[],
24    "enterprise_security_group_ids":["esg-1atxb1iqd1e2"],
25    "created_time":"2023-11-24T11:39:54Z"
26}

Operation failed:

An exception is thrown; for the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7#Elastic network interface service error codes

Code example

For specific code examples, refer to example_get_specific_eni.py

Attach elastic network interface to cloud host

  • A cloud host can have multiple elastic network interfaces attached, but only one primary network interface card.
  • An elastic network interface can be attached to only one cloud host.
  • Elastic network interfaces can only be attached to cloud hosts that are in running or stopped states.
  • The elastic network interface and its attached cloud host must belong to the same virtual private cloud, and their respective subnets must be in the same availability zone.

Function declaration

Plain Text
1def attach_eni_instance(self, eni_id, instance_id, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/qkknfp44w

Response value

Operation succeeded:

Plain Text
1There are no special response parameters

Operation failed:

An exception is thrown; for the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7#Elastic network interface service error codes

Code example

For specific code examples, refer to example_attach_eni_instance.py

Detach elastic network interface from cloud host

  • Only elastic network interfaces in the mounted state can be detached from a cloud host.

Function declaration

Plain Text
1def detach_eni_instance(self, eni_id, instance_id, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/jkknfq87r

Response value

Operation succeeded:

Plain Text
1There are no special response parameters

Operation failed:

An exception is thrown; for the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7#Elastic network interface service error codes

Code example

For specific code examples, refer to example_detach_eni_instance.py

Elastic network interface binds to EIP

  • Network interface cards that are in attaching or detaching states cannot be associated with an EIP.
  • Network interface cards within NAT-dedicated subnets cannot be associated with an EIP.

Function declaration

Plain Text
1def bind_eni_public_ip(self, eni_id, privat_ip_address, public_ip_address, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/vkknfr857

Response value

Operation succeeded:

Plain Text
1There are no special response parameters

Operation failed:

An exception is thrown; for the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7#Elastic network interface service error codes

Code example

For specific code examples, refer to example_bind_eni_public_ip.py

Elastic network interface unbinds from EIP

  • Network interface cards in attaching or detaching states cannot be disassociated from an EIP.

Function declaration

Plain Text
1def unbind_eni_public_ip(self, eni_id, public_ip_address, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/Hkknfs7ee

Response value

Operation succeeded:

Plain Text
1There are no special response parameters

Operation failed:

An exception is thrown; for the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7#Elastic network interface service error codes

Code example

For specific code examples, refer to example_unbind_eni_public_ip.py

Update elastic network interface with regular security group

  • An elastic network interface must be associated with at least one security group, either a regular security group or an enterprise security group.
  • This operation associates the elastic network interface with a final regular security group while removing it from any existing regular or enterprise security groups.

Function declaration

Plain Text
1def update_eni_security_group(self, eni_id, security_group_ids, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/Nkknft2l0

Response value

Operation succeeded:

Plain Text
1There are no special response parameters

Operation failed:

An exception is thrown; for the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7#Elastic network interface service error codes

Code example

For specific code examples, refer to example_update_eni_sg.py

Update elastic network interface with enterprise security group

  • An elastic network interface must be associated with at least one security group, either a regular security group or an enterprise security group.
  • This operation associates the elastic network interface with an enterprise security group while removing it from any existing regular or enterprise security groups.

Function declaration

Plain Text
1def update_eni_enterprise_security_group(self, eni_id, enterprise_security_group_ids,
2                                         client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/Jl5kp9uyw

Response value

Operation succeeded:

Plain Text
1There are no special response parameters

Operation failed:

An exception is thrown; for the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7#Elastic network interface service error codes

Code example

For specific code examples, refer to example_update_eni_esg.py

Delete Intranet IP from elastic network interface in batches

  • The primary IP address is not deletable; only secondary IP addresses can be removed.
  • You can specify IPv4 or IPv6 intranet IPs for deletion.

Function declaration

Plain Text
1def batch_delete_private_ip(self, eni_id, private_ip_address_list, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/Akw4yd4ht

Response value

Operation succeeded:

Plain Text
1There are no special response parameters

Operation failed:

An exception is thrown; for the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7#Elastic network interface service error codes

Code example

For specific code examples, refer to example_batch_delete_private_ip.py

Add intranet IP to elastic network interface in batches

  • Any additional private intranet IPs assigned will serve as secondary IP addresses.
  • When isIpv6 is set to true, it signifies the addition of an IPv6 private intranet IP. The subnet linked with the elastic network interface must have an assigned IPv6 segment.

Function declaration

Plain Text
1def batch_add_private_ip(self, eni_id, is_ipv6=None, private_ip_address_list=None,
2                         private_ip_address_count=None, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/9kw4xi713

Response value

Operation succeeded:

Plain Text
1{
2    "private_ip_addresses": ["10.0.1.201","10.0.1.202"]
3}

Operation failed:

An exception is thrown; for the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7#Elastic network interface service error codes

Code example

For specific code examples, refer to example_batch_add_private_ip.py

Query elastic network interface status

Function declaration

Plain Text
1def get_eni_status(self, eni_id, client_token=None, config=None)

Parameter meaning

Refer to the OpenAPI documentation: https://cloud.baidu.com/doc/VPC/s/alk0j86xp

Response value

Operation succeeded:

Plain Text
1{
2    "status": "available"
3}

Operation failed:

An exception is thrown; for the exception list, refer to https://cloud.baidu.com/doc/VPC/s/sjwvyuhe7#Elastic network interface service error codes

Code example

For specific code examples, refer to example_get_eni_status.py

Previous
Dedicated gateway
Next
Enterprise security group