Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

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

Configuring a Health Check

Updated on 2024-04-09 GMT+08:00

Function

This API is used to configure a health check for backend ECSs.

URI

POST /v1.0/{project_id}/elbaas/healthcheck

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

listener_id

Yes

String

Specifies the ID of the listener with which the health check is associated.

healthcheck_protocol

No

String

  • Specifies the health check protocol. A listener using UDP is not allowed for a private network load balancer.
  • The value can be HTTP, TCP, or UDP.

healthcheck_uri

No

String

  • Specifies the health check URI. This parameter is valid when healthcheck_protocol is HTTP.
  • The value can contain 1 to 80 characters that must start with a slash (/) and can contain only letters, digits, and special characters such as -/.%?#&_=

healthcheck_connect_port

No

Integer

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

healthy_threshold

No

Integer

  • Specifies the number of consecutive health checks when the health check result of a backend ECS changes from fail to success.
  • The value ranges from 1 to 10.

unhealthy_threshold

No

Integer

  • Specifies the number of consecutive health checks when the health check result of a backend ECS changes from success to fail.
  • The value ranges from 1 to 10.

healthcheck_timeout

No

Integer

  • Specifies the maximum time required for waiting for a response from the health check in the unit of second.
  • The value ranges from 1 to 50.

healthcheck_interval

No

Integer

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

Request

  • Request parameters

    None

  • Example request 1: Configuring an HTTP health check
    {
        "healthcheck_connect_port": 80,
        "healthcheck_interval": 5,
        "healthcheck_protocol": "HTTP",
        "healthcheck_timeout": 10,
        "healthcheck_uri": "/",
        "healthy_threshold": 3,
        "listener_id": "3ce8c4429478a5eb6ef4930de2d75b28",
        "unhealthy_threshold": 3
    }
  • Example request 2: Configuring a TCP health check
    {
        "healthcheck_connect_port": 80,
        "healthcheck_interval": 5,
        "healthcheck_protocol": "TCP",
        "healthcheck_timeout": 10,
        "healthcheck_uri": "",
        "healthy_threshold": 3,
        "listener_id": "3ce8c4429478a5eb6ef4930de2d75b28",
        "unhealthy_threshold": 3
    }

Response

  • Response parameters
    Table 2 Parameter description

    Parameter

    Type

    Description

    healthcheck_interval

    Integer

    Specifies the maximum time between health checks in the unit of second.

    listener_id

    String

    Specifies the ID of the listener with which the health check is associated.

    id

    String

    Specifies the health check ID.

    healthcheck_protocol

    String

    Specifies the health check protocol.

    unhealthy_threshold

    Integer

    Specifies the number of consecutive health checks when the health check result of a backend ECS changes from success to fail.

    update_time

    String

    Specifies the time when the health check was updated.

    create_time

    String

    Specifies the time when the health check was configured.

    healthcheck_connect_port

    Integer

    Specifies the health check port.

    healthcheck_timeout

    Integer

    Specifies the maximum time required for waiting for a response from the health check in the unit of second.

    healthcheck_uri

    String

    Specifies the health check URI. This parameter is valid when healthcheck_protocol is HTTP.

    healthy_threshold

    Integer

    Specifies the number of consecutive health checks when the health check result of a backend ECS changes from fail to success.

  • Example response 1: Configuring an HTTP health check
    {
         "healthcheck_interval":5,
         "listener_id":"3ce8c4429478a5eb6ef4930de2d75b28",
         "id":"134e5ea962327c6a574b83e6e7f31f35",
         "healthcheck_protocol":"HTTP",
         "unhealthy_threshold":3,
         "update_time":"2015-12-25 03:57:23",
         "create_time":"2015-12-25 03:57:23",
         "healthcheck_connect_port":80,
         "healthcheck_timeout":10,
         "healthcheck_uri":"\/",
         "healthy_threshold":3
    }
  • Example response 2: Configuring a TCP health check
    {
         "healthcheck_interval":5,
         "listener_id":"3ce8c4429478a5eb6ef4930de2d75b28",
         "id":"134e5ea962327c6a574b83e6e7f31f35",
         "healthcheck_protocol":"TCP",
         "unhealthy_threshold":3,
         "update_time":"2015-12-25 03:57:23",
         "create_time":"2015-12-25 03:57:23",
         "healthcheck_connect_port":80,
         "healthcheck_timeout":10,
         "healthcheck_uri":"",
         "healthy_threshold":3
    }

Status Code

  • Normal

    200

  • Error

    Status Code

    Message

    Description

    400

    badRequest

    Request error.

    401

    unauthorized

    Authentication failed.

    403

    userDisabled

    You do not have the permission to perform the operation.

    404

    Not Found

    The requested page does not exist.

    500

    authFault

    System error.

    503

    serviceUnavailable

    The service is unavailable.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback