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
  • Go-SDK
  • arrow
  • Elastic network interface
Table of contents on this page
  • Initialization
  • Confirm Endpoint
  • Retrieve access key
  • 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

Initialization

Confirm 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 Region Selection Guide.

Currently supported regions are: "North China-Beijing," "South China-Guangzhou," "East China-Suzhou," "Hong Kong," "Central Finance-Wuhan," and "North China-Baoding." Corresponding details:

Access region Endpoint Protocol
BJ bcc.bj.baidubce.com HTTP and HTTPS
GZ bcc.gz.baidubce.com HTTP and HTTPS
SU bcc.su.baidubce.com HTTP and HTTPS
HKG bcc.hkg.baidubce.com HTTP and HTTPS
FWH bcc.fwh.baidubce.com HTTP and HTTPS
BD bcc.bd.baidubce.com HTTP and HTTPS

Retrieve access key

To use Baidu AI Cloud's route feature, users need an AK (Access Key ID) and SK (Secret Access Key) for signature authentication. These keys are system-assigned strings used to identify users and verify signatures.

Your AK/SK information can be obtained and understood through the following steps:

Register a Baidu AI Cloud account

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
1type PrivateIp struct {
2    PublicIpAddress  string `json:"publicIpAddress"`
3    Primary          bool   `json:"primary"`
4    PrivateIpAddress string `json:"privateIpAddress"`
5}
6type CreateEniArgs struct {
7    ClientToken                string      `json:"-"`
8    Name                       string      `json:"name"`
9    SubnetId                   string      `json:"subnetId"`
10    InstanceId                 string      `json:"instanceId,omitempty"`
11    SecurityGroupIds           []string    `json:"securityGroupIds"`
12    EnterpriseSecurityGroupIds []string    `json:"enterpriseSecurityGroupIds"`
13    PrivateIpSet               []PrivateIp `json:"privateIpSet"`
14    Ipv6PrivateIpSet           []PrivateIp `json:"ipv6PrivateIpSet,omitempty"`
15    Description                string      `json:"description,omitempty"`
16}
17type CreateEniResult struct {
18    EniId string `json:"eniId"`
19}
20func (c *Client) CreateEni(args *CreateEniArgs) (*CreateEniResult, error)

Parameter meaning

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

Response value

Operation succeeded:

Plain Text
1{
2    "eniId":"eni-2dn7v328tegp"
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_create_eni.go

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
1type UpdateEniArgs struct {
2    EniId       string `json:"-"`
3    ClientToken string `json:"-"`
4    Name        string `json:"name"`
5    Description string `json:"description"`
6}
7func (c *Client) UpdateEni(args *UpdateEniArgs) error

Parameter meaning

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

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

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
1type DeleteEniArgs struct {
2    EniId       string
3    ClientToken string
4}
5func (c *Client) DeleteEni(args *DeleteEniArgs) error

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

Query elastic network interface list

Function declaration

Plain Text
1type ListEniArgs struct {
2    VpcId            string
3    InstanceId       string
4    Name             string
5    Marker           string
6    MaxKeys          int
7    PrivateIpAddress []string `json:"privateIpAddress,omitempty"`
8}
9type ListEniResult struct {
10    Eni         []Eni  `json:"enis"`
11    Marker      string `json:"marker"`
12    IsTruncated bool   `json:"isTruncated"`
13    NextMarker  string `json:"nextMarker"`
14    MaxKeys     int    `json:"maxKeys"`
15}
16func (c *Client) ListEni(args *ListEniArgs) (*ListEniResult, error)

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    "isTruncated":true,
57    "nextMarker":"eni-ziqsx63b3nfq",
58    "maxKeys":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.go

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.
  • A privateIpAddress value of "" indicates automatic allocation of an IP address.
  • 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
1type EniPrivateIpArgs struct {
2    EniId            string `json:"-"`
3    ClientToken      string `json:"-"`
4    IsIpv6           bool   `json:"isIpv6,omitempty"`
5    PrivateIpAddress string `json:"privateIpAddress"`
6}
7type AddPrivateIpResult struct {
8    PrivateIpAddress string `json:"privateIpAddress"`
9}
10func (c *Client) AddPrivateIp(args *EniPrivateIpArgs) (*AddPrivateIpResult, error)

Parameter meaning

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

Response value

Operation succeeded:

Plain Text
1{
2    "privateIpAddress":"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.go

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
1type EniPrivateIpArgs struct {
2    EniId            string `json:"-"`
3    ClientToken      string `json:"-"`
4    IsIpv6           bool   `json:"isIpv6,omitempty"`
5    PrivateIpAddress string `json:"privateIpAddress"`
6}
7func (c *Client) DeletePrivateIp(args *EniPrivateIpArgs) error

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

Query the specified elastic network interface

Function declaration

Plain Text
1type Eni struct {
2    EniId                      string      `json:"eniId"`
3    Name                       string      `json:"name"`
4    ZoneName                   string      `json:"zoneName"`
5    Description                string      `json:"description"`
6    InstanceId                 string      `json:"instanceId"`
7    MacAddress                 string      `json:"macAddress"`
8    VpcId                      string      `json:"vpcId"`
9    SubnetId                   string      `json:"subnetId"`
10    Status                     string      `json:"status"`
11    PrivateIpSet               []PrivateIp `json:"privateIpSet"`
12    Ipv6PrivateIpSet           []PrivateIp `json:"ipv6PrivateIpSet"`
13    SecurityGroupIds           []string    `json:"securityGroupIds"`
14    EnterpriseSecurityGroupIds []string    `json:"enterpriseSecurityGroupIds"`
15    CreatedTime                string      `json:"createdTime"`
16}
17func (c *Client) GetEniDetail(eniId string) (*Eni, error)

Parameter meaning

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

Response value

Operation succeeded:

Plain Text
1{
2    "eniId":"eni-477g9akswgjv",
3    "name":"GO_SDK_TEST_UPDATE",
4    "zoneName":"cn-bj-d",
5    "description":"go sdk update",
6    "instanceId":"",
7    "macAddress":"fa:20:20:2f:b2:ae",
8    "vpcId":"vpc-jm7h2j497ut7",
9    "subnetId":"sbn-d63m7t0bbwt5",
10    "status":"available",
11    "privateIpSet":[
12    {
13        "publicIpAddress":"",
14        "primary":true,
15        "privateIpAddress":"10.0.1.100"
16    }],
17    "ipv6PrivateIpSet":[
18    {
19        "publicIpAddress":"",
20        "primary":false,
21        "privateIpAddress":"240c:4081:8005:5e04::2"
22    }],
23    "securityGroupIds":[],
24    "enterpriseSecurityGroupIds":["esg-1atxb1iqd1e2"],
25    "createdTime":"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_eni_detail.go

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
1type EniInstance struct {
2    EniId       string `json:"-"`
3    InstanceId  string `json:"instanceId"`
4    ClientToken string `json:"-"`
5}
6func (c *Client) AttachEniInstance(args *EniInstance) error

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

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
1type EniInstance struct {
2    EniId       string `json:"-"`
3    InstanceId  string `json:"instanceId"`
4    ClientToken string `json:"-"`
5}
6func (c *Client) DetachEniInstance(args *EniInstance) error

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

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
1type BindEniPublicIpArgs struct {
2    EniId            string `json:"-"`
3    ClientToken      string `json:"-"`
4    PrivateIpAddress string `json:"privateIpAddress"`
5    PublicIpAddress  string `json:"publicIpAddress"`
6}
7func (c *Client) BindEniPublicIp(args *BindEniPublicIpArgs) error

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

Elastic network interface unbinds from EIP

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

Function declaration

Plain Text
1type UnBindEniPublicIpArgs struct {
2    EniId           string `json:"-"`
3    ClientToken     string `json:"-"`
4    PublicIpAddress string `json:"publicIpAddress"`
5}
6func (c *Client) UnBindEniPublicIp(args *UnBindEniPublicIpArgs) error

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_public_ip.go

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
1type UpdateEniSecurityGroupArgs struct {
2    EniId            string   `json:"-"`
3    ClientToken      string   `json:"-"`
4    SecurityGroupIds []string `json:"securityGroupIds"`
5}
6func (c *Client) UpdateEniSecurityGroup(args *UpdateEniSecurityGroupArgs) error

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

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
1type UpdateEniEnterpriseSecurityGroupArgs struct {
2    EniId                      string   `json:"-"`
3    ClientToken                string   `json:"-"`
4    EnterpriseSecurityGroupIds []string `json:"enterpriseSecurityGroupIds"`
5}
6func (c *Client) UpdateEniEnterpriseSecurityGroup(args *UpdateEniEnterpriseSecurityGroupArgs) error

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

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
1type EniBatchPrivateIpArgs struct {
2    EniId                 string   `json:"-"`
3    ClientToken           string   `json:"-"`
4    IsIpv6                bool     `json:"isIpv6,omitempty"`
5    PrivateIpAddresses    []string `json:"privateIpAddresses"`
6    PrivateIpAddressCount int      `json:"privateIpAddressCount,omitempty"`
7}
8func (c *Client) BatchDeletePrivateIp(args *EniBatchPrivateIpArgs) error

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

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
1type EniBatchPrivateIpArgs struct {
2    EniId                 string   `json:"-"`
3    ClientToken           string   `json:"-"`
4    IsIpv6                bool     `json:"isIpv6,omitempty"`
5    PrivateIpAddresses    []string `json:"privateIpAddresses"`
6    PrivateIpAddressCount int      `json:"privateIpAddressCount,omitempty"`
7}
8type BatchAddPrivateIpResult struct {
9    PrivateIpAddresses []string `json:"privateIpAddresses"`
10}
11func (c *Client) BatchAddPrivateIp(args *EniBatchPrivateIpArgs) (*BatchAddPrivateIpResult, error)

Parameter meaning

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

Response value

Operation succeeded:

Plain Text
1{
2    "privateIpAddresses": ["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.go

Query elastic network interface status

Function declaration

Plain Text
1type EniStatusInfo struct {
2    Status string `json:"status"`
3}
4func (c *Client) GetEniStatus(eniId string) (*EniStatusInfo, error)

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

Previous
Dedicated gateway
Next
Exception handling