Updated on 2023-11-21 GMT+08:00

Binding/Unbinding an EIP

Function

This API is used to bind an EIP to a node of an instance or unbind an EIP from the node.

Constraints

  • This API supports the following types of instances:
    • GeminiDB Cassandra
    • GeminiDB Mongo
    • GeminiDB Influx
    • GeminiDB Redis
  • This API is not available to frozen or abnormal instances.
  • Multiple EIPs cannot be bound to the same node.
  • Unbinding an EIP from a node of a frozen instance is not supported.
  • Unbinding an EIP from a node with no EIPs bound is not supported.

URI

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

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID.

node_id

Yes

String

Instance node ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

action

Yes

String

Operation identifier.

The value can be:

  • BIND, indicating that an EIP is bound.
  • UNBIND, indicating that an EIP is unbound.

public_ip

No

String

EIP. This parameter is mandatory when an EIP needs to be bound.

public_ip_id

No

String

EIP ID. This parameter is mandatory when an EIP needs to be bound.

Response Parameters

Status code: 202

Table 4 Response body parameters

Parameter

Type

Description

job_id

String

Task ID.

Example Requests

  • Binding an EIP
    • URI example
      POST https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/61f554065802400c9c33f87e8114f081in10/nodes/1345bb07d1834f8fb0b4acbc26e989aano10/public-ip 
    • Example request body
      { 
        "action" : "BIND", 
        "public_ip" : "10.154.218.161", 
        "public_ip_id" : "45da4782-e0c8-4aa4-a290-b8740014f710" 
      }
  • Unbinding an EIP
    • URI example
      POST https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/61f554065802400c9c33f87e8114f081in10/nodes/1345bb07d1834f8fb0b4acbc26e989aano10/public-ip
    • Example request body
      { 
        "action" : "UNBIND", 
        "public_ip" : "10.154.218.161"
      }

Example Responses

Status code: 202

Accepted

{ 
  "job_id" : "f85104b5-4a9c-4e0f-9505-fc5409d8f7ae" 
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.