Files
2026-02-07 15:48:27 +08:00

157 lines
8.0 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
namespace TencentCloud.Clb.V20180317.Models
{
using Newtonsoft.Json;
using System.Collections.Generic;
using TencentCloud.Common;
public class HealthCheck : AbstractModel
{
/// <summary>
/// 是否开启健康检查1开启、0关闭
/// </summary>
[JsonProperty("HealthSwitch")]
public long? HealthSwitch{ get; set; }
/// <summary>
/// 健康检查的响应超时时间仅适用于四层监听器可选值2~60默认值2单位秒。响应超时时间要小于检查间隔时间。
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("TimeOut")]
public long? TimeOut{ get; set; }
/// <summary>
/// 健康检查探测间隔时间默认值5可选值5~300单位秒。
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("IntervalTime")]
public long? IntervalTime{ get; set; }
/// <summary>
/// 健康阈值默认值3表示当连续探测三次健康则表示该转发正常可选值2~10单位次。
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("HealthNum")]
public long? HealthNum{ get; set; }
/// <summary>
/// 不健康阈值默认值3表示当连续探测三次不健康则表示该转发异常可选值2~10单位次。
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("UnHealthNum")]
public long? UnHealthNum{ get; set; }
/// <summary>
/// 健康检查状态码仅适用于HTTP/HTTPS转发规则、TCP监听器的HTTP健康检查方式。可选值1~31默认 31。
/// 1 表示探测后返回值 1xx 代表健康2 表示返回 2xx 代表健康4 表示返回 3xx 代表健康8 表示返回 4xx 代表健康16 表示返回 5xx 代表健康。若希望多种返回码都可代表健康则将相应的值相加。注意TCP监听器的HTTP健康检查方式只支持指定一种健康检查状态码。
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("HttpCode")]
public long? HttpCode{ get; set; }
/// <summary>
/// 健康检查路径仅适用于HTTP/HTTPS转发规则、TCP监听器的HTTP健康检查方式
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("HttpCheckPath")]
public string HttpCheckPath{ get; set; }
/// <summary>
/// 健康检查域名仅适用于HTTP/HTTPS转发规则、TCP监听器的HTTP健康检查方式
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("HttpCheckDomain")]
public string HttpCheckDomain{ get; set; }
/// <summary>
/// 健康检查方法仅适用于HTTP/HTTPS转发规则、TCP监听器的HTTP健康检查方式默认值HEAD可选值HEAD或GET。
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("HttpCheckMethod")]
public string HttpCheckMethod{ get; set; }
/// <summary>
/// 自定义探测相关参数。健康检查端口默认为后端服务的端口除非您希望指定特定端口否则建议留空。仅适用于TCP/UDP监听器
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("CheckPort")]
public long? CheckPort{ get; set; }
/// <summary>
/// 自定义探测相关参数。健康检查协议CheckType的值取CUSTOM时必填此字段代表健康检查的输入格式可取值HEX或TEXT取值为HEX时SendContext和RecvContext的字符只能在0123456789ABCDEF中选取且长度必须是偶数位。仅适用于TCP/UDP监听器
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("ContextType")]
public string ContextType{ get; set; }
/// <summary>
/// 自定义探测相关参数。健康检查协议CheckType的值取CUSTOM时必填此字段代表健康检查发送的请求内容只允许ASCII可见字符最大长度限制500。仅适用于TCP/UDP监听器
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("SendContext")]
public string SendContext{ get; set; }
/// <summary>
/// 自定义探测相关参数。健康检查协议CheckType的值取CUSTOM时必填此字段代表健康检查返回的结果只允许ASCII可见字符最大长度限制500。仅适用于TCP/UDP监听器
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("RecvContext")]
public string RecvContext{ get; set; }
/// <summary>
/// 自定义探测相关参数。健康检查使用的协议TCP | HTTP | CUSTOM仅适用于TCP/UDP监听器其中UDP监听器只支持CUSTOM如果使用自定义健康检查功能则必传
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("CheckType")]
public string CheckType{ get; set; }
/// <summary>
/// 自定义探测相关参数。健康检查协议CheckType的值取HTTP时必传此字段代表后端服务的HTTP版本HTTP/1.0、HTTP/1.1仅适用于TCP监听器
/// 注意:此字段可能返回 null表示取不到有效值。
/// </summary>
[JsonProperty("HttpVersion")]
public string HttpVersion{ get; set; }
/// <summary>
/// For internal usage only. DO NOT USE IT.
/// </summary>
internal override void ToMap(Dictionary<string, string> map, string prefix)
{
this.SetParamSimple(map, prefix + "HealthSwitch", this.HealthSwitch);
this.SetParamSimple(map, prefix + "TimeOut", this.TimeOut);
this.SetParamSimple(map, prefix + "IntervalTime", this.IntervalTime);
this.SetParamSimple(map, prefix + "HealthNum", this.HealthNum);
this.SetParamSimple(map, prefix + "UnHealthNum", this.UnHealthNum);
this.SetParamSimple(map, prefix + "HttpCode", this.HttpCode);
this.SetParamSimple(map, prefix + "HttpCheckPath", this.HttpCheckPath);
this.SetParamSimple(map, prefix + "HttpCheckDomain", this.HttpCheckDomain);
this.SetParamSimple(map, prefix + "HttpCheckMethod", this.HttpCheckMethod);
this.SetParamSimple(map, prefix + "CheckPort", this.CheckPort);
this.SetParamSimple(map, prefix + "ContextType", this.ContextType);
this.SetParamSimple(map, prefix + "SendContext", this.SendContext);
this.SetParamSimple(map, prefix + "RecvContext", this.RecvContext);
this.SetParamSimple(map, prefix + "CheckType", this.CheckType);
this.SetParamSimple(map, prefix + "HttpVersion", this.HttpVersion);
}
}
}