Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

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
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
On this page
Help Center/ Elastic Load Balance/ API Reference/ Historical APIs/ Getting Started/ Creating a Public Network Load Balancer

Creating a Public Network Load Balancer

Updated on 2023-12-18 GMT+08:00

When an EIP is bound to a private network load balancer, the load balancer becomes a public network load balancer. Clients can access backend servers through this load balancer over Internet.

Apply for an EIP

API Format

Method

URI

Description

POST

/v1/{tenant_id}/publicips

Applies for an EIP.

Procedure

  1. Set the request header.

    Set the header in Postman and place the obtained token in the header.

  2. Under Body, set the request body.

  3. Enter the URL.

    https://vpc.cn-east-2.myhuaweicloud.com/v1/0d0bf0e8fb564cc9abbe526dbdca9248/publicips

  4. Send the request. Set the POST request method and click Send to wait for response from the server.

    {
        "publicip": {
            "id": "73c079fc-357a-4d34-8ba1-818a9d9a2aa2",
            "status": "PENDING_CREATE",
            "type": "5_sbgp",
            "public_ip_address": "122.112.235.121",
            "tenant_id": "0d0bf0e8fb564cc9abbe526dbdca9248",
            "create_time": "2018-07-11 02:40:32",
            "bandwidth_size": 0,
            "enterprise_project_id": "0"
        }
    }
    NOTE:

    Note that the value of tenant_id in the response body is the project ID on the web console.

Sample Code

Request body in 2

{
    "publicip": {
        "type": "5_sbgp"
    },
    "bandwidth": {
        "name": "bandwidth_elb",
        "size": 1,
        "share_type": "PER",
        "charge_mode": "traffic"
    }
}
NOTE:

For details about fields in the request body and their formats, see the Virtual Private Cloud API Reference.

Bind the EIP

API Format

Method

URI

Description

PUT

/v1/{tenant_id}/publicips/{publicip_id}

Binds the EIP to a load balancer.

Procedure

  1. Set the request header.

    Set the header in Postman and place the obtained token in the header.

  2. Under Body, set the request body.

    NOTE:

    The value of port_id can be obtained by calling the VPC API. The request is as follows:

    GET https://vpc.cn-north-1.myhuaweicloud.com/v2.0/ports?network_id=Network ID&fixed_ips=ip_address=Private IP address of the load balancer

    Choose Network > Virtual Private Cloud, click the target VPC name, and obtain the network ID and private IP address of the load balancer on the subnet details page.

  3. Enter the URL.

    https://vpc.cn-east-2.myhuaweicloud.com/v1/{{project_id}}/publicips/{{eip_id}}
    NOTE:

    eip_id is the ID returned when the EIP is assigned in Apply for an EIP.

  4. Send the request. Set the PUT request method and click Send to wait for response from the server.

    {
        "publicip": {
            "id": "73c079fc-357a-4d34-8ba1-818a9d9a2aa2",
            "status": "ACTIVE",
            "type": "5_sbgp",
            "port_id": "d2c5a9fc-6a91-4a2d-8aac-e8e8ca6da727",
            "public_ip_address": "122.112.235.121",
            "private_ip_address": "192.168.0.160",
            "tenant_id": "0d0bf0e8fb564cc9abbe526dbdca9248",
            "create_time": "2018-07-11 02:40:32",
            "bandwidth_size": 1
        }
    }

Sample Code

Request body in 2

{
    "publicip": {
        "port_id": "d2c5a9fc-6a91-4a2d-8aac-e8e8ca6da727"
    }
}

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback