Help Center/ GaussDB/ API Reference/ APIs/ Instance Management/ Binding or Unbinding an EIP
Updated on 2026-08-18 GMT+08:00

Binding or Unbinding an EIP

Function

This API is used to bind an EIP to an instance node or unbind an EIP from an instance node. Before calling this API:

Debugging

You can debug this API in API Explorer.

URI

POST /v3/{project_id}/instances/{instance_id}/nodes/{node_id}/public-ip

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which uniquely identifies an instance. For details about how to obtain the instance ID, see Querying DB Instances.

Constraints

N/A

Range

The value can contain 36 characters. Only letters and digits are allowed.

Default Value

N/A

node_id

Yes

String

Definition

Node ID. Obtain the node ID by referring to Querying the Components of a DB Instance.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

After a response is returned, the value of X-Subject-Token in the response header is the token.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Language of the information returned by the API.

Constraints

N/A

Range

  • zh-cn: Chinese
  • en-us: English

Default Value

en-us

Table 3 Parameter description

Parameter

Mandatory

Type

Description

action

Yes

String

Definition

Operation identifier.

Constraints

N/A

Range

  • BIND: An EIP is bound.
  • UNBIND: An EIP is unbound.

Default Value

N/A

public_ip

Yes

String

Definition

EIP.

Obtain the value of the response parameter public_ip_address by referring to Querying EIPs.

Constraints

N/A

Range

IPv4 address.

Default Value

N/A

public_ip_id

Yes

String

Definition

EIP ID.

Obtain the value of the response parameter id by referring to Querying EIPs.

Constraints

N/A

Range

The value is in UUID format.

Default Value

N/A

Response Parameters

Table 4 Parameter description

Parameter

Type

Description

job_id

String

Definition

Job ID.

Range

N/A

Example Request

  • Binding an EIP to a GaussDB instance
    POST https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dd93e98e103b4fc4b5a978a6bd6f03a9in14/nodes/0bc478b4d132494a8f7b804da521b4b2no14/public-ip
    {
        "action": "BIND",
        "public_ip": "10.154.218.161",
        "public_ip_id": "45da4782-e0c8-4aa4-a290-b8740014f710"
    }
  • Unbinding an EIP from a GaussDB instance
    POST https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dd93e98e103b4fc4b5a978a6bd6f03a9in14/nodes/0bc478b4d132494a8f7b804da521b4b2no14/public-ip
    {
        "action": "UNBIND",
        "public_ip": "10.154.218.161",
        "public_ip_id": "45da4782-e0c8-4aa4-a290-b8740014f710"
    }

Example Response

EIP bounded or unbounded.
{
	"job_id": "2b414788a6004883a02390e2eb0ea227"
}

Status Codes

Error Codes

For details, see Error Codes.