หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

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

Updating a Health Check

Updated on 2025-02-25 GMT+08:00

Function

This API is used to update a health check.

Constraints

If provisioning_status of the load balancer for which the health check is configured is not ACTIVE, the health check cannot be updated.

URI

PUT /v2/{project_id}/elb/healthmonitors/{healthmonitor_id}

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

healthmonitor_id

Yes

String

Specifies the health check ID.

Request

Table 2 Parameter description

Parameter

Mandatory

Type

Description

healthmonitor

Yes

Healthmonitor object

Specifies the health check. For details, see Table 3.

Table 3 healthmonitor parameter description

Parameter

Mandatory

Type

Description

name

No

String

Specifies the health check name.

The value contains a maximum of 255 characters.

delay

No

Integer

Specifies the maximum time between health checks in the unit of second. The value ranges from 1 to 50.

max_retries

No

Integer

Specifies the maximum number of retries. The value ranges from 1 to 10.

admin_state_up

No

Boolean

Specifies the administrative status of the health check.

This parameter is reserved, and the default value is true.

timeout

No

Integer

Specifies the health check timeout duration in the unit of second. The value ranges from 1 to 50.

NOTE:

You are advised to set the value less than that of parameter delay.

type

No

String

Specifies the health check protocol.

The value can be TCP, UDP_CONNECT, or HTTP.

monitor_port

No

Integer

Specifies the health check port. The port number ranges from 1 to 65535.

The value is left blank by default, indicating that the port of the backend server is used as the health check port.

expected_codes

No

String

Specifies the expected HTTP status code. The following options are available:

A single value, such as 200

A list of values, such as 200,202

A value range, such as 200–204

This parameter takes effect only when the value of type is set to HTTP.

domain_name

No

String

Specifies the domain name of HTTP requests during the health check.

This parameter takes effect only when the value of type is set to HTTP.

The value is left blank by default, indicating that the private IP address of the load balancer is used as the destination address of HTTP requests.

The value can contain only digits, letters, hyphens (-), and periods (.) and must start with a digit or letter,

for example: www.test.com.

The value contains a maximum of 100 characters.

url_path

No

String

Specifies the HTTP request path for the health check. The default value is /.

The value starts with a slash (/).

This parameter takes effect only when the value of type is set to HTTP.

An example value is /test.

The value contains a maximum of 80 characters.

http_method

No

String

Specifies the HTTP request method. The default value is GET.

The value can be GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, or PATCH.

This parameter takes effect only when the value of type is set to HTTP.

NOTE:

This parameter is reserved.

Response

Table 4 Parameter description

Parameter

Type

Description

healthmonitor

Healthmonitor object

Specifies the health check. For details, see Table 5.

Table 5 healthmonitor parameter description

Parameter

Type

Description

id

String

Specifies the health check ID.

tenant_id

String

Specifies the ID of the project where the health check is performed.

project_id

String

Specifies the ID of the project to which the health check belongs. This parameter has the same meaning as tenant_id.

name

String

Specifies the health check name.

delay

Integer

Specifies the maximum time between health checks in the unit of second. The value ranges from 1 to 50.

max_retries

Integer

Specifies the maximum number of retries. The value ranges from 1 to 10.

max_retries_down

Integer

Specifies the number of consecutive health checks when the health check result of a backend server changes from ONLINE to OFFLINE. The value ranges from 1 to 10.

pools

Array of Pools objects

Lists the IDs of backend server groups associated with the health check. For details, see Table 6.

admin_state_up

Boolean

Specifies the administrative status of the health check.

This parameter is reserved. The value can be true or false.

  • true: Enabled
  • false: Disabled

timeout

Integer

Specifies the health check timeout duration in the unit of second. The value ranges from 1 to 50.

NOTE:

You are advised to set the value less than that of parameter delay.

type

String

Specifies the health check protocol.

The value can be TCP, UDP_CONNECT, or HTTP.

monitor_port

Integer

Specifies the health check port. The port number ranges from 1 to 65535.

The value is left blank by default, indicating that the port of the backend server is used as the health check port.

expected_codes

String

Specifies the expected HTTP status code. The following options are available:

A single value, such as 200

A list of values, such as 200,202

A value range, such as 200–204

This parameter takes effect only when the value of type is set to HTTP.

Currently, this parameter is not supported and is fixed at 200.

domain_name

String

Specifies the domain name of HTTP requests during the health check.

This parameter takes effect only when the value of type is set to HTTP.

The value is left blank by default, indicating that the private IP address of the load balancer is used as the destination address of HTTP requests.

The value can contain only digits, letters, hyphens (-), and periods (.) and must start with a digit or letter, for example: www.test.com.

url_path

String

Specifies the HTTP request path for the health check. The default value is /.

The value starts with a slash (/).

This parameter takes effect only when the value of type is set to HTTP.

An example value is /test.

http_method

String

Specifies the HTTP request method. The default value is GET.

The value can be GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, or PATCH.

This parameter takes effect only when the value of type is set to HTTP.

NOTE:

This parameter is reserved.

Table 6 pools parameter description

Parameter

Mandatory

Type

Description

id

Yes

String

Specifies the ID of the backend server group.

Example Request

  • Example request: Updating a health check
    PUT https://{endpoint}/v2/145483a5107745e9b3d80f956713e6a3/elb/healthmonitors/b7633ade-24dc-4d72-8475-06aa22be5412
    
    {
      "healthmonitor": {
        "delay": 15,
        "name": "health-xx",
        "timeout": 12
       }
    }

Example Response

  • Example response
    {
      "healthmonitor": {
        "name": "health-xx",
        "admin_state_up": true,
        "tenant_id": "145483a5107745e9b3d80f956713e6a3",
        "project_id": "145483a5107745e9b3d80f956713e6a3",
        "domain_name": null,
        "delay": 15,
        "expected_codes": "200",
        "max_retries": 10,
        "http_method": "GET",
        "timeout": 12,
        "pools": [
          {
            "id": "bb44bffb-05d9-412c-9d9c-b189d9e14193"
          }
        ],
        "url_path": "/",
        "type": "HTTP",
        "id": "2dca3867-98c5-4cde-8f2c-b89ae6bd7e36",
        "monitor_port": 112
      }
    }

Status Code

For details, see Status Codes.

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback