Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Updating an EIP

Function

This API is used to update an EIP.

URI

PUT /v3/{project_id}/eip/publicips/{publicip_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Maximum length: 32

publicip_id

Yes

String

EIP ID

Minimum length: 0

Maximum length: 36

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

publicip

Yes

UpdatePublicipOption object

EIP

Table 3 UpdatePublicipOption

Parameter

Mandatory

Type

Description

alias

No

String

  • EIP name

Minimum length: 0

Maximum length: 64

description

No

String

  • Supplementary information about the EIP

  • The value can contains 0 to 255 characters and cannot contain the following special characters: <>

Minimum length: 0

Maximum length: 255

associate_instance_type

No

String

  • Type of the instance that the port belongs to

  • The value can be:

    • PORT

    • NATGW

    • VPN

    • ELB

  • Constraints:

    • If neither associate_instance_type nor associate_instance_id is left empty, the EIP is bound to an instance.

    • If both associate_instance_type and associate_instance_id are null, an instance is unbound. You can set associate_instance_type and associate_instance_id to null on API Explorer. For details, see the example request for unbinding an EIP from an instance.

    • A dual-stack EIP cannot have its bound instance changed.

Minimum length: 0

Maximum length: 36

associate_instance_id

No

String

  • ID of the bound instance, such as a load balancer ID or an ECS NIC ID.

  • Constraints:

    • If neither associate_instance_type nor associate_instance_id is left empty, the EIP is bound to an instance.

    • If both associate_instance_type and associate_instance_id are null, an instance is unbound. You can set associate_instance_type and associate_instance_id to null on API Explorer. For details, see the example request for unbinding an EIP from an instance.

    • A dual-stack EIP cannot have its bound instance changed.

Minimum length: 0

Maximum length: 36

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

request_id

String

Request ID

Minimum length: 0

Maximum length: 36

publicip

PublicipUpdateResp object

Response object of updating an EIP

Table 5 PublicipUpdateResp

Parameter

Type

Description

id

String

  • EIP ID, which uniquely identifies the EIP.

Minimum length: 0

Maximum length: 36

project_id

String

  • Project ID

Minimum length: 0

Maximum length: 32

ip_version

Integer

  • IP address version

  • The value can be:

    • 4: IPv4 EIP

    • 6: IPv6 EIP

public_ip_address

String

  • EIP or IPv6 port address

Minimum length: 0

Maximum length: 36

public_ipv6_address

String

  • Obtained EIP if IPv6 EIPs are available. This parameter does not exist if only IPv4 EIPs are available.

Minimum length: 0

Maximum length: 64

status

String

  • EIP status

  • The value can be:

    • FREEZED (Frozen)

    • BIND_ERROR (Binding failed)

    • BINDING (Binding)

    • PENDING_DELETE (Releasing)

    • PENDING_CREATE (Assigning)

    • NOTIFYING (Notify that EIP is assigned)

    • NOTIFY_DELETE (Notify to release an EIP)

    • PENDING_UPDATE (Updating)

    • DOWN (Unbound)

    • ACTIVE (Bound)

    • ELB (Bound to a load balancer)

    • VPN (Bound to a VPN)

    • ERROR (Assignment failed)

Minimum length: 0

Maximum length: 64

description

String

  • Supplementary information about the EIP

  • You can customize this value to identify your EIP, which is not perceived by the system.

Minimum length: 0

Maximum length: 255

public_border_group

String

  • Whether it is a central or an edge EIP.

  • The value can be center or an edge site name.

  • An EIP can only be bound to a resource of the same region or site.

Minimum length: 1

Maximum length: 64

created_at

String

  • Time (UTC) when an EIP is assigned

  • Format: yyyy-MM-ddTHH:mm:ssZ

Minimum length: 0

Maximum length: 64

updated_at

String

  • Time (UTC) when an EIP is updated

  • Format: yyyy-MM-ddTHH:mm:ssZ

Minimum length: 0

Maximum length: 64

type

String

EIP type

Minimum length: 1

Maximum length: 36

vnic

VnicInfo object

  • Port information of the instance with an EIP bound

  • If the instance has no port, the value is null.

bandwidth

PublicipBandwidthInfo object

Bandwidth of an EIP

enterprise_project_id

String

Enterprise project ID. The value is 0 or a string that contains a maximum of 36 characters in UUID format with hyphens (-). This is the ID of the enterprise project that you associate with the EIP when you assign the EIP.

Minimum length: 0

Maximum length: 36

billing_info

String

  • Order information of an EIP

  • The value is available only for yearly/monthly resources. This value is left blank for pay-per-use resources.

Minimum length: 0

Maximum length: 256

lock_status

String

  • Frozen status of an EIP

  • The metadata type indicates that the EIP is frozen due to arrears or security reasons.

  • The value can be:

    • police

    • locked

Minimum length: 0

Maximum length: 64

associate_instance_type

String

  • Type of the instance with an EIP bound

  • The value can be:

    • PORT

    • NATGW

    • ELB

    • ELBV1

    • VPN

Minimum length: 0

Maximum length: 64

associate_instance_id

String

ID of the instance with an EIP bound

Minimum length: 0

Maximum length: 36

publicip_pool_id

String

ID of the network that an EIP belongs to It is the network ID corresponding to publicip_pool_name.

Minimum length: 0

Maximum length: 36

publicip_pool_name

String

  • Network type of an EIP, including public EIP pool (for example, 5_bgp or 5_sbgp) and dedicated EIP pool.

  • For details about the dedicated EIP pool, see the APIs about publcip_pool.

Minimum length: 0

Maximum length: 64

alias

String

  • EIP name

Minimum length: 0

Maximum length: 64

associate_mode

String

  • Passthrough mode. (The parameter is not displayed by default.)

Minimum length: 1

Maximum length: 36

Table 6 VnicInfo

Parameter

Type

Description

private_ip_address

String

  • Private IP address

Minimum length: 0

Maximum length: 36

device_id

String

  • ID of the device that the port belongs to

  • The system automatically sets this parameter.

Minimum length: 0

Maximum length: 36

device_owner

String

  • Device that the port belongs to

  • The value can be:

    • network:dhcp

    • network:VIP_PORT

    • network:router_interface_distributed

    • network:router_centralized_snat

  • The system automatically sets this parameter.

Minimum length: 0

Maximum length: 64

vpc_id

String

  • VPC ID

Minimum length: 0

Maximum length: 36

port_id

String

  • Port ID

Minimum length: 0

Maximum length: 36

port_profile

String

  • Port profile

Minimum length: 0

Maximum length: 256

mac

String

  • Port MAC address

  • The system automatically sets this parameter.

Minimum length: 0

Maximum length: 64

vtep

String

  • VTEP IP address

Minimum length: 0

Maximum length: 36

vni

String

  • VXLAN ID

Minimum length: 0

Maximum length: 36

instance_id

String

  • ID of the instance that the port belongs to, for example, RDS instance ID

  • The system automatically sets this parameter.

Minimum length: 0

Maximum length: 36

instance_type

String

  • Type of the instance that the port belongs to, for example, RDS.

  • The system automatically sets this parameter.

Minimum length: 0

Maximum length: 36

port_vif_details

String

  • Details about the NIC virtual interface.

Minimum length: 0

Maximum length: 255

Table 7 PublicipBandwidthInfo

Parameter

Type

Description

id

String

  • Bandwidth ID

Minimum length: 0

Maximum length: 36

size

Integer

  • Bandwidth size

  • The value ranges from 5 Mbit/s to 2,000 Mbit/s by default.

Minimum value: 0

Maximum value: 99999

share_type

String

  • Whether the bandwidth is shared or dedicated.

  • The value can be:

    • PER: Dedicated bandwidth

    • WHOLE: Shared bandwidth

  • IPv6 addresses do not support bandwidth whose type is WHOLE.

Minimum length: 0

Maximum length: 36

charge_mode

String

  • Whether the billing is based on traffic or bandwidth.

  • The value can be:

    • bandwidth: billed by bandwidth

    • traffic: billed by traffic

    • 95peak_plus: billed by 95th percentile bandwidth (enhanced)

Minimum length: 0

Maximum length: 36

name

String

  • Bandwidth name

  • The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.).

Minimum length: 0

Maximum length: 64

billing_info

String

  • Billing information. If billing_info is specified, the bandwidth is billed on a yearly/monthly basis.

Minimum length: 0

Maximum length: 256

Example Request

  • Update the alias and description of an EIP.

    {
      "publicip" : {
        "alias" : "abcd",
        "description" : "test!!!!"
      }
    }
  • Unbind an EIP from an instance.

    {
      "publicip" : {
        "associate_instance_type" : null,
        "associate_instance_id" : null
      }
    }

Example Response

Status code: 200

Normal response to PUT requests

{
  "publicip" : {
    "alias" : "abcd",
    "associate_instance_id" : null,
    "associate_instance_type" : null,
    "bandwidth" : {
      "billing_info" : "xxxx:xxxx:xxxx",
      "charge_mode" : "bandwidth",
      "id" : "80549ae1-cf7a-4f39-a45f-bdb8e194a1f4",
      "name" : "bandwidth-bd25-test",
      "share_type" : "WHOLE",
      "size" : 7
    },
    "billing_info" : null,
    "created_at" : "2020-06-18T14:05:32Z",
    "description" : "test!!!!",
    "enterprise_project_id" : "0",
    "public_border_group" : "center",
    "id" : "b0c42aa6-3d1d-4b39-9188-35ee6aa8d6f7",
    "ip_version" : 4,
    "lock_status" : null,
    "project_id" : "060576782980d5762f9ec014dd2f1148",
    "public_ip_address" : "xx.xx.xx.xx",
    "public_ipv6_address" : null,
    "publicip_pool_id" : "160576782980d5762f9ec014dd2f1148",
    "publicip_pool_name" : "5_mobile",
    "status" : "DOWN",
    "type" : "EIP",
    "updated_at" : "2020-06-18T14:05:32Z",
    "vnic" : null
  },
  "request_id" : "ead9f912bd1191e3d5f0037141098d91"
}

Status Codes

Status Code

Description

200

Normal response to PUT requests

Error Codes

See Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback