diff --git a/ucloud/services/uk8s/client.py b/ucloud/services/uk8s/client.py index 5fd59ce..c29c710 100644 --- a/ucloud/services/uk8s/client.py +++ b/ucloud/services/uk8s/client.py @@ -210,8 +210,9 @@ def add_uk8s_uhost_node( - **EIP** (dict) - 见 **AddUK8SUHostNodeParamNetworkInterfaceEIP** 模型定义 - **AddUK8SUHostNodeParamKubeletConfiguration** - - **ContainerLogMaxFiles** (str) - 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup + **AddUK8SUHostNodeParamUserLabels** + - **Key** (str) - UK8S用户资源标签的键值 + - **Value** (str) - UK8S用户资源标签的值 **AddUK8SUHostNodeParamSecGroupId** @@ -220,9 +221,8 @@ def add_uk8s_uhost_node( - **Priority** (str) - 安全组优先级。取值范围[1, 5] - **AddUK8SUHostNodeParamUserLabels** - - **Key** (str) - UK8S用户资源标签的键值 - - **Value** (str) - UK8S用户资源标签的值 + **AddUK8SUHostNodeParamKubeletConfiguration** + - **ContainerLogMaxFiles** (str) - 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup """ @@ -292,6 +292,11 @@ def create_uk8s_cluster_v2( - **Priority** (str) - 安全组优先级。取值范围[1, 5] + **CreateUK8SClusterV2ParamMaster** + - **SecGroupId** (list) - 见 **CreateUK8SClusterV2ParamMasterSecGroupId** 模型定义 + - **Zone** (str) - Master节点所属可用区,需要设置 Master.0.Zone、 Master.1.Zone、Master.2.Zone 三个 Master 节点的可用区。 三个节点可部署在不同可用区。参见 `可用区列表 `_ + + **CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP** - **Bandwidth** (int) - 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] - **CouponId** (str) - 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 @@ -300,10 +305,6 @@ def create_uk8s_cluster_v2( - **ShareBandwidthId** (str) - 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 - **CreateUK8SClusterV2ParamKubeProxy** - - **Mode** (str) - 集群kube-proxy模式。支持iptables和ipvs,默认为iptables。 - - **CreateUK8SClusterV2ParamNodesNetworkInterface** - **EIP** (dict) - 见 **CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP** 模型定义 @@ -340,9 +341,8 @@ def create_uk8s_cluster_v2( - **Zone** (str) - 一组Nodes节点所属可用区,可创建多组Nodes节点,如一组是CPU Nodes节点,另一组是GPU Nodes节点。参见 `可用区列表 `_ - **CreateUK8SClusterV2ParamMaster** - - **SecGroupId** (list) - 见 **CreateUK8SClusterV2ParamMasterSecGroupId** 模型定义 - - **Zone** (str) - Master节点所属可用区,需要设置 Master.0.Zone、 Master.1.Zone、Master.2.Zone 三个 Master 节点的可用区。 三个节点可部署在不同可用区。参见 `可用区列表 `_ + **CreateUK8SClusterV2ParamKubeProxy** + - **Mode** (str) - 集群kube-proxy模式。支持iptables和ipvs,默认为iptables。 """ @@ -382,31 +382,38 @@ def create_uk8s_uls_config( **Request Model** - **CreateUK8SULSConfigParamInputDetailMetadata** - - **Container** (str) - 指定具体要采集元数据的容器名。如果留空,则不采集容器的元数据,可选字段:container_name,namespace,pod_name,pod_ip,pod_uid,container_id,image_name。Pod Label 元数据通过指定 InputDetail.Metadata.Labels字段。 - - **Labels** (str) - 定义要采集哪些 Pod 的标签 (Labels)。可选值: * (采集所有标签), "app,version" (仅采集 app 和 version), "" (不采集任何标签)。 + **CreateUK8SULSConfigParamMatchRulePodLabelsLabels** + - **Key** (str) - 按 Pod 标签匹配时,要匹配的标签的 Key。 + - **Value** (str) - 按 Pod 标签匹配时,要匹配的标签的值。 + - **ValueOperator** (str) - 按 Pod 标签匹配时,标签值的匹配操作符。可选值: in, notin。 - **CreateUK8SULSConfigParamInputDetailFilePaths** - - **File** (str) - 定义采集路径的文件名 - - **Path** (str) - 定义采集路径 + **CreateUK8SULSConfigParamMatchRulePodLabels** + - **Labels** (list) - 见 **CreateUK8SULSConfigParamMatchRulePodLabelsLabels** 模型定义 + - **Namespace** (str) - 命名空间名称 + - **NamespaceOperator** (str) - 指定/排除命名空间, 可选值: in/notin - **CreateUK8SULSConfigParamInputDetail** - - **FilePaths** (list) - 见 **CreateUK8SULSConfigParamInputDetailFilePaths** 模型定义 - - **Metadata** (dict) - 见 **CreateUK8SULSConfigParamInputDetailMetadata** 模型定义 - - **Stream** (str) - all、stdout、stderr,默认 all (用于 InputDetail.Type = container_stdout) - - **Type** (str) - 日志输入类型。支持 container_file 和 container_stdout + **CreateUK8SULSConfigParamMatchRuleWorkloads** + - **Name** (str) - 按工作负载匹配时,工作负载的名称。 + - **Namespace** (str) - 按工作负载匹配时,工作负载所在的命名空间。 + - **Type** (str) - 按工作负载匹配时,工作负载的类型,例如 deployment, statefulset, daemonset,job, cronjob。 + + + **CreateUK8SULSConfigParamMatchRule** + - **Container** (str) - 要匹配的容器名称,*表示所有容器,用逗号分隔 + - **ContainerOperator** (str) - 容器名称匹配操作符。支持:in(包含),notin(不包含) + - **PodLabels** (dict) - 见 **CreateUK8SULSConfigParamMatchRulePodLabels** 模型定义 + - **Workloads** (list) - 见 **CreateUK8SULSConfigParamMatchRuleWorkloads** 模型定义 **CreateUK8SULSConfigParamExtractRuleExtractRule** - **LogRegexBase64** (str) - Base64 编码的日志提取正则表达式。 - **CreateUK8SULSConfigParamMatchRuleWorkloads** - - **Name** (str) - 按工作负载匹配时,工作负载的名称。 - - **Namespace** (str) - 按工作负载匹配时,工作负载所在的命名空间。 - - **Type** (str) - 按工作负载匹配时,工作负载的类型,例如 deployment, statefulset, daemonset,job, cronjob。 + **CreateUK8SULSConfigParamInputDetailMetadata** + - **Container** (str) - 指定具体要采集元数据的容器名。如果留空,则不采集容器的元数据,可选字段:container_name,namespace,pod_name,pod_ip,pod_uid,container_id,image_name。Pod Label 元数据通过指定 InputDetail.Metadata.Labels字段。 + - **Labels** (str) - 定义要采集哪些 Pod 的标签 (Labels)。可选值: * (采集所有标签), "app,version" (仅采集 app 和 version), "" (不采集任何标签)。 **CreateUK8SULSConfigParamExtractRule** @@ -426,23 +433,16 @@ def create_uk8s_uls_config( - **UnMatchUpload** (str) - 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。 - **CreateUK8SULSConfigParamMatchRulePodLabelsLabels** - - **Key** (str) - 按 Pod 标签匹配时,要匹配的标签的 Key。 - - **Value** (str) - 按 Pod 标签匹配时,要匹配的标签的值。 - - **ValueOperator** (str) - 按 Pod 标签匹配时,标签值的匹配操作符。可选值: in, notin。 - - - **CreateUK8SULSConfigParamMatchRulePodLabels** - - **Labels** (list) - 见 **CreateUK8SULSConfigParamMatchRulePodLabelsLabels** 模型定义 - - **Namespace** (str) - 命名空间名称 - - **NamespaceOperator** (str) - 指定/排除命名空间, 可选值: in/notin + **CreateUK8SULSConfigParamInputDetailFilePaths** + - **File** (str) - 定义采集路径的文件名 + - **Path** (str) - 定义采集路径 - **CreateUK8SULSConfigParamMatchRule** - - **Container** (str) - 要匹配的容器名称,*表示所有容器,用逗号分隔 - - **ContainerOperator** (str) - 容器名称匹配操作符。支持:in(包含),notin(不包含) - - **PodLabels** (dict) - 见 **CreateUK8SULSConfigParamMatchRulePodLabels** 模型定义 - - **Workloads** (list) - 见 **CreateUK8SULSConfigParamMatchRuleWorkloads** 模型定义 + **CreateUK8SULSConfigParamInputDetail** + - **FilePaths** (list) - 见 **CreateUK8SULSConfigParamInputDetailFilePaths** 模型定义 + - **Metadata** (dict) - 见 **CreateUK8SULSConfigParamInputDetailMetadata** 模型定义 + - **Stream** (str) - all、stdout、stderr,默认 all (用于 InputDetail.Type = container_stdout) + - **Type** (str) - 日志输入类型。支持 container_file 和 container_stdout """ @@ -604,13 +604,17 @@ def describe_uk8s_cluster( - **Priority** (str) - 安全组优先级 - **KubeProxy** - - **Mode** (str) - KubeProxy模式,枚举值为[ipvs,iptables] - - - **LoopbackClientCert** - - **ExpireTime** (int) - 证书到期时间 - - **Warn** (bool) - 证书是否进入过期告警状态 + **IPSet** + - **Bandwidth** (int) - IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) + - **Default** (str) - 是否默认的弹性网卡的信息。true: 是默认弹性网卡;其他值:不是。 + - **IP** (str) - IP地址 + - **IPId** (str) - IP资源ID (内网IP无对应的资源ID) + - **IPMode** (str) - IP 地址分配模式 + - **Mac** (str) - 网卡的 MAC 地址 + - **NetworkInterfaceId** (str) - 虚拟网卡 Id + - **SubnetId** (str) - IP 所在的 子网 Id + - **Type** (str) - 国际: Internation,BGP: Bgp,内网: Private + - **VPCId** (str) - IP 所属的 VPC Id **Autoscaler** @@ -636,19 +640,6 @@ def describe_uk8s_cluster( - **Type** (str) - 磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk - **IPSet** - - **Bandwidth** (int) - IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) - - **Default** (str) - 是否默认的弹性网卡的信息。true: 是默认弹性网卡;其他值:不是。 - - **IP** (str) - IP地址 - - **IPId** (str) - IP资源ID (内网IP无对应的资源ID) - - **IPMode** (str) - IP 地址分配模式 - - **Mac** (str) - 网卡的 MAC 地址 - - **NetworkInterfaceId** (str) - 虚拟网卡 Id - - **SubnetId** (str) - IP 所在的 子网 Id - - **Type** (str) - 国际: Internation,BGP: Bgp,内网: Private - - **VPCId** (str) - IP 所属的 VPC Id - - **UhostInfo** - **BasicImageName** (str) - 基础镜像名称 - **CPU** (int) - Cpu数量 @@ -671,6 +662,15 @@ def describe_uk8s_cluster( - **Zone** (str) - 所在机房 + **KubeProxy** + - **Mode** (str) - KubeProxy模式,枚举值为[ipvs,iptables] + + + **LoopbackClientCert** + - **ExpireTime** (int) - 证书到期时间 + - **Warn** (bool) - 证书是否进入过期告警状态 + + """ # build request d = { @@ -1038,11 +1038,23 @@ def list_uk8s_node_group( **Response Model** - **EvictionCondition** - - **ImagefsAvailable** (str) - 镜像文件系统存储相关驱逐条件或宽限时间。 - - **MemoryAvailable** (str) - 内存相关驱逐条件或宽限时间。 - - **NodefsAvailable** (str) - 节点存储余量相关驱逐条件或宽限时间。 - - **NodefsInodesFree** (str) - 节点剩余inodes驱逐条件或宽限时间。 + **SecGroupId** + - **Id** (str) - 安全组名称 + - **Name** (str) - 安全组id + - **Priority** (str) - 安全组优先级 + + + **DiskSet** + - **BackupType** (str) - 备份方案,枚举类型:BASIC_SNAPSHOT,普通快照;DATAARK,方舟。无快照则不返回该字段。 + - **DiskId** (str) - 磁盘长ID + - **DiskType** (str) - LOCAL_NOMAL| CLOUD_NORMAL| LOCAL_SSD| CLOUD_SSD|EXCLUSIVE_LOCAL_DISK + - **Drive** (str) - 磁盘盘符 + - **Encrypted** (str) - Yes: 加密 No: 非加密 + - **IOPS** (int) - 当前主机的IOPS值 + - **IsBoot** (str) - True| False + - **Name** (str) - UDisk名字(仅当磁盘是UDisk时返回) + - **Size** (int) - 磁盘大小,单位: GB + - **Type** (str) - 磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk **ReservedResource** @@ -1052,6 +1064,13 @@ def list_uk8s_node_group( - **Pid** (str) - Pid + **EvictionCondition** + - **ImagefsAvailable** (str) - 镜像文件系统存储相关驱逐条件或宽限时间。 + - **MemoryAvailable** (str) - 内存相关驱逐条件或宽限时间。 + - **NodefsAvailable** (str) - 节点存储余量相关驱逐条件或宽限时间。 + - **NodefsInodesFree** (str) - 节点剩余inodes驱逐条件或宽限时间。 + + **KubeletConfiguration** - **ContainerLogMaxFiles** (int) - 最大日志文件数量 - **ContainerLogMaxSize** (str) - 最大日志文件大小 @@ -1065,25 +1084,6 @@ def list_uk8s_node_group( - **SystemReserved** (dict) - 见 **ReservedResource** 模型定义 - **SecGroupId** - - **Id** (str) - 安全组名称 - - **Name** (str) - 安全组id - - **Priority** (str) - 安全组优先级 - - - **DiskSet** - - **BackupType** (str) - 备份方案,枚举类型:BASIC_SNAPSHOT,普通快照;DATAARK,方舟。无快照则不返回该字段。 - - **DiskId** (str) - 磁盘长ID - - **DiskType** (str) - LOCAL_NOMAL| CLOUD_NORMAL| LOCAL_SSD| CLOUD_SSD|EXCLUSIVE_LOCAL_DISK - - **Drive** (str) - 磁盘盘符 - - **Encrypted** (str) - Yes: 加密 No: 非加密 - - **IOPS** (int) - 当前主机的IOPS值 - - **IsBoot** (str) - True| False - - **Name** (str) - UDisk名字(仅当磁盘是UDisk时返回) - - **Size** (int) - 磁盘大小,单位: GB - - **Type** (str) - 磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk - - **EIP** - **Bandwidth** (int) - 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] - **CouponId** (str) - 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 @@ -1171,11 +1171,6 @@ def list_uk8s_uls_config( **Response Model** - **ULSFilePaths** - - **File** (str) - 采集文件 - - **Path** (str) - 定义采集路径 - - **ULSLabels** - **Key** (str) - 要匹配的标签的 Key。 - **Value** (str) - 要匹配的标签的值。 @@ -1202,16 +1197,25 @@ def list_uk8s_uls_config( **ULSExtractRule** - - **BeginningRegex** (str) - 行首正则表达式。当 logType 为多行模式 (如 multiline_log 或 multiline_fullregex_log) 时,用于标识一条新日志的开始。 - - **CollectPolicy** (str) - 采集策略。可选值: full (全量采集存量日志), increment (从当前时间点增量采集)。默认为 full。 - - **Delimiter** (str) - 当 LogType 为delimiter_log 时可选,可选字段 ' ',' ','|',';',',' - - **Encode** (str) - 日志原文的编码格式。可选值: utf-8, gbk。默认为 utf-8。 - - **LogRegex** (str) - 日志提取正则表达式。当 logType 为正则模式 (如 fullregex_log 或 multiline_fullregex_log) 时,用于从日志中提取字段。 - - **LogType** (str) - 日志解析类型,决定了如何结构化日志。 - - **TimeFormat** (str) - timeKey 对应的时间格式。如: %Y-%m-%d %H:%M:%S - - **TimeKey** (str) - 指定时间字段。 - - **UnMatchKey** (str) - 如果 unMatchUpload 为 true,无法解析的日志原文将被存放在此字段指定的 Key 下。默认为 LogParseFailure。 - - **UnMatchUpload** (str) - 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。 + - **BeginningRegex** (str) - 行首正则表达式。在 multi_line、multi_line_full_regex 或 multi_line_delimiter 模式下,BeginningRegex 和 BeginningRegexBase64 必须至少填写一个。 + - **BeginningRegexBase64** (str) - Base64 编码的行首正则表达式。填写时优先于 BeginningRegex。 + - **CollectPolicy** (str) - 采集策略。可选值:full(全量采集存量日志)、increment(从当前时间点增量采集)。默认为 full。 + - **Delimiter** (str) - 分隔符。适用于 delimiter 或 multi_line_delimiter,可选值:space、tab、|、;、,。 + - **DelimiterBase64** (str) - Base64 编码的分隔符。填写时优先于 Delimiter。 + - **Encode** (str) - 日志原文的编码格式。可选值:utf-8、gbk。默认为 utf-8。 + - **Keys** (list) - 提取后的字段名列表。仅适用于 delimiter、full_regex、multi_line_full_regex 和 multi_line_delimiter。 + - **LogRegex** (str) - 日志提取正则表达式。在 full_regex 或 multi_line_full_regex 模式下,LogRegex 和 LogRegexBase64 必须至少填写一个。 + - **LogRegexBase64** (str) - Base64 编码的日志提取正则表达式。填写时优先于 LogRegex。 + - **LogType** (str) - 日志解析类型。可选值:json、delimiter、full_regex、multi_line_full_regex、multi_line_delimiter、minimal_list、multi_line。 + - **TimeFormat** (str) - TimeKey 对应的时间格式。在 json、full_regex 或 multi_line_full_regex 模式下,填写 TimeKey 时必须同时填写 TimeFormat。 + - **TimeKey** (str) - 包含日志时间的字段名。 + - **UnMatchKey** (str) - 存放无法解析的日志原文的 Key。UnMatchUpload 为 true 时必须填写。 + - **UnMatchUpload** (str) - 是否上传解析失败的日志。字符串 true 表示上传,false 表示丢弃。默认为 false。 + + + **ULSFilePaths** + - **File** (str) - 采集文件 + - **Path** (str) - 定义采集路径 **ULSInputMetadata** @@ -1222,7 +1226,8 @@ def list_uk8s_uls_config( **ULSInputDetail** - **FilePaths** (list) - 见 **ULSFilePaths** 模型定义 - **InputMetadata** (dict) - 见 **ULSInputMetadata** 模型定义 - - **Type** (str) - 日志输入类型。当前主要支持 container_file,表示采集容器标准输出或文件。 + - **Stream** (str) - 容器标准输出流类型。仅适用于 container_stdout,可选值:all、stdout、stderr,默认为 all。 + - **Type** (str) - 日志输入类型。可选值:container_file、container_stdout。 **ULSLogConfig** @@ -1297,11 +1302,6 @@ def update_uk8s_uls_config( **Request Model** - **UpdateUK8SULSConfigParamInputDetailMetadata** - - **Container** (str) - 要附加到日志中的容器元数据字段,多个字段使用逗号分隔。可选字段:container_name、namespace、pod_name、pod_ip、pod_uid、container_id、image_name。留空表示不采集容器元数据。 - - **Labels** (str) - 要采集的Pod标签。*表示采集所有标签,app,version表示仅采集指定标签,空字符串表示不采集标签。 - - **UpdateUK8SULSConfigParamMatchRulePodLabelsLabels** - **Key** (str) - 按Pod标签匹配时,要匹配的标签Key。 - **Value** (str) - 要匹配的标签值。 @@ -1327,6 +1327,23 @@ def update_uk8s_uls_config( - **Workloads** (list) - 见 **UpdateUK8SULSConfigParamMatchRuleWorkloads** 模型定义 + **UpdateUK8SULSConfigParamInputDetailFilePaths** + - **File** (str) - 要采集的文件名。仅适用于container_file。 + - **Path** (str) - 日志采集路径。仅适用于container_file。 + + + **UpdateUK8SULSConfigParamInputDetailMetadata** + - **Container** (str) - 要附加到日志中的容器元数据字段,多个字段使用逗号分隔。可选字段:container_name、namespace、pod_name、pod_ip、pod_uid、container_id、image_name。留空表示不采集容器元数据。 + - **Labels** (str) - 要采集的Pod标签。*表示采集所有标签,app,version表示仅采集指定标签,空字符串表示不采集标签。 + + + **UpdateUK8SULSConfigParamInputDetail** + - **FilePaths** (list) - 见 **UpdateUK8SULSConfigParamInputDetailFilePaths** 模型定义 + - **Metadata** (dict) - 见 **UpdateUK8SULSConfigParamInputDetailMetadata** 模型定义 + - **Stream** (str) - 容器标准输出流类型。仅适用于container_stdout,可选值:all、stdout、stderr,默认为all。 + - **Type** (str) - 日志输入类型。可选值:container_file、container_stdout。 + + **UpdateUK8SULSConfigParamExtractRule** - **BeginningRegex** (str) - 行首正则表达式。multi_line、multi_line_full_regex或multi_line_delimiter模式下,BeginningRegex和BeginningRegexBase64必须至少填写一个。 - **BeginningRegexBase64** (str) - Base64编码的行首正则表达式。填写时优先于BeginningRegex。 @@ -1344,18 +1361,6 @@ def update_uk8s_uls_config( - **UnMatchUpload** (str) - 是否上传解析失败的日志。字符串true表示上传,false表示丢弃。默认为false。 - **UpdateUK8SULSConfigParamInputDetailFilePaths** - - **File** (str) - 要采集的文件名。仅适用于container_file。 - - **Path** (str) - 日志采集路径。仅适用于container_file。 - - - **UpdateUK8SULSConfigParamInputDetail** - - **FilePaths** (list) - 见 **UpdateUK8SULSConfigParamInputDetailFilePaths** 模型定义 - - **Metadata** (dict) - 见 **UpdateUK8SULSConfigParamInputDetailMetadata** 模型定义 - - **Stream** (str) - 容器标准输出流类型。仅适用于container_stdout,可选值:all、stdout、stderr,默认为all。 - - **Type** (str) - 日志输入类型。可选值:container_file、container_stdout。 - - """ # build request d = { diff --git a/ucloud/services/uk8s/schemas/apis.py b/ucloud/services/uk8s/schemas/apis.py index 1411fc3..328b4f9 100644 --- a/ucloud/services/uk8s/schemas/apis.py +++ b/ucloud/services/uk8s/schemas/apis.py @@ -160,13 +160,12 @@ class AddUK8SUHostNodeParamNetworkInterfaceSchema(schema.RequestSchema): } -class AddUK8SUHostNodeParamKubeletConfigurationSchema(schema.RequestSchema): - """AddUK8SUHostNodeParamKubeletConfiguration -""" +class AddUK8SUHostNodeParamUserLabelsSchema(schema.RequestSchema): + """AddUK8SUHostNodeParamUserLabels -""" fields = { - "ContainerLogMaxFiles": fields.Str( - required=False, dump_to="ContainerLogMaxFiles" - ), + "Key": fields.Str(required=False, dump_to="Key"), + "Value": fields.Str(required=False, dump_to="Value"), } @@ -180,12 +179,13 @@ class AddUK8SUHostNodeParamSecGroupIdSchema(schema.RequestSchema): } -class AddUK8SUHostNodeParamUserLabelsSchema(schema.RequestSchema): - """AddUK8SUHostNodeParamUserLabels -""" +class AddUK8SUHostNodeParamKubeletConfigurationSchema(schema.RequestSchema): + """AddUK8SUHostNodeParamKubeletConfiguration -""" fields = { - "Key": fields.Str(required=False, dump_to="Key"), - "Value": fields.Str(required=False, dump_to="Value"), + "ContainerLogMaxFiles": fields.Str( + required=False, dump_to="ContainerLogMaxFiles" + ), } @@ -276,6 +276,17 @@ class CreateUK8SClusterV2ParamMasterSecGroupIdSchema(schema.RequestSchema): } +class CreateUK8SClusterV2ParamMasterSchema(schema.RequestSchema): + """CreateUK8SClusterV2ParamMaster -""" + + fields = { + "SecGroupId": fields.List( + CreateUK8SClusterV2ParamMasterSecGroupIdSchema() + ), + "Zone": fields.Str(required=True, dump_to="Zone"), + } + + class CreateUK8SClusterV2ParamNodesNetworkInterfaceEIPSchema( schema.RequestSchema ): @@ -292,14 +303,6 @@ class CreateUK8SClusterV2ParamNodesNetworkInterfaceEIPSchema( } -class CreateUK8SClusterV2ParamKubeProxySchema(schema.RequestSchema): - """CreateUK8SClusterV2ParamKubeProxy -""" - - fields = { - "Mode": fields.Str(required=False, dump_to="Mode"), - } - - class CreateUK8SClusterV2ParamNodesNetworkInterfaceSchema(schema.RequestSchema): """CreateUK8SClusterV2ParamNodesNetworkInterface -""" @@ -361,14 +364,11 @@ class CreateUK8SClusterV2ParamNodesSchema(schema.RequestSchema): } -class CreateUK8SClusterV2ParamMasterSchema(schema.RequestSchema): - """CreateUK8SClusterV2ParamMaster -""" +class CreateUK8SClusterV2ParamKubeProxySchema(schema.RequestSchema): + """CreateUK8SClusterV2ParamKubeProxy -""" fields = { - "SecGroupId": fields.List( - CreateUK8SClusterV2ParamMasterSecGroupIdSchema() - ), - "Zone": fields.Str(required=True, dump_to="Zone"), + "Mode": fields.Str(required=False, dump_to="Mode"), } @@ -449,36 +449,56 @@ class CreateUK8SClusterV2ResponseSchema(schema.ResponseSchema): """ -class CreateUK8SULSConfigParamInputDetailMetadataSchema(schema.RequestSchema): - """CreateUK8SULSConfigParamInputDetailMetadata -""" +class CreateUK8SULSConfigParamMatchRulePodLabelsLabelsSchema( + schema.RequestSchema +): + """CreateUK8SULSConfigParamMatchRulePodLabelsLabels -""" fields = { - "Container": fields.Str(required=False, dump_to="Container"), - "Labels": fields.Str(required=False, dump_to="Labels"), + "Key": fields.Str(required=False, dump_to="Key"), + "Value": fields.Str(required=False, dump_to="Value"), + "ValueOperator": fields.Str(required=False, dump_to="ValueOperator"), } -class CreateUK8SULSConfigParamInputDetailFilePathsSchema(schema.RequestSchema): - """CreateUK8SULSConfigParamInputDetailFilePaths -""" +class CreateUK8SULSConfigParamMatchRulePodLabelsSchema(schema.RequestSchema): + """CreateUK8SULSConfigParamMatchRulePodLabels -""" fields = { - "File": fields.Str(required=False, dump_to="File"), - "Path": fields.Str(required=False, dump_to="Path"), + "Labels": fields.List( + CreateUK8SULSConfigParamMatchRulePodLabelsLabelsSchema() + ), + "Namespace": fields.Str(required=False, dump_to="Namespace"), + "NamespaceOperator": fields.Str( + required=False, dump_to="NamespaceOperator" + ), } -class CreateUK8SULSConfigParamInputDetailSchema(schema.RequestSchema): - """CreateUK8SULSConfigParamInputDetail -""" +class CreateUK8SULSConfigParamMatchRuleWorkloadsSchema(schema.RequestSchema): + """CreateUK8SULSConfigParamMatchRuleWorkloads -""" fields = { - "FilePaths": fields.List( - CreateUK8SULSConfigParamInputDetailFilePathsSchema() + "Name": fields.Str(required=False, dump_to="Name"), + "Namespace": fields.Str(required=False, dump_to="Namespace"), + "Type": fields.Str(required=False, dump_to="Type"), + } + + +class CreateUK8SULSConfigParamMatchRuleSchema(schema.RequestSchema): + """CreateUK8SULSConfigParamMatchRule -""" + + fields = { + "Container": fields.Str(required=False, dump_to="Container"), + "ContainerOperator": fields.Str( + required=False, dump_to="ContainerOperator" ), - "Metadata": CreateUK8SULSConfigParamInputDetailMetadataSchema( - required=False, dump_to="Metadata" + "PodLabels": CreateUK8SULSConfigParamMatchRulePodLabelsSchema( + required=False, dump_to="PodLabels" + ), + "Workloads": fields.List( + CreateUK8SULSConfigParamMatchRuleWorkloadsSchema() ), - "Stream": fields.Str(required=False, dump_to="Stream"), - "Type": fields.Str(required=True, dump_to="Type"), } @@ -492,13 +512,12 @@ class CreateUK8SULSConfigParamExtractRuleExtractRuleSchema( } -class CreateUK8SULSConfigParamMatchRuleWorkloadsSchema(schema.RequestSchema): - """CreateUK8SULSConfigParamMatchRuleWorkloads -""" +class CreateUK8SULSConfigParamInputDetailMetadataSchema(schema.RequestSchema): + """CreateUK8SULSConfigParamInputDetailMetadata -""" fields = { - "Name": fields.Str(required=False, dump_to="Name"), - "Namespace": fields.Str(required=False, dump_to="Namespace"), - "Type": fields.Str(required=False, dump_to="Type"), + "Container": fields.Str(required=False, dump_to="Container"), + "Labels": fields.Str(required=False, dump_to="Labels"), } @@ -529,46 +548,27 @@ class CreateUK8SULSConfigParamExtractRuleSchema(schema.RequestSchema): } -class CreateUK8SULSConfigParamMatchRulePodLabelsLabelsSchema( - schema.RequestSchema -): - """CreateUK8SULSConfigParamMatchRulePodLabelsLabels -""" - - fields = { - "Key": fields.Str(required=False, dump_to="Key"), - "Value": fields.Str(required=False, dump_to="Value"), - "ValueOperator": fields.Str(required=False, dump_to="ValueOperator"), - } - - -class CreateUK8SULSConfigParamMatchRulePodLabelsSchema(schema.RequestSchema): - """CreateUK8SULSConfigParamMatchRulePodLabels -""" +class CreateUK8SULSConfigParamInputDetailFilePathsSchema(schema.RequestSchema): + """CreateUK8SULSConfigParamInputDetailFilePaths -""" fields = { - "Labels": fields.List( - CreateUK8SULSConfigParamMatchRulePodLabelsLabelsSchema() - ), - "Namespace": fields.Str(required=False, dump_to="Namespace"), - "NamespaceOperator": fields.Str( - required=False, dump_to="NamespaceOperator" - ), + "File": fields.Str(required=False, dump_to="File"), + "Path": fields.Str(required=False, dump_to="Path"), } -class CreateUK8SULSConfigParamMatchRuleSchema(schema.RequestSchema): - """CreateUK8SULSConfigParamMatchRule -""" +class CreateUK8SULSConfigParamInputDetailSchema(schema.RequestSchema): + """CreateUK8SULSConfigParamInputDetail -""" fields = { - "Container": fields.Str(required=False, dump_to="Container"), - "ContainerOperator": fields.Str( - required=False, dump_to="ContainerOperator" - ), - "PodLabels": CreateUK8SULSConfigParamMatchRulePodLabelsSchema( - required=False, dump_to="PodLabels" + "FilePaths": fields.List( + CreateUK8SULSConfigParamInputDetailFilePathsSchema() ), - "Workloads": fields.List( - CreateUK8SULSConfigParamMatchRuleWorkloadsSchema() + "Metadata": CreateUK8SULSConfigParamInputDetailMetadataSchema( + required=False, dump_to="Metadata" ), + "Stream": fields.Str(required=False, dump_to="Stream"), + "Type": fields.Str(required=True, dump_to="Type"), } @@ -1094,15 +1094,6 @@ class RemoveUK8SNodeGroupResponseSchema(schema.ResponseSchema): """ -class UpdateUK8SULSConfigParamInputDetailMetadataSchema(schema.RequestSchema): - """UpdateUK8SULSConfigParamInputDetailMetadata -""" - - fields = { - "Container": fields.Str(required=False, dump_to="Container"), - "Labels": fields.Str(required=False, dump_to="Labels"), - } - - class UpdateUK8SULSConfigParamMatchRulePodLabelsLabelsSchema( schema.RequestSchema ): @@ -1156,37 +1147,21 @@ class UpdateUK8SULSConfigParamMatchRuleSchema(schema.RequestSchema): } -class UpdateUK8SULSConfigParamExtractRuleSchema(schema.RequestSchema): - """UpdateUK8SULSConfigParamExtractRule -""" +class UpdateUK8SULSConfigParamInputDetailFilePathsSchema(schema.RequestSchema): + """UpdateUK8SULSConfigParamInputDetailFilePaths -""" fields = { - "BeginningRegex": fields.Str(required=False, dump_to="BeginningRegex"), - "BeginningRegexBase64": fields.Str( - required=False, dump_to="BeginningRegexBase64" - ), - "CollectPolicy": fields.Str(required=False, dump_to="CollectPolicy"), - "Delimiter": fields.Str(required=False, dump_to="Delimiter"), - "DelimiterBase64": fields.Str( - required=False, dump_to="DelimiterBase64" - ), - "Encode": fields.Str(required=False, dump_to="Encode"), - "Keys": fields.List(fields.Str()), - "LogRegex": fields.Str(required=False, dump_to="LogRegex"), - "LogRegexBase64": fields.Str(required=False, dump_to="LogRegexBase64"), - "LogType": fields.Str(required=True, dump_to="LogType"), - "TimeFormat": fields.Str(required=False, dump_to="TimeFormat"), - "TimeKey": fields.Str(required=False, dump_to="TimeKey"), - "UnMatchKey": fields.Str(required=False, dump_to="UnMatchKey"), - "UnMatchUpload": fields.Str(required=False, dump_to="UnMatchUpload"), + "File": fields.Str(required=False, dump_to="File"), + "Path": fields.Str(required=False, dump_to="Path"), } -class UpdateUK8SULSConfigParamInputDetailFilePathsSchema(schema.RequestSchema): - """UpdateUK8SULSConfigParamInputDetailFilePaths -""" +class UpdateUK8SULSConfigParamInputDetailMetadataSchema(schema.RequestSchema): + """UpdateUK8SULSConfigParamInputDetailMetadata -""" fields = { - "File": fields.Str(required=False, dump_to="File"), - "Path": fields.Str(required=False, dump_to="Path"), + "Container": fields.Str(required=False, dump_to="Container"), + "Labels": fields.Str(required=False, dump_to="Labels"), } @@ -1205,6 +1180,31 @@ class UpdateUK8SULSConfigParamInputDetailSchema(schema.RequestSchema): } +class UpdateUK8SULSConfigParamExtractRuleSchema(schema.RequestSchema): + """UpdateUK8SULSConfigParamExtractRule -""" + + fields = { + "BeginningRegex": fields.Str(required=False, dump_to="BeginningRegex"), + "BeginningRegexBase64": fields.Str( + required=False, dump_to="BeginningRegexBase64" + ), + "CollectPolicy": fields.Str(required=False, dump_to="CollectPolicy"), + "Delimiter": fields.Str(required=False, dump_to="Delimiter"), + "DelimiterBase64": fields.Str( + required=False, dump_to="DelimiterBase64" + ), + "Encode": fields.Str(required=False, dump_to="Encode"), + "Keys": fields.List(fields.Str()), + "LogRegex": fields.Str(required=False, dump_to="LogRegex"), + "LogRegexBase64": fields.Str(required=False, dump_to="LogRegexBase64"), + "LogType": fields.Str(required=True, dump_to="LogType"), + "TimeFormat": fields.Str(required=False, dump_to="TimeFormat"), + "TimeKey": fields.Str(required=False, dump_to="TimeKey"), + "UnMatchKey": fields.Str(required=False, dump_to="UnMatchKey"), + "UnMatchUpload": fields.Str(required=False, dump_to="UnMatchUpload"), + } + + class UpdateUK8SULSConfigRequestSchema(schema.RequestSchema): """UpdateUK8SULSConfig - 更新指定UK8S集群的日志采集规则。""" diff --git a/ucloud/services/uk8s/schemas/models.py b/ucloud/services/uk8s/schemas/models.py index bb7f4af..65ad144 100644 --- a/ucloud/services/uk8s/schemas/models.py +++ b/ucloud/services/uk8s/schemas/models.py @@ -3,16 +3,6 @@ from ucloud.core.typesystem import schema, fields -class SecGroupIdSchema(schema.ResponseSchema): - """SecGroupId - 安全组""" - - fields = { - "Id": fields.Str(required=False, load_from="Id"), - "Name": fields.Str(required=False, load_from="Name"), - "Priority": fields.Str(required=False, load_from="Priority"), - } - - class DiskSetSchema(schema.ResponseSchema): """DiskSet - 节点磁盘信息""" @@ -30,20 +20,13 @@ class DiskSetSchema(schema.ResponseSchema): } -class KubeProxySchema(schema.ResponseSchema): - """KubeProxy - KubeProxy信息""" - - fields = { - "Mode": fields.Str(required=False, load_from="Mode"), - } - - -class LoopbackClientCertSchema(schema.ResponseSchema): - """LoopbackClientCert - API Server 回环客户端证书""" +class SecGroupIdSchema(schema.ResponseSchema): + """SecGroupId - 安全组""" fields = { - "ExpireTime": fields.Int(required=False, load_from="ExpireTime"), - "Warn": fields.Bool(required=False, load_from="Warn"), + "Id": fields.Str(required=False, load_from="Id"), + "Name": fields.Str(required=False, load_from="Name"), + "Priority": fields.Str(required=False, load_from="Priority"), } @@ -114,6 +97,23 @@ class AutoscalerSchema(schema.ResponseSchema): } +class LoopbackClientCertSchema(schema.ResponseSchema): + """LoopbackClientCert - API Server 回环客户端证书""" + + fields = { + "ExpireTime": fields.Int(required=False, load_from="ExpireTime"), + "Warn": fields.Bool(required=False, load_from="Warn"), + } + + +class KubeProxySchema(schema.ResponseSchema): + """KubeProxy - KubeProxy信息""" + + fields = { + "Mode": fields.Str(required=False, load_from="Mode"), + } + + class ImageInfoSchema(schema.ResponseSchema): """ImageInfo - UK8S 可用镜像信息""" @@ -267,16 +267,25 @@ class ClusterSetSchema(schema.ResponseSchema): } -class ReservedResourceSchema(schema.ResponseSchema): - """ReservedResource - 预留资源""" +class EIPSchema(schema.ResponseSchema): + """EIP - 节点EIP""" fields = { - "CPU": fields.Str(required=False, load_from="CPU"), - "EphemeralStorage": fields.Str( - required=False, load_from="EphemeralStorage" + "Bandwidth": fields.Int(required=False, load_from="Bandwidth"), + "CouponId": fields.Str(required=False, load_from="CouponId"), + "OperatorName": fields.Str(required=False, load_from="OperatorName"), + "PayMode": fields.Str(required=False, load_from="PayMode"), + "ShareBandwidthId": fields.Str( + required=False, load_from="ShareBandwidthId" ), - "Memory": fields.Str(required=False, load_from="Memory"), - "Pid": fields.Str(required=False, load_from="Pid"), + } + + +class NetworkInterfaceSchema(schema.ResponseSchema): + """NetworkInterface - 网络接口""" + + fields = { + "EIP": EIPSchema(), } @@ -299,6 +308,19 @@ class EvictionConditionSchema(schema.ResponseSchema): } +class ReservedResourceSchema(schema.ResponseSchema): + """ReservedResource - 预留资源""" + + fields = { + "CPU": fields.Str(required=False, load_from="CPU"), + "EphemeralStorage": fields.Str( + required=False, load_from="EphemeralStorage" + ), + "Memory": fields.Str(required=False, load_from="Memory"), + "Pid": fields.Str(required=False, load_from="Pid"), + } + + class KubeletConfigurationSchema(schema.ResponseSchema): """KubeletConfiguration - kubelet自定义配置""" @@ -324,28 +346,6 @@ class KubeletConfigurationSchema(schema.ResponseSchema): } -class EIPSchema(schema.ResponseSchema): - """EIP - 节点EIP""" - - fields = { - "Bandwidth": fields.Int(required=False, load_from="Bandwidth"), - "CouponId": fields.Str(required=False, load_from="CouponId"), - "OperatorName": fields.Str(required=False, load_from="OperatorName"), - "PayMode": fields.Str(required=False, load_from="PayMode"), - "ShareBandwidthId": fields.Str( - required=False, load_from="ShareBandwidthId" - ), - } - - -class NetworkInterfaceSchema(schema.ResponseSchema): - """NetworkInterface - 网络接口""" - - fields = { - "EIP": EIPSchema(), - } - - class NodeGroupSetSchema(schema.ResponseSchema): """NodeGroupSet - 节点池配置""" @@ -402,16 +402,6 @@ class NodeGroupSetSchema(schema.ResponseSchema): } -class ULSWorkloadMatchSchema(schema.ResponseSchema): - """ULSWorkloadMatch - ULSWorkloadMatch""" - - fields = { - "Name": fields.Str(required=False, load_from="Name"), - "Namespace": fields.Str(required=False, load_from="Namespace"), - "Type": fields.Str(required=False, load_from="Type"), - } - - class ULSLabelsSchema(schema.ResponseSchema): """ULSLabels - ULSLabels""" @@ -422,34 +412,6 @@ class ULSLabelsSchema(schema.ResponseSchema): } -class ULSFilePathsSchema(schema.ResponseSchema): - """ULSFilePaths - ULS采集文件路径""" - - fields = { - "File": fields.Str(required=False, load_from="File"), - "Path": fields.Str(required=False, load_from="Path"), - } - - -class ULSInputMetadataSchema(schema.ResponseSchema): - """ULSInputMetadata - ULSInputMetadata""" - - fields = { - "Container": fields.Str(required=False, load_from="Container"), - "Labels": fields.Str(required=False, load_from="Labels"), - } - - -class ULSInputDetailSchema(schema.ResponseSchema): - """ULSInputDetail - ULSInputDetail""" - - fields = { - "FilePaths": fields.List(ULSFilePathsSchema()), - "InputMetadata": ULSInputMetadataSchema(), - "Type": fields.Str(required=False, load_from="Type"), - } - - class ULSPodLabelsMatchSchema(schema.ResponseSchema): """ULSPodLabelsMatch - ULSPodLabelsMatch""" @@ -462,6 +424,16 @@ class ULSPodLabelsMatchSchema(schema.ResponseSchema): } +class ULSWorkloadMatchSchema(schema.ResponseSchema): + """ULSWorkloadMatch - ULSWorkloadMatch""" + + fields = { + "Name": fields.Str(required=False, load_from="Name"), + "Namespace": fields.Str(required=False, load_from="Namespace"), + "Type": fields.Str(required=False, load_from="Type"), + } + + class ULSMatchRuleSchema(schema.ResponseSchema): """ULSMatchRule - ULSMatchRule""" @@ -482,10 +454,20 @@ class ULSExtractRuleSchema(schema.ResponseSchema): "BeginningRegex": fields.Str( required=False, load_from="BeginningRegex" ), + "BeginningRegexBase64": fields.Str( + required=False, load_from="BeginningRegexBase64" + ), "CollectPolicy": fields.Str(required=False, load_from="CollectPolicy"), "Delimiter": fields.Str(required=False, load_from="Delimiter"), + "DelimiterBase64": fields.Str( + required=False, load_from="DelimiterBase64" + ), "Encode": fields.Str(required=False, load_from="Encode"), + "Keys": fields.List(fields.Str()), "LogRegex": fields.Str(required=False, load_from="LogRegex"), + "LogRegexBase64": fields.Str( + required=False, load_from="LogRegexBase64" + ), "LogType": fields.Str(required=False, load_from="LogType"), "TimeFormat": fields.Str(required=False, load_from="TimeFormat"), "TimeKey": fields.Str(required=False, load_from="TimeKey"), @@ -494,6 +476,35 @@ class ULSExtractRuleSchema(schema.ResponseSchema): } +class ULSFilePathsSchema(schema.ResponseSchema): + """ULSFilePaths - ULS采集文件路径""" + + fields = { + "File": fields.Str(required=False, load_from="File"), + "Path": fields.Str(required=False, load_from="Path"), + } + + +class ULSInputMetadataSchema(schema.ResponseSchema): + """ULSInputMetadata - ULSInputMetadata""" + + fields = { + "Container": fields.Str(required=False, load_from="Container"), + "Labels": fields.Str(required=False, load_from="Labels"), + } + + +class ULSInputDetailSchema(schema.ResponseSchema): + """ULSInputDetail - 定义日志的输入来源,例如容器文件或容器标准输出。""" + + fields = { + "FilePaths": fields.List(ULSFilePathsSchema()), + "InputMetadata": ULSInputMetadataSchema(), + "Stream": fields.Str(required=False, load_from="Stream"), + "Type": fields.Str(required=False, load_from="Type"), + } + + class ULSLogConfigSchema(schema.ResponseSchema): """ULSLogConfig - ULSLogConfig""" diff --git a/ucloud/services/ulb/client.py b/ucloud/services/ulb/client.py index 954db68..169a8ec 100644 --- a/ucloud/services/ulb/client.py +++ b/ucloud/services/ulb/client.py @@ -234,6 +234,7 @@ def create_listener( - **Scheduler** (str) - 负载均衡算法。应用型限定取值:"Roundrobin"/"Source"/"WeightRoundrobin"/" Leastconn"/"Backup",默认值"Roundrobin" - **SecurityPolicyId** (str) - (应用型专用)安全策略组ID。仅HTTPS监听支持绑定;默认值“Default”,表示绑定原生策略 - **StickinessConfig** (dict) - 见 **CreateListenerParamStickinessConfig** 模型定义 + - **TargetProtocol** (str) - 后端协议。应用型限定取值:“HTTP,HTTPS,GRPC",默认值“HTTP” **Response** @@ -242,12 +243,18 @@ def create_listener( **Request Model** **CreateListenerParamHealthCheckConfig** - - **Domain** (str) - (应用型专用)HTTP检查域名 - - **Enabled** (bool) - 是否开启健康检查功能。暂时不支持关闭。默认值为:true + - **Domain** (str) - (应用型专用)HTTP/GRPC检查域名 + - **DownCounts** (int) - (应用型专用)判定失败的连续次数 + - **Enabled** (bool) - 是否开启健康检查功能。默认值为:true + - **HTTPVersion** (str) - (应用型专用)检查协议 + - **Interval** (int) - (应用型专用)间隔时间,秒,必须大于TimeOut - **Method** (str) - (应用型专用)HTTP检查方法。只支持GET和HEAD。 - - **Path** (str) - (应用型专用)HTTP检查路径 - - **ResponseCode** (str) - (应用型专用)GRPC检查响应码 + - **Path** (str) - (应用型专用)HTTP/GRPC检查路径 + - **Port** (int) - (应用型专用)端口 + - **ResponseCode** (str) - (应用型专用)HTTP时为2xx,3xx格式(逗号分隔),GRPC时为数字码(逗号分隔) + - **TimeOut** (int) - (应用型专用)超时时间,秒,必须小于Interval - **Type** (str) - 健康检查方式。应用型限定取值:“Port”/"HTTP/GRPC",默认值:“Port” + - **UpCounts** (int) - (应用型专用)判定成功的连续次数 **CreateListenerParamStickinessConfig** @@ -379,10 +386,6 @@ def create_rule(self, req: typing.Optional[dict] = None, **kwargs) -> dict: **Request Model** - **CreateRuleParamRuleActionsProxyBufferingConfig** - - **CloseProxyBuffering** (bool) - 关闭缓存 - - **CreateRuleParamRuleActionsForwardConfigTargets** - **Id** (str) - 转发的后端服务节点的标识ID。限定在监听器的服务节点池里;数组长度可以是0;转发服务节点配置的数组长度不为0时,Id必填 - **Weight** (int) - 转发的后端服务节点的权重。仅监听器负载均衡算法是加权轮询是有效 @@ -392,6 +395,15 @@ def create_rule(self, req: typing.Optional[dict] = None, **kwargs) -> dict: - **Targets** (list) - 见 **CreateRuleParamRuleActionsForwardConfigTargets** 模型定义 + **CreateRuleParamRuleActionsProxyBufferingConfig** + - **CloseProxyBuffering** (bool) - 关闭缓存 + + + **CreateRuleParamRuleConditionsHostConfig** + - **MatchMode** (str) - 匹配方式。限定枚举值:"Regular"/"Wildcard",默认值:"Regular" + - **Values** (list) - 取值。暂时只支持数组长度为1;取值需符合相关匹配方式的条件;域名匹配时必填 + + **CreateRuleParamRuleActionsInsertHeaderConfig** - **Key** (str) - 插入的 header 字段名称,长度为 1~40 个字符,支持大小写字母 a~z、数字、下划线(_)和短划线(-)。头字段名称不能重复用于InsertHeader中。header 字段不能使用以下(此处判断大小写不敏感)x-real-ip、x-forwarded-for、x-forwarded-proto、x-forwarded-srcport、ucloud-alb-trace、connection、upgrade、content-length、transfer-encoding、keep-alive、te、host、cookie、remoteip、authority - **Value** (str) - 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 @@ -406,6 +418,15 @@ def create_rule(self, req: typing.Optional[dict] = None, **kwargs) -> dict: - **EnablePersistentConnection** (bool) - 开启长连接 + **CreateRuleParamRuleActionsFixedResponseConfig** + - **Content** (str) - 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 + - **HttpCode** (int) - 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 + + + **CreateRuleParamRuleConditionsPathConfig** + - **Values** (list) - 取值。暂时只支持数组长度为1;取值需符合相关条件;路径匹配时必填 + + **CreateRuleParamRuleActionsCorsConfig** - **AllowCredentials** (str) - 是否允许携带凭证信息。取值:on:是。off:否。 - **AllowHeaders** (list) - 允许跨域的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 @@ -415,11 +436,6 @@ def create_rule(self, req: typing.Optional[dict] = None, **kwargs) -> dict: - **MaxAge** (int) - 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 - **CreateRuleParamRuleActionsFixedResponseConfig** - - **Content** (str) - 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 - - **HttpCode** (int) - 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 - - **CreateRuleParamRuleActions** - **BackendConnectionConfig** (dict) - 见 **CreateRuleParamRuleActionsBackendConnectionConfig** 模型定义 - **CorsConfig** (dict) - 见 **CreateRuleParamRuleActionsCorsConfig** 模型定义 @@ -432,15 +448,6 @@ def create_rule(self, req: typing.Optional[dict] = None, **kwargs) -> dict: - **Type** (str) - 动作类型。限定枚举值:"Forward"、"InsertHeader"、"Cors"、"FixedResponse"、"RemoveHeader"。只会处理 Type 对应的结构体。 - **CreateRuleParamRuleConditionsPathConfig** - - **Values** (list) - 取值。暂时只支持数组长度为1;取值需符合相关条件;路径匹配时必填 - - - **CreateRuleParamRuleConditionsHostConfig** - - **MatchMode** (str) - 匹配方式。限定枚举值:"Regular"/"Wildcard",默认值:"Regular" - - **Values** (list) - 取值。暂时只支持数组长度为1;取值需符合相关匹配方式的条件;域名匹配时必填 - - **CreateRuleParamRuleConditions** - **HostConfig** (dict) - 见 **CreateRuleParamRuleConditionsHostConfig** 模型定义 - **PathConfig** (dict) - 见 **CreateRuleParamRuleConditionsPathConfig** 模型定义 @@ -872,19 +879,9 @@ def describe_listeners( **Response Model** - **ProxyBufferingConfig** - - **CloseProxyBuffering** (bool) - 关闭缓存 - - - **HostConfigSet** - - **MatchMode** (str) - 匹配方式。限定枚举值:Regular-正则,Wildcard-泛域名; 默认值:Regular - - **Values** (list) - 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 - - - **StickinessConfigSet** - - **CookieName** (str) - (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效 - - **Enabled** (bool) - 是否开启会话保持功能。应用型负载均衡实例基于Cookie实现 - - **Type** (str) - (应用型专用)Cookie处理方式。限定枚举值: ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY + **ForwardTargetSet** + - **Id** (str) - 服务节点的标识ID + - **Weight** (int) - 权重。仅监听器负载均衡算法是加权轮询是有效;取值范围[1-100],默认值为1 **Target** @@ -902,24 +899,19 @@ def describe_listeners( - **Weight** (int) - 服务节点的权重。仅在加权轮询算法时有效 - **Certificate** - - **IsDefault** (bool) - 是否为默认证书 - - **SSLId** (str) - 证书ID + **HostConfigSet** + - **MatchMode** (str) - 匹配方式。限定枚举值:Regular-正则,Wildcard-泛域名; 默认值:Regular + - **Values** (list) - 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 - **HealthCheckConfigSet** - - **Domain** (str) - (应用型专用)HTTP检查域名。 当Type为HTTP/GRPC时,此字段有意义,代表HTTP检查域名 - - **DownCounts** (int) - (应用型专用)判定失败的连续次数 - - **Enabled** (bool) - 是否开启健康检查功能。 默认值为:true - - **HTTPVersion** (str) - (应用型专用)检查协议 - - **Interval** (int) - (应用型专用)间隔时间,秒,必须大于TimeOut - - **Method** (str) - (应用型专用)HTTP检查方法。当Type为HTTP/GRPC时,此字段有意义,代表HTTP检查方法 - - **Path** (str) - (应用型专用)HTTP检查路径。当Type为HTTP/GRPC时,此字段有意义,代表HTTP检查路径 - - **Port** (int) - (应用型专用)端口 - - **ResponseCode** (str) - (应用型专用)检查预期状态码。HTTP时为2xx,3xx格式(逗号分隔),GRPC时为数字码(逗号分隔)。 - - **TimeOut** (int) - (应用型专用)超时时间,秒,必须小于Interval - - **Type** (str) - 健康检查方式。应用型限定取值: Port -> 端口检查;HTTP -> HTTP检查;GRPC -> GRPC检测; 默认值:Port - - **UpCounts** (int) - (应用型专用)判定成功的连续次数 + **PathConfigSet** + - **Values** (list) - 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 + + + **RuleCondition** + - **HostConfig** (dict) - 见 **HostConfigSet** 模型定义 + - **PathConfig** (dict) - 见 **PathConfigSet** 模型定义 + - **Type** (str) - 匹配条件类型。限定枚举值:Host,Path **CorsConfigSet** @@ -931,28 +923,27 @@ def describe_listeners( - **MaxAge** (int) - 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 - **ForwardTargetSet** - - **Id** (str) - 服务节点的标识ID - - **Weight** (int) - 权重。仅监听器负载均衡算法是加权轮询是有效;取值范围[1-100],默认值为1 - - - **ForwardConfigSet** - - **Targets** (list) - 见 **ForwardTargetSet** 模型定义 - - **InsertHeaderConfigSet** - **Key** (str) - 插入的 header 字段名称,长度为 1~40 个字符,支持大小写字母 a~z、数字、下划线(_)和短划线(-)。头字段名称不能重复用于InsertHeader中。header 字段不能使用以下(此处判断大小写不敏感)x-real-ip、x-forwarded-for、x-forwarded-proto、x-forwarded-srcport、ucloud-alb-trace、connection、upgrade、content-length、transfer-encoding、keep-alive、te、host、cookie、remoteip、authority - **Value** (str) - 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 - **ValueType** (str) - 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 + **RemoveHeaderConfigSet** + - **Key** (str) - 删除的 header 字段名称,目前只能删除以下几个默认配置的字段: X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort + + **FixedResponseConfigSet** - **Content** (str) - 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 - **HttpCode** (int) - 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 - **RemoveHeaderConfigSet** - - **Key** (str) - 删除的 header 字段名称,目前只能删除以下几个默认配置的字段: X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort + **ForwardConfigSet** + - **Targets** (list) - 见 **ForwardTargetSet** 模型定义 + + + **ProxyBufferingConfig** + - **CloseProxyBuffering** (bool) - 关闭缓存 **BackendConnectionConfig** @@ -971,16 +962,6 @@ def describe_listeners( - **Type** (str) - 动作类型。限定枚举值:Forward、"InsertHeader"、"Cors"、"FixedResponse"、"RemoveHeader" - **PathConfigSet** - - **Values** (list) - 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 - - - **RuleCondition** - - **HostConfig** (dict) - 见 **HostConfigSet** 模型定义 - - **PathConfig** (dict) - 见 **PathConfigSet** 模型定义 - - **Type** (str) - 匹配条件类型。限定枚举值:Host,Path - - **Rule** - **IsDefault** (bool) - 是否为默认转发规则 - **Pass** (bool) - 当转发的服务节点为空时,规则是否忽略 @@ -989,6 +970,32 @@ def describe_listeners( - **RuleId** (str) - 转发规则的ID + **HealthCheckConfigSet** + - **Domain** (str) - (应用型专用)HTTP检查域名。 当Type为HTTP/GRPC时,此字段有意义,代表HTTP检查域名 + - **DownCounts** (int) - (应用型专用)判定失败的连续次数 + - **Enabled** (bool) - 是否开启健康检查功能。 默认值为:true + - **HTTPVersion** (str) - (应用型专用)检查协议 + - **Interval** (int) - (应用型专用)间隔时间,秒,必须大于TimeOut + - **Method** (str) - (应用型专用)HTTP检查方法。当Type为HTTP/GRPC时,此字段有意义,代表HTTP检查方法 + - **Path** (str) - (应用型专用)HTTP检查路径。当Type为HTTP/GRPC时,此字段有意义,代表HTTP检查路径 + - **Port** (int) - (应用型专用)端口 + - **ResponseCode** (str) - (应用型专用)检查预期状态码。HTTP时为2xx,3xx格式(逗号分隔),GRPC时为数字码(逗号分隔)。 + - **TimeOut** (int) - (应用型专用)超时时间,秒,必须小于Interval + - **Type** (str) - 健康检查方式。应用型限定取值: Port -> 端口检查;HTTP -> HTTP检查;GRPC -> GRPC检测; 默认值:Port + - **UpCounts** (int) - (应用型专用)判定成功的连续次数 + + + **StickinessConfigSet** + - **CookieName** (str) - (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效 + - **Enabled** (bool) - 是否开启会话保持功能。应用型负载均衡实例基于Cookie实现 + - **Type** (str) - (应用型专用)Cookie处理方式。限定枚举值: ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY + + + **Certificate** + - **IsDefault** (bool) - 是否为默认证书 + - **SSLId** (str) - 证书ID + + **Listener** - **Certificates** (list) - 见 **Certificate** 模型定义 - **CompressionEnabled** (bool) - (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩 @@ -1047,18 +1054,50 @@ def describe_load_balancers( **Response Model** - **FixedResponseConfigSet** - - **Content** (str) - 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 - - **HttpCode** (int) - 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 + **FirewallSet** + - **FirewallId** (str) - 防火墙ID + - **FirewallName** (str) - 防火墙名称 - **ForwardTargetSet** - - **Id** (str) - 服务节点的标识ID - - **Weight** (int) - 权重。仅监听器负载均衡算法是加权轮询是有效;取值范围[1-100],默认值为1 + **HealthCheckConfigSet** + - **Domain** (str) - (应用型专用)HTTP检查域名。 当Type为HTTP/GRPC时,此字段有意义,代表HTTP检查域名 + - **DownCounts** (int) - (应用型专用)判定失败的连续次数 + - **Enabled** (bool) - 是否开启健康检查功能。 默认值为:true + - **HTTPVersion** (str) - (应用型专用)检查协议 + - **Interval** (int) - (应用型专用)间隔时间,秒,必须大于TimeOut + - **Method** (str) - (应用型专用)HTTP检查方法。当Type为HTTP/GRPC时,此字段有意义,代表HTTP检查方法 + - **Path** (str) - (应用型专用)HTTP检查路径。当Type为HTTP/GRPC时,此字段有意义,代表HTTP检查路径 + - **Port** (int) - (应用型专用)端口 + - **ResponseCode** (str) - (应用型专用)检查预期状态码。HTTP时为2xx,3xx格式(逗号分隔),GRPC时为数字码(逗号分隔)。 + - **TimeOut** (int) - (应用型专用)超时时间,秒,必须小于Interval + - **Type** (str) - 健康检查方式。应用型限定取值: Port -> 端口检查;HTTP -> HTTP检查;GRPC -> GRPC检测; 默认值:Port + - **UpCounts** (int) - (应用型专用)判定成功的连续次数 - **ForwardConfigSet** - - **Targets** (list) - 见 **ForwardTargetSet** 模型定义 + **Certificate** + - **IsDefault** (bool) - 是否为默认证书 + - **SSLId** (str) - 证书ID + + + **StickinessConfigSet** + - **CookieName** (str) - (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效 + - **Enabled** (bool) - 是否开启会话保持功能。应用型负载均衡实例基于Cookie实现 + - **Type** (str) - (应用型专用)Cookie处理方式。限定枚举值: ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY + + + **HostConfigSet** + - **MatchMode** (str) - 匹配方式。限定枚举值:Regular-正则,Wildcard-泛域名; 默认值:Regular + - **Values** (list) - 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 + + + **PathConfigSet** + - **Values** (list) - 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 + + + **RuleCondition** + - **HostConfig** (dict) - 见 **HostConfigSet** 模型定义 + - **PathConfig** (dict) - 见 **PathConfigSet** 模型定义 + - **Type** (str) - 匹配条件类型。限定枚举值:Host,Path **InsertHeaderConfigSet** @@ -1067,8 +1106,8 @@ def describe_load_balancers( - **ValueType** (str) - 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 - **BackendConnectionConfig** - - **EnablePersistentConnection** (bool) - 是否开启长连接 + **RemoveHeaderConfigSet** + - **Key** (str) - 删除的 header 字段名称,目前只能删除以下几个默认配置的字段: X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort **CorsConfigSet** @@ -1080,14 +1119,28 @@ def describe_load_balancers( - **MaxAge** (int) - 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 - **RemoveHeaderConfigSet** - - **Key** (str) - 删除的 header 字段名称,目前只能删除以下几个默认配置的字段: X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort + **ForwardTargetSet** + - **Id** (str) - 服务节点的标识ID + - **Weight** (int) - 权重。仅监听器负载均衡算法是加权轮询是有效;取值范围[1-100],默认值为1 + + + **ForwardConfigSet** + - **Targets** (list) - 见 **ForwardTargetSet** 模型定义 **ProxyBufferingConfig** - **CloseProxyBuffering** (bool) - 关闭缓存 + **BackendConnectionConfig** + - **EnablePersistentConnection** (bool) - 是否开启长连接 + + + **FixedResponseConfigSet** + - **Content** (str) - 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 + - **HttpCode** (int) - 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 + + **RuleAction** - **BackendConnectionConfig** (dict) - 见 **BackendConnectionConfig** 模型定义 - **CorsConfig** (dict) - 见 **CorsConfigSet** 模型定义 @@ -1100,21 +1153,6 @@ def describe_load_balancers( - **Type** (str) - 动作类型。限定枚举值:Forward、"InsertHeader"、"Cors"、"FixedResponse"、"RemoveHeader" - **HostConfigSet** - - **MatchMode** (str) - 匹配方式。限定枚举值:Regular-正则,Wildcard-泛域名; 默认值:Regular - - **Values** (list) - 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 - - - **PathConfigSet** - - **Values** (list) - 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 - - - **RuleCondition** - - **HostConfig** (dict) - 见 **HostConfigSet** 模型定义 - - **PathConfig** (dict) - 见 **PathConfigSet** 模型定义 - - **Type** (str) - 匹配条件类型。限定枚举值:Host,Path - - **Rule** - **IsDefault** (bool) - 是否为默认转发规则 - **Pass** (bool) - 当转发的服务节点为空时,规则是否忽略 @@ -1138,32 +1176,6 @@ def describe_load_balancers( - **Weight** (int) - 服务节点的权重。仅在加权轮询算法时有效 - **Certificate** - - **IsDefault** (bool) - 是否为默认证书 - - **SSLId** (str) - 证书ID - - - **StickinessConfigSet** - - **CookieName** (str) - (应用型专用)自定义Cookie。当StickinessType取值"UserDefined"时有效 - - **Enabled** (bool) - 是否开启会话保持功能。应用型负载均衡实例基于Cookie实现 - - **Type** (str) - (应用型专用)Cookie处理方式。限定枚举值: ServerInsert -> 自动生成KEY;UserDefined -> 用户自定义KEY - - - **HealthCheckConfigSet** - - **Domain** (str) - (应用型专用)HTTP检查域名。 当Type为HTTP/GRPC时,此字段有意义,代表HTTP检查域名 - - **DownCounts** (int) - (应用型专用)判定失败的连续次数 - - **Enabled** (bool) - 是否开启健康检查功能。 默认值为:true - - **HTTPVersion** (str) - (应用型专用)检查协议 - - **Interval** (int) - (应用型专用)间隔时间,秒,必须大于TimeOut - - **Method** (str) - (应用型专用)HTTP检查方法。当Type为HTTP/GRPC时,此字段有意义,代表HTTP检查方法 - - **Path** (str) - (应用型专用)HTTP检查路径。当Type为HTTP/GRPC时,此字段有意义,代表HTTP检查路径 - - **Port** (int) - (应用型专用)端口 - - **ResponseCode** (str) - (应用型专用)检查预期状态码。HTTP时为2xx,3xx格式(逗号分隔),GRPC时为数字码(逗号分隔)。 - - **TimeOut** (int) - (应用型专用)超时时间,秒,必须小于Interval - - **Type** (str) - 健康检查方式。应用型限定取值: Port -> 端口检查;HTTP -> HTTP检查;GRPC -> GRPC检测; 默认值:Port - - **UpCounts** (int) - (应用型专用)判定成功的连续次数 - - **Listener** - **Certificates** (list) - 见 **Certificate** 模型定义 - **CompressionEnabled** (bool) - (应用型专用)是否开启数据压缩功能。目前只支持使用gzip对特定文件类型进行压缩 @@ -1186,9 +1198,17 @@ def describe_load_balancers( - **Targets** (list) - 见 **Target** 模型定义 - **FirewallSet** - - **FirewallId** (str) - 防火墙ID - - **FirewallName** (str) - 防火墙名称 + **AccessLogConfigSet** + - **Enabled** (bool) - (应用型专用)是否开启访问日志记录功能 + - **US3BucketName** (str) - (应用型专用)用于存储访问日志的bucket + - **US3TokenId** (str) - (应用型专用)上传访问日志到bucket所需的token + + + **SecGroupInfo** + - **Name** (str) - 安全组名称 + - **Priority** (int) - 优先级 + - **SecgroupId** (str) - 安全组id + - **VPCId** (str) - 安全组所属vpc id **IPInfo** @@ -1201,19 +1221,6 @@ def describe_load_balancers( - **OperatorName** (str) - 外网IP的运营商信息。枚举值为:Telecom -> 电信,Unicom -> 联通,International -> 国际IP,Bgp -> BGP,Duplet -> 双线(电信+联通双线路),BGPPro -> 精品BGP,China-mobile -> 中国移动,Anycast -> AnycastEIP - **SecGroupInfo** - - **Name** (str) - 安全组名称 - - **Priority** (int) - 优先级 - - **SecgroupId** (str) - 安全组id - - **VPCId** (str) - 安全组所属vpc id - - - **AccessLogConfigSet** - - **Enabled** (bool) - (应用型专用)是否开启访问日志记录功能 - - **US3BucketName** (str) - (应用型专用)用于存储访问日志的bucket - - **US3TokenId** (str) - (应用型专用)上传访问日志到bucket所需的token - - **LoadBalancer** - **AccessLogConfig** (dict) - 见 **AccessLogConfigSet** 模型定义 - **AutoRenewEnabled** (bool) - 是否开启自动续费 @@ -1272,13 +1279,41 @@ def describe_rules( - **Values** (list) - 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 + **PathConfigSet** + - **Values** (list) - 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 + + + **RuleCondition** + - **HostConfig** (dict) - 见 **HostConfigSet** 模型定义 + - **PathConfig** (dict) - 见 **PathConfigSet** 模型定义 + - **Type** (str) - 匹配条件类型。限定枚举值:Host,Path + + + **RemoveHeaderConfigSet** + - **Key** (str) - 删除的 header 字段名称,目前只能删除以下几个默认配置的字段: X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort + + + **BackendConnectionConfig** + - **EnablePersistentConnection** (bool) - 是否开启长连接 + + **ForwardTargetSet** - **Id** (str) - 服务节点的标识ID - **Weight** (int) - 权重。仅监听器负载均衡算法是加权轮询是有效;取值范围[1-100],默认值为1 - **BackendConnectionConfig** - - **EnablePersistentConnection** (bool) - 是否开启长连接 + **ForwardConfigSet** + - **Targets** (list) - 见 **ForwardTargetSet** 模型定义 + + + **InsertHeaderConfigSet** + - **Key** (str) - 插入的 header 字段名称,长度为 1~40 个字符,支持大小写字母 a~z、数字、下划线(_)和短划线(-)。头字段名称不能重复用于InsertHeader中。header 字段不能使用以下(此处判断大小写不敏感)x-real-ip、x-forwarded-for、x-forwarded-proto、x-forwarded-srcport、ucloud-alb-trace、connection、upgrade、content-length、transfer-encoding、keep-alive、te、host、cookie、remoteip、authority + - **Value** (str) - 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 + - **ValueType** (str) - 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 + + + **ProxyBufferingConfig** + - **CloseProxyBuffering** (bool) - 关闭缓存 **CorsConfigSet** @@ -1295,24 +1330,6 @@ def describe_rules( - **HttpCode** (int) - 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 - **ForwardConfigSet** - - **Targets** (list) - 见 **ForwardTargetSet** 模型定义 - - - **InsertHeaderConfigSet** - - **Key** (str) - 插入的 header 字段名称,长度为 1~40 个字符,支持大小写字母 a~z、数字、下划线(_)和短划线(-)。头字段名称不能重复用于InsertHeader中。header 字段不能使用以下(此处判断大小写不敏感)x-real-ip、x-forwarded-for、x-forwarded-proto、x-forwarded-srcport、ucloud-alb-trace、connection、upgrade、content-length、transfer-encoding、keep-alive、te、host、cookie、remoteip、authority - - **Value** (str) - 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 - - **ValueType** (str) - 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 - - - **RemoveHeaderConfigSet** - - **Key** (str) - 删除的 header 字段名称,目前只能删除以下几个默认配置的字段: X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort - - - **ProxyBufferingConfig** - - **CloseProxyBuffering** (bool) - 关闭缓存 - - **RuleAction** - **BackendConnectionConfig** (dict) - 见 **BackendConnectionConfig** 模型定义 - **CorsConfig** (dict) - 见 **CorsConfigSet** 模型定义 @@ -1325,16 +1342,6 @@ def describe_rules( - **Type** (str) - 动作类型。限定枚举值:Forward、"InsertHeader"、"Cors"、"FixedResponse"、"RemoveHeader" - **PathConfigSet** - - **Values** (list) - 取值。暂时只支持数组长度为1; 取值需符合相关匹配方式的条件 - - - **RuleCondition** - - **HostConfig** (dict) - 见 **HostConfigSet** 模型定义 - - **PathConfig** (dict) - 见 **PathConfigSet** 模型定义 - - **Type** (str) - 匹配条件类型。限定枚举值:Host,Path - - **Rule** - **IsDefault** (bool) - 是否为默认转发规则 - **Pass** (bool) - 当转发的服务节点为空时,规则是否忽略 @@ -1613,29 +1620,6 @@ def describe_ulb(self, req: typing.Optional[dict] = None, **kwargs) -> dict: **Response Model** - **FirewallSet** - - **FirewallId** (str) - 防火墙ID - - **FirewallName** (str) - 防火墙名称 - - - **ULBBackendSet** - - **BackendId** (str) - 后端资源实例的Id - - **Enabled** (int) - 后端提供服务的实例启用与否,枚举值:0 禁用 1 启用 - - **IsBackup** (int) - 是否为backup,只有当vserver的Backup属性为1时才会有此字段,说明:0:主rs1:备rs - - **Port** (int) - 后端提供服务的端口 - - **PrivateIP** (str) - 后端提供服务的内网IP - - **ResourceId** (str) - 资源实例的资源Id - - **ResourceName** (str) - 资源实例的资源名称 - - **ResourceType** (str) - 资源实例的类型 - - **Status** (int) - 后端提供服务的实例运行状态,枚举值:0健康检查健康状态 1 健康检查异常 - - **SubResourceId** (str) - 资源绑定的虚拟网卡实例的资源Id - - **SubResourceName** (str) - 资源绑定的虚拟网卡实例的资源名称 - - **SubResourceType** (str) - 资源绑定的虚拟网卡实例的类型 - - **SubnetId** (str) - 后端提供服务的资源所在的子网的ID - - **VPCId** (str) - 后端服务器所在的VPC - - **Weight** (int) - 后端RS权重(在加权轮询算法下有效) - - **SSLBindedTargetSet** - **ULBId** (str) - VServer 所属的ULB实例的资源ID - **ULBName** (str) - ULB实例的名称 @@ -1658,12 +1642,22 @@ def describe_ulb(self, req: typing.Optional[dict] = None, **kwargs) -> dict: - **USSLId** (str) - USSL证书平台的编号,只有当SSLSource为1时才出现 - **BindSecurityPolicy** - - **SSLCiphers** (list) - 加密套件 - - **SecurityPolicyId** (str) - 安全策略组ID - - **SecurityPolicyName** (str) - 安全策略组名称 - - **SecurityPolicyType** (int) - 安全策略类型 0:预定义 1:自定义 - - **TLSVersion** (str) - TLS最低版本 + **ULBBackendSet** + - **BackendId** (str) - 后端资源实例的Id + - **Enabled** (int) - 后端提供服务的实例启用与否,枚举值:0 禁用 1 启用 + - **IsBackup** (int) - 是否为backup,只有当vserver的Backup属性为1时才会有此字段,说明:0:主rs1:备rs + - **Port** (int) - 后端提供服务的端口 + - **PrivateIP** (str) - 后端提供服务的内网IP + - **ResourceId** (str) - 资源实例的资源Id + - **ResourceName** (str) - 资源实例的资源名称 + - **ResourceType** (str) - 资源实例的类型 + - **Status** (int) - 后端提供服务的实例运行状态,枚举值:0健康检查健康状态 1 健康检查异常 + - **SubResourceId** (str) - 资源绑定的虚拟网卡实例的资源Id + - **SubResourceName** (str) - 资源绑定的虚拟网卡实例的资源名称 + - **SubResourceType** (str) - 资源绑定的虚拟网卡实例的类型 + - **SubnetId** (str) - 后端提供服务的资源所在的子网的ID + - **VPCId** (str) - 后端服务器所在的VPC + - **Weight** (int) - 后端RS权重(在加权轮询算法下有效) **PolicyBackendSet** @@ -1678,6 +1672,28 @@ def describe_ulb(self, req: typing.Optional[dict] = None, **kwargs) -> dict: - **SubResourceType** (str) - "UNI"或者为空 + **ULBIPSet** + - **Bandwidth** (int) - 弹性IP的带宽值(暂未对外开放) + - **BandwidthType** (int) - 弹性IP的带宽类型,枚举值:1 表示是共享带宽,0 普通带宽类型(暂未对外开放) + - **EIP** (str) - 弹性IP地址 + - **EIPId** (str) - 弹性IP的ID + - **OperatorName** (str) - 弹性IP的运营商信息,枚举值为: Bgp:BGP IP International:国际IP + + + **LoggerSet** + - **BucketName** (str) - ulb日志上传的bucket + - **TokenID** (str) - 上传到bucket使用的token的tokenid + - **TokenName** (str) - bucket的token名称 + + + **BindSecurityPolicy** + - **SSLCiphers** (list) - 加密套件 + - **SecurityPolicyId** (str) - 安全策略组ID + - **SecurityPolicyName** (str) - 安全策略组名称 + - **SecurityPolicyType** (int) - 安全策略类型 0:预定义 1:自定义 + - **TLSVersion** (str) - TLS最低版本 + + **ULBPolicySet** - **BackendSet** (list) - 见 **PolicyBackendSet** 模型定义 - **DomainMatchMode** (str) - 内容转发规则中域名的匹配方式。枚举值:Regular,正则;Wildcard,泛域名 @@ -1716,18 +1732,9 @@ def describe_ulb(self, req: typing.Optional[dict] = None, **kwargs) -> dict: - **VServerName** (str) - VServer实例的名字 - **ULBIPSet** - - **Bandwidth** (int) - 弹性IP的带宽值(暂未对外开放) - - **BandwidthType** (int) - 弹性IP的带宽类型,枚举值:1 表示是共享带宽,0 普通带宽类型(暂未对外开放) - - **EIP** (str) - 弹性IP地址 - - **EIPId** (str) - 弹性IP的ID - - **OperatorName** (str) - 弹性IP的运营商信息,枚举值为: Bgp:BGP IP International:国际IP - - - **LoggerSet** - - **BucketName** (str) - ulb日志上传的bucket - - **TokenID** (str) - 上传到bucket使用的token的tokenid - - **TokenName** (str) - bucket的token名称 + **FirewallSet** + - **FirewallId** (str) - 防火墙ID + - **FirewallName** (str) - 防火墙名称 **ULBSet** @@ -1788,6 +1795,12 @@ def describe_ulb_simple( **Response Model** + **LoggerSet** + - **BucketName** (str) - ulb日志上传的bucket + - **TokenID** (str) - 上传到bucket使用的token的tokenid + - **TokenName** (str) - bucket的token名称 + + **FirewallSet** - **FirewallId** (str) - 防火墙ID - **FirewallName** (str) - 防火墙名称 @@ -1801,12 +1814,6 @@ def describe_ulb_simple( - **OperatorName** (str) - 弹性IP的运营商信息,枚举值为: Bgp:BGP IP International:国际IP - **LoggerSet** - - **BucketName** (str) - ulb日志上传的bucket - - **TokenID** (str) - 上传到bucket使用的token的tokenid - - **TokenName** (str) - bucket的token名称 - - **ULBSimpleSet** - **Bandwidth** (int) - 带宽 - **BandwidthType** (int) - 带宽类型,枚举值为: 0,非共享带宽; 1,共享带宽 @@ -1864,28 +1871,6 @@ def describe_vserver( **Response Model** - **SSLBindedTargetSet** - - **ULBId** (str) - VServer 所属的ULB实例的资源ID - - **ULBName** (str) - ULB实例的名称 - - **VServerId** (str) - SSL证书绑定到的VServer的资源ID - - **VServerName** (str) - 对应的VServer的名字 - - - **ULBSSLSet** - - **BindedTargetSet** (list) - 见 **SSLBindedTargetSet** 模型定义 - - **CreateTime** (int) - SSL证书的创建时间 - - **Domains** (str) - USSL证书平台的域名,只有当SSLSource为1时才出现 - - **HashValue** (str) - SSL证书的HASH值 - - **NotAfter** (int) - 证书过期时间,只有当SSLSource为1时才出现 - - **NotBefore** (int) - 证书颁发时间,只有当SSLSource为1时才出现 - - **SSLContent** (str) - SSL证书的内容 - - **SSLId** (str) - SSL证书的Id - - **SSLName** (str) - SSL证书的名字 - - **SSLSource** (int) - SSL证书来源,SSL证书来源,0代表证书来自于ULB平台,1代表证书来自于USSL平台 - - **SSLType** (str) - SSL证书类型,暂时只有 Pem 一种类型 - - **USSLId** (str) - USSL证书平台的编号,只有当SSLSource为1时才出现 - - **PolicyBackendSet** - **BackendId** (str) - 所添加的后端资源在ULB中的对象ID,(为ULB系统中使用,与资源自身ID无关 - **ObjectId** (str) - 后端资源的对象ID @@ -1898,6 +1883,13 @@ def describe_vserver( - **SubResourceType** (str) - "UNI"或者为空 + **SSLBindedTargetSet** + - **ULBId** (str) - VServer 所属的ULB实例的资源ID + - **ULBName** (str) - ULB实例的名称 + - **VServerId** (str) - SSL证书绑定到的VServer的资源ID + - **VServerName** (str) - 对应的VServer的名字 + + **ULBPolicySet** - **BackendSet** (list) - 见 **PolicyBackendSet** 模型定义 - **DomainMatchMode** (str) - 内容转发规则中域名的匹配方式。枚举值:Regular,正则;Wildcard,泛域名 @@ -1910,6 +1902,21 @@ def describe_vserver( - **VServerId** (str) - 所属VServerId + **ULBSSLSet** + - **BindedTargetSet** (list) - 见 **SSLBindedTargetSet** 模型定义 + - **CreateTime** (int) - SSL证书的创建时间 + - **Domains** (str) - USSL证书平台的域名,只有当SSLSource为1时才出现 + - **HashValue** (str) - SSL证书的HASH值 + - **NotAfter** (int) - 证书过期时间,只有当SSLSource为1时才出现 + - **NotBefore** (int) - 证书颁发时间,只有当SSLSource为1时才出现 + - **SSLContent** (str) - SSL证书的内容 + - **SSLId** (str) - SSL证书的Id + - **SSLName** (str) - SSL证书的名字 + - **SSLSource** (int) - SSL证书来源,SSL证书来源,0代表证书来自于ULB平台,1代表证书来自于USSL平台 + - **SSLType** (str) - SSL证书类型,暂时只有 Pem 一种类型 + - **USSLId** (str) - USSL证书平台的编号,只有当SSLSource为1时才出现 + + **BindSecurityPolicy** - **SSLCiphers** (list) - 加密套件 - **SecurityPolicyId** (str) - 安全策略组ID @@ -2181,6 +2188,7 @@ def update_listener_attribute( - **Scheduler** (str) - 负载均衡算法。应用型限定取值:"Roundrobin"/"Source"/"WeightRoundrobin"/" Leastconn"/"Backup" - **SecurityPolicyId** (str) - (应用型专用)安全策略组ID。仅HTTPS监听支持绑定。“Default”,表示绑定原生策略 - **StickinessConfig** (dict) - 见 **UpdateListenerAttributeParamStickinessConfig** 模型定义 + - **TargetProtocol** (str) - 后端协议。应用型限定取值:“HTTP,HTTPS,GRPC",默认值“HTTP” **Response** @@ -2194,12 +2202,18 @@ def update_listener_attribute( **UpdateListenerAttributeParamHealthCheckConfig** - - **Domain** (str) - (应用型专用)HTTP检查域名 - - **Enabled** (bool) - 是否开启健康检查功能。暂时不支持关闭;默认值为:true + - **Domain** (str) - (应用型专用)HTTP/GRPC检查域名 + - **DownCounts** (int) - (应用型专用)判定失败的连续次数 + - **Enabled** (bool) - 是否开启健康检查功能。默认值为:true + - **HTTPVersion** (str) - (应用型专用)检查协议 + - **Interval** (int) - (应用型专用)间隔时间,秒,必须大于TimeOut - **Method** (str) - (应用型专用)HTTP检查方法。只支持GET和HEAD。 - - **Path** (str) - (应用型专用)HTTP检查路径 - - **ResponseCode** (str) - (应用型专用)GRPC检查响应码 - - **Type** (str) - 健康检查方式。应用型限定取值:“Port”/"HTTP";默认值:“Port” + - **Path** (str) - (应用型专用)HTTP/GRPC检查路径 + - **Port** (int) - (应用型专用)端口 + - **ResponseCode** (str) - (应用型专用)HTTP时为2xx,3xx格式(逗号分隔),GRPC时为数字码(逗号分隔) + - **TimeOut** (int) - (应用型专用)超时时间,秒,必须小于Interval + - **Type** (str) - 健康检查方式。应用型限定取值:“Port”/"HTTP/GRPC",默认值:“Port” + - **UpCounts** (int) - (应用型专用)判定成功的连续次数 """ @@ -2306,20 +2320,49 @@ def update_rule_attribute( **Request Model** + **UpdateRuleAttributeParamRuleActionsForwardConfigTargets** + - **Id** (str) - 转发的后端服务节点的标识ID。限定在监听器的服务节点池里;数组长度可以是0;转发服务节点配置的数组长度不为0时,Id必填 + - **Weight** (int) - 转发的后端服务节点的权重。仅监听器负载均衡算法是加权轮询是有效 + + + **UpdateRuleAttributeParamRuleConditionsHostConfig** + - **MatchMode** (str) - 匹配方式。限定枚举值:"Regular"/"Wildcard",默认值:"Regular" + - **Values** (list) - 取值。暂时只支持数组长度为1;取值需符合相关匹配方式的条件;修改域名匹配时必填 + + + **UpdateRuleAttributeParamRuleConditionsPathConfig** + - **Values** (list) - 取值。暂时只支持数组长度为1;取值需符合相关条件;修改路径匹配时必填 + + + **UpdateRuleAttributeParamRuleConditions** + - **HostConfig** (dict) - 见 **UpdateRuleAttributeParamRuleConditionsHostConfig** 模型定义 + - **PathConfig** (dict) - 见 **UpdateRuleAttributeParamRuleConditionsPathConfig** 模型定义 + - **Type** (str) - 匹配条件类型。限定枚举值:"Host"/"Path";RuleConditions数组长度不为0时必填 + + **UpdateRuleAttributeParamRuleActionsInsertHeaderConfig** - **Key** (str) - 插入的 header 字段名称,长度为 1~40 个字符,支持大小写字母 a~z、数字、下划线(_)和短划线(-)。头字段名称不能重复用于InsertHeader中。header 字段不能使用以下(此处判断大小写不敏感)x-real-ip、x-forwarded-for、x-forwarded-proto、x-forwarded-srcport、ucloud-alb-trace、connection、upgrade、content-length、transfer-encoding、keep-alive、te、host、cookie、remoteip、authority - **Value** (str) - 插入的 header 字段内容。ValueType 取值为 SystemDefined 时取值如下:ClientSrcPort:客户端端口。ClientSrcIp:客户端 IP 地址。Protocol:客户端请求的协议(HTTP 或 HTTPS)。RuleID:客户端请求命中的转发规则ID。ALBID:ALB ID。ALBPort:ALB 端口。ValueType 取值为 UserDefined 时:可以自定义头字段内容,限制长度为 1~128 个字符,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。ValueType 取值为 ReferenceHeader 时:可以引用请求头字段中的某一个字段,限制长度限制为 1~128 个字符,支持小写字母 a~z、数字、短划线(-)和下划线(_)。 - **ValueType** (str) - 头字段内容类型。取值:UserDefined:用户指定。ReferenceHeader:引用用户请求头中的某一个字段。SystemDefined:系统定义。 - **UpdateRuleAttributeParamRuleActionsRemoveHeaderConfig** - - **Key** (str) - 删除的 header 字段名称,目前只能删除以下几个默认配置的字段X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort - - **UpdateRuleAttributeParamRuleActionsProxyBufferingConfig** - **CloseProxyBuffering** (bool) - 关闭缓存 + **UpdateRuleAttributeParamRuleActionsBackendConnectionConfig** + - **EnablePersistentConnection** (bool) - 开启长连接 + + + **UpdateRuleAttributeParamRuleActionsFixedResponseConfig** + - **Content** (str) - 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 + - **HttpCode** (int) - 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 + + + **UpdateRuleAttributeParamRuleActionsRemoveHeaderConfig** + - **Key** (str) - 删除的 header 字段名称,目前只能删除以下几个默认配置的字段X-Real-IP、X-Forwarded-For、X-Forwarded-Proto、X-Forwarded-SrcPort + + **UpdateRuleAttributeParamRuleActionsCorsConfig** - **AllowCredentials** (str) - 是否允许携带凭证信息。取值:on:是。off:否。 - **AllowHeaders** (list) - 允许跨域的 Header 列表。支持配置为*或配置一个或多个 value 值。单个 value 值只允许包含大小写字母、数字,不能以下划线(_)和短划线(-)开头或结尾,最大长度限制为 32 个字符。最多支持20个值 @@ -2329,24 +2372,10 @@ def update_rule_attribute( - **MaxAge** (int) - 预检请求在浏览器的最大缓存时间,单位:秒。取值范围:-1~172800。 - **UpdateRuleAttributeParamRuleActionsForwardConfigTargets** - - **Id** (str) - 转发的后端服务节点的标识ID。限定在监听器的服务节点池里;数组长度可以是0;转发服务节点配置的数组长度不为0时,Id必填 - - **Weight** (int) - 转发的后端服务节点的权重。仅监听器负载均衡算法是加权轮询是有效 - - **UpdateRuleAttributeParamRuleActionsForwardConfig** - **Targets** (list) - 见 **UpdateRuleAttributeParamRuleActionsForwardConfigTargets** 模型定义 - **UpdateRuleAttributeParamRuleActionsBackendConnectionConfig** - - **EnablePersistentConnection** (bool) - 开启长连接 - - - **UpdateRuleAttributeParamRuleActionsFixedResponseConfig** - - **Content** (str) - 返回的固定内容。最大支持存储 1 KB,只支持 ASCII 码值ch >= 32 && ch < 127范围内、不包括 $ 的可打印字符。 - - **HttpCode** (int) - 返回的 HTTP 响应码,仅支持 2xx、4xx、5xx 数字,x 为任意数字。 - - **UpdateRuleAttributeParamRuleActions** - **BackendConnectionConfig** (dict) - 见 **UpdateRuleAttributeParamRuleActionsBackendConnectionConfig** 模型定义 - **CorsConfig** (dict) - 见 **UpdateRuleAttributeParamRuleActionsCorsConfig** 模型定义 @@ -2359,21 +2388,6 @@ def update_rule_attribute( - **Type** (str) - 动作类型。限定枚举值:"Forward";RuleActions数组长度不为0时必填 - **UpdateRuleAttributeParamRuleConditionsHostConfig** - - **MatchMode** (str) - 匹配方式。限定枚举值:"Regular"/"Wildcard",默认值:"Regular" - - **Values** (list) - 取值。暂时只支持数组长度为1;取值需符合相关匹配方式的条件;修改域名匹配时必填 - - - **UpdateRuleAttributeParamRuleConditionsPathConfig** - - **Values** (list) - 取值。暂时只支持数组长度为1;取值需符合相关条件;修改路径匹配时必填 - - - **UpdateRuleAttributeParamRuleConditions** - - **HostConfig** (dict) - 见 **UpdateRuleAttributeParamRuleConditionsHostConfig** 模型定义 - - **PathConfig** (dict) - 见 **UpdateRuleAttributeParamRuleConditionsPathConfig** 模型定义 - - **Type** (str) - 匹配条件类型。限定枚举值:"Host"/"Path";RuleConditions数组长度不为0时必填 - - """ # build request d = { diff --git a/ucloud/services/ulb/schemas/apis.py b/ucloud/services/ulb/schemas/apis.py index 1edb9b5..29f592e 100644 --- a/ucloud/services/ulb/schemas/apis.py +++ b/ucloud/services/ulb/schemas/apis.py @@ -179,11 +179,17 @@ class CreateListenerParamHealthCheckConfigSchema(schema.RequestSchema): fields = { "Domain": fields.Str(required=False, dump_to="Domain"), + "DownCounts": fields.Int(required=False, dump_to="DownCounts"), "Enabled": fields.Bool(required=False, dump_to="Enabled"), + "HTTPVersion": fields.Str(required=False, dump_to="HTTPVersion"), + "Interval": fields.Int(required=False, dump_to="Interval"), "Method": fields.Str(required=False, dump_to="Method"), "Path": fields.Str(required=False, dump_to="Path"), + "Port": fields.Int(required=False, dump_to="Port"), "ResponseCode": fields.Str(required=False, dump_to="ResponseCode"), + "TimeOut": fields.Int(required=False, dump_to="TimeOut"), "Type": fields.Str(required=False, dump_to="Type"), + "UpCounts": fields.Int(required=False, dump_to="UpCounts"), } @@ -230,6 +236,7 @@ class CreateListenerRequestSchema(schema.RequestSchema): "StickinessConfig": CreateListenerParamStickinessConfigSchema( required=False, dump_to="StickinessConfig" ), + "TargetProtocol": fields.Str(required=False, dump_to="TargetProtocol"), } @@ -237,7 +244,7 @@ class CreateListenerResponseSchema(schema.ResponseSchema): """CreateListener - 创建一个应用型负载均衡的监听器""" fields = { - "ListenerId": fields.Str(required=True, load_from="ListenerId"), + "ListenerId": fields.Str(required=False, load_from="ListenerId"), } @@ -337,18 +344,6 @@ class CreatePolicyResponseSchema(schema.ResponseSchema): """ -class CreateRuleParamRuleActionsProxyBufferingConfigSchema( - schema.RequestSchema -): - """CreateRuleParamRuleActionsProxyBufferingConfig -""" - - fields = { - "CloseProxyBuffering": fields.Bool( - required=False, dump_to="CloseProxyBuffering" - ), - } - - class CreateRuleParamRuleActionsForwardConfigTargetsSchema( schema.RequestSchema ): @@ -370,6 +365,27 @@ class CreateRuleParamRuleActionsForwardConfigSchema(schema.RequestSchema): } +class CreateRuleParamRuleActionsProxyBufferingConfigSchema( + schema.RequestSchema +): + """CreateRuleParamRuleActionsProxyBufferingConfig -""" + + fields = { + "CloseProxyBuffering": fields.Bool( + required=False, dump_to="CloseProxyBuffering" + ), + } + + +class CreateRuleParamRuleConditionsHostConfigSchema(schema.RequestSchema): + """CreateRuleParamRuleConditionsHostConfig -""" + + fields = { + "MatchMode": fields.Str(required=False, dump_to="MatchMode"), + "Values": fields.List(fields.Str()), + } + + class CreateRuleParamRuleActionsInsertHeaderConfigSchema(schema.RequestSchema): """CreateRuleParamRuleActionsInsertHeaderConfig -""" @@ -400,6 +416,23 @@ class CreateRuleParamRuleActionsBackendConnectionConfigSchema( } +class CreateRuleParamRuleActionsFixedResponseConfigSchema(schema.RequestSchema): + """CreateRuleParamRuleActionsFixedResponseConfig -""" + + fields = { + "Content": fields.Str(required=False, dump_to="Content"), + "HttpCode": fields.Int(required=False, dump_to="HttpCode"), + } + + +class CreateRuleParamRuleConditionsPathConfigSchema(schema.RequestSchema): + """CreateRuleParamRuleConditionsPathConfig -""" + + fields = { + "Values": fields.List(fields.Str()), + } + + class CreateRuleParamRuleActionsCorsConfigSchema(schema.RequestSchema): """CreateRuleParamRuleActionsCorsConfig -""" @@ -415,15 +448,6 @@ class CreateRuleParamRuleActionsCorsConfigSchema(schema.RequestSchema): } -class CreateRuleParamRuleActionsFixedResponseConfigSchema(schema.RequestSchema): - """CreateRuleParamRuleActionsFixedResponseConfig -""" - - fields = { - "Content": fields.Str(required=False, dump_to="Content"), - "HttpCode": fields.Int(required=False, dump_to="HttpCode"), - } - - class CreateRuleParamRuleActionsSchema(schema.RequestSchema): """CreateRuleParamRuleActions -""" @@ -454,23 +478,6 @@ class CreateRuleParamRuleActionsSchema(schema.RequestSchema): } -class CreateRuleParamRuleConditionsPathConfigSchema(schema.RequestSchema): - """CreateRuleParamRuleConditionsPathConfig -""" - - fields = { - "Values": fields.List(fields.Str()), - } - - -class CreateRuleParamRuleConditionsHostConfigSchema(schema.RequestSchema): - """CreateRuleParamRuleConditionsHostConfig -""" - - fields = { - "MatchMode": fields.Str(required=False, dump_to="MatchMode"), - "Values": fields.List(fields.Str()), - } - - class CreateRuleParamRuleConditionsSchema(schema.RequestSchema): """CreateRuleParamRuleConditions -""" @@ -1418,11 +1425,17 @@ class UpdateListenerAttributeParamHealthCheckConfigSchema(schema.RequestSchema): fields = { "Domain": fields.Str(required=False, dump_to="Domain"), + "DownCounts": fields.Int(required=False, dump_to="DownCounts"), "Enabled": fields.Bool(required=False, dump_to="Enabled"), + "HTTPVersion": fields.Str(required=False, dump_to="HTTPVersion"), + "Interval": fields.Int(required=False, dump_to="Interval"), "Method": fields.Str(required=False, dump_to="Method"), "Path": fields.Str(required=False, dump_to="Path"), + "Port": fields.Int(required=False, dump_to="Port"), "ResponseCode": fields.Str(required=False, dump_to="ResponseCode"), + "TimeOut": fields.Int(required=False, dump_to="TimeOut"), "Type": fields.Str(required=False, dump_to="Type"), + "UpCounts": fields.Int(required=False, dump_to="UpCounts"), } @@ -1456,6 +1469,7 @@ class UpdateListenerAttributeRequestSchema(schema.RequestSchema): "StickinessConfig": UpdateListenerAttributeParamStickinessConfigSchema( required=False, dump_to="StickinessConfig" ), + "TargetProtocol": fields.Str(required=False, dump_to="TargetProtocol"), } @@ -1549,74 +1563,72 @@ class UpdatePolicyResponseSchema(schema.ResponseSchema): """ -class UpdateRuleAttributeParamRuleActionsInsertHeaderConfigSchema( +class UpdateRuleAttributeParamRuleActionsForwardConfigTargetsSchema( schema.RequestSchema ): - """UpdateRuleAttributeParamRuleActionsInsertHeaderConfig -""" + """UpdateRuleAttributeParamRuleActionsForwardConfigTargets -""" fields = { - "Key": fields.Str(required=False, dump_to="Key"), - "Value": fields.Str(required=False, dump_to="Value"), - "ValueType": fields.Str(required=False, dump_to="ValueType"), + "Id": fields.Str(required=False, dump_to="Id"), + "Weight": fields.Int(required=False, dump_to="Weight"), } -class UpdateRuleAttributeParamRuleActionsRemoveHeaderConfigSchema( +class UpdateRuleAttributeParamRuleConditionsHostConfigSchema( schema.RequestSchema ): - """UpdateRuleAttributeParamRuleActionsRemoveHeaderConfig -""" + """UpdateRuleAttributeParamRuleConditionsHostConfig -""" fields = { - "Key": fields.Str(required=False, dump_to="Key"), + "MatchMode": fields.Str(required=False, dump_to="MatchMode"), + "Values": fields.List(fields.Str()), } -class UpdateRuleAttributeParamRuleActionsProxyBufferingConfigSchema( +class UpdateRuleAttributeParamRuleConditionsPathConfigSchema( schema.RequestSchema ): - """UpdateRuleAttributeParamRuleActionsProxyBufferingConfig -""" + """UpdateRuleAttributeParamRuleConditionsPathConfig -""" fields = { - "CloseProxyBuffering": fields.Bool( - required=False, dump_to="CloseProxyBuffering" - ), + "Values": fields.List(fields.Str()), } -class UpdateRuleAttributeParamRuleActionsCorsConfigSchema(schema.RequestSchema): - """UpdateRuleAttributeParamRuleActionsCorsConfig -""" +class UpdateRuleAttributeParamRuleConditionsSchema(schema.RequestSchema): + """UpdateRuleAttributeParamRuleConditions -""" fields = { - "AllowCredentials": fields.Str( - required=False, dump_to="AllowCredentials" + "HostConfig": UpdateRuleAttributeParamRuleConditionsHostConfigSchema( + required=False, dump_to="HostConfig" ), - "AllowHeaders": fields.List(fields.Str()), - "AllowMethods": fields.List(fields.Str()), - "AllowOrigin": fields.List(fields.Str()), - "ExposeHeaders": fields.List(fields.Str()), - "MaxAge": fields.Int(required=False, dump_to="MaxAge"), + "PathConfig": UpdateRuleAttributeParamRuleConditionsPathConfigSchema( + required=False, dump_to="PathConfig" + ), + "Type": fields.Str(required=False, dump_to="Type"), } -class UpdateRuleAttributeParamRuleActionsForwardConfigTargetsSchema( +class UpdateRuleAttributeParamRuleActionsInsertHeaderConfigSchema( schema.RequestSchema ): - """UpdateRuleAttributeParamRuleActionsForwardConfigTargets -""" + """UpdateRuleAttributeParamRuleActionsInsertHeaderConfig -""" fields = { - "Id": fields.Str(required=False, dump_to="Id"), - "Weight": fields.Int(required=False, dump_to="Weight"), + "Key": fields.Str(required=False, dump_to="Key"), + "Value": fields.Str(required=False, dump_to="Value"), + "ValueType": fields.Str(required=False, dump_to="ValueType"), } -class UpdateRuleAttributeParamRuleActionsForwardConfigSchema( +class UpdateRuleAttributeParamRuleActionsProxyBufferingConfigSchema( schema.RequestSchema ): - """UpdateRuleAttributeParamRuleActionsForwardConfig -""" + """UpdateRuleAttributeParamRuleActionsProxyBufferingConfig -""" fields = { - "Targets": fields.List( - UpdateRuleAttributeParamRuleActionsForwardConfigTargetsSchema() + "CloseProxyBuffering": fields.Bool( + required=False, dump_to="CloseProxyBuffering" ), } @@ -1644,6 +1656,43 @@ class UpdateRuleAttributeParamRuleActionsFixedResponseConfigSchema( } +class UpdateRuleAttributeParamRuleActionsRemoveHeaderConfigSchema( + schema.RequestSchema +): + """UpdateRuleAttributeParamRuleActionsRemoveHeaderConfig -""" + + fields = { + "Key": fields.Str(required=False, dump_to="Key"), + } + + +class UpdateRuleAttributeParamRuleActionsCorsConfigSchema(schema.RequestSchema): + """UpdateRuleAttributeParamRuleActionsCorsConfig -""" + + fields = { + "AllowCredentials": fields.Str( + required=False, dump_to="AllowCredentials" + ), + "AllowHeaders": fields.List(fields.Str()), + "AllowMethods": fields.List(fields.Str()), + "AllowOrigin": fields.List(fields.Str()), + "ExposeHeaders": fields.List(fields.Str()), + "MaxAge": fields.Int(required=False, dump_to="MaxAge"), + } + + +class UpdateRuleAttributeParamRuleActionsForwardConfigSchema( + schema.RequestSchema +): + """UpdateRuleAttributeParamRuleActionsForwardConfig -""" + + fields = { + "Targets": fields.List( + UpdateRuleAttributeParamRuleActionsForwardConfigTargetsSchema() + ), + } + + class UpdateRuleAttributeParamRuleActionsSchema(schema.RequestSchema): """UpdateRuleAttributeParamRuleActions -""" @@ -1674,41 +1723,6 @@ class UpdateRuleAttributeParamRuleActionsSchema(schema.RequestSchema): } -class UpdateRuleAttributeParamRuleConditionsHostConfigSchema( - schema.RequestSchema -): - """UpdateRuleAttributeParamRuleConditionsHostConfig -""" - - fields = { - "MatchMode": fields.Str(required=False, dump_to="MatchMode"), - "Values": fields.List(fields.Str()), - } - - -class UpdateRuleAttributeParamRuleConditionsPathConfigSchema( - schema.RequestSchema -): - """UpdateRuleAttributeParamRuleConditionsPathConfig -""" - - fields = { - "Values": fields.List(fields.Str()), - } - - -class UpdateRuleAttributeParamRuleConditionsSchema(schema.RequestSchema): - """UpdateRuleAttributeParamRuleConditions -""" - - fields = { - "HostConfig": UpdateRuleAttributeParamRuleConditionsHostConfigSchema( - required=False, dump_to="HostConfig" - ), - "PathConfig": UpdateRuleAttributeParamRuleConditionsPathConfigSchema( - required=False, dump_to="PathConfig" - ), - "Type": fields.Str(required=False, dump_to="Type"), - } - - class UpdateRuleAttributeRequestSchema(schema.RequestSchema): """UpdateRuleAttribute - 更新应用型负载均衡监听器的一条转发规则的属性""" diff --git a/ucloud/services/ulb/schemas/models.py b/ucloud/services/ulb/schemas/models.py index d923139..370b349 100644 --- a/ucloud/services/ulb/schemas/models.py +++ b/ucloud/services/ulb/schemas/models.py @@ -30,22 +30,78 @@ class BackendSetSchema(schema.ResponseSchema): } -class BackendConnectionConfigSchema(schema.ResponseSchema): - """BackendConnectionConfig - 后向连接配置""" +class HostConfigSetSchema(schema.ResponseSchema): + """HostConfigSet - 域名相关配置""" fields = { - "EnablePersistentConnection": fields.Bool( - required=False, load_from="EnablePersistentConnection" - ), + "MatchMode": fields.Str(required=False, load_from="MatchMode"), + "Values": fields.List(fields.Str()), } -class ProxyBufferingConfigSchema(schema.ResponseSchema): - """ProxyBufferingConfig - 缓存配置""" +class HealthCheckConfigSetSchema(schema.ResponseSchema): + """HealthCheckConfigSet - 健康检查相关配置""" fields = { - "CloseProxyBuffering": fields.Bool( - required=False, load_from="CloseProxyBuffering" + "Domain": fields.Str(required=False, load_from="Domain"), + "DownCounts": fields.Int(required=False, load_from="DownCounts"), + "Enabled": fields.Bool(required=False, load_from="Enabled"), + "HTTPVersion": fields.Str(required=False, load_from="HTTPVersion"), + "Interval": fields.Int(required=False, load_from="Interval"), + "Method": fields.Str(required=False, load_from="Method"), + "Path": fields.Str(required=False, load_from="Path"), + "Port": fields.Int(required=False, load_from="Port"), + "ResponseCode": fields.Str(required=False, load_from="ResponseCode"), + "TimeOut": fields.Int(required=False, load_from="TimeOut"), + "Type": fields.Str(required=False, load_from="Type"), + "UpCounts": fields.Int(required=False, load_from="UpCounts"), + } + + +class StickinessConfigSetSchema(schema.ResponseSchema): + """StickinessConfigSet - 会话保持相关配置""" + + fields = { + "CookieName": fields.Str(required=False, load_from="CookieName"), + "Enabled": fields.Bool(required=False, load_from="Enabled"), + "Type": fields.Str(required=False, load_from="Type"), + } + + +class CertificateSchema(schema.ResponseSchema): + """Certificate - (应用型专用)服务器证书信息""" + + fields = { + "IsDefault": fields.Bool(required=False, load_from="IsDefault"), + "SSLId": fields.Str(required=False, load_from="SSLId"), + } + + +class TargetSchema(schema.ResponseSchema): + """Target - 服务节点信息""" + + fields = { + "Enabled": fields.Bool(required=False, load_from="Enabled"), + "Id": fields.Str(required=False, load_from="Id"), + "IsBackup": fields.Bool(required=False, load_from="IsBackup"), + "Port": fields.Int(required=False, load_from="Port"), + "ResourceIP": fields.Str(required=False, load_from="ResourceIP"), + "ResourceId": fields.Str(required=False, load_from="ResourceId"), + "ResourceName": fields.Str(required=False, load_from="ResourceName"), + "ResourceType": fields.Str(required=False, load_from="ResourceType"), + "State": fields.Str(required=False, load_from="State"), + "SubnetId": fields.Str(required=False, load_from="SubnetId"), + "VPCId": fields.Str(required=False, load_from="VPCId"), + "Weight": fields.Int(required=False, load_from="Weight"), + } + + +class BackendConnectionConfigSchema(schema.ResponseSchema): + """BackendConnectionConfig - 后向连接配置""" + + fields = { + "EnablePersistentConnection": fields.Bool( + required=False, load_from="EnablePersistentConnection" ), } @@ -74,6 +130,16 @@ class FixedResponseConfigSetSchema(schema.ResponseSchema): } +class ProxyBufferingConfigSchema(schema.ResponseSchema): + """ProxyBufferingConfig - 缓存配置""" + + fields = { + "CloseProxyBuffering": fields.Bool( + required=False, load_from="CloseProxyBuffering" + ), + } + + class ForwardTargetSetSchema(schema.ResponseSchema): """ForwardTargetSet - 转发的后端服务节点""" @@ -125,15 +191,6 @@ class RuleActionSchema(schema.ResponseSchema): } -class HostConfigSetSchema(schema.ResponseSchema): - """HostConfigSet - 域名相关配置""" - - fields = { - "MatchMode": fields.Str(required=False, load_from="MatchMode"), - "Values": fields.List(fields.Str()), - } - - class PathConfigSetSchema(schema.ResponseSchema): """PathConfigSet - 路径相关配置""" @@ -164,63 +221,6 @@ class RuleSchema(schema.ResponseSchema): } -class StickinessConfigSetSchema(schema.ResponseSchema): - """StickinessConfigSet - 会话保持相关配置""" - - fields = { - "CookieName": fields.Str(required=False, load_from="CookieName"), - "Enabled": fields.Bool(required=False, load_from="Enabled"), - "Type": fields.Str(required=False, load_from="Type"), - } - - -class TargetSchema(schema.ResponseSchema): - """Target - 服务节点信息""" - - fields = { - "Enabled": fields.Bool(required=False, load_from="Enabled"), - "Id": fields.Str(required=False, load_from="Id"), - "IsBackup": fields.Bool(required=False, load_from="IsBackup"), - "Port": fields.Int(required=False, load_from="Port"), - "ResourceIP": fields.Str(required=False, load_from="ResourceIP"), - "ResourceId": fields.Str(required=False, load_from="ResourceId"), - "ResourceName": fields.Str(required=False, load_from="ResourceName"), - "ResourceType": fields.Str(required=False, load_from="ResourceType"), - "State": fields.Str(required=False, load_from="State"), - "SubnetId": fields.Str(required=False, load_from="SubnetId"), - "VPCId": fields.Str(required=False, load_from="VPCId"), - "Weight": fields.Int(required=False, load_from="Weight"), - } - - -class CertificateSchema(schema.ResponseSchema): - """Certificate - (应用型专用)服务器证书信息""" - - fields = { - "IsDefault": fields.Bool(required=False, load_from="IsDefault"), - "SSLId": fields.Str(required=False, load_from="SSLId"), - } - - -class HealthCheckConfigSetSchema(schema.ResponseSchema): - """HealthCheckConfigSet - 健康检查相关配置""" - - fields = { - "Domain": fields.Str(required=False, load_from="Domain"), - "DownCounts": fields.Int(required=False, load_from="DownCounts"), - "Enabled": fields.Bool(required=False, load_from="Enabled"), - "HTTPVersion": fields.Str(required=False, load_from="HTTPVersion"), - "Interval": fields.Int(required=False, load_from="Interval"), - "Method": fields.Str(required=False, load_from="Method"), - "Path": fields.Str(required=False, load_from="Path"), - "Port": fields.Int(required=False, load_from="Port"), - "ResponseCode": fields.Str(required=False, load_from="ResponseCode"), - "TimeOut": fields.Int(required=False, load_from="TimeOut"), - "Type": fields.Str(required=False, load_from="Type"), - "UpCounts": fields.Int(required=False, load_from="UpCounts"), - } - - class ListenerSchema(schema.ResponseSchema): """Listener - 负载均衡监听器信息""" @@ -257,17 +257,14 @@ class ListenerSchema(schema.ResponseSchema): } -class IPInfoSchema(schema.ResponseSchema): - """IPInfo - 绑定的IP信息""" +class SecGroupInfoSchema(schema.ResponseSchema): + """SecGroupInfo - 安全组详细信息""" fields = { - "AddressType": fields.Str(required=False, load_from="AddressType"), - "Bandwidth": fields.Int(required=False, load_from="Bandwidth"), - "BandwidthType": fields.Int(required=False, load_from="BandwidthType"), - "IP": fields.Str(required=False, load_from="IP"), - "IPVersion": fields.Str(required=False, load_from="IPVersion"), - "Id": fields.Str(required=False, load_from="Id"), - "OperatorName": fields.Str(required=False, load_from="OperatorName"), + "Name": fields.Str(required=False, load_from="Name"), + "Priority": fields.Int(required=False, load_from="Priority"), + "SecgroupId": fields.Str(required=False, load_from="SecgroupId"), + "VPCId": fields.Str(required=False, load_from="VPCId"), } @@ -281,23 +278,26 @@ class AccessLogConfigSetSchema(schema.ResponseSchema): } -class FirewallSetSchema(schema.ResponseSchema): - """FirewallSet - ulb防火墙信息""" +class IPInfoSchema(schema.ResponseSchema): + """IPInfo - 绑定的IP信息""" fields = { - "FirewallId": fields.Str(required=False, load_from="FirewallId"), - "FirewallName": fields.Str(required=False, load_from="FirewallName"), + "AddressType": fields.Str(required=False, load_from="AddressType"), + "Bandwidth": fields.Int(required=False, load_from="Bandwidth"), + "BandwidthType": fields.Int(required=False, load_from="BandwidthType"), + "IP": fields.Str(required=False, load_from="IP"), + "IPVersion": fields.Str(required=False, load_from="IPVersion"), + "Id": fields.Str(required=False, load_from="Id"), + "OperatorName": fields.Str(required=False, load_from="OperatorName"), } -class SecGroupInfoSchema(schema.ResponseSchema): - """SecGroupInfo - 安全组详细信息""" +class FirewallSetSchema(schema.ResponseSchema): + """FirewallSet - ulb防火墙信息""" fields = { - "Name": fields.Str(required=False, load_from="Name"), - "Priority": fields.Int(required=False, load_from="Priority"), - "SecgroupId": fields.Str(required=False, load_from="SecgroupId"), - "VPCId": fields.Str(required=False, load_from="VPCId"), + "FirewallId": fields.Str(required=False, load_from="FirewallId"), + "FirewallName": fields.Str(required=False, load_from="FirewallName"), } @@ -480,13 +480,29 @@ class ULBIPSetSchema(schema.ResponseSchema): } -class LoggerSetSchema(schema.ResponseSchema): - """LoggerSet - ulb日志信息""" +class ULBBackendSetSchema(schema.ResponseSchema): + """ULBBackendSet - DescribeULB""" fields = { - "BucketName": fields.Str(required=False, load_from="BucketName"), - "TokenID": fields.Str(required=False, load_from="TokenID"), - "TokenName": fields.Str(required=False, load_from="TokenName"), + "BackendId": fields.Str(required=False, load_from="BackendId"), + "Enabled": fields.Int(required=False, load_from="Enabled"), + "IsBackup": fields.Int(required=False, load_from="IsBackup"), + "Port": fields.Int(required=False, load_from="Port"), + "PrivateIP": fields.Str(required=False, load_from="PrivateIP"), + "ResourceId": fields.Str(required=False, load_from="ResourceId"), + "ResourceName": fields.Str(required=False, load_from="ResourceName"), + "ResourceType": fields.Str(required=False, load_from="ResourceType"), + "Status": fields.Int(required=False, load_from="Status"), + "SubResourceId": fields.Str(required=False, load_from="SubResourceId"), + "SubResourceName": fields.Str( + required=False, load_from="SubResourceName" + ), + "SubResourceType": fields.Str( + required=False, load_from="SubResourceType" + ), + "SubnetId": fields.Str(required=False, load_from="SubnetId"), + "VPCId": fields.Str(required=False, load_from="VPCId"), + "Weight": fields.Int(required=False, load_from="Weight"), } @@ -530,32 +546,6 @@ class ULBPolicySetSchema(schema.ResponseSchema): } -class ULBBackendSetSchema(schema.ResponseSchema): - """ULBBackendSet - DescribeULB""" - - fields = { - "BackendId": fields.Str(required=False, load_from="BackendId"), - "Enabled": fields.Int(required=False, load_from="Enabled"), - "IsBackup": fields.Int(required=False, load_from="IsBackup"), - "Port": fields.Int(required=False, load_from="Port"), - "PrivateIP": fields.Str(required=False, load_from="PrivateIP"), - "ResourceId": fields.Str(required=False, load_from="ResourceId"), - "ResourceName": fields.Str(required=False, load_from="ResourceName"), - "ResourceType": fields.Str(required=False, load_from="ResourceType"), - "Status": fields.Int(required=False, load_from="Status"), - "SubResourceId": fields.Str(required=False, load_from="SubResourceId"), - "SubResourceName": fields.Str( - required=False, load_from="SubResourceName" - ), - "SubResourceType": fields.Str( - required=False, load_from="SubResourceType" - ), - "SubnetId": fields.Str(required=False, load_from="SubnetId"), - "VPCId": fields.Str(required=False, load_from="VPCId"), - "Weight": fields.Int(required=False, load_from="Weight"), - } - - class BindSecurityPolicySchema(schema.ResponseSchema): """BindSecurityPolicy - VServer绑定的安全策略组信息""" @@ -610,6 +600,16 @@ class ULBVServerSetSchema(schema.ResponseSchema): } +class LoggerSetSchema(schema.ResponseSchema): + """LoggerSet - ulb日志信息""" + + fields = { + "BucketName": fields.Str(required=False, load_from="BucketName"), + "TokenID": fields.Str(required=False, load_from="TokenID"), + "TokenName": fields.Str(required=False, load_from="TokenName"), + } + + class ULBSetSchema(schema.ResponseSchema): """ULBSet - DescribeULB""" diff --git a/ucloud/version.py b/ucloud/version.py index 31145cc..03fcd42 100644 --- a/ucloud/version.py +++ b/ucloud/version.py @@ -1 +1 @@ -version = "0.11.128" +version = "0.11.129"