diff --git a/docs/services.rst b/docs/services.rst index 13ccad5..10a6591 100644 --- a/docs/services.rst +++ b/docs/services.rst @@ -346,6 +346,13 @@ UPFS :members: +UPgSQL +------ + +.. autoclass:: ucloud.services.upgsql.client.UPgSQLClient + :members: + + UPhone ------ @@ -401,9 +408,3 @@ sandbox .. autoclass:: ucloud.services.sandbox.client.SandboxClient :members: - -UPgSQL ------- - -.. autoclass:: ucloud.services.upgsql.client.UPgSQLClient - :members: diff --git a/ucloud/client.py b/ucloud/client.py index cac19c4..71ab3ba 100644 --- a/ucloud/client.py +++ b/ucloud/client.py @@ -502,6 +502,16 @@ def uphost(self): self.logger, ) + def upgsql(self): + from ucloud.services.upgsql.client import UPgSQLClient + + return UPgSQLClient( + self._auto_config("upgsql"), + self.transport, + self.middleware, + self.logger, + ) + def uphone(self): from ucloud.services.uphone.client import UPhoneClient @@ -597,13 +607,3 @@ def _auto_config(self, package="generic"): package, self._config.get("user_agent") or "" ) return dict(user_agent=user_agent.rstrip(), **self._config) - - def upgsql(self): - from ucloud.services.upgsql.client import UPgSQLClient - - return UPgSQLClient( - self._auto_config("upgsql"), - self.transport, - self.middleware, - self.logger, - ) diff --git a/ucloud/services/uk8s/client.py b/ucloud/services/uk8s/client.py index fe8e036..7beebe3 100644 --- a/ucloud/services/uk8s/client.py +++ b/ucloud/services/uk8s/client.py @@ -163,6 +163,12 @@ def add_uk8s_node_group( **Request Model** + **AddUK8SNodeGroupParamSecGroupId** + - **Id** (str) - 安全组 ID。至多可以同时绑定5个安全组。 + - **Name** (str) - 安全组名称。 + - **Priority** (str) - 安全组优先级。取值范围[1, 5] + + **AddUK8SNodeGroupParamNetworkInterfaceEIP** - **Bandwidth** (int) - 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] - **CouponId** (str) - 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 @@ -171,18 +177,8 @@ def add_uk8s_node_group( - **ShareBandwidthId** (str) - 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 - **AddUK8SNodeGroupParamKubeletConfigurationEvictionSoft** - - **ImagefsAvailable** (str) - 触发Pod驱逐操作的软性门限之容器镜像剩余空间: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.ImagefsAvailable。控制台展示为evictionSoft - imagefs.available - - **MemoryAvailable** (str) - 触发Pod驱逐操作的软性门限之内存用量: 需以Mi或Gi结尾。配置此值时必须同时配置EvictionSoftGracePeriod.MemoryAvailable。控制台展示为evictionSoft - memory.available - - **NodefsAvailable** (str) - 触发Pod驱逐操作的软性门限之节点存储剩余空间: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.NodefsAvailable。控制台展示为evictionSoft - nodefs.available - - **NodefsInodesFree** (str) - 触发Pod驱逐操作的软性门限节点inode剩余量: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.NodefsInodesFree。控制台展示为evictionSoft - nodefs.inodesFree - - - **AddUK8SNodeGroupParamKubeletConfigurationKubeReserved** - - **CPU** (str) - kubelet预留CPU资源,以m结尾。控制台展示为kubeReserved - cpu - - **EphemeralStorage** (str) - kubelet预留存储空间,以Gi结尾。控制台展示为kubeReserved - ephemeral-storage - - **Memory** (str) - kubelet预留内存资源,以Mi结尾。控制台展示为kubeReserved - memory - - **Pid** (str) - kubelet预留pid数量,必须大于等于500, string方式提供。控制台展示为kubeReserved - pid + **AddUK8SNodeGroupParamNetworkInterface** + - **EIP** (dict) - 见 **AddUK8SNodeGroupParamNetworkInterfaceEIP** 模型定义 **AddUK8SNodeGroupParamKubeletConfigurationEvictionHard** @@ -192,6 +188,20 @@ def add_uk8s_node_group( - **NodefsInodesFree** (str) - 触发Pod驱逐操作的硬性门限节点inode剩余量: 需以%结尾。控制台展示为evictionHard - nodefs.inodesFree + **AddUK8SNodeGroupParamKubeletConfigurationSystemReserved** + - **CPU** (str) - 系统预留CPU资源,以m结尾。控制台展示为systemReserved - cpu + - **EphemeralStorage** (str) - 系统预留存储空间,以Gi结尾。控制台展示为systemReserved - ephemeral-storage + - **Memory** (str) - 系统预留内存资源,以Mi结尾。控制台展示为systemReserved - memory + - **Pid** (str) - 系统预留pid数量,必须大于等于500, string方式提供。控制台展示为systemReserved - pid + + + **AddUK8SNodeGroupParamKubeletConfigurationEvictionSoft** + - **ImagefsAvailable** (str) - 触发Pod驱逐操作的软性门限之容器镜像剩余空间: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.ImagefsAvailable。控制台展示为evictionSoft - imagefs.available + - **MemoryAvailable** (str) - 触发Pod驱逐操作的软性门限之内存用量: 需以Mi或Gi结尾。配置此值时必须同时配置EvictionSoftGracePeriod.MemoryAvailable。控制台展示为evictionSoft - memory.available + - **NodefsAvailable** (str) - 触发Pod驱逐操作的软性门限之节点存储剩余空间: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.NodefsAvailable。控制台展示为evictionSoft - nodefs.available + - **NodefsInodesFree** (str) - 触发Pod驱逐操作的软性门限节点inode剩余量: 需以%结尾。配置此值时必须同时配置EvictionSoftGracePeriod.NodefsInodesFree。控制台展示为evictionSoft - nodefs.inodesFree + + **AddUK8SNodeGroupParamKubeletConfigurationEvictionSoftGracePeriod** - **ImagefsAvailable** (str) - ImagefsAvailable软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - imagefs.available - **MemoryAvailable** (str) - MemoryAvailable软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - memory.available @@ -199,11 +209,11 @@ def add_uk8s_node_group( - **NodefsInodesFree** (str) - NodefsInodesFree软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - nodefs.inodesFree - **AddUK8SNodeGroupParamKubeletConfigurationSystemReserved** - - **CPU** (str) - 系统预留CPU资源,以m结尾。控制台展示为systemReserved - cpu - - **EphemeralStorage** (str) - 系统预留存储空间,以Gi结尾。控制台展示为systemReserved - ephemeral-storage - - **Memory** (str) - 系统预留内存资源,以Mi结尾。控制台展示为systemReserved - memory - - **Pid** (str) - 系统预留pid数量,必须大于等于500, string方式提供。控制台展示为systemReserved - pid + **AddUK8SNodeGroupParamKubeletConfigurationKubeReserved** + - **CPU** (str) - kubelet预留CPU资源,以m结尾。控制台展示为kubeReserved - cpu + - **EphemeralStorage** (str) - kubelet预留存储空间,以Gi结尾。控制台展示为kubeReserved - ephemeral-storage + - **Memory** (str) - kubelet预留内存资源,以Mi结尾。控制台展示为kubeReserved - memory + - **Pid** (str) - kubelet预留pid数量,必须大于等于500, string方式提供。控制台展示为kubeReserved - pid **AddUK8SNodeGroupParamKubeletConfiguration** @@ -219,16 +229,6 @@ def add_uk8s_node_group( - **SystemReserved** (dict) - 见 **AddUK8SNodeGroupParamKubeletConfigurationSystemReserved** 模型定义 - **AddUK8SNodeGroupParamSecGroupId** - - **Id** (str) - 安全组 ID。至多可以同时绑定5个安全组。 - - **Name** (str) - 安全组名称。 - - **Priority** (str) - 安全组优先级。取值范围[1, 5] - - - **AddUK8SNodeGroupParamNetworkInterface** - - **EIP** (dict) - 见 **AddUK8SNodeGroupParamNetworkInterfaceEIP** 模型定义 - - """ # build request d = { @@ -347,8 +347,10 @@ def add_uk8s_uhost_node( - **Value** (str) - UK8S用户资源标签的值 - **AddUK8SUHostNodeParamKubeletConfiguration** - - **ContainerLogMaxFiles** (str) - 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup + **AddUK8SUHostNodeParamSecGroupId** + - **Id** (str) - 安全组 ID。至多可以同时绑定5个安全组。 + - **Name** (str) - 安全组名称。 + - **Priority** (str) - 安全组优先级。取值范围[1, 5] **AddUK8SUHostNodeParamNetworkInterfaceEIP** @@ -363,10 +365,8 @@ def add_uk8s_uhost_node( - **EIP** (dict) - 见 **AddUK8SUHostNodeParamNetworkInterfaceEIP** 模型定义 - **AddUK8SUHostNodeParamSecGroupId** - - **Id** (str) - 安全组 ID。至多可以同时绑定5个安全组。 - - **Name** (str) - 安全组名称。 - - **Priority** (str) - 安全组优先级。取值范围[1, 5] + **AddUK8SUHostNodeParamKubeletConfiguration** + - **ContainerLogMaxFiles** (str) - 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup """ @@ -405,6 +405,7 @@ def create_uk8s_cluster_v2( - **VPCId** (str) - (Required) 集群Node及Pod所属VPC - **ChargeType** (str) - 集群所有节点的付费模式。枚举值为: Year,按年付费; Month,按月付费; Dynamic,按小时付费(需开启权限),默认按月。 - **ClusterDomain** (str) - 创建集群的时候定义clusterdomain + - **DedicatedPodSubnet** (bool) - Pod是否使用独立子网 - **ExternalApiServer** (str) - 是否允许外网访问apiserver,开启:Yes 不开启:No。默认为No。 - **ForwardSrcIPMethod** (str) - LbClass为nlb的时候支持的源ip转发模式,目前只支持Toa,为空则不开源ip功能 枚举:"",Toa - **InitScript** (str) - 用户自定义脚本,与UserData不同,自定义脚本将在集群安装完毕后执行。注意:1、总数据量大小不超多16K;2、使用base64编码。 @@ -423,6 +424,8 @@ def create_uk8s_cluster_v2( - **MasterMinimalCpuPlatform** (str) - Master节点的最低cpu平台,不选则随机。枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake"。 - **MasterUHostFamily** (str) - Master节点规格族,如o1a, o1i - **Nodes** (list) - 见 **CreateUK8SClusterV2ParamNodes** 模型定义 + - **PodSubnetId** (str) - Pod独立子网模式下的子网Id + - **PodSubnetSecGroup** (str) - Pod独立子网模式下使用的安全组,如不配置则使用防火墙模式 - **Quantity** (int) - 购买时长。默认为1。按小时购买(Dynamic)时无需此参数。 月付时,此参数传0,代表了购买至月末。 - **Tag** (str) - 业务组 - **UserData** (str) - 用户自定义数据。注意:1、总数据量大小不超多16K;2、使用base64编码。 @@ -434,12 +437,6 @@ def create_uk8s_cluster_v2( **Request Model** - **CreateUK8SClusterV2ParamMasterSecGroupId** - - **Id** (str) - 安全组 ID。至多可以同时绑定5个安全组。 - - **Name** (str) - 安全组名称。 - - **Priority** (str) - 安全组优先级。取值范围[1, 5] - - **CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP** - **Bandwidth** (int) - 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] - **CouponId** (str) - 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 @@ -452,7 +449,12 @@ def create_uk8s_cluster_v2( - **EIP** (dict) - 见 **CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP** 模型定义 - **CreateUK8SClusterV2ParamNodesSecGroupId** + **CreateUK8SClusterV2ParamUserLabels** + - **Key** (str) - UK8S用户资源标签的键值 + - **Value** (str) - UK8S用户资源标签的值 + + + **CreateUK8SClusterV2ParamMasterSecGroupId** - **Id** (str) - 安全组 ID。至多可以同时绑定5个安全组。 - **Name** (str) - 安全组名称。 - **Priority** (str) - 安全组优先级。取值范围[1, 5] @@ -462,6 +464,21 @@ def create_uk8s_cluster_v2( - **ContainerLogMaxFiles** (str) - 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup + **CreateUK8SClusterV2ParamNodesSecGroupId** + - **Id** (str) - 安全组 ID。至多可以同时绑定5个安全组。 + - **Name** (str) - 安全组名称。 + - **Priority** (str) - 安全组优先级。取值范围[1, 5] + + + **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。 + + **CreateUK8SClusterV2ParamNodes** - **BootDiskSize** (int) - Node节点的系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。 - **BootDiskType** (str) - 一组Node节点的系统盘类型,请参考 `磁盘类型 `_ 。默认为SSD云盘 @@ -491,20 +508,6 @@ def create_uk8s_cluster_v2( - **Zone** (str) - 一组Nodes节点所属可用区,可创建多组Nodes节点,如一组是CPU Nodes节点,另一组是GPU Nodes节点。参见 `可用区列表 `_ - **CreateUK8SClusterV2ParamUserLabels** - - **Key** (str) - UK8S用户资源标签的键值 - - **Value** (str) - UK8S用户资源标签的值 - - - **CreateUK8SClusterV2ParamKubeProxy** - - **Mode** (str) - 集群kube-proxy模式。支持iptables和ipvs,默认为iptables。 - - - **CreateUK8SClusterV2ParamMaster** - - **SecGroupId** (list) - 见 **CreateUK8SClusterV2ParamMasterSecGroupId** 模型定义 - - **Zone** (str) - Master节点所属可用区,需要设置 Master.0.Zone、 Master.1.Zone、Master.2.Zone 三个 Master 节点的可用区。 三个节点可部署在不同可用区。参见 `可用区列表 `_ - - """ # build request d = { @@ -542,16 +545,16 @@ 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), "" (不采集任何标签)。 - - **CreateUK8SULSConfigParamInputDetailFilePaths** - **File** (str) - 定义采集路径的文件名 - **Path** (str) - 定义采集路径 + **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), "" (不采集任何标签)。 + + **CreateUK8SULSConfigParamInputDetail** - **FilePaths** (list) - 见 **CreateUK8SULSConfigParamInputDetailFilePaths** 模型定义 - **Metadata** (dict) - 见 **CreateUK8SULSConfigParamInputDetailMetadata** 模型定义 @@ -559,25 +562,14 @@ def create_uk8s_uls_config( - **Type** (str) - 日志输入类型。支持 container_file 和 container_stdout - **CreateUK8SULSConfigParamExtractRuleExtractRule** - - **LogRegexBase64** (str) - Base64 编码的日志提取正则表达式。 + **CreateUK8SULSConfigParamMatchRuleWorkloads** + - **Name** (str) - 按工作负载匹配时,工作负载的名称。 + - **Namespace** (str) - 按工作负载匹配时,工作负载所在的命名空间。 + - **Type** (str) - 按工作负载匹配时,工作负载的类型,例如 deployment, statefulset, daemonset,job, cronjob。 - **CreateUK8SULSConfigParamExtractRule** - - **BeginningRegex** (str) - 行首正则表达式。当 logType 为多行模式 (如 multi_line 或 multi_line_full_regex) 时,用于标识一条新日志的开始。 - - **BeginningRegexBase64** (str) - Base64 编码的行首正则,优先级高于 BeginningRegex - - **CollectPolicy** (str) - 采集策略。可选值: full (全量采集存量日志), increment (从当前时间点增量采集)。默认为 full。 - - **Delimiter** (str) - 当 LogType 为delimiter 时可选,接收 "space"、"tab"、"|"、";"、","。 - - **DelimiterBase64** (str) - Base64 编码的分隔符,优先级高于 Delimiter - - **Encode** (str) - 日志原文的编码格式。可选值: utf-8, gbk。默认为 utf-8。 - - **ExtractRule** (dict) - 见 **CreateUK8SULSConfigParamExtractRuleExtractRule** 模型定义 - - **Keys** (list) - 当LogType 为分隔符、正则、多行正则时可用 - - **LogRegex** (str) - 日志提取正则表达式。当 logType 为正则模式 (如 full_regex,multi_line_full_regex) 时,用于从日志中提取字段。 - - **LogType** (str) - 日志解析类型,决定了如何结构化日志。可选值: multi_line_delimiter:多行分隔符,delimiter:分隔符,full_regex:完全正则,multi_line_full_regex:多行完全正则,minimal_list:单行全文日志,multi_line:多行全文日志 - - **TimeFormat** (str) - timeKey 对应的时间格式。 - - **TimeKey** (str) - 当日志为 json 或正则提取时,指定包含日志时间的字段名 (Key)。 - - **UnMatchKey** (str) - 没有设置默认值;UnMatchUpload="true" 时强制要求填写 - - **UnMatchUpload** (str) - 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。 + **CreateUK8SULSConfigParamExtractRuleExtractRule** + - **LogRegexBase64** (str) - Base64 编码的日志提取正则表达式。 **CreateUK8SULSConfigParamMatchRulePodLabelsLabels** @@ -592,12 +584,6 @@ def create_uk8s_uls_config( - **NamespaceOperator** (str) - 指定/排除命名空间, 可选值: in/notin - **CreateUK8SULSConfigParamMatchRuleWorkloads** - - **Name** (str) - 按工作负载匹配时,工作负载的名称。 - - **Namespace** (str) - 按工作负载匹配时,工作负载所在的命名空间。 - - **Type** (str) - 按工作负载匹配时,工作负载的类型,例如 deployment, statefulset, daemonset,job, cronjob。 - - **CreateUK8SULSConfigParamMatchRule** - **Container** (str) - 要匹配的容器名称,*表示所有容器,用逗号分隔 - **ContainerOperator** (str) - 容器名称匹配操作符。支持:in(包含),notin(不包含) @@ -605,6 +591,23 @@ def create_uk8s_uls_config( - **Workloads** (list) - 见 **CreateUK8SULSConfigParamMatchRuleWorkloads** 模型定义 + **CreateUK8SULSConfigParamExtractRule** + - **BeginningRegex** (str) - 行首正则表达式。当 logType 为多行模式 (如 multi_line 或 multi_line_full_regex) 时,用于标识一条新日志的开始。 + - **BeginningRegexBase64** (str) - Base64 编码的行首正则,优先级高于 BeginningRegex + - **CollectPolicy** (str) - 采集策略。可选值: full (全量采集存量日志), increment (从当前时间点增量采集)。默认为 full。 + - **Delimiter** (str) - 当 LogType 为delimiter 时可选,接收 "space"、"tab"、"|"、";"、","。 + - **DelimiterBase64** (str) - Base64 编码的分隔符,优先级高于 Delimiter + - **Encode** (str) - 日志原文的编码格式。可选值: utf-8, gbk。默认为 utf-8。 + - **ExtractRule** (dict) - 见 **CreateUK8SULSConfigParamExtractRuleExtractRule** 模型定义 + - **Keys** (list) - 当LogType 为分隔符、正则、多行正则时可用 + - **LogRegex** (str) - 日志提取正则表达式。当 logType 为正则模式 (如 full_regex,multi_line_full_regex) 时,用于从日志中提取字段。 + - **LogType** (str) - 日志解析类型,决定了如何结构化日志。可选值: multi_line_delimiter:多行分隔符,delimiter:分隔符,full_regex:完全正则,multi_line_full_regex:多行完全正则,minimal_list:单行全文日志,multi_line:多行全文日志 + - **TimeFormat** (str) - timeKey 对应的时间格式。 + - **TimeKey** (str) - 当日志为 json 或正则提取时,指定包含日志时间的字段名 (Key)。 + - **UnMatchKey** (str) - 没有设置默认值;UnMatchUpload="true" 时强制要求填写 + - **UnMatchUpload** (str) - 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。 + + """ # build request d = { @@ -751,12 +754,6 @@ def describe_uk8s_autoscaler_group( **Response Model** - **SecGroupId** - - **Id** (str) - 安全组 ID - - **Name** (str) - 安全组名称 - - **Priority** (str) - 安全组优先级 - - **EIP** - **Bandwidth** (int) - 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] - **CouponId** (str) - 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 @@ -796,6 +793,12 @@ def describe_uk8s_autoscaler_group( - **SystemReserved** (dict) - 见 **ReservedResource** 模型定义 + **SecGroupId** + - **Id** (str) - 安全组 ID + - **Name** (str) - 安全组名称 + - **Priority** (str) - 安全组优先级 + + **AutoScalingGroup** - **BootDiskSize** (int) - 节点系统盘大小 - **BootDiskType** (str) - 节点系统盘类型。请参考 `磁盘类型 `_ 。默认为SSD云盘 @@ -922,8 +925,17 @@ def describe_uk8s_cluster( **Response Model** - **KubeProxy** - - **Mode** (str) - KubeProxy模式,枚举值为[ipvs,iptables] + **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 **SecGroupId** @@ -945,19 +957,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 - - **LoopbackClientCert** - **ExpireTime** (int) - 证书到期时间 - **Warn** (bool) - 证书是否进入过期告警状态 @@ -985,6 +984,10 @@ def describe_uk8s_cluster( - **Zone** (str) - 所在机房 + **KubeProxy** + - **Mode** (str) - KubeProxy模式,枚举值为[ipvs,iptables] + + **Autoscaler** - **Enabled** (int) - 打开/关闭 - **ScaleDownDelayAfterAdd** (str) - 静默时间 @@ -1200,11 +1203,16 @@ def get_uk8s_available_instance_types( **Response Model** - **InstanceTypeBootDisk** - - **Features** (list) - 磁盘特性列表 - - **InstantResize** (bool) - 是否支持即时扩容 - - **MaximalSize** (int) - 最大磁盘容量 - - **Name** (str) - 系统盘类型名称 + **InstanceTypeMachineSizeCollection** + - **Cpu** (int) - CPU 核数 + - **Memory** (list) - 可用内存容量列表 + - **MinimalCpuPlatform** (list) - 最低 CPU 平台列表 + + + **InstanceTypeCpuPlatform** + - **CpuFrequency** (str) - CPU 频率 + - **CpuModels** (list) - CPU 型号列表 + - **Name** (str) - CPU 平台名称 **InstanceTypeDataDisk** @@ -1214,46 +1222,41 @@ def get_uk8s_available_instance_types( - **Name** (str) - 数据盘类型名称 + **InstanceTypeBootDisk** + - **Features** (list) - 磁盘特性列表 + - **InstantResize** (bool) - 是否支持即时扩容 + - **MaximalSize** (int) - 最大磁盘容量 + - **Name** (str) - 系统盘类型名称 + + + **InstanceTypeDisk** + - **BootDisk** (list) - 见 **InstanceTypeBootDisk** 模型定义 + - **DataDisk** (list) - 见 **InstanceTypeDataDisk** 模型定义 + - **Name** (str) - 磁盘配置名称 + + **InstanceTypeFeatureMode** - **MinimalCpuPlatform** (list) - 最低 CPU 平台列表 - **Name** (str) - 模式名称 - **RelatedToImageFeature** (list) - 关联的镜像特性 + **InstanceTypeFeature** + - **Modes** (list) - 见 **InstanceTypeFeatureMode** 模型定义 + - **Name** (str) - 特性名称 + + **InstanceTypeValueRate** - **Rate** (int) - 评分 - **Value** (float) - 数值 - **InstanceTypeCpuPlatform** - - **CpuFrequency** (str) - CPU 频率 - - **CpuModels** (list) - CPU 型号列表 - - **Name** (str) - CPU 平台名称 - - **InstanceTypeUHostFamily** - **CpuFrequency** (str) - CPU 频率 - **CpuPlatforms** (list) - 见 **InstanceTypeCpuPlatform** 模型定义 - **Name** (str) - 规格族名称 - **InstanceTypeDisk** - - **BootDisk** (list) - 见 **InstanceTypeBootDisk** 模型定义 - - **DataDisk** (list) - 见 **InstanceTypeDataDisk** 模型定义 - - **Name** (str) - 磁盘配置名称 - - - **InstanceTypeFeature** - - **Modes** (list) - 见 **InstanceTypeFeatureMode** 模型定义 - - **Name** (str) - 特性名称 - - - **InstanceTypeMachineSizeCollection** - - **Cpu** (int) - CPU 核数 - - **Memory** (list) - 可用内存容量列表 - - **MinimalCpuPlatform** (list) - 最低 CPU 平台列表 - - **InstanceTypeMachineSize** - **Collection** (list) - 见 **InstanceTypeMachineSizeCollection** 模型定义 - **Gpu** (int) - GPU 数量 @@ -1428,6 +1431,13 @@ def get_uk8s_node_group( - **Pid** (str) - Pid + **NodeGroupDiskConfig** + - **IsBoot** (bool) - 是否为系统盘 + - **KmsKeyId** (str) - 磁盘加密密钥 ID + - **Size** (int) - 磁盘大小,单位 GB + - **Type** (str) - 磁盘类型 + + **EIP** - **Bandwidth** (int) - 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] - **CouponId** (str) - 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 @@ -1440,11 +1450,10 @@ def get_uk8s_node_group( - **EIP** (dict) - 见 **EIP** 模型定义 - **NodeGroupDiskConfig** - - **IsBoot** (bool) - 是否为系统盘 - - **KmsKeyId** (str) - 磁盘加密密钥 ID - - **Size** (int) - 磁盘大小,单位 GB - - **Type** (str) - 磁盘类型 + **SecGroupId** + - **Id** (str) - 安全组 ID + - **Name** (str) - 安全组名称 + - **Priority** (str) - 安全组优先级 **KubeletConfiguration** @@ -1460,12 +1469,6 @@ def get_uk8s_node_group( - **SystemReserved** (dict) - 见 **ReservedResource** 模型定义 - **SecGroupId** - - **Id** (str) - 安全组 ID - - **Name** (str) - 安全组名称 - - **Priority** (str) - 安全组优先级 - - **NodeGroupSet** - **BootDiskSize** (int) - 系统盘大小 - **BootDiskType** (str) - 系统盘类型 @@ -1550,25 +1553,6 @@ def get_uk8s_plugin_info( **Response Model** - **ClusterUpdateNodeInfo** - - **IP** (str) - Node节点IP - - **Node** (str) - Node节点名称 - - **OperationResult** (int) - 上次插件操作结果,0:没有上次操作结果,或当前正在执行升级或查询 1:获取成功 2 获取失败 3 升级成功 4 升级失败 - - **Role** (str) - 节点角色, master 或者 node - - **Status** (int) - 插件工作状态,0:未知,1:正常,2:异常, 3: 升级中 - - **UpdateTime** (int) - 插件信息更新时间 - - **Version** (str) - 插件版本 - - - **ClusterUpgradeInfo** - - **AvailableVersions** (list) - string 数组,可用新版本,例如 ["1.15.12","1.16.15","1.17.4","1.18.9"] - - **NodeInfoSet** (list) - 见 **ClusterUpdateNodeInfo** 模型定义 - - **Stage** (str) - string,集群升级所处阶段 Unknown、Precheck、MasterUpdating、NodeUpdating、Failed、Success集群从未进行过升级则返回 Unknown集群开始升级过程几个阶段 Precheck->MasterUpdating->NodeUpdating→Success如果升级失败则为 Failed - - **TargetVersion** (str) - string,集群升级目标版本 - - **UpdateTime** (int) - 集群信息更新时间戳,单位 s - - **Version** (str) - string, 集群当前版本 - - **VKNodeInfo** - **Node** (str) - 节点 ID。 - **OperationResult** (int) - 上次插件操作结果:0 无结果,1 查询成功,2 查询失败,3 升级成功,4 升级失败。 @@ -1611,6 +1595,25 @@ def get_uk8s_plugin_info( - **Version** (str) - 当前插件版本。 + **ClusterUpdateNodeInfo** + - **IP** (str) - Node节点IP + - **Node** (str) - Node节点名称 + - **OperationResult** (int) - 上次插件操作结果,0:没有上次操作结果,或当前正在执行升级或查询 1:获取成功 2 获取失败 3 升级成功 4 升级失败 + - **Role** (str) - 节点角色, master 或者 node + - **Status** (int) - 插件工作状态,0:未知,1:正常,2:异常, 3: 升级中 + - **UpdateTime** (int) - 插件信息更新时间 + - **Version** (str) - 插件版本 + + + **ClusterUpgradeInfo** + - **AvailableVersions** (list) - string 数组,可用新版本,例如 ["1.15.12","1.16.15","1.17.4","1.18.9"] + - **NodeInfoSet** (list) - 见 **ClusterUpdateNodeInfo** 模型定义 + - **Stage** (str) - string,集群升级所处阶段 Unknown、Precheck、MasterUpdating、NodeUpdating、Failed、Success集群从未进行过升级则返回 Unknown集群开始升级过程几个阶段 Precheck->MasterUpdating->NodeUpdating→Success如果升级失败则为 Failed + - **TargetVersion** (str) - string,集群升级目标版本 + - **UpdateTime** (int) - 集群信息更新时间戳,单位 s + - **Version** (str) - string, 集群当前版本 + + **NodePluginInfo** - **IP** (str) - Node节点IP - **Node** (str) - Node节点名称 @@ -1701,10 +1704,6 @@ def list_uk8s_cluster_node_v2( **Response Model** - **KubeProxy** - - **Mode** (str) - KubeProxy模式,枚举值为[ipvs,iptables] - - **UHostIPSet** - **Bandwidth** (int) - IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) - **IP** (str) - IP地址 @@ -1717,6 +1716,10 @@ def list_uk8s_cluster_node_v2( - **VPCId** (str) - IP地址对应的VPC ID + **KubeProxy** + - **Mode** (str) - KubeProxy模式,枚举值为[ipvs,iptables] + + **NodeInfoV2** - **AsgId** (str) - 节点所属伸缩组ID,非伸缩组创建出来的节点,伸缩组ID为Default。 - **BootDiskSize** (int) - 系统盘大小 @@ -1855,6 +1858,13 @@ def list_uk8s_node_group( **Response Model** + **EvictionCondition** + - **ImagefsAvailable** (str) - 镜像文件系统存储相关驱逐条件或宽限时间。 + - **MemoryAvailable** (str) - 内存相关驱逐条件或宽限时间。 + - **NodefsAvailable** (str) - 节点存储余量相关驱逐条件或宽限时间。 + - **NodefsInodesFree** (str) - 节点剩余inodes驱逐条件或宽限时间。 + + **ReservedResource** - **CPU** (str) - CPU - **EphemeralStorage** (str) - 存储 @@ -1862,11 +1872,12 @@ def list_uk8s_node_group( - **Pid** (str) - Pid - **EvictionCondition** - - **ImagefsAvailable** (str) - 镜像文件系统存储相关驱逐条件或宽限时间。 - - **MemoryAvailable** (str) - 内存相关驱逐条件或宽限时间。 - - **NodefsAvailable** (str) - 节点存储余量相关驱逐条件或宽限时间。 - - **NodefsInodesFree** (str) - 节点剩余inodes驱逐条件或宽限时间。 + **EIP** + - **Bandwidth** (int) - 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] + - **CouponId** (str) - 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 + - **OperatorName** (str) - 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International,BGP: Bgp。 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International + - **PayMode** (str) - 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" + - **ShareBandwidthId** (str) - 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 **SecGroupId** @@ -1875,17 +1886,8 @@ def list_uk8s_node_group( - **Priority** (str) - 安全组优先级 - **KubeletConfiguration** - - **ContainerLogMaxFiles** (int) - 最大日志文件数量 - - **ContainerLogMaxSize** (str) - 最大日志文件大小 - - **EvictionHard** (dict) - 见 **EvictionCondition** 模型定义 - - **EvictionSoft** (dict) - 见 **EvictionCondition** 模型定义 - - **EvictionSoftGracePeriod** (dict) - 见 **EvictionCondition** 模型定义 - - **ImageGCHighThresholdPercent** (int) - 镜像垃圾收集阈值 - - **ImageGCLowThresholdPercent** (int) - 停止镜像垃圾收集阈值 - - **KubeReserved** (dict) - 见 **ReservedResource** 模型定义 - - **MaxPods** (int) - 最大Pod数量 - - **SystemReserved** (dict) - 见 **ReservedResource** 模型定义 + **NetworkInterface** + - **EIP** (dict) - 见 **EIP** 模型定义 **DiskSet** @@ -1901,16 +1903,17 @@ def list_uk8s_node_group( - **Type** (str) - 磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk - **EIP** - - **Bandwidth** (int) - 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] - - **CouponId** (str) - 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 - - **OperatorName** (str) - 【若绑定EIP,此参数必填】弹性IP的线路。枚举值: 国际: International,BGP: Bgp。 各地域允许的线路参数如下: cn-sh1: Bgp cn-sh2: Bgp cn-gd: Bgp cn-bj1: Bgp cn-bj2: Bgp hk: International us-ca: International th-bkk: International kr-seoul:International us-ws:International ge-fra:International sg:International tw-kh:International.其他海外线路均为 International - - **PayMode** (str) - 弹性IP的计费模式. 枚举值: "Traffic", 流量计费; "Bandwidth", 带宽计费; "ShareBandwidth",共享带宽模式. "Free":免费带宽模式,默认为 "Bandwidth" - - **ShareBandwidthId** (str) - 绑定的共享带宽Id,仅当PayMode为ShareBandwidth时有效 - - - **NetworkInterface** - - **EIP** (dict) - 见 **EIP** 模型定义 + **KubeletConfiguration** + - **ContainerLogMaxFiles** (int) - 最大日志文件数量 + - **ContainerLogMaxSize** (str) - 最大日志文件大小 + - **EvictionHard** (dict) - 见 **EvictionCondition** 模型定义 + - **EvictionSoft** (dict) - 见 **EvictionCondition** 模型定义 + - **EvictionSoftGracePeriod** (dict) - 见 **EvictionCondition** 模型定义 + - **ImageGCHighThresholdPercent** (int) - 镜像垃圾收集阈值 + - **ImageGCLowThresholdPercent** (int) - 停止镜像垃圾收集阈值 + - **KubeReserved** (dict) - 见 **ReservedResource** 模型定义 + - **MaxPods** (int) - 最大Pod数量 + - **SystemReserved** (dict) - 见 **ReservedResource** 模型定义 **NodeGroupSet** @@ -1988,40 +1991,11 @@ def list_uk8s_uls_config( **Response Model** - **ULSFilePaths** - - **File** (str) - 采集文件 - - **Path** (str) - 定义采集路径 - - **ULSInputMetadata** - **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 这两个标签。""(空字符串):不采集任何标签。 - **ULSInputDetail** - - **FilePaths** (list) - 见 **ULSFilePaths** 模型定义 - - **InputMetadata** (dict) - 见 **ULSInputMetadata** 模型定义 - - **Stream** (str) - 容器标准输出流类型。仅适用于 container_stdout,可选值:all、stdout、stderr,默认为 all。 - - **Type** (str) - 日志输入类型。可选值:container_file、container_stdout。 - - - **ULSExtractRule** - - **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。 - - **ULSWorkloadMatch** - **Name** (str) - 工作负载的名称。 - **Namespace** (str) - 工作负载所在的命名空间。 @@ -2047,6 +2021,35 @@ def list_uk8s_uls_config( - **Workloads** (list) - 见 **ULSWorkloadMatch** 模型定义 + **ULSExtractRule** + - **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) - 定义采集路径 + + + **ULSInputDetail** + - **FilePaths** (list) - 见 **ULSFilePaths** 模型定义 + - **InputMetadata** (dict) - 见 **ULSInputMetadata** 模型定义 + - **Stream** (str) - 容器标准输出流类型。仅适用于 container_stdout,可选值:all、stdout、stderr,默认为 all。 + - **Type** (str) - 日志输入类型。可选值:container_file、container_stdout。 + + **ULSLogConfig** - **ClusterId** (str) - uk8s集群id - **ExtractRule** (dict) - 见 **ULSExtractRule** 模型定义 @@ -2237,6 +2240,16 @@ def update_uk8s_node_group( **Request Model** + **UpdateUK8SNodeGroupParamKubeletConfiguration** + - **ContainerLogMaxFiles** (int) - 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup + + + **UpdateUK8SNodeGroupParamSecGroupId** + - **Id** (str) - 安全组 ID。至多可以同时绑定5个安全组。 + - **Name** (str) - 安全组名称。 + - **Priority** (str) - 安全组优先级。取值范围[1, 5] + + **UpdateUK8SNodeGroupParamNetworkInterfaceEIP** - **Bandwidth** (int) - 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] - **CouponId** (str) - 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 @@ -2249,16 +2262,6 @@ def update_uk8s_node_group( - **EIP** (dict) - 见 **UpdateUK8SNodeGroupParamNetworkInterfaceEIP** 模型定义 - **UpdateUK8SNodeGroupParamSecGroupId** - - **Id** (str) - 安全组 ID。至多可以同时绑定5个安全组。 - - **Name** (str) - 安全组名称。 - - **Priority** (str) - 安全组优先级。取值范围[1, 5] - - - **UpdateUK8SNodeGroupParamKubeletConfiguration** - - **ContainerLogMaxFiles** (int) - 全量KubeletConfiguration.XXX定义参考AddUK8SNodeGroup接口: https://uxiao.ucloudadmin.com/#/api-manager/api/detail/UK8S/AddUK8SNodeGroup - - """ # build request d = { @@ -2312,23 +2315,6 @@ def update_uk8s_uls_config( - **Type** (str) - 工作负载类型。可选值:deployment、statefulset、daemonset、job、cronjob。 - **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表示仅采集指定标签,空字符串表示不采集标签。 - - - **UpdateUK8SULSConfigParamMatchRule** - - **Container** (str) - 要匹配的容器名称,*表示所有容器,多个名称使用逗号分隔。 - - **ContainerOperator** (str) - 容器名称匹配操作符。可选值:in、notin。填写该参数时必须同时填写MatchRule.Container。 - - **PodLabels** (dict) - 见 **UpdateUK8SULSConfigParamMatchRulePodLabels** 模型定义 - - **Workloads** (list) - 见 **UpdateUK8SULSConfigParamMatchRuleWorkloads** 模型定义 - - **UpdateUK8SULSConfigParamExtractRule** - **BeginningRegex** (str) - 行首正则表达式。multi_line、multi_line_full_regex或multi_line_delimiter模式下,BeginningRegex和BeginningRegexBase64必须至少填写一个。 - **BeginningRegexBase64** (str) - Base64编码的行首正则表达式。填写时优先于BeginningRegex。 @@ -2346,6 +2332,16 @@ def update_uk8s_uls_config( - **UnMatchUpload** (str) - 是否上传解析失败的日志。字符串true表示上传,false表示丢弃。默认为false。 + **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** 模型定义 @@ -2353,6 +2349,13 @@ def update_uk8s_uls_config( - **Type** (str) - 日志输入类型。可选值:container_file、container_stdout。 + **UpdateUK8SULSConfigParamMatchRule** + - **Container** (str) - 要匹配的容器名称,*表示所有容器,多个名称使用逗号分隔。 + - **ContainerOperator** (str) - 容器名称匹配操作符。可选值:in、notin。填写该参数时必须同时填写MatchRule.Container。 + - **PodLabels** (dict) - 见 **UpdateUK8SULSConfigParamMatchRulePodLabels** 模型定义 + - **Workloads** (list) - 见 **UpdateUK8SULSConfigParamMatchRuleWorkloads** 模型定义 + + """ # build request d = { diff --git a/ucloud/services/uk8s/schemas/apis.py b/ucloud/services/uk8s/schemas/apis.py index b4b108f..fbde70b 100644 --- a/ucloud/services/uk8s/schemas/apis.py +++ b/ucloud/services/uk8s/schemas/apis.py @@ -110,6 +110,16 @@ class AddUK8SExistingUHostResponseSchema(schema.ResponseSchema): """ +class AddUK8SNodeGroupParamSecGroupIdSchema(schema.RequestSchema): + """AddUK8SNodeGroupParamSecGroupId -""" + + fields = { + "Id": fields.Str(required=False, dump_to="Id"), + "Name": fields.Str(required=False, dump_to="Name"), + "Priority": fields.Str(required=False, dump_to="Priority"), + } + + class AddUK8SNodeGroupParamNetworkInterfaceEIPSchema(schema.RequestSchema): """AddUK8SNodeGroupParamNetworkInterfaceEIP -""" @@ -124,10 +134,20 @@ class AddUK8SNodeGroupParamNetworkInterfaceEIPSchema(schema.RequestSchema): } -class AddUK8SNodeGroupParamKubeletConfigurationEvictionSoftSchema( +class AddUK8SNodeGroupParamNetworkInterfaceSchema(schema.RequestSchema): + """AddUK8SNodeGroupParamNetworkInterface -""" + + fields = { + "EIP": AddUK8SNodeGroupParamNetworkInterfaceEIPSchema( + required=False, dump_to="EIP" + ), + } + + +class AddUK8SNodeGroupParamKubeletConfigurationEvictionHardSchema( schema.RequestSchema ): - """AddUK8SNodeGroupParamKubeletConfigurationEvictionSoft -""" + """AddUK8SNodeGroupParamKubeletConfigurationEvictionHard -""" fields = { "ImagefsAvailable": fields.Str( @@ -145,10 +165,10 @@ class AddUK8SNodeGroupParamKubeletConfigurationEvictionSoftSchema( } -class AddUK8SNodeGroupParamKubeletConfigurationKubeReservedSchema( +class AddUK8SNodeGroupParamKubeletConfigurationSystemReservedSchema( schema.RequestSchema ): - """AddUK8SNodeGroupParamKubeletConfigurationKubeReserved -""" + """AddUK8SNodeGroupParamKubeletConfigurationSystemReserved -""" fields = { "CPU": fields.Str(required=False, dump_to="CPU"), @@ -160,10 +180,10 @@ class AddUK8SNodeGroupParamKubeletConfigurationKubeReservedSchema( } -class AddUK8SNodeGroupParamKubeletConfigurationEvictionHardSchema( +class AddUK8SNodeGroupParamKubeletConfigurationEvictionSoftSchema( schema.RequestSchema ): - """AddUK8SNodeGroupParamKubeletConfigurationEvictionHard -""" + """AddUK8SNodeGroupParamKubeletConfigurationEvictionSoft -""" fields = { "ImagefsAvailable": fields.Str( @@ -202,10 +222,10 @@ class AddUK8SNodeGroupParamKubeletConfigurationEvictionSoftGracePeriodSchema( } -class AddUK8SNodeGroupParamKubeletConfigurationSystemReservedSchema( +class AddUK8SNodeGroupParamKubeletConfigurationKubeReservedSchema( schema.RequestSchema ): - """AddUK8SNodeGroupParamKubeletConfigurationSystemReserved -""" + """AddUK8SNodeGroupParamKubeletConfigurationKubeReserved -""" fields = { "CPU": fields.Str(required=False, dump_to="CPU"), @@ -252,26 +272,6 @@ class AddUK8SNodeGroupParamKubeletConfigurationSchema(schema.RequestSchema): } -class AddUK8SNodeGroupParamSecGroupIdSchema(schema.RequestSchema): - """AddUK8SNodeGroupParamSecGroupId -""" - - fields = { - "Id": fields.Str(required=False, dump_to="Id"), - "Name": fields.Str(required=False, dump_to="Name"), - "Priority": fields.Str(required=False, dump_to="Priority"), - } - - -class AddUK8SNodeGroupParamNetworkInterfaceSchema(schema.RequestSchema): - """AddUK8SNodeGroupParamNetworkInterface -""" - - fields = { - "EIP": AddUK8SNodeGroupParamNetworkInterfaceEIPSchema( - required=False, dump_to="EIP" - ), - } - - class AddUK8SNodeGroupRequestSchema(schema.RequestSchema): """AddUK8SNodeGroup - 添加UK8S节点池""" @@ -390,13 +390,13 @@ class AddUK8SUHostNodeParamUserLabelsSchema(schema.RequestSchema): } -class AddUK8SUHostNodeParamKubeletConfigurationSchema(schema.RequestSchema): - """AddUK8SUHostNodeParamKubeletConfiguration -""" +class AddUK8SUHostNodeParamSecGroupIdSchema(schema.RequestSchema): + """AddUK8SUHostNodeParamSecGroupId -""" fields = { - "ContainerLogMaxFiles": fields.Str( - required=False, dump_to="ContainerLogMaxFiles" - ), + "Id": fields.Str(required=False, dump_to="Id"), + "Name": fields.Str(required=False, dump_to="Name"), + "Priority": fields.Str(required=False, dump_to="Priority"), } @@ -424,13 +424,13 @@ class AddUK8SUHostNodeParamNetworkInterfaceSchema(schema.RequestSchema): } -class AddUK8SUHostNodeParamSecGroupIdSchema(schema.RequestSchema): - """AddUK8SUHostNodeParamSecGroupId -""" +class AddUK8SUHostNodeParamKubeletConfigurationSchema(schema.RequestSchema): + """AddUK8SUHostNodeParamKubeletConfiguration -""" fields = { - "Id": fields.Str(required=False, dump_to="Id"), - "Name": fields.Str(required=False, dump_to="Name"), - "Priority": fields.Str(required=False, dump_to="Priority"), + "ContainerLogMaxFiles": fields.Str( + required=False, dump_to="ContainerLogMaxFiles" + ), } @@ -511,16 +511,6 @@ class AddUK8SUHostNodeResponseSchema(schema.ResponseSchema): """ -class CreateUK8SClusterV2ParamMasterSecGroupIdSchema(schema.RequestSchema): - """CreateUK8SClusterV2ParamMasterSecGroupId -""" - - fields = { - "Id": fields.Str(required=False, dump_to="Id"), - "Name": fields.Str(required=False, dump_to="Name"), - "Priority": fields.Str(required=False, dump_to="Priority"), - } - - class CreateUK8SClusterV2ParamNodesNetworkInterfaceEIPSchema( schema.RequestSchema ): @@ -547,8 +537,17 @@ class CreateUK8SClusterV2ParamNodesNetworkInterfaceSchema(schema.RequestSchema): } -class CreateUK8SClusterV2ParamNodesSecGroupIdSchema(schema.RequestSchema): - """CreateUK8SClusterV2ParamNodesSecGroupId -""" +class CreateUK8SClusterV2ParamUserLabelsSchema(schema.RequestSchema): + """CreateUK8SClusterV2ParamUserLabels -""" + + fields = { + "Key": fields.Str(required=False, dump_to="Key"), + "Value": fields.Str(required=False, dump_to="Value"), + } + + +class CreateUK8SClusterV2ParamMasterSecGroupIdSchema(schema.RequestSchema): + """CreateUK8SClusterV2ParamMasterSecGroupId -""" fields = { "Id": fields.Str(required=False, dump_to="Id"), @@ -569,6 +568,35 @@ class CreateUK8SClusterV2ParamNodesKubeletConfigurationSchema( } +class CreateUK8SClusterV2ParamNodesSecGroupIdSchema(schema.RequestSchema): + """CreateUK8SClusterV2ParamNodesSecGroupId -""" + + fields = { + "Id": fields.Str(required=False, dump_to="Id"), + "Name": fields.Str(required=False, dump_to="Name"), + "Priority": fields.Str(required=False, dump_to="Priority"), + } + + +class CreateUK8SClusterV2ParamMasterSchema(schema.RequestSchema): + """CreateUK8SClusterV2ParamMaster -""" + + fields = { + "SecGroupId": fields.List( + CreateUK8SClusterV2ParamMasterSecGroupIdSchema() + ), + "Zone": fields.Str(required=True, dump_to="Zone"), + } + + +class CreateUK8SClusterV2ParamKubeProxySchema(schema.RequestSchema): + """CreateUK8SClusterV2ParamKubeProxy -""" + + fields = { + "Mode": fields.Str(required=False, dump_to="Mode"), + } + + class CreateUK8SClusterV2ParamNodesSchema(schema.RequestSchema): """CreateUK8SClusterV2ParamNodes -""" @@ -620,34 +648,6 @@ class CreateUK8SClusterV2ParamNodesSchema(schema.RequestSchema): } -class CreateUK8SClusterV2ParamUserLabelsSchema(schema.RequestSchema): - """CreateUK8SClusterV2ParamUserLabels -""" - - fields = { - "Key": fields.Str(required=False, dump_to="Key"), - "Value": fields.Str(required=False, dump_to="Value"), - } - - -class CreateUK8SClusterV2ParamKubeProxySchema(schema.RequestSchema): - """CreateUK8SClusterV2ParamKubeProxy -""" - - fields = { - "Mode": fields.Str(required=False, dump_to="Mode"), - } - - -class CreateUK8SClusterV2ParamMasterSchema(schema.RequestSchema): - """CreateUK8SClusterV2ParamMaster -""" - - fields = { - "SecGroupId": fields.List( - CreateUK8SClusterV2ParamMasterSecGroupIdSchema() - ), - "Zone": fields.Str(required=True, dump_to="Zone"), - } - - class CreateUK8SClusterV2RequestSchema(schema.RequestSchema): """CreateUK8SClusterV2 - 创建UK8S集群""" @@ -655,6 +655,9 @@ class CreateUK8SClusterV2RequestSchema(schema.RequestSchema): "ChargeType": fields.Str(required=False, dump_to="ChargeType"), "ClusterDomain": fields.Str(required=False, dump_to="ClusterDomain"), "ClusterName": fields.Str(required=True, dump_to="ClusterName"), + "DedicatedPodSubnet": fields.Bool( + required=False, dump_to="DedicatedPodSubnet" + ), "ExternalApiServer": fields.Str( required=False, dump_to="ExternalApiServer" ), @@ -706,6 +709,10 @@ class CreateUK8SClusterV2RequestSchema(schema.RequestSchema): ), "Nodes": fields.List(CreateUK8SClusterV2ParamNodesSchema()), "Password": fields.Str(required=True, dump_to="Password"), + "PodSubnetId": fields.Str(required=False, dump_to="PodSubnetId"), + "PodSubnetSecGroup": fields.Str( + required=False, dump_to="PodSubnetSecGroup" + ), "ProjectId": fields.Str(required=True, dump_to="ProjectId"), "Quantity": fields.Int(required=False, dump_to="Quantity"), "Region": fields.Str(required=True, dump_to="Region"), @@ -733,21 +740,21 @@ class CreateUK8SClusterV2ResponseSchema(schema.ResponseSchema): """ -class CreateUK8SULSConfigParamInputDetailMetadataSchema(schema.RequestSchema): - """CreateUK8SULSConfigParamInputDetailMetadata -""" +class CreateUK8SULSConfigParamInputDetailFilePathsSchema(schema.RequestSchema): + """CreateUK8SULSConfigParamInputDetailFilePaths -""" fields = { - "Container": fields.Str(required=False, dump_to="Container"), - "Labels": fields.Str(required=False, dump_to="Labels"), + "File": fields.Str(required=False, dump_to="File"), + "Path": fields.Str(required=False, dump_to="Path"), } -class CreateUK8SULSConfigParamInputDetailFilePathsSchema(schema.RequestSchema): - """CreateUK8SULSConfigParamInputDetailFilePaths -""" +class CreateUK8SULSConfigParamInputDetailMetadataSchema(schema.RequestSchema): + """CreateUK8SULSConfigParamInputDetailMetadata -""" 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"), } @@ -766,40 +773,23 @@ class CreateUK8SULSConfigParamInputDetailSchema(schema.RequestSchema): } -class CreateUK8SULSConfigParamExtractRuleExtractRuleSchema( - schema.RequestSchema -): - """CreateUK8SULSConfigParamExtractRuleExtractRule -""" +class CreateUK8SULSConfigParamMatchRuleWorkloadsSchema(schema.RequestSchema): + """CreateUK8SULSConfigParamMatchRuleWorkloads -""" fields = { - "LogRegexBase64": fields.Str(required=False, dump_to="LogRegexBase64"), + "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 CreateUK8SULSConfigParamExtractRuleSchema(schema.RequestSchema): - """CreateUK8SULSConfigParamExtractRule -""" +class CreateUK8SULSConfigParamExtractRuleExtractRuleSchema( + schema.RequestSchema +): + """CreateUK8SULSConfigParamExtractRuleExtractRule -""" 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"), - "ExtractRule": CreateUK8SULSConfigParamExtractRuleExtractRuleSchema( - required=False, dump_to="ExtractRule" - ), - "Keys": fields.List(fields.Str()), - "LogRegex": fields.Str(required=False, dump_to="LogRegex"), - "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"), + "LogRegexBase64": fields.Str(required=False, dump_to="LogRegexBase64"), } @@ -829,16 +819,6 @@ class CreateUK8SULSConfigParamMatchRulePodLabelsSchema(schema.RequestSchema): } -class CreateUK8SULSConfigParamMatchRuleWorkloadsSchema(schema.RequestSchema): - """CreateUK8SULSConfigParamMatchRuleWorkloads -""" - - 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"), - } - - class CreateUK8SULSConfigParamMatchRuleSchema(schema.RequestSchema): """CreateUK8SULSConfigParamMatchRule -""" @@ -856,6 +836,33 @@ class CreateUK8SULSConfigParamMatchRuleSchema(schema.RequestSchema): } +class CreateUK8SULSConfigParamExtractRuleSchema(schema.RequestSchema): + """CreateUK8SULSConfigParamExtractRule -""" + + 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"), + "ExtractRule": CreateUK8SULSConfigParamExtractRuleExtractRuleSchema( + required=False, dump_to="ExtractRule" + ), + "Keys": fields.List(fields.Str()), + "LogRegex": fields.Str(required=False, dump_to="LogRegex"), + "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 CreateUK8SULSConfigRequestSchema(schema.RequestSchema): """CreateUK8SULSConfig - 创建 LogConfig 自定义资源,用于声明式地定义日志采集规则""" @@ -1740,6 +1747,26 @@ class UpdateUK8SAutoscalerResponseSchema(schema.ResponseSchema): """ +class UpdateUK8SNodeGroupParamKubeletConfigurationSchema(schema.RequestSchema): + """UpdateUK8SNodeGroupParamKubeletConfiguration -""" + + fields = { + "ContainerLogMaxFiles": fields.Int( + required=False, dump_to="ContainerLogMaxFiles" + ), + } + + +class UpdateUK8SNodeGroupParamSecGroupIdSchema(schema.RequestSchema): + """UpdateUK8SNodeGroupParamSecGroupId -""" + + fields = { + "Id": fields.Str(required=False, dump_to="Id"), + "Name": fields.Str(required=False, dump_to="Name"), + "Priority": fields.Str(required=False, dump_to="Priority"), + } + + class UpdateUK8SNodeGroupParamNetworkInterfaceEIPSchema(schema.RequestSchema): """UpdateUK8SNodeGroupParamNetworkInterfaceEIP -""" @@ -1764,26 +1791,6 @@ class UpdateUK8SNodeGroupParamNetworkInterfaceSchema(schema.RequestSchema): } -class UpdateUK8SNodeGroupParamSecGroupIdSchema(schema.RequestSchema): - """UpdateUK8SNodeGroupParamSecGroupId -""" - - fields = { - "Id": fields.Str(required=False, dump_to="Id"), - "Name": fields.Str(required=False, dump_to="Name"), - "Priority": fields.Str(required=False, dump_to="Priority"), - } - - -class UpdateUK8SNodeGroupParamKubeletConfigurationSchema(schema.RequestSchema): - """UpdateUK8SNodeGroupParamKubeletConfiguration -""" - - fields = { - "ContainerLogMaxFiles": fields.Int( - required=False, dump_to="ContainerLogMaxFiles" - ), - } - - class UpdateUK8SNodeGroupRequestSchema(schema.RequestSchema): """UpdateUK8SNodeGroup - 修改UK8S节点池""" @@ -1889,41 +1896,6 @@ class UpdateUK8SULSConfigParamMatchRuleWorkloadsSchema(schema.RequestSchema): } -class UpdateUK8SULSConfigParamInputDetailFilePathsSchema(schema.RequestSchema): - """UpdateUK8SULSConfigParamInputDetailFilePaths -""" - - fields = { - "File": fields.Str(required=False, dump_to="File"), - "Path": fields.Str(required=False, dump_to="Path"), - } - - -class UpdateUK8SULSConfigParamInputDetailMetadataSchema(schema.RequestSchema): - """UpdateUK8SULSConfigParamInputDetailMetadata -""" - - fields = { - "Container": fields.Str(required=False, dump_to="Container"), - "Labels": fields.Str(required=False, dump_to="Labels"), - } - - -class UpdateUK8SULSConfigParamMatchRuleSchema(schema.RequestSchema): - """UpdateUK8SULSConfigParamMatchRule -""" - - fields = { - "Container": fields.Str(required=False, dump_to="Container"), - "ContainerOperator": fields.Str( - required=False, dump_to="ContainerOperator" - ), - "PodLabels": UpdateUK8SULSConfigParamMatchRulePodLabelsSchema( - required=False, dump_to="PodLabels" - ), - "Workloads": fields.List( - UpdateUK8SULSConfigParamMatchRuleWorkloadsSchema() - ), - } - - class UpdateUK8SULSConfigParamExtractRuleSchema(schema.RequestSchema): """UpdateUK8SULSConfigParamExtractRule -""" @@ -1949,6 +1921,24 @@ class UpdateUK8SULSConfigParamExtractRuleSchema(schema.RequestSchema): } +class UpdateUK8SULSConfigParamInputDetailFilePathsSchema(schema.RequestSchema): + """UpdateUK8SULSConfigParamInputDetailFilePaths -""" + + fields = { + "File": fields.Str(required=False, dump_to="File"), + "Path": fields.Str(required=False, dump_to="Path"), + } + + +class UpdateUK8SULSConfigParamInputDetailMetadataSchema(schema.RequestSchema): + """UpdateUK8SULSConfigParamInputDetailMetadata -""" + + fields = { + "Container": fields.Str(required=False, dump_to="Container"), + "Labels": fields.Str(required=False, dump_to="Labels"), + } + + class UpdateUK8SULSConfigParamInputDetailSchema(schema.RequestSchema): """UpdateUK8SULSConfigParamInputDetail -""" @@ -1964,6 +1954,23 @@ class UpdateUK8SULSConfigParamInputDetailSchema(schema.RequestSchema): } +class UpdateUK8SULSConfigParamMatchRuleSchema(schema.RequestSchema): + """UpdateUK8SULSConfigParamMatchRule -""" + + fields = { + "Container": fields.Str(required=False, dump_to="Container"), + "ContainerOperator": fields.Str( + required=False, dump_to="ContainerOperator" + ), + "PodLabels": UpdateUK8SULSConfigParamMatchRulePodLabelsSchema( + required=False, dump_to="PodLabels" + ), + "Workloads": fields.List( + UpdateUK8SULSConfigParamMatchRuleWorkloadsSchema() + ), + } + + class UpdateUK8SULSConfigRequestSchema(schema.RequestSchema): """UpdateUK8SULSConfig - 更新指定UK8S集群的日志采集规则。""" diff --git a/ucloud/services/uk8s/schemas/models.py b/ucloud/services/uk8s/schemas/models.py index 1ec308e..3a449cb 100644 --- a/ucloud/services/uk8s/schemas/models.py +++ b/ucloud/services/uk8s/schemas/models.py @@ -3,38 +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 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 EvictionConditionSchema(schema.ResponseSchema): """EvictionCondition - 驱逐条件或宽限时间""" @@ -54,6 +22,16 @@ class EvictionConditionSchema(schema.ResponseSchema): } +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 ReservedResourceSchema(schema.ResponseSchema): """ReservedResource - 预留资源""" @@ -92,6 +70,28 @@ 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 AutoScalingGroupSchema(schema.ResponseSchema): """AutoScalingGroup - 自动伸缩组配置""" @@ -180,6 +180,14 @@ class AutoscalerSchema(schema.ResponseSchema): } +class KubeProxySchema(schema.ResponseSchema): + """KubeProxy - KubeProxy信息""" + + fields = { + "Mode": fields.Str(required=False, load_from="Mode"), + } + + class IPSetSchema(schema.ResponseSchema): """IPSet - 节点的IP信息""" @@ -251,14 +259,6 @@ class UhostInfoSchema(schema.ResponseSchema): } -class KubeProxySchema(schema.ResponseSchema): - """KubeProxy - KubeProxy信息""" - - fields = { - "Mode": fields.Str(required=False, load_from="Mode"), - } - - class ImageInfoSchema(schema.ResponseSchema): """ImageInfo - UK8S 可用镜像信息""" @@ -293,72 +293,63 @@ class K8SNodeConditionSchema(schema.ResponseSchema): } -class InstanceTypeCpuPlatformSchema(schema.ResponseSchema): - """InstanceTypeCpuPlatform - 机型 CPU 平台""" - - fields = { - "CpuFrequency": fields.Str(required=False, load_from="CpuFrequency"), - "CpuModels": fields.List(fields.Str()), - "Name": fields.Str(required=False, load_from="Name"), - } - - -class InstanceTypeUHostFamilySchema(schema.ResponseSchema): - """InstanceTypeUHostFamily - 机型规格族""" +class InstanceTypeMachineSizeCollectionSchema(schema.ResponseSchema): + """InstanceTypeMachineSizeCollection - 机型 CPU 与内存组合""" fields = { - "CpuFrequency": fields.Str(required=False, load_from="CpuFrequency"), - "CpuPlatforms": fields.List(InstanceTypeCpuPlatformSchema()), - "Name": fields.Str(required=False, load_from="Name"), + "Cpu": fields.Int(required=False, load_from="Cpu"), + "Memory": fields.List(fields.Int()), + "MinimalCpuPlatform": fields.List(fields.Str()), } -class InstanceTypeFeatureModeSchema(schema.ResponseSchema): - """InstanceTypeFeatureMode - 机型特性模式""" +class InstanceTypeMachineSizeSchema(schema.ResponseSchema): + """InstanceTypeMachineSize - 机型规格组合""" fields = { - "MinimalCpuPlatform": fields.List(fields.Str()), - "Name": fields.Str(required=False, load_from="Name"), - "RelatedToImageFeature": fields.List(fields.Str()), + "Collection": fields.List(InstanceTypeMachineSizeCollectionSchema()), + "Gpu": fields.Int(required=False, load_from="Gpu"), } -class InstanceTypeFeatureSchema(schema.ResponseSchema): - """InstanceTypeFeature - 机型特性""" +class InstanceTypeBootDiskSchema(schema.ResponseSchema): + """InstanceTypeBootDisk - 机型系统盘能力""" fields = { - "Modes": fields.List(InstanceTypeFeatureModeSchema()), + "Features": fields.List(fields.Str()), + "InstantResize": fields.Bool(required=False, load_from="InstantResize"), + "MaximalSize": fields.Int(required=False, load_from="MaximalSize"), "Name": fields.Str(required=False, load_from="Name"), } -class InstanceTypeBootDiskSchema(schema.ResponseSchema): - """InstanceTypeBootDisk - 机型系统盘能力""" +class InstanceTypeDataDiskSchema(schema.ResponseSchema): + """InstanceTypeDataDisk - 机型数据盘能力""" fields = { "Features": fields.List(fields.Str()), - "InstantResize": fields.Bool(required=False, load_from="InstantResize"), "MaximalSize": fields.Int(required=False, load_from="MaximalSize"), + "MinimalSize": fields.Int(required=False, load_from="MinimalSize"), "Name": fields.Str(required=False, load_from="Name"), } -class InstanceTypeMachineSizeCollectionSchema(schema.ResponseSchema): - """InstanceTypeMachineSizeCollection - 机型 CPU 与内存组合""" +class InstanceTypeFeatureModeSchema(schema.ResponseSchema): + """InstanceTypeFeatureMode - 机型特性模式""" fields = { - "Cpu": fields.Int(required=False, load_from="Cpu"), - "Memory": fields.List(fields.Int()), "MinimalCpuPlatform": fields.List(fields.Str()), + "Name": fields.Str(required=False, load_from="Name"), + "RelatedToImageFeature": fields.List(fields.Str()), } -class InstanceTypeMachineSizeSchema(schema.ResponseSchema): - """InstanceTypeMachineSize - 机型规格组合""" +class InstanceTypeFeatureSchema(schema.ResponseSchema): + """InstanceTypeFeature - 机型特性""" fields = { - "Collection": fields.List(InstanceTypeMachineSizeCollectionSchema()), - "Gpu": fields.Int(required=False, load_from="Gpu"), + "Modes": fields.List(InstanceTypeFeatureModeSchema()), + "Name": fields.Str(required=False, load_from="Name"), } @@ -371,13 +362,22 @@ class InstanceTypeValueRateSchema(schema.ResponseSchema): } -class InstanceTypeDataDiskSchema(schema.ResponseSchema): - """InstanceTypeDataDisk - 机型数据盘能力""" +class InstanceTypeCpuPlatformSchema(schema.ResponseSchema): + """InstanceTypeCpuPlatform - 机型 CPU 平台""" fields = { - "Features": fields.List(fields.Str()), - "MaximalSize": fields.Int(required=False, load_from="MaximalSize"), - "MinimalSize": fields.Int(required=False, load_from="MinimalSize"), + "CpuFrequency": fields.Str(required=False, load_from="CpuFrequency"), + "CpuModels": fields.List(fields.Str()), + "Name": fields.Str(required=False, load_from="Name"), + } + + +class InstanceTypeUHostFamilySchema(schema.ResponseSchema): + """InstanceTypeUHostFamily - 机型规格族""" + + fields = { + "CpuFrequency": fields.Str(required=False, load_from="CpuFrequency"), + "CpuPlatforms": fields.List(InstanceTypeCpuPlatformSchema()), "Name": fields.Str(required=False, load_from="Name"), } @@ -494,25 +494,6 @@ class NodeGroupSetSchema(schema.ResponseSchema): } -class CloudProviderInfoSchema(schema.ResponseSchema): - """CloudProviderInfo - CloudProvider 插件版本与状态""" - - fields = { - "AvailableVersion": fields.Str( - required=False, load_from="AvailableVersion" - ), - "ManageEnabled": fields.Bool(required=False, load_from="ManageEnabled"), - "Name": fields.Str(required=False, load_from="Name"), - "OperationResult": fields.Int( - required=False, load_from="OperationResult" - ), - "ReleaseTime": fields.Str(required=False, load_from="ReleaseTime"), - "Status": fields.Int(required=False, load_from="Status"), - "UpdateTime": fields.Int(required=False, load_from="UpdateTime"), - "Version": fields.Str(required=False, load_from="Version"), - } - - class ClusterUpdateNodeInfoSchema(schema.ResponseSchema): """ClusterUpdateNodeInfo - 集群升级时单个Node节点的状态等信息""" @@ -542,20 +523,6 @@ class ClusterUpgradeInfoSchema(schema.ResponseSchema): } -class RuntimeConvertInfoSchema(schema.ResponseSchema): - """RuntimeConvertInfo - 集群Runtime转换信息""" - - fields = { - "NodeInfoSet": fields.List(NodePluginInfoSchema()), - "RuntimeName": fields.Str(required=False, load_from="RuntimeName"), - "RuntimeVersion": fields.Str( - required=False, load_from="RuntimeVersion" - ), - "Stage": fields.Str(required=False, load_from="Stage"), - "UpdateTime": fields.Int(required=False, load_from="UpdateTime"), - } - - class VKNodeInfoSchema(schema.ResponseSchema): """VKNodeInfo - 单个虚拟节点插件信息""" @@ -570,18 +537,22 @@ class VKNodeInfoSchema(schema.ResponseSchema): } -class MonitorInfoSchema(schema.ResponseSchema): - """MonitorInfo - 监控插件信息""" +class VKNodeSchema(schema.ResponseSchema): + """VKNode - 虚拟节点插件信息""" fields = { "AvailableVersion": fields.Str( required=False, load_from="AvailableVersion" ), + "ManageEnabled": fields.Bool(required=False, load_from="ManageEnabled"), + "Name": fields.Str(required=True, load_from="Name"), + "PluginInfoSet": fields.List(VKNodeInfoSchema()), + "ReleaseTime": fields.Str(required=False, load_from="ReleaseTime"), } -class VKNodeSchema(schema.ResponseSchema): - """VKNode - 虚拟节点插件信息""" +class NodePluginSchema(schema.ResponseSchema): + """NodePlugin - 节点类插件信息""" fields = { "AvailableVersion": fields.Str( @@ -589,11 +560,25 @@ class VKNodeSchema(schema.ResponseSchema): ), "ManageEnabled": fields.Bool(required=False, load_from="ManageEnabled"), "Name": fields.Str(required=True, load_from="Name"), - "PluginInfoSet": fields.List(VKNodeInfoSchema()), + "PluginInfoSet": fields.List(NodePluginInfoSchema()), "ReleaseTime": fields.Str(required=False, load_from="ReleaseTime"), } +class RuntimeConvertInfoSchema(schema.ResponseSchema): + """RuntimeConvertInfo - 集群Runtime转换信息""" + + fields = { + "NodeInfoSet": fields.List(NodePluginInfoSchema()), + "RuntimeName": fields.Str(required=False, load_from="RuntimeName"), + "RuntimeVersion": fields.Str( + required=False, load_from="RuntimeVersion" + ), + "Stage": fields.Str(required=False, load_from="Stage"), + "UpdateTime": fields.Int(required=False, load_from="UpdateTime"), + } + + class CSIInfoSchema(schema.ResponseSchema): """CSIInfo - CSI 插件版本与状态""" @@ -613,17 +598,32 @@ class CSIInfoSchema(schema.ResponseSchema): } -class NodePluginSchema(schema.ResponseSchema): - """NodePlugin - 节点类插件信息""" +class MonitorInfoSchema(schema.ResponseSchema): + """MonitorInfo - 监控插件信息""" + + fields = { + "AvailableVersion": fields.Str( + required=False, load_from="AvailableVersion" + ), + } + + +class CloudProviderInfoSchema(schema.ResponseSchema): + """CloudProviderInfo - CloudProvider 插件版本与状态""" fields = { "AvailableVersion": fields.Str( required=False, load_from="AvailableVersion" ), "ManageEnabled": fields.Bool(required=False, load_from="ManageEnabled"), - "Name": fields.Str(required=True, load_from="Name"), - "PluginInfoSet": fields.List(NodePluginInfoSchema()), + "Name": fields.Str(required=False, load_from="Name"), + "OperationResult": fields.Int( + required=False, load_from="OperationResult" + ), "ReleaseTime": fields.Str(required=False, load_from="ReleaseTime"), + "Status": fields.Int(required=False, load_from="Status"), + "UpdateTime": fields.Int(required=False, load_from="UpdateTime"), + "Version": fields.Str(required=False, load_from="Version"), } @@ -746,25 +746,6 @@ class ClusterSetSchema(schema.ResponseSchema): } -class ULSInputMetadataSchema(schema.ResponseSchema): - """ULSInputMetadata - ULSInputMetadata""" - - fields = { - "Container": fields.Str(required=False, load_from="Container"), - "Labels": fields.Str(required=False, load_from="Labels"), - } - - -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 ULSExtractRuleSchema(schema.ResponseSchema): """ULSExtractRule - 定义日志的提取、解析和格式化规则。""" @@ -803,6 +784,15 @@ class ULSFilePathsSchema(schema.ResponseSchema): } +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 - 定义日志的输入来源,例如容器文件或容器标准输出。""" @@ -836,6 +826,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""" diff --git a/ucloud/version.py b/ucloud/version.py index 4d335ba..c829b40 100644 --- a/ucloud/version.py +++ b/ucloud/version.py @@ -1 +1 @@ -version = "0.11.155" +version = "0.11.156"