From 46e7c9636832d1a7c5342350aba730ea093d8675 Mon Sep 17 00:00:00 2001 From: ucloud-bot Date: Thu, 3 Sep 2026 10:03:55 +0000 Subject: [PATCH] sdk: rolling update for 0.3.46 --- VERSION | 2 +- src/UK8S/Models/ULSExtractRule.php | 120 ++++++++++++--- src/UK8S/Models/ULSInputDetail.php | 32 +++- src/UK8S/UK8SClient.php | 31 ++-- src/ULB/Apis/CreateListenerRequest.php | 20 +++ .../Apis/UpdateListenerAttributeRequest.php | 20 +++ .../CreateListenerParamHealthCheckConfig.php | 136 ++++++++++++++++- ...istenerAttributeParamHealthCheckConfig.php | 140 ++++++++++++++++-- src/ULB/ULBClient.php | 32 ++-- 9 files changed, 466 insertions(+), 67 deletions(-) diff --git a/VERSION b/VERSION index 5d8b11a..b9c7814 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.45 +0.3.46 diff --git a/src/UK8S/Models/ULSExtractRule.php b/src/UK8S/Models/ULSExtractRule.php index 3088cd1..34f1005 100644 --- a/src/UK8S/Models/ULSExtractRule.php +++ b/src/UK8S/Models/ULSExtractRule.php @@ -23,7 +23,7 @@ class ULSExtractRule extends Response /** - * CollectPolicy: 采集策略。可选值: full (全量采集存量日志), increment (从当前时间点增量采集)。默认为 full。 + * CollectPolicy: 采集策略。可选值:full(全量采集存量日志)、increment(从当前时间点增量采集)。默认为 full。 * * @return string|null */ @@ -33,7 +33,7 @@ public function getCollectPolicy() } /** - * CollectPolicy: 采集策略。可选值: full (全量采集存量日志), increment (从当前时间点增量采集)。默认为 full。 + * CollectPolicy: 采集策略。可选值:full(全量采集存量日志)、increment(从当前时间点增量采集)。默认为 full。 * * @param string $collectPolicy */ @@ -43,7 +43,7 @@ public function setCollectPolicy($collectPolicy) } /** - * Encode: 日志原文的编码格式。可选值: utf-8, gbk。默认为 utf-8。 + * Encode: 日志原文的编码格式。可选值:utf-8、gbk。默认为 utf-8。 * * @return string|null */ @@ -53,7 +53,7 @@ public function getEncode() } /** - * Encode: 日志原文的编码格式。可选值: utf-8, gbk。默认为 utf-8。 + * Encode: 日志原文的编码格式。可选值:utf-8、gbk。默认为 utf-8。 * * @param string $encode */ @@ -63,7 +63,7 @@ public function setEncode($encode) } /** - * LogType: 日志解析类型,决定了如何结构化日志。 + * LogType: 日志解析类型。可选值:json、delimiter、full_regex、multi_line_full_regex、multi_line_delimiter、minimal_list、multi_line。 * * @return string|null */ @@ -73,7 +73,7 @@ public function getLogType() } /** - * LogType: 日志解析类型,决定了如何结构化日志。 + * LogType: 日志解析类型。可选值:json、delimiter、full_regex、multi_line_full_regex、multi_line_delimiter、minimal_list、multi_line。 * * @param string $logType */ @@ -83,7 +83,7 @@ public function setLogType($logType) } /** - * Delimiter: 当 LogType 为delimiter_log 时可选,可选字段 ' ',' ','|',';',',' + * Delimiter: 分隔符。适用于 delimiter 或 multi_line_delimiter,可选值:space、tab、|、;、,。 * * @return string|null */ @@ -93,7 +93,7 @@ public function getDelimiter() } /** - * Delimiter: 当 LogType 为delimiter_log 时可选,可选字段 ' ',' ','|',';',',' + * Delimiter: 分隔符。适用于 delimiter 或 multi_line_delimiter,可选值:space、tab、|、;、,。 * * @param string $delimiter */ @@ -103,7 +103,27 @@ public function setDelimiter($delimiter) } /** - * BeginningRegex: 行首正则表达式。当 logType 为多行模式 (如 multiline_log 或 multiline_fullregex_log) 时,用于标识一条新日志的开始。 + * DelimiterBase64: Base64 编码的分隔符。填写时优先于 Delimiter。 + * + * @return string|null + */ + public function getDelimiterBase64() + { + return $this->get("DelimiterBase64"); + } + + /** + * DelimiterBase64: Base64 编码的分隔符。填写时优先于 Delimiter。 + * + * @param string $delimiterBase64 + */ + public function setDelimiterBase64($delimiterBase64) + { + $this->set("DelimiterBase64", $delimiterBase64); + } + + /** + * BeginningRegex: 行首正则表达式。在 multi_line、multi_line_full_regex 或 multi_line_delimiter 模式下,BeginningRegex 和 BeginningRegexBase64 必须至少填写一个。 * * @return string|null */ @@ -113,7 +133,7 @@ public function getBeginningRegex() } /** - * BeginningRegex: 行首正则表达式。当 logType 为多行模式 (如 multiline_log 或 multiline_fullregex_log) 时,用于标识一条新日志的开始。 + * BeginningRegex: 行首正则表达式。在 multi_line、multi_line_full_regex 或 multi_line_delimiter 模式下,BeginningRegex 和 BeginningRegexBase64 必须至少填写一个。 * * @param string $beginningRegex */ @@ -123,7 +143,27 @@ public function setBeginningRegex($beginningRegex) } /** - * LogRegex: 日志提取正则表达式。当 logType 为正则模式 (如 fullregex_log 或 multiline_fullregex_log) 时,用于从日志中提取字段。 + * BeginningRegexBase64: Base64 编码的行首正则表达式。填写时优先于 BeginningRegex。 + * + * @return string|null + */ + public function getBeginningRegexBase64() + { + return $this->get("BeginningRegexBase64"); + } + + /** + * BeginningRegexBase64: Base64 编码的行首正则表达式。填写时优先于 BeginningRegex。 + * + * @param string $beginningRegexBase64 + */ + public function setBeginningRegexBase64($beginningRegexBase64) + { + $this->set("BeginningRegexBase64", $beginningRegexBase64); + } + + /** + * LogRegex: 日志提取正则表达式。在 full_regex 或 multi_line_full_regex 模式下,LogRegex 和 LogRegexBase64 必须至少填写一个。 * * @return string|null */ @@ -133,7 +173,7 @@ public function getLogRegex() } /** - * LogRegex: 日志提取正则表达式。当 logType 为正则模式 (如 fullregex_log 或 multiline_fullregex_log) 时,用于从日志中提取字段。 + * LogRegex: 日志提取正则表达式。在 full_regex 或 multi_line_full_regex 模式下,LogRegex 和 LogRegexBase64 必须至少填写一个。 * * @param string $logRegex */ @@ -143,7 +183,27 @@ public function setLogRegex($logRegex) } /** - * TimeKey: 指定时间字段。 + * LogRegexBase64: Base64 编码的日志提取正则表达式。填写时优先于 LogRegex。 + * + * @return string|null + */ + public function getLogRegexBase64() + { + return $this->get("LogRegexBase64"); + } + + /** + * LogRegexBase64: Base64 编码的日志提取正则表达式。填写时优先于 LogRegex。 + * + * @param string $logRegexBase64 + */ + public function setLogRegexBase64($logRegexBase64) + { + $this->set("LogRegexBase64", $logRegexBase64); + } + + /** + * TimeKey: 包含日志时间的字段名。 * * @return string|null */ @@ -153,7 +213,7 @@ public function getTimeKey() } /** - * TimeKey: 指定时间字段。 + * TimeKey: 包含日志时间的字段名。 * * @param string $timeKey */ @@ -163,7 +223,7 @@ public function setTimeKey($timeKey) } /** - * TimeFormat: timeKey 对应的时间格式。如: %Y-%m-%d %H:%M:%S + * TimeFormat: TimeKey 对应的时间格式。在 json、full_regex 或 multi_line_full_regex 模式下,填写 TimeKey 时必须同时填写 TimeFormat。 * * @return string|null */ @@ -173,7 +233,7 @@ public function getTimeFormat() } /** - * TimeFormat: timeKey 对应的时间格式。如: %Y-%m-%d %H:%M:%S + * TimeFormat: TimeKey 对应的时间格式。在 json、full_regex 或 multi_line_full_regex 模式下,填写 TimeKey 时必须同时填写 TimeFormat。 * * @param string $timeFormat */ @@ -183,7 +243,7 @@ public function setTimeFormat($timeFormat) } /** - * UnMatchUpload: 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。 + * UnMatchUpload: 是否上传解析失败的日志。字符串 true 表示上传,false 表示丢弃。默认为 false。 * * @return string|null */ @@ -193,7 +253,7 @@ public function getUnMatchUpload() } /** - * UnMatchUpload: 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。 + * UnMatchUpload: 是否上传解析失败的日志。字符串 true 表示上传,false 表示丢弃。默认为 false。 * * @param string $unMatchUpload */ @@ -203,7 +263,7 @@ public function setUnMatchUpload($unMatchUpload) } /** - * UnMatchKey: 如果 unMatchUpload 为 true,无法解析的日志原文将被存放在此字段指定的 Key 下。默认为 LogParseFailure。 + * UnMatchKey: 存放无法解析的日志原文的 Key。UnMatchUpload 为 true 时必须填写。 * * @return string|null */ @@ -213,7 +273,7 @@ public function getUnMatchKey() } /** - * UnMatchKey: 如果 unMatchUpload 为 true,无法解析的日志原文将被存放在此字段指定的 Key 下。默认为 LogParseFailure。 + * UnMatchKey: 存放无法解析的日志原文的 Key。UnMatchUpload 为 true 时必须填写。 * * @param string $unMatchKey */ @@ -221,4 +281,24 @@ public function setUnMatchKey($unMatchKey) { $this->set("UnMatchKey", $unMatchKey); } + + /** + * Keys: 提取后的字段名列表。仅适用于 delimiter、full_regex、multi_line_full_regex 和 multi_line_delimiter。 + * + * @return string[]|null + */ + public function getKeys() + { + return $this->get("Keys"); + } + + /** + * Keys: 提取后的字段名列表。仅适用于 delimiter、full_regex、multi_line_full_regex 和 multi_line_delimiter。 + * + * @param string[] $keys + */ + public function setKeys(array $keys) + { + $this->set("Keys", $keys); + } } diff --git a/src/UK8S/Models/ULSInputDetail.php b/src/UK8S/Models/ULSInputDetail.php index 8f30e57..0895dd3 100644 --- a/src/UK8S/Models/ULSInputDetail.php +++ b/src/UK8S/Models/ULSInputDetail.php @@ -23,7 +23,7 @@ class ULSInputDetail extends Response /** - * FilePaths: 采集路径,数组。 + * FilePaths: 日志采集路径列表。仅适用于 container_file。 * * @return ULSFilePaths[]|null */ @@ -41,7 +41,7 @@ public function getFilePaths() } /** - * FilePaths: 采集路径,数组。 + * FilePaths: 日志采集路径列表。仅适用于 container_file。 * * @param ULSFilePaths[] $filePaths */ @@ -55,7 +55,7 @@ public function setFilePaths(array $filePaths) } /** - * Type: 日志输入类型。当前主要支持 container_file,表示采集容器标准输出或文件。 + * Type: 日志输入类型。可选值:container_file、container_stdout。 * * @return string|null */ @@ -65,7 +65,7 @@ public function getType() } /** - * Type: 日志输入类型。当前主要支持 container_file,表示采集容器标准输出或文件。 + * Type: 日志输入类型。可选值:container_file、container_stdout。 * * @param string $type */ @@ -75,7 +75,27 @@ public function setType($type) } /** - * InputMetadata: 定义哪些容器相关的元数据需要附加到日志中。 + * Stream: 容器标准输出流类型。仅适用于 container_stdout,可选值:all、stdout、stderr,默认为 all。 + * + * @return string|null + */ + public function getStream() + { + return $this->get("Stream"); + } + + /** + * Stream: 容器标准输出流类型。仅适用于 container_stdout,可选值:all、stdout、stderr,默认为 all。 + * + * @param string $stream + */ + public function setStream($stream) + { + $this->set("Stream", $stream); + } + + /** + * InputMetadata: 定义需要附加到日志中的容器相关元数据。 * * @return ULSInputMetadata|null */ @@ -85,7 +105,7 @@ public function getInputMetadata() } /** - * InputMetadata: 定义哪些容器相关的元数据需要附加到日志中。 + * InputMetadata: 定义需要附加到日志中的容器相关元数据。 * * @param ULSInputMetadata $inputMetadata */ diff --git a/src/UK8S/UK8SClient.php b/src/UK8S/UK8SClient.php index 53394e1..e5661c7 100644 --- a/src/UK8S/UK8SClient.php +++ b/src/UK8S/UK8SClient.php @@ -1267,26 +1267,31 @@ public function listUK8SNodeGroup(ListUK8SNodeGroupRequest $request = null) * "ClusterId" => (string) uk8s集群id * "MachineGroup" => (string) 机器组 * "ExtractRule" => (object) 定义日志的提取、解析和格式化规则。见 ULSExtractRule[ - * "CollectPolicy" => (string) 采集策略。可选值: full (全量采集存量日志), increment (从当前时间点增量采集)。默认为 full。 - * "Encode" => (string) 日志原文的编码格式。可选值: utf-8, gbk。默认为 utf-8。 - * "LogType" => (string) 日志解析类型,决定了如何结构化日志。 - * "Delimiter" => (string) 当 LogType 为delimiter_log 时可选,可选字段 ' ',' ','|',';',',' - * "BeginningRegex" => (string) 行首正则表达式。当 logType 为多行模式 (如 multiline_log 或 multiline_fullregex_log) 时,用于标识一条新日志的开始。 - * "LogRegex" => (string) 日志提取正则表达式。当 logType 为正则模式 (如 fullregex_log 或 multiline_fullregex_log) 时,用于从日志中提取字段。 - * "TimeKey" => (string) 指定时间字段。 - * "TimeFormat" => (string) timeKey 对应的时间格式。如: %Y-%m-%d %H:%M:%S - * "UnMatchUpload" => (string) 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。 - * "UnMatchKey" => (string) 如果 unMatchUpload 为 true,无法解析的日志原文将被存放在此字段指定的 Key 下。默认为 LogParseFailure。 + * "CollectPolicy" => (string) 采集策略。可选值:full(全量采集存量日志)、increment(从当前时间点增量采集)。默认为 full。 + * "Encode" => (string) 日志原文的编码格式。可选值:utf-8、gbk。默认为 utf-8。 + * "LogType" => (string) 日志解析类型。可选值:json、delimiter、full_regex、multi_line_full_regex、multi_line_delimiter、minimal_list、multi_line。 + * "Delimiter" => (string) 分隔符。适用于 delimiter 或 multi_line_delimiter,可选值:space、tab、|、;、,。 + * "DelimiterBase64" => (string) Base64 编码的分隔符。填写时优先于 Delimiter。 + * "BeginningRegex" => (string) 行首正则表达式。在 multi_line、multi_line_full_regex 或 multi_line_delimiter 模式下,BeginningRegex 和 BeginningRegexBase64 必须至少填写一个。 + * "BeginningRegexBase64" => (string) Base64 编码的行首正则表达式。填写时优先于 BeginningRegex。 + * "LogRegex" => (string) 日志提取正则表达式。在 full_regex 或 multi_line_full_regex 模式下,LogRegex 和 LogRegexBase64 必须至少填写一个。 + * "LogRegexBase64" => (string) Base64 编码的日志提取正则表达式。填写时优先于 LogRegex。 + * "TimeKey" => (string) 包含日志时间的字段名。 + * "TimeFormat" => (string) TimeKey 对应的时间格式。在 json、full_regex 或 multi_line_full_regex 模式下,填写 TimeKey 时必须同时填写 TimeFormat。 + * "UnMatchUpload" => (string) 是否上传解析失败的日志。字符串 true 表示上传,false 表示丢弃。默认为 false。 + * "UnMatchKey" => (string) 存放无法解析的日志原文的 Key。UnMatchUpload 为 true 时必须填写。 + * "Keys" => (array) 提取后的字段名列表。仅适用于 delimiter、full_regex、multi_line_full_regex 和 multi_line_delimiter。 * ] * "InputDetail" => (object) 定义日志的输入来源(例如容器文件)。见 ULSInputDetail[ - * "FilePaths" => (array) 采集路径,数组。[ + * "FilePaths" => (array) 日志采集路径列表。仅适用于 container_file。[ * [ * "Path" => (string) 定义采集路径 * "File" => (string) 采集文件 * ] * ] - * "Type" => (string) 日志输入类型。当前主要支持 container_file,表示采集容器标准输出或文件。 - * "InputMetadata" => (object) 定义哪些容器相关的元数据需要附加到日志中。[ + * "Type" => (string) 日志输入类型。可选值:container_file、container_stdout。 + * "Stream" => (string) 容器标准输出流类型。仅适用于 container_stdout,可选值:all、stdout、stderr,默认为 all。 + * "InputMetadata" => (object) 定义需要附加到日志中的容器相关元数据。[ * "Container" => (string) 指定具体要采集元数据的容器名。如果留空,则不采集容器的元数据,可选字段:container_name,namespace,pod_name,pod_ip,pod_uid,container_id,image_name。Pod Label 元数据通过指定 InputDetail.Metadata.Labels 字段。 * "Labels" => (string) 定义要采集哪些 Pod 的标签 (Labels)。可选值:*:采集所有标签。app,version:仅采集 app 和 version 这两个标签。""(空字符串):不采集任何标签。 * ] diff --git a/src/ULB/Apis/CreateListenerRequest.php b/src/ULB/Apis/CreateListenerRequest.php index 4c2c215..eba33bf 100644 --- a/src/ULB/Apis/CreateListenerRequest.php +++ b/src/ULB/Apis/CreateListenerRequest.php @@ -371,4 +371,24 @@ public function setRedirectPort($redirectPort) { $this->set("RedirectPort", $redirectPort); } + + /** + * TargetProtocol: 后端协议。应用型限定取值:“HTTP,HTTPS,GRPC",默认值“HTTP” + * + * @return string|null + */ + public function getTargetProtocol() + { + return $this->get("TargetProtocol"); + } + + /** + * TargetProtocol: 后端协议。应用型限定取值:“HTTP,HTTPS,GRPC",默认值“HTTP” + * + * @param string $targetProtocol + */ + public function setTargetProtocol($targetProtocol) + { + $this->set("TargetProtocol", $targetProtocol); + } } diff --git a/src/ULB/Apis/UpdateListenerAttributeRequest.php b/src/ULB/Apis/UpdateListenerAttributeRequest.php index 0aea646..4cf5d01 100644 --- a/src/ULB/Apis/UpdateListenerAttributeRequest.php +++ b/src/ULB/Apis/UpdateListenerAttributeRequest.php @@ -352,4 +352,24 @@ public function setRedirectPort($redirectPort) { $this->set("RedirectPort", $redirectPort); } + + /** + * TargetProtocol: 后端协议。应用型限定取值:“HTTP,HTTPS,GRPC",默认值“HTTP” + * + * @return string|null + */ + public function getTargetProtocol() + { + return $this->get("TargetProtocol"); + } + + /** + * TargetProtocol: 后端协议。应用型限定取值:“HTTP,HTTPS,GRPC",默认值“HTTP” + * + * @param string $targetProtocol + */ + public function setTargetProtocol($targetProtocol) + { + $this->set("TargetProtocol", $targetProtocol); + } } diff --git a/src/ULB/Params/CreateListenerParamHealthCheckConfig.php b/src/ULB/Params/CreateListenerParamHealthCheckConfig.php index 16ff337..b1c0ba0 100644 --- a/src/ULB/Params/CreateListenerParamHealthCheckConfig.php +++ b/src/ULB/Params/CreateListenerParamHealthCheckConfig.php @@ -23,7 +23,7 @@ class CreateListenerParamHealthCheckConfig extends Request /** - * Enabled: 是否开启健康检查功能。暂时不支持关闭。默认值为:true + * Enabled: 是否开启健康检查功能。默认值为:true * * @return boolean|null */ @@ -33,7 +33,7 @@ public function getEnabled() } /** - * Enabled: 是否开启健康检查功能。暂时不支持关闭。默认值为:true + * Enabled: 是否开启健康检查功能。默认值为:true * * @param boolean $enabled */ @@ -63,7 +63,7 @@ public function setType($type) } /** - * Domain: (应用型专用)HTTP检查域名 + * Domain: (应用型专用)HTTP/GRPC检查域名 * * @return string|null */ @@ -73,7 +73,7 @@ public function getDomain() } /** - * Domain: (应用型专用)HTTP检查域名 + * Domain: (应用型专用)HTTP/GRPC检查域名 * * @param string $domain */ @@ -83,7 +83,7 @@ public function setDomain($domain) } /** - * Path: (应用型专用)HTTP检查路径 + * Path: (应用型专用)HTTP/GRPC检查路径 * * @return string|null */ @@ -93,7 +93,7 @@ public function getPath() } /** - * Path: (应用型专用)HTTP检查路径 + * Path: (应用型专用)HTTP/GRPC检查路径 * * @param string $path */ @@ -123,7 +123,7 @@ public function setMethod($method) } /** - * ResponseCode: (应用型专用)GRPC检查响应码 + * ResponseCode: (应用型专用)HTTP时为2xx,3xx格式(逗号分隔),GRPC时为数字码(逗号分隔) * * @return string|null */ @@ -133,7 +133,7 @@ public function getResponseCode() } /** - * ResponseCode: (应用型专用)GRPC检查响应码 + * ResponseCode: (应用型专用)HTTP时为2xx,3xx格式(逗号分隔),GRPC时为数字码(逗号分隔) * * @param string $responseCode */ @@ -141,4 +141,124 @@ public function setResponseCode($responseCode) { $this->set("ResponseCode", $responseCode); } + + /** + * Port: (应用型专用)端口 + * + * @return integer|null + */ + public function getPort() + { + return $this->get("Port"); + } + + /** + * Port: (应用型专用)端口 + * + * @param int $port + */ + public function setPort($port) + { + $this->set("Port", $port); + } + + /** + * HTTPVersion: (应用型专用)检查协议 + * + * @return string|null + */ + public function getHTTPVersion() + { + return $this->get("HTTPVersion"); + } + + /** + * HTTPVersion: (应用型专用)检查协议 + * + * @param string $httpVersion + */ + public function setHTTPVersion($httpVersion) + { + $this->set("HTTPVersion", $httpVersion); + } + + /** + * TimeOut: (应用型专用)超时时间,秒,必须小于Interval + * + * @return integer|null + */ + public function getTimeOut() + { + return $this->get("TimeOut"); + } + + /** + * TimeOut: (应用型专用)超时时间,秒,必须小于Interval + * + * @param int $timeOut + */ + public function setTimeOut($timeOut) + { + $this->set("TimeOut", $timeOut); + } + + /** + * Interval: (应用型专用)间隔时间,秒,必须大于TimeOut + * + * @return integer|null + */ + public function getInterval() + { + return $this->get("Interval"); + } + + /** + * Interval: (应用型专用)间隔时间,秒,必须大于TimeOut + * + * @param int $interval + */ + public function setInterval($interval) + { + $this->set("Interval", $interval); + } + + /** + * UpCounts: (应用型专用)判定成功的连续次数 + * + * @return integer|null + */ + public function getUpCounts() + { + return $this->get("UpCounts"); + } + + /** + * UpCounts: (应用型专用)判定成功的连续次数 + * + * @param int $upCounts + */ + public function setUpCounts($upCounts) + { + $this->set("UpCounts", $upCounts); + } + + /** + * DownCounts: (应用型专用)判定失败的连续次数 + * + * @return integer|null + */ + public function getDownCounts() + { + return $this->get("DownCounts"); + } + + /** + * DownCounts: (应用型专用)判定失败的连续次数 + * + * @param int $downCounts + */ + public function setDownCounts($downCounts) + { + $this->set("DownCounts", $downCounts); + } } diff --git a/src/ULB/Params/UpdateListenerAttributeParamHealthCheckConfig.php b/src/ULB/Params/UpdateListenerAttributeParamHealthCheckConfig.php index d867b8a..7877040 100644 --- a/src/ULB/Params/UpdateListenerAttributeParamHealthCheckConfig.php +++ b/src/ULB/Params/UpdateListenerAttributeParamHealthCheckConfig.php @@ -23,7 +23,7 @@ class UpdateListenerAttributeParamHealthCheckConfig extends Request /** - * Enabled: 是否开启健康检查功能。暂时不支持关闭;默认值为:true + * Enabled: 是否开启健康检查功能。默认值为:true * * @return boolean|null */ @@ -33,7 +33,7 @@ public function getEnabled() } /** - * Enabled: 是否开启健康检查功能。暂时不支持关闭;默认值为:true + * Enabled: 是否开启健康检查功能。默认值为:true * * @param boolean $enabled */ @@ -43,7 +43,7 @@ public function setEnabled($enabled) } /** - * Type: 健康检查方式。应用型限定取值:“Port”/"HTTP";默认值:“Port” + * Type: 健康检查方式。应用型限定取值:“Port”/"HTTP/GRPC",默认值:“Port” * * @return string|null */ @@ -53,7 +53,7 @@ public function getType() } /** - * Type: 健康检查方式。应用型限定取值:“Port”/"HTTP";默认值:“Port” + * Type: 健康检查方式。应用型限定取值:“Port”/"HTTP/GRPC",默认值:“Port” * * @param string $type */ @@ -63,7 +63,7 @@ public function setType($type) } /** - * Domain: (应用型专用)HTTP检查域名 + * Domain: (应用型专用)HTTP/GRPC检查域名 * * @return string|null */ @@ -73,7 +73,7 @@ public function getDomain() } /** - * Domain: (应用型专用)HTTP检查域名 + * Domain: (应用型专用)HTTP/GRPC检查域名 * * @param string $domain */ @@ -83,7 +83,7 @@ public function setDomain($domain) } /** - * Path: (应用型专用)HTTP检查路径 + * Path: (应用型专用)HTTP/GRPC检查路径 * * @return string|null */ @@ -93,7 +93,7 @@ public function getPath() } /** - * Path: (应用型专用)HTTP检查路径 + * Path: (应用型专用)HTTP/GRPC检查路径 * * @param string $path */ @@ -123,7 +123,7 @@ public function setMethod($method) } /** - * ResponseCode: (应用型专用)GRPC检查响应码 + * ResponseCode: (应用型专用)HTTP时为2xx,3xx格式(逗号分隔),GRPC时为数字码(逗号分隔) * * @return string|null */ @@ -133,7 +133,7 @@ public function getResponseCode() } /** - * ResponseCode: (应用型专用)GRPC检查响应码 + * ResponseCode: (应用型专用)HTTP时为2xx,3xx格式(逗号分隔),GRPC时为数字码(逗号分隔) * * @param string $responseCode */ @@ -141,4 +141,124 @@ public function setResponseCode($responseCode) { $this->set("ResponseCode", $responseCode); } + + /** + * Port: (应用型专用)端口 + * + * @return integer|null + */ + public function getPort() + { + return $this->get("Port"); + } + + /** + * Port: (应用型专用)端口 + * + * @param int $port + */ + public function setPort($port) + { + $this->set("Port", $port); + } + + /** + * HTTPVersion: (应用型专用)检查协议 + * + * @return string|null + */ + public function getHTTPVersion() + { + return $this->get("HTTPVersion"); + } + + /** + * HTTPVersion: (应用型专用)检查协议 + * + * @param string $httpVersion + */ + public function setHTTPVersion($httpVersion) + { + $this->set("HTTPVersion", $httpVersion); + } + + /** + * TimeOut: (应用型专用)超时时间,秒,必须小于Interval + * + * @return integer|null + */ + public function getTimeOut() + { + return $this->get("TimeOut"); + } + + /** + * TimeOut: (应用型专用)超时时间,秒,必须小于Interval + * + * @param int $timeOut + */ + public function setTimeOut($timeOut) + { + $this->set("TimeOut", $timeOut); + } + + /** + * Interval: (应用型专用)间隔时间,秒,必须大于TimeOut + * + * @return integer|null + */ + public function getInterval() + { + return $this->get("Interval"); + } + + /** + * Interval: (应用型专用)间隔时间,秒,必须大于TimeOut + * + * @param int $interval + */ + public function setInterval($interval) + { + $this->set("Interval", $interval); + } + + /** + * UpCounts: (应用型专用)判定成功的连续次数 + * + * @return integer|null + */ + public function getUpCounts() + { + return $this->get("UpCounts"); + } + + /** + * UpCounts: (应用型专用)判定成功的连续次数 + * + * @param int $upCounts + */ + public function setUpCounts($upCounts) + { + $this->set("UpCounts", $upCounts); + } + + /** + * DownCounts: (应用型专用)判定失败的连续次数 + * + * @return integer|null + */ + public function getDownCounts() + { + return $this->get("DownCounts"); + } + + /** + * DownCounts: (应用型专用)判定失败的连续次数 + * + * @param int $downCounts + */ + public function setDownCounts($downCounts) + { + $this->set("DownCounts", $downCounts); + } } diff --git a/src/ULB/ULBClient.php b/src/ULB/ULBClient.php index f00b41d..6a96020 100644 --- a/src/ULB/ULBClient.php +++ b/src/ULB/ULBClient.php @@ -298,17 +298,24 @@ public function bindSSL(BindSSLRequest $request = null) * "CookieName" => (string) (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效;限定字符长度:[0-255] * ] * "HealthCheckConfig" => (object) [ - * "Enabled" => (boolean) 是否开启健康检查功能。暂时不支持关闭。默认值为:true + * "Enabled" => (boolean) 是否开启健康检查功能。默认值为:true * "Type" => (string) 健康检查方式。应用型限定取值:“Port”/"HTTP/GRPC",默认值:“Port” - * "Domain" => (string) (应用型专用)HTTP检查域名 - * "Path" => (string) (应用型专用)HTTP检查路径 + * "Domain" => (string) (应用型专用)HTTP/GRPC检查域名 + * "Path" => (string) (应用型专用)HTTP/GRPC检查路径 * "Method" => (string) (应用型专用)HTTP检查方法。只支持GET和HEAD。 - * "ResponseCode" => (string) (应用型专用)GRPC检查响应码 + * "ResponseCode" => (string) (应用型专用)HTTP时为2xx,3xx格式(逗号分隔),GRPC时为数字码(逗号分隔) + * "Port" => (integer) (应用型专用)端口 + * "HTTPVersion" => (string) (应用型专用)检查协议 + * "TimeOut" => (integer) (应用型专用)超时时间,秒,必须小于Interval + * "Interval" => (integer) (应用型专用)间隔时间,秒,必须大于TimeOut + * "UpCounts" => (integer) (应用型专用)判定成功的连续次数 + * "DownCounts" => (integer) (应用型专用)判定失败的连续次数 * ] * "CompressionEnabled" => (boolean) (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩。默认值为:false * "HTTP2Enabled" => (boolean) (应用型专用)是否开启HTTP/2特性。仅HTTPS监听支持开启;默认值为:false * "RedirectEnabled" => (boolean) (应用型专用)是否开启HTTP重定向到HTTPS。仅HTTP监听支持开启;默认值为:false * "RedirectPort" => (integer) (应用型专用)重定向端口。限定取值:[1-65535],默认值443 + * "TargetProtocol" => (string) 后端协议。应用型限定取值:“HTTP,HTTPS,GRPC",默认值“HTTP” * ] * * Outputs: @@ -2145,17 +2152,24 @@ public function updateBackendBatch(UpdateBackendBatchRequest $request = null) * "CookieName" => (string) (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效;限定字符长度:[0-255] * ] * "HealthCheckConfig" => (object) [ - * "Enabled" => (boolean) 是否开启健康检查功能。暂时不支持关闭;默认值为:true - * "Type" => (string) 健康检查方式。应用型限定取值:“Port”/"HTTP";默认值:“Port” - * "Domain" => (string) (应用型专用)HTTP检查域名 - * "Path" => (string) (应用型专用)HTTP检查路径 + * "Enabled" => (boolean) 是否开启健康检查功能。默认值为:true + * "Type" => (string) 健康检查方式。应用型限定取值:“Port”/"HTTP/GRPC",默认值:“Port” + * "Domain" => (string) (应用型专用)HTTP/GRPC检查域名 + * "Path" => (string) (应用型专用)HTTP/GRPC检查路径 * "Method" => (string) (应用型专用)HTTP检查方法。只支持GET和HEAD。 - * "ResponseCode" => (string) (应用型专用)GRPC检查响应码 + * "ResponseCode" => (string) (应用型专用)HTTP时为2xx,3xx格式(逗号分隔),GRPC时为数字码(逗号分隔) + * "Port" => (integer) (应用型专用)端口 + * "HTTPVersion" => (string) (应用型专用)检查协议 + * "TimeOut" => (integer) (应用型专用)超时时间,秒,必须小于Interval + * "Interval" => (integer) (应用型专用)间隔时间,秒,必须大于TimeOut + * "UpCounts" => (integer) (应用型专用)判定成功的连续次数 + * "DownCounts" => (integer) (应用型专用)判定失败的连续次数 * ] * "CompressionEnabled" => (boolean) (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩 * "HTTP2Enabled" => (boolean) (应用型专用)是否开启HTTP/2特性。仅HTTPS监听支持开启 * "RedirectEnabled" => (boolean) (应用型专用)是否开启HTTP重定向到HTTPS。仅HTTP监听支持开启 * "RedirectPort" => (integer) (应用型专用)重定向端口。限定取值:[1-65535] + * "TargetProtocol" => (string) 后端协议。应用型限定取值:“HTTP,HTTPS,GRPC",默认值“HTTP” * ] * * Outputs: