From e60ed5862f83d498a4603e6be140fe89b4997bd1 Mon Sep 17 00:00:00 2001 From: ucloud-bot Date: Thu, 10 Sep 2026 10:02:55 +0000 Subject: [PATCH] sdk: rolling update for 0.11.133 --- ucloud/services/sandbox/client.py | 1 + ucloud/services/sandbox/schemas/apis.py | 1 + ucloud/services/uk8s/client.py | 335 +++++++++++--------- ucloud/services/uk8s/schemas/apis.py | 396 +++++++++++++----------- ucloud/services/uk8s/schemas/models.py | 120 +++---- ucloud/services/umem/client.py | 392 ++++++++++++++++++----- ucloud/services/umem/schemas/apis.py | 191 +++++++++++- ucloud/services/umem/schemas/models.py | 72 ++++- ucloud/version.py | 2 +- 9 files changed, 1011 insertions(+), 499 deletions(-) diff --git a/ucloud/services/sandbox/client.py b/ucloud/services/sandbox/client.py index 9e2731f..189e56e 100644 --- a/ucloud/services/sandbox/client.py +++ b/ucloud/services/sandbox/client.py @@ -58,6 +58,7 @@ def create_sandbox_site( - **AccessCode** (str) - (Required) 访问码 - **KeyID** (str) - (Required) 密钥ID - **Name** (str) - (Required) 站点空间名称 + - **TemplateName** (str) - (Required) 站点空间空间模版,格式:site-nc-ng,n为偶数 - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ - **Envs** (str) - 环境变量,格式:["key=value"] diff --git a/ucloud/services/sandbox/schemas/apis.py b/ucloud/services/sandbox/schemas/apis.py index a061255..5db3b67 100644 --- a/ucloud/services/sandbox/schemas/apis.py +++ b/ucloud/services/sandbox/schemas/apis.py @@ -53,6 +53,7 @@ class CreateSandboxSiteRequestSchema(schema.RequestSchema): "Name": fields.Str(required=True, dump_to="Name"), "ProjectId": fields.Str(required=False, dump_to="ProjectId"), "Region": fields.Str(required=True, dump_to="Region"), + "TemplateName": fields.Str(required=True, dump_to="TemplateName"), "Zone": fields.Str(required=True, dump_to="Zone"), } diff --git a/ucloud/services/uk8s/client.py b/ucloud/services/uk8s/client.py index 3f7a9ee..362429d 100644 --- a/ucloud/services/uk8s/client.py +++ b/ucloud/services/uk8s/client.py @@ -103,6 +103,21 @@ def add_uk8s_node_group( **Request Model** + **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 + + + **AddUK8SNodeGroupParamNetworkInterfaceEIP** + - **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时有效 + + **AddUK8SNodeGroupParamKubeletConfigurationEvictionHard** - **ImagefsAvailable** (str) - 触发Pod驱逐操作的硬性门限之容器镜像剩余空间: 需以%结尾。控制台展示为evictionHard - imagefs.available - **MemoryAvailable** (str) - 触发Pod驱逐操作的硬性门限之内存用量: 需以Mi或Gi结尾。控制台展示为evictionHard - memory.available @@ -124,24 +139,6 @@ def add_uk8s_node_group( - **NodefsInodesFree** (str) - NodefsInodesFree软性门限的宽限时间,必须以s结尾。控制台展示为evictionSoftGracePeriod - nodefs.inodesFree - **AddUK8SNodeGroupParamNetworkInterfaceEIP** - - **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时有效 - - - **AddUK8SNodeGroupParamSecGroupId** - - **Id** (str) - 安全组 ID。至多可以同时绑定5个安全组。 - - **Name** (str) - 安全组名称。 - - **Priority** (str) - 安全组优先级。取值范围[1, 5] - - - **AddUK8SNodeGroupParamNetworkInterface** - - **EIP** (dict) - 见 **AddUK8SNodeGroupParamNetworkInterfaceEIP** 模型定义 - - **AddUK8SNodeGroupParamKubeletConfigurationSystemReserved** - **CPU** (str) - 系统预留CPU资源,以m结尾。控制台展示为systemReserved - cpu - **EphemeralStorage** (str) - 系统预留存储空间,以Gi结尾。控制台展示为systemReserved - ephemeral-storage @@ -149,13 +146,6 @@ def add_uk8s_node_group( - **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** - **ContainerLogMaxFiles** (int) - 容器的日志文件个数上限,需大于等于2。控制台展示为containerLogMaxFiles - **ContainerLogMaxSize** (str) - 容器日志文件轮换生成新文件的最大阈值,需以Mi结尾。控制台展示为containerLogMaxSize @@ -169,6 +159,16 @@ 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 = { @@ -282,21 +282,12 @@ def add_uk8s_uhost_node( **Request Model** - **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] - **AddUK8SUHostNodeParamUserLabels** - - **Key** (str) - UK8S用户资源标签的键值 - - **Value** (str) - UK8S用户资源标签的值 - - **AddUK8SUHostNodeParamNetworkInterfaceEIP** - **Bandwidth** (int) - 【若绑定EIP,此参数必填】弹性IP的外网带宽, 单位为Mbps. 共享带宽模式下非必传, 非共享带宽模式必须指定非0Mbps带宽. 各地域非共享带宽的带宽范围如下: 流量计费[1-300],带宽计费[1-800] - **CouponId** (str) - 当前EIP代金券id。请通过DescribeCoupon接口查询,或登录用户中心查看。 @@ -309,6 +300,15 @@ 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用户资源标签的值 + + """ # build request d = { @@ -370,8 +370,18 @@ def create_uk8s_cluster_v2( **Request Model** - **CreateUK8SClusterV2ParamKubeProxy** - - **Mode** (str) - 集群kube-proxy模式。支持iptables和ipvs,默认为iptables。 + **CreateUK8SClusterV2ParamNodesSecGroupId** + - **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接口查询,或登录用户中心查看。 + - **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时有效 **CreateUK8SClusterV2ParamMasterSecGroupId** @@ -385,24 +395,14 @@ def create_uk8s_cluster_v2( - **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接口查询,或登录用户中心查看。 - - **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时有效 + **CreateUK8SClusterV2ParamKubeProxy** + - **Mode** (str) - 集群kube-proxy模式。支持iptables和ipvs,默认为iptables。 **CreateUK8SClusterV2ParamNodesNetworkInterface** - **EIP** (dict) - 见 **CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP** 模型定义 - **CreateUK8SClusterV2ParamNodesSecGroupId** - - **Id** (str) - 安全组 ID。至多可以同时绑定5个安全组。 - - **Name** (str) - 安全组名称。 - - **Priority** (str) - 安全组优先级。取值范围[1, 5] - - **CreateUK8SClusterV2ParamNodes** - **BootDiskSIze** (int) - Node节点的系统盘大小,单位GB,默认为40。范围:[40, 500]。注意SSD本地盘无法调整。 - **BootDiskType** (str) - 一组Node节点的系统盘类型,请参考 `磁盘类型 `_ 。默认为SSD云盘 @@ -466,16 +466,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** 模型定义 @@ -483,10 +483,8 @@ def create_uk8s_uls_config( - **Type** (str) - 日志输入类型。支持 container_file 和 container_stdout - **CreateUK8SULSConfigParamMatchRuleWorkloads** - - **Name** (str) - 按工作负载匹配时,工作负载的名称。 - - **Namespace** (str) - 按工作负载匹配时,工作负载所在的命名空间。 - - **Type** (str) - 按工作负载匹配时,工作负载的类型,例如 deployment, statefulset, daemonset,job, cronjob。 + **CreateUK8SULSConfigParamExtractRuleExtractRule** + - **LogRegexBase64** (str) - Base64 编码的日志提取正则表达式。 **CreateUK8SULSConfigParamMatchRulePodLabelsLabels** @@ -501,17 +499,6 @@ def create_uk8s_uls_config( - **NamespaceOperator** (str) - 指定/排除命名空间, 可选值: in/notin - **CreateUK8SULSConfigParamMatchRule** - - **Container** (str) - 要匹配的容器名称,*表示所有容器,用逗号分隔 - - **ContainerOperator** (str) - 容器名称匹配操作符。支持:in(包含),notin(不包含) - - **PodLabels** (dict) - 见 **CreateUK8SULSConfigParamMatchRulePodLabels** 模型定义 - - **Workloads** (list) - 见 **CreateUK8SULSConfigParamMatchRuleWorkloads** 模型定义 - - - **CreateUK8SULSConfigParamExtractRuleExtractRule** - - **LogRegexBase64** (str) - Base64 编码的日志提取正则表达式。 - - **CreateUK8SULSConfigParamExtractRule** - **BeginningRegex** (str) - 行首正则表达式。当 logType 为多行模式 (如 multi_line 或 multi_line_full_regex) 时,用于标识一条新日志的开始。 - **BeginningRegexBase64** (str) - Base64 编码的行首正则,优先级高于 BeginningRegex @@ -529,6 +516,19 @@ def create_uk8s_uls_config( - **UnMatchUpload** (str) - 是否上传解析失败的日志。true 表示上传,false 表示丢弃。默认为 false。 + **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** 模型定义 + + """ # build request d = { @@ -682,6 +682,12 @@ def describe_uk8s_cluster( **Response Model** + **SecGroupId** + - **Id** (str) - 安全组名称 + - **Name** (str) - 安全组id + - **Priority** (str) - 安全组优先级 + + **DiskSet** - **BackupType** (str) - 备份方案,枚举类型:BASIC_SNAPSHOT,普通快照;DATAARK,方舟。无快照则不返回该字段。 - **DiskId** (str) - 磁盘长ID @@ -695,12 +701,6 @@ def describe_uk8s_cluster( - **Type** (str) - 磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk - **SecGroupId** - - **Id** (str) - 安全组名称 - - **Name** (str) - 安全组id - - **Priority** (str) - 安全组优先级 - - **IPSet** - **Bandwidth** (int) - IP对应的带宽, 单位: Mb (内网IP不显示带宽信息) - **Default** (str) - 是否默认的弹性网卡的信息。true: 是默认弹性网卡;其他值:不是。 @@ -736,6 +736,11 @@ def describe_uk8s_cluster( - **Zone** (str) - 所在机房 + **LoopbackClientCert** + - **ExpireTime** (int) - 证书到期时间 + - **Warn** (bool) - 证书是否进入过期告警状态 + + **Autoscaler** - **Enabled** (int) - 打开/关闭 - **ScaleDownDelayAfterAdd** (str) - 静默时间 @@ -750,11 +755,6 @@ def describe_uk8s_cluster( - **Mode** (str) - KubeProxy模式,枚举值为[ipvs,iptables] - **LoopbackClientCert** - - **ExpireTime** (int) - 证书到期时间 - - **Warn** (bool) - 证书是否进入过期告警状态 - - """ # build request d = { @@ -1122,32 +1122,6 @@ def list_uk8s_node_group( **Response Model** - **EvictionCondition** - - **ImagefsAvailable** (str) - 镜像文件系统存储相关驱逐条件或宽限时间。 - - **MemoryAvailable** (str) - 内存相关驱逐条件或宽限时间。 - - **NodefsAvailable** (str) - 节点存储余量相关驱逐条件或宽限时间。 - - **NodefsInodesFree** (str) - 节点剩余inodes驱逐条件或宽限时间。 - - - **ReservedResource** - - **CPU** (str) - CPU - - **EphemeralStorage** (str) - 存储 - - **Memory** (str) - 内存 - - **Pid** (str) - Pid - - - **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** 模型定义 - - **DiskSet** - **BackupType** (str) - 备份方案,枚举类型:BASIC_SNAPSHOT,普通快照;DATAARK,方舟。无快照则不返回该字段。 - **DiskId** (str) - 磁盘长ID @@ -1161,10 +1135,18 @@ def list_uk8s_node_group( - **Type** (str) - 磁盘类型。系统盘: Boot,数据盘: Data,网络盘:Udisk - **SecGroupId** - - **Id** (str) - 安全组名称 - - **Name** (str) - 安全组id - - **Priority** (str) - 安全组优先级 + **ReservedResource** + - **CPU** (str) - CPU + - **EphemeralStorage** (str) - 存储 + - **Memory** (str) - 内存 + - **Pid** (str) - Pid + + + **EvictionCondition** + - **ImagefsAvailable** (str) - 镜像文件系统存储相关驱逐条件或宽限时间。 + - **MemoryAvailable** (str) - 内存相关驱逐条件或宽限时间。 + - **NodefsAvailable** (str) - 节点存储余量相关驱逐条件或宽限时间。 + - **NodefsInodesFree** (str) - 节点剩余inodes驱逐条件或宽限时间。 **KubeletConfiguration** @@ -1180,6 +1162,24 @@ def list_uk8s_node_group( - **SystemReserved** (dict) - 见 **ReservedResource** 模型定义 + **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** 模型定义 + + + **SecGroupId** + - **Id** (str) - 安全组名称 + - **Name** (str) - 安全组id + - **Priority** (str) - 安全组优先级 + + **NodeGroupSet** - **BootDiskSize** (int) - 系统盘大小 - **BootDiskType** (str) - 系统盘类型 @@ -1255,23 +1255,6 @@ def list_uk8s_uls_config( **Response Model** - **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) - 定义采集路径 @@ -1314,6 +1297,23 @@ 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。 + + **ULSLogConfig** - **ClusterId** (str) - uk8s集群id - **ExtractRule** (dict) - 见 **ULSExtractRule** 模型定义 @@ -1336,6 +1336,33 @@ def list_uk8s_uls_config( resp = self.invoke("ListUK8SULSConfig", d, **kwargs) return apis.ListUK8SULSConfigResponseSchema().loads(resp) + def modify_uk8s_cluster_name( + self, req: typing.Optional[dict] = None, **kwargs + ) -> dict: + """ModifyUK8SClusterName - 修改k8s集群名称 + + **Request** + + - **ProjectId** (str) - (Config) 项目ID + - **Region** (str) - (Config) 所在地域 + - **ClusterId** (str) - (Required) 集群ID + - **ClusterName** (str) - (Required) 集群名称 + + **Response** + + + """ + # build request + d = { + "ProjectId": self.config.project_id, + "Region": self.config.region, + } + req and d.update(req) + d = apis.ModifyUK8SClusterNameRequestSchema().dumps(d) + + resp = self.invoke("ModifyUK8SClusterName", d, **kwargs) + return apis.ModifyUK8SClusterNameResponseSchema().loads(resp) + def remove_uk8s_node_group( self, req: typing.Optional[dict] = None, **kwargs ) -> dict: @@ -1414,8 +1441,10 @@ 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** @@ -1430,10 +1459,8 @@ 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 """ @@ -1471,28 +1498,36 @@ def update_uk8s_uls_config( **Request Model** - **UpdateUK8SULSConfigParamMatchRuleWorkloads** - - **Name** (str) - 工作负载名称。 - - **Namespace** (str) - 按工作负载匹配时,工作负载所在的命名空间。Workloads和PodLabels不能同时设置。 - - **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表示仅采集指定标签,空字符串表示不采集标签。 - - **UpdateUK8SULSConfigParamMatchRulePodLabelsLabels** - **Key** (str) - 按Pod标签匹配时,要匹配的标签Key。 - **Value** (str) - 要匹配的标签值。 - **ValueOperator** (str) - 标签值匹配操作符。可选值:in、notin。 + **UpdateUK8SULSConfigParamMatchRulePodLabels** + - **Labels** (list) - 见 **UpdateUK8SULSConfigParamMatchRulePodLabelsLabels** 模型定义 + - **Namespace** (str) - 按Pod标签匹配时要匹配的命名空间。 + - **NamespaceOperator** (str) - 按Pod标签匹配时,命名空间名称的匹配操作符。可选值:in、notin。填写该参数时必须同时填写MatchRule.PodLabels.Namespace。PodLabels和Workloads不能同时设置。 + + + **UpdateUK8SULSConfigParamMatchRuleWorkloads** + - **Name** (str) - 工作负载名称。 + - **Namespace** (str) - 按工作负载匹配时,工作负载所在的命名空间。Workloads和PodLabels不能同时设置。 + - **Type** (str) - 工作负载类型。可选值:deployment、statefulset、daemonset、job、cronjob。 + + + **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。 @@ -1510,17 +1545,9 @@ def update_uk8s_uls_config( - **UnMatchUpload** (str) - 是否上传解析失败的日志。字符串true表示上传,false表示丢弃。默认为false。 - **UpdateUK8SULSConfigParamMatchRulePodLabels** - - **Labels** (list) - 见 **UpdateUK8SULSConfigParamMatchRulePodLabelsLabels** 模型定义 - - **Namespace** (str) - 按Pod标签匹配时要匹配的命名空间。 - - **NamespaceOperator** (str) - 按Pod标签匹配时,命名空间名称的匹配操作符。可选值:in、notin。填写该参数时必须同时填写MatchRule.PodLabels.Namespace。PodLabels和Workloads不能同时设置。 - - - **UpdateUK8SULSConfigParamMatchRule** - - **Container** (str) - 要匹配的容器名称,*表示所有容器,多个名称使用逗号分隔。 - - **ContainerOperator** (str) - 容器名称匹配操作符。可选值:in、notin。填写该参数时必须同时填写MatchRule.Container。 - - **PodLabels** (dict) - 见 **UpdateUK8SULSConfigParamMatchRulePodLabels** 模型定义 - - **Workloads** (list) - 见 **UpdateUK8SULSConfigParamMatchRuleWorkloads** 模型定义 + **UpdateUK8SULSConfigParamInputDetailMetadata** + - **Container** (str) - 要附加到日志中的容器元数据字段,多个字段使用逗号分隔。可选字段:container_name、namespace、pod_name、pod_ip、pod_uid、container_id、image_name。留空表示不采集容器元数据。 + - **Labels** (str) - 要采集的Pod标签。*表示采集所有标签,app,version表示仅采集指定标签,空字符串表示不采集标签。 **UpdateUK8SULSConfigParamInputDetail** diff --git a/ucloud/services/uk8s/schemas/apis.py b/ucloud/services/uk8s/schemas/apis.py index c346681..8805281 100644 --- a/ucloud/services/uk8s/schemas/apis.py +++ b/ucloud/services/uk8s/schemas/apis.py @@ -51,6 +51,35 @@ class AddUK8SExistingUHostResponseSchema(schema.ResponseSchema): """ +class AddUK8SNodeGroupParamKubeletConfigurationKubeReservedSchema( + schema.RequestSchema +): + """AddUK8SNodeGroupParamKubeletConfigurationKubeReserved -""" + + fields = { + "CPU": fields.Str(required=False, dump_to="CPU"), + "EphemeralStorage": fields.Str( + required=False, dump_to="EphemeralStorage" + ), + "Memory": fields.Str(required=False, dump_to="Memory"), + "Pid": fields.Str(required=False, dump_to="Pid"), + } + + +class AddUK8SNodeGroupParamNetworkInterfaceEIPSchema(schema.RequestSchema): + """AddUK8SNodeGroupParamNetworkInterfaceEIP -""" + + fields = { + "Bandwidth": fields.Int(required=False, dump_to="Bandwidth"), + "CouponId": fields.Str(required=False, dump_to="CouponId"), + "OperatorName": fields.Str(required=False, dump_to="OperatorName"), + "PayMode": fields.Str(required=False, dump_to="PayMode"), + "ShareBandwidthId": fields.Str( + required=False, dump_to="ShareBandwidthId" + ), + } + + class AddUK8SNodeGroupParamKubeletConfigurationEvictionHardSchema( schema.RequestSchema ): @@ -114,40 +143,6 @@ class AddUK8SNodeGroupParamKubeletConfigurationEvictionSoftGracePeriodSchema( } -class AddUK8SNodeGroupParamNetworkInterfaceEIPSchema(schema.RequestSchema): - """AddUK8SNodeGroupParamNetworkInterfaceEIP -""" - - fields = { - "Bandwidth": fields.Int(required=False, dump_to="Bandwidth"), - "CouponId": fields.Str(required=False, dump_to="CouponId"), - "OperatorName": fields.Str(required=False, dump_to="OperatorName"), - "PayMode": fields.Str(required=False, dump_to="PayMode"), - "ShareBandwidthId": fields.Str( - required=False, dump_to="ShareBandwidthId" - ), - } - - -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 AddUK8SNodeGroupParamKubeletConfigurationSystemReservedSchema( schema.RequestSchema ): @@ -163,21 +158,6 @@ class AddUK8SNodeGroupParamKubeletConfigurationSystemReservedSchema( } -class AddUK8SNodeGroupParamKubeletConfigurationKubeReservedSchema( - schema.RequestSchema -): - """AddUK8SNodeGroupParamKubeletConfigurationKubeReserved -""" - - fields = { - "CPU": fields.Str(required=False, dump_to="CPU"), - "EphemeralStorage": fields.Str( - required=False, dump_to="EphemeralStorage" - ), - "Memory": fields.Str(required=False, dump_to="Memory"), - "Pid": fields.Str(required=False, dump_to="Pid"), - } - - class AddUK8SNodeGroupParamKubeletConfigurationSchema(schema.RequestSchema): """AddUK8SNodeGroupParamKubeletConfiguration -""" @@ -213,6 +193,26 @@ 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节点池""" @@ -322,16 +322,6 @@ class AddUK8SPHostNodeResponseSchema(schema.ResponseSchema): """ -class AddUK8SUHostNodeParamKubeletConfigurationSchema(schema.RequestSchema): - """AddUK8SUHostNodeParamKubeletConfiguration -""" - - fields = { - "ContainerLogMaxFiles": fields.Str( - required=False, dump_to="ContainerLogMaxFiles" - ), - } - - class AddUK8SUHostNodeParamSecGroupIdSchema(schema.RequestSchema): """AddUK8SUHostNodeParamSecGroupId -""" @@ -342,15 +332,6 @@ class AddUK8SUHostNodeParamSecGroupIdSchema(schema.RequestSchema): } -class AddUK8SUHostNodeParamUserLabelsSchema(schema.RequestSchema): - """AddUK8SUHostNodeParamUserLabels -""" - - fields = { - "Key": fields.Str(required=False, dump_to="Key"), - "Value": fields.Str(required=False, dump_to="Value"), - } - - class AddUK8SUHostNodeParamNetworkInterfaceEIPSchema(schema.RequestSchema): """AddUK8SUHostNodeParamNetworkInterfaceEIP -""" @@ -375,6 +356,25 @@ class AddUK8SUHostNodeParamNetworkInterfaceSchema(schema.RequestSchema): } +class AddUK8SUHostNodeParamKubeletConfigurationSchema(schema.RequestSchema): + """AddUK8SUHostNodeParamKubeletConfiguration -""" + + fields = { + "ContainerLogMaxFiles": fields.Str( + required=False, dump_to="ContainerLogMaxFiles" + ), + } + + +class AddUK8SUHostNodeParamUserLabelsSchema(schema.RequestSchema): + """AddUK8SUHostNodeParamUserLabels -""" + + fields = { + "Key": fields.Str(required=False, dump_to="Key"), + "Value": fields.Str(required=False, dump_to="Value"), + } + + class AddUK8SUHostNodeRequestSchema(schema.RequestSchema): """AddUK8SUHostNode - 为UK8S集群添加一台Node节点,机型类型为云主机""" @@ -452,11 +452,29 @@ class AddUK8SUHostNodeResponseSchema(schema.ResponseSchema): """ -class CreateUK8SClusterV2ParamKubeProxySchema(schema.RequestSchema): - """CreateUK8SClusterV2ParamKubeProxy -""" +class CreateUK8SClusterV2ParamNodesSecGroupIdSchema(schema.RequestSchema): + """CreateUK8SClusterV2ParamNodesSecGroupId -""" fields = { - "Mode": fields.Str(required=False, dump_to="Mode"), + "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 +): + """CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP -""" + + fields = { + "Bandwidth": fields.Int(required=False, dump_to="Bandwidth"), + "CouponId": fields.Str(required=False, dump_to="CouponId"), + "OperatorName": fields.Str(required=False, dump_to="OperatorName"), + "PayMode": fields.Str(required=False, dump_to="PayMode"), + "ShareBandwidthId": fields.Str( + required=False, dump_to="ShareBandwidthId" + ), } @@ -481,19 +499,11 @@ class CreateUK8SClusterV2ParamMasterSchema(schema.RequestSchema): } -class CreateUK8SClusterV2ParamNodesNetworkInterfaceEIPSchema( - schema.RequestSchema -): - """CreateUK8SClusterV2ParamNodesNetworkInterfaceEIP -""" +class CreateUK8SClusterV2ParamKubeProxySchema(schema.RequestSchema): + """CreateUK8SClusterV2ParamKubeProxy -""" fields = { - "Bandwidth": fields.Int(required=False, dump_to="Bandwidth"), - "CouponId": fields.Str(required=False, dump_to="CouponId"), - "OperatorName": fields.Str(required=False, dump_to="OperatorName"), - "PayMode": fields.Str(required=False, dump_to="PayMode"), - "ShareBandwidthId": fields.Str( - required=False, dump_to="ShareBandwidthId" - ), + "Mode": fields.Str(required=False, dump_to="Mode"), } @@ -507,16 +517,6 @@ class CreateUK8SClusterV2ParamNodesNetworkInterfaceSchema(schema.RequestSchema): } -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 CreateUK8SClusterV2ParamNodesSchema(schema.RequestSchema): """CreateUK8SClusterV2ParamNodes -""" @@ -635,21 +635,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"), } @@ -668,13 +668,13 @@ class CreateUK8SULSConfigParamInputDetailSchema(schema.RequestSchema): } -class CreateUK8SULSConfigParamMatchRuleWorkloadsSchema(schema.RequestSchema): - """CreateUK8SULSConfigParamMatchRuleWorkloads -""" +class CreateUK8SULSConfigParamExtractRuleExtractRuleSchema( + schema.RequestSchema +): + """CreateUK8SULSConfigParamExtractRuleExtractRule -""" 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"), + "LogRegexBase64": fields.Str(required=False, dump_to="LogRegexBase64"), } @@ -704,33 +704,6 @@ class CreateUK8SULSConfigParamMatchRulePodLabelsSchema(schema.RequestSchema): } -class CreateUK8SULSConfigParamMatchRuleSchema(schema.RequestSchema): - """CreateUK8SULSConfigParamMatchRule -""" - - fields = { - "Container": fields.Str(required=False, dump_to="Container"), - "ContainerOperator": fields.Str( - required=False, dump_to="ContainerOperator" - ), - "PodLabels": CreateUK8SULSConfigParamMatchRulePodLabelsSchema( - required=False, dump_to="PodLabels" - ), - "Workloads": fields.List( - CreateUK8SULSConfigParamMatchRuleWorkloadsSchema() - ), - } - - -class CreateUK8SULSConfigParamExtractRuleExtractRuleSchema( - schema.RequestSchema -): - """CreateUK8SULSConfigParamExtractRuleExtractRule -""" - - fields = { - "LogRegexBase64": fields.Str(required=False, dump_to="LogRegexBase64"), - } - - class CreateUK8SULSConfigParamExtractRuleSchema(schema.RequestSchema): """CreateUK8SULSConfigParamExtractRule -""" @@ -758,6 +731,33 @@ class CreateUK8SULSConfigParamExtractRuleSchema(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 -""" + + fields = { + "Container": fields.Str(required=False, dump_to="Container"), + "ContainerOperator": fields.Str( + required=False, dump_to="ContainerOperator" + ), + "PodLabels": CreateUK8SULSConfigParamMatchRulePodLabelsSchema( + required=False, dump_to="PodLabels" + ), + "Workloads": fields.List( + CreateUK8SULSConfigParamMatchRuleWorkloadsSchema() + ), + } + + class CreateUK8SULSConfigRequestSchema(schema.RequestSchema): """CreateUK8SULSConfig - 创建 LogConfig 自定义资源,用于声明式地定义日志采集规则""" @@ -1246,6 +1246,30 @@ class ListUK8SULSConfigResponseSchema(schema.ResponseSchema): } +""" +API: ModifyUK8SClusterName + +修改k8s集群名称 +""" + + +class ModifyUK8SClusterNameRequestSchema(schema.RequestSchema): + """ModifyUK8SClusterName - 修改k8s集群名称""" + + fields = { + "ClusterId": fields.Str(required=True, dump_to="ClusterId"), + "ClusterName": fields.Str(required=True, dump_to="ClusterName"), + "ProjectId": fields.Str(required=False, dump_to="ProjectId"), + "Region": fields.Str(required=True, dump_to="Region"), + } + + +class ModifyUK8SClusterNameResponseSchema(schema.ResponseSchema): + """ModifyUK8SClusterName - 修改k8s集群名称""" + + fields = {} + + """ API: RemoveUK8SNodeGroup @@ -1280,13 +1304,13 @@ class RemoveUK8SNodeGroupResponseSchema(schema.ResponseSchema): """ -class UpdateUK8SNodeGroupParamKubeletConfigurationSchema(schema.RequestSchema): - """UpdateUK8SNodeGroupParamKubeletConfiguration -""" +class UpdateUK8SNodeGroupParamSecGroupIdSchema(schema.RequestSchema): + """UpdateUK8SNodeGroupParamSecGroupId -""" fields = { - "ContainerLogMaxFiles": fields.Int( - 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"), } @@ -1314,13 +1338,13 @@ class UpdateUK8SNodeGroupParamNetworkInterfaceSchema(schema.RequestSchema): } -class UpdateUK8SNodeGroupParamSecGroupIdSchema(schema.RequestSchema): - """UpdateUK8SNodeGroupParamSecGroupId -""" +class UpdateUK8SNodeGroupParamKubeletConfigurationSchema(schema.RequestSchema): + """UpdateUK8SNodeGroupParamKubeletConfiguration -""" 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.Int( + required=False, dump_to="ContainerLogMaxFiles" + ), } @@ -1393,16 +1417,6 @@ class UpdateUK8SNodeGroupResponseSchema(schema.ResponseSchema): """ -class UpdateUK8SULSConfigParamMatchRuleWorkloadsSchema(schema.RequestSchema): - """UpdateUK8SULSConfigParamMatchRuleWorkloads -""" - - 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 UpdateUK8SULSConfigParamInputDetailFilePathsSchema(schema.RequestSchema): """UpdateUK8SULSConfigParamInputDetailFilePaths -""" @@ -1412,15 +1426,6 @@ class UpdateUK8SULSConfigParamInputDetailFilePathsSchema(schema.RequestSchema): } -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 ): @@ -1433,31 +1438,6 @@ class UpdateUK8SULSConfigParamMatchRulePodLabelsLabelsSchema( } -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 UpdateUK8SULSConfigParamMatchRulePodLabelsSchema(schema.RequestSchema): """UpdateUK8SULSConfigParamMatchRulePodLabels -""" @@ -1472,6 +1452,16 @@ class UpdateUK8SULSConfigParamMatchRulePodLabelsSchema(schema.RequestSchema): } +class UpdateUK8SULSConfigParamMatchRuleWorkloadsSchema(schema.RequestSchema): + """UpdateUK8SULSConfigParamMatchRuleWorkloads -""" + + 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 UpdateUK8SULSConfigParamMatchRuleSchema(schema.RequestSchema): """UpdateUK8SULSConfigParamMatchRule -""" @@ -1489,6 +1479,40 @@ class UpdateUK8SULSConfigParamMatchRuleSchema(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 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 -""" diff --git a/ucloud/services/uk8s/schemas/models.py b/ucloud/services/uk8s/schemas/models.py index 9740c1f..f5ac78e 100644 --- a/ucloud/services/uk8s/schemas/models.py +++ b/ucloud/services/uk8s/schemas/models.py @@ -3,24 +3,6 @@ from ucloud.core.typesystem import schema, fields -class KubeProxySchema(schema.ResponseSchema): - """KubeProxy - KubeProxy信息""" - - fields = { - "Mode": fields.Str(required=False, load_from="Mode"), - } - - -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 - 节点磁盘信息""" @@ -79,6 +61,16 @@ class AutoscalerSchema(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 UhostInfoSchema(schema.ResponseSchema): """UhostInfo - 机器信息""" @@ -105,6 +97,14 @@ class UhostInfoSchema(schema.ResponseSchema): } +class KubeProxySchema(schema.ResponseSchema): + """KubeProxy - KubeProxy信息""" + + fields = { + "Mode": fields.Str(required=False, load_from="Mode"), + } + + class LoopbackClientCertSchema(schema.ResponseSchema): """LoopbackClientCert - API Server 回环客户端证书""" @@ -267,19 +267,6 @@ class ClusterSetSchema(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 EIPSchema(schema.ResponseSchema): """EIP - 节点EIP""" @@ -313,6 +300,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自定义配置""" @@ -402,35 +402,6 @@ class NodeGroupSetSchema(schema.ResponseSchema): } -class ULSExtractRuleSchema(schema.ResponseSchema): - """ULSExtractRule - 定义日志的提取、解析和格式化规则。""" - - fields = { - "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"), - "UnMatchKey": fields.Str(required=False, load_from="UnMatchKey"), - "UnMatchUpload": fields.Str(required=False, load_from="UnMatchUpload"), - } - - class ULSFilePathsSchema(schema.ResponseSchema): """ULSFilePaths - ULS采集文件路径""" @@ -505,6 +476,35 @@ class ULSMatchRuleSchema(schema.ResponseSchema): } +class ULSExtractRuleSchema(schema.ResponseSchema): + """ULSExtractRule - 定义日志的提取、解析和格式化规则。""" + + fields = { + "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"), + "UnMatchKey": fields.Str(required=False, load_from="UnMatchKey"), + "UnMatchUpload": fields.Str(required=False, load_from="UnMatchUpload"), + } + + class ULSLogConfigSchema(schema.ResponseSchema): """ULSLogConfig - ULSLogConfig""" diff --git a/ucloud/services/umem/client.py b/ucloud/services/umem/client.py index 07783b1..bae3fdc 100644 --- a/ucloud/services/umem/client.py +++ b/ucloud/services/umem/client.py @@ -87,6 +87,7 @@ def create_scan_hot_big_keys( - **Type** (str) - (Required) 任务类型。"ScanBigKeys":扫大key,"ScanHotKeys":扫热key - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ - **IsRetry** (bool) - 是否要重试任务,如果是的话,TaskId必填 + - **SpaceId** (str) - 分布式资源ID - **TaskId** (str) - 要重试的任务id **Response** @@ -107,6 +108,41 @@ def create_scan_hot_big_keys( resp = self.invoke("CreateScanHotBigKeys", d, **kwargs) return apis.CreateScanHotBigKeysResponseSchema().loads(resp) + def create_ud_redis_uhproxy( + self, req: typing.Optional[dict] = None, **kwargs + ) -> dict: + """CreateUDRedisUhproxy - 添加分布式Redis代理 + + **Request** + + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **CPU** (int) - (Required) 代理核数 + - **SpaceId** (str) - (Required) UMem内存空间ID + - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ + - **CouponId** (str) - 使用的代金券id + - **Port** (int) - 代理端口, 默认为 6379 + - **ProxyCnt** (int) - 代理个数 + + **Response** + + - **ResourceId** (str) - 代理资源id + + """ + # build request + d = { + "ProjectId": self.config.project_id, + "Region": self.config.region, + } + req and d.update(req) + d = apis.CreateUDRedisUhproxyRequestSchema().dumps(d) + + # build options + kwargs["max_retries"] = 0 # ignore retry when api is not idempotent + + resp = self.invoke("CreateUDRedisUhproxy", d, **kwargs) + return apis.CreateUDRedisUhproxyResponseSchema().loads(resp) + def create_umem_backup( self, req: typing.Optional[dict] = None, **kwargs ) -> dict: @@ -114,11 +150,11 @@ def create_umem_backup( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **BackupName** (str) - (Required) 请求创建备份的名称 (范围[6-63],只能包含英文、数字以及符号-和_) - **SpaceId** (str) - (Required) 资源id - - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ + - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ **Response** @@ -241,12 +277,12 @@ def create_uredis_backup( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **BackupName** (str) - (Required) 请求创建组的名称 (范围[6-63],只能包含英文、数字以及符号-和_) - **GroupId** (str) - (Required) 资源id - **SlaveZone** (str) - 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) - - **Zone** (str) - 可用区。参见 `可用区列表 `_ + - **Zone** (str) - 可用区。参见 `可用区列表 `_ **Response** @@ -320,6 +356,34 @@ def create_uredis_group( resp = self.invoke("CreateURedisGroup", d, **kwargs) return apis.CreateURedisGroupResponseSchema().loads(resp) + def delete_ud_redis_proxy( + self, req: typing.Optional[dict] = None, **kwargs + ) -> dict: + """DeleteUDRedisProxy - 删除分布式Redis代理 + + **Request** + + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProxyId** (str) - (Required) 代理id + - **SpaceId** (str) - (Required) 分布式Redis资源ID + - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ + + **Response** + + + """ + # build request + d = { + "ProjectId": self.config.project_id, + "Region": self.config.region, + } + req and d.update(req) + d = apis.DeleteUDRedisProxyRequestSchema().dumps(d) + + resp = self.invoke("DeleteUDRedisProxy", d, **kwargs) + return apis.DeleteUDRedisProxyResponseSchema().loads(resp) + def delete_umem_space( self, req: typing.Optional[dict] = None, **kwargs ) -> dict: @@ -327,10 +391,10 @@ def delete_umem_space( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **SpaceId** (str) - (Required) UMem内存空间ID - - **Zone** (str) - 可用区。参见 `可用区列表 `_ + - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ **Response** @@ -354,10 +418,10 @@ def delete_umem_cache_group( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **GroupId** (str) - (Required) 组ID - - **Zone** (str) - 可用区。参见 `可用区列表 `_ + - **Zone** (str) - 可用区。参见 `可用区列表 `_ **Response** @@ -381,8 +445,8 @@ def delete_uredis_group( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **GroupId** (str) - (Required) 组ID **Response** @@ -400,6 +464,44 @@ def delete_uredis_group( resp = self.invoke("DeleteURedisGroup", d, **kwargs) return apis.DeleteURedisGroupResponseSchema().loads(resp) + def describe_ud_redis_proxy_client_list( + self, req: typing.Optional[dict] = None, **kwargs + ) -> dict: + """DescribeUDRedisProxyClientList - 查询分布式代理客户端连接信息 + + **Request** + + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProxyId** (str) - (Required) 分布式Redis代理Id + - **SpaceId** (str) - (Required) 分布式Redis集群id + - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ + + **Response** + + - **Count** (int) - 连接数 + - **ProxyClientList** (list) - 见 **ProxyClientList** 模型定义 + - **Time** (int) - 连接获取时间 + + **Response Model** + + **ProxyClientList** + - **ConnCnt** (int) - 该客户端Ip连接数量 + - **Ip** (str) - 客户端Ip + + + """ + # build request + d = { + "ProjectId": self.config.project_id, + "Region": self.config.region, + } + req and d.update(req) + d = apis.DescribeUDRedisProxyClientListRequestSchema().dumps(d) + + resp = self.invoke("DescribeUDRedisProxyClientList", d, **kwargs) + return apis.DescribeUDRedisProxyClientListResponseSchema().loads(resp) + def describe_ud_redis_proxy_info( self, req: typing.Optional[dict] = None, **kwargs ) -> dict: @@ -419,9 +521,15 @@ def describe_ud_redis_proxy_info( **Response Model** **UDRedisProxyInfo** + - **CPU** (int) - 代理CPU核数 - **ProxyId** (str) - 代理id + - **ProxyType** (int) - 0 : 物理机版分布式代理, 1: NVME(或SSD)版分布式代理 + - **PublicIp** (str) - 开启外网状态下的外网IP,否则为空 + - **ReadMode** (str) - 读写分离策略, "Custom": 用户自定义节点权重, "Uniform": 包括主节点在内的所有节点平均读请求, "ReadOnly": 读请求均分至只读节点 + - **ReadOnly** (bool) - 代理是否为只读 - **ResourceId** (str) - 代理资源id - - **State** (str) - 代理状态 + - **State** (str) - 代理状态 [PROXY_CREATING:创建中, PROXY_NORMAL:正常运行, PROXY_FAILED:创建失败, PROXY_CLOSED:关闭, PROXY_INIT_RESIZE:初始化核数调整, PROXY_WAIT_RESIZE:等待核数调整, PROXY_RESIZING:核数调整中, PROXY_RESIZE_ERROR:核数调整失败] + - **SupportReadOnly** (bool) - 代理是否支持设置为只读 - **Vip** (str) - 代理ip @@ -450,6 +558,7 @@ def describe_ud_redis_slowlog( - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ - **Limit** (int) - 分页显示的条目数,默认为10 - **ProxyId** (str) - 代理Id + - **SpaceId** (str) - 分布式资源Id **Response** @@ -501,63 +610,81 @@ def describe_umem( **Response Model** - **UMemDataSet** - - **Address** (list) - 见 **UMemSpaceAddressSet** 模型定义 - - **AutoBackup** (str) - 是否需要自动备份,enable,disable - - **BackupTime** (int) - 自动备份开始时间,单位小时计,范围[0-23] + **UMemSlaveDataSet** - **ChargeType** (str) - 计费模式,Year, Month, Dynamic, Trial - **ConfigId** (str) - 节点的配置ID - **CreateTime** (int) - 创建时间 - - **DataSet** (list) - 见 **UMemSlaveDataSet** 模型定义 + - **DefaultConfigId** (str) - 是否是默认配置文件;true表示默认;false表示非默认 - **ExpireTime** (int) - 到期时间 - - **HighAvailability** (str) - 是否开启高可用,enable,disable + - **GroupId** (str) - 资源id + - **GroupName** (str) - 资源名称 + - **HasPassword** (bool) - 实例是否设置密码 + - **MasterGroupId** (str) - 主实例id + - **MemorySize** (int) - 实力大小 + - **ModifyTime** (int) - 修改时间 - **Name** (str) - 资源名称 - - **OwnSlave** (str) - 是否拥有只读Slave“Yes” 包含“No” 不包含 - - **Protocol** (str) - 协议类型: memcache, redis - - **ResourceId** (str) - 资源ID + - **Port** (int) - 端口 - **ResourceType** (str) - distributed: 分布式版Redis,或者分布式Memcache;single:主备版Redis,或者单机Memcache;performance:高性能版 - - **RewriteTime** (int) - 主备redis和分布式redis运维时间0 //0点1 //1点以此类推单机版memcache不返回该项 - - **Role** (str) - 表示实例是主库还是从库,master,slave仅主备redis返回该项参数 + - **RewriteTime** (int) - 主备Redis返回运维时间 0//0点 1 //1点 以此类推 + - **Role** (str) - 表示实例是主库还是从库,master,slave - **Size** (int) - 容量单位GB - - **SlaveZone** (str) - 跨机房URedis,slave redis所在可用区,参见 `可用区列表 `_ - - **State** (str) - 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中SetPasswordFail //设置密码失败 + - **State** (str) - 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中SetPasswordFail //设置密码失败 - **SubnetId** (str) - 子网 - **Tag** (str) - 业务组名称 - - **Type** (str) - 空间类型:single(无热备),double(热备) + - **UDACEnable** (bool) - 实例是否有加入到自治中心 - **UsedSize** (int) - 使用量单位MB - **VPCId** (str) - vpc - **Version** (str) - Redis版本信息 + - **VirtualIP** (str) - - **Zone** (str) - 实例所在可用区,或者master redis所在可用区,参见 `可用区列表 `_ **UMemSpaceAddressSet** - - **IP** (str) - UMem实例访问IP + - **IP** (str) - UMem实例内网访问IP - **Port** (int) - UMem实例访问Port + - **PrivateDomain** (str) - UMem实例内网访问域名地址,未开启状态下返回为空 + - **PublicIp** (str) - 开启外网状态下外网IP,否则为空 - **UMemSlaveDataSet** + **UMemDataSet** + - **Address** (list) - 见 **UMemSpaceAddressSet** 模型定义 + - **AofRollbackEnable** (bool) - 实例是否开启了回档 + - **AutoBackup** (str) - 是否需要自动备份,enable,disable + - **BackupTime** (int) - 自动备份开始时间,单位小时计,范围[0-23] - **ChargeType** (str) - 计费模式,Year, Month, Dynamic, Trial - **ConfigId** (str) - 节点的配置ID - **CreateTime** (int) - 创建时间 + - **DataSet** (list) - 见 **UMemSlaveDataSet** 模型定义 + - **DefaultConfigId** (str) - 是否是默认配置文件,true表示默认;false表示非默认 - **ExpireTime** (int) - 到期时间 - - **GroupId** (str) - 资源id - - **GroupName** (str) - 资源名称 - - **MasterGroupId** (str) - 主实例id - - **MemorySize** (int) - 实力大小 - - **ModifyTime** (int) - 修改时间 + - **HasPassword** (bool) - 实例是否设置密码 + - **HighAvailability** (str) - 是否开启高可用,enable,disable + - **IsHighPerformance** (bool) - 是否是高性能Redis,true表示是;false表示否 + - **IsRWMode** (bool) - 是否是读写分离 - **Name** (str) - 资源名称 - - **Port** (int) - 端口 + - **OwnSlave** (str) - 是否拥有只读Slave“Yes” 包含“No” 不包含 + - **ProductType** (int) - 判断后端是否快杰资源(非快杰: 0或者1 快杰: 2或者3) + - **Protocol** (str) - 协议类型: memcache, redis + - **ProxyName** (str) - URedis是否开启读写分离 + - **ResourceId** (str) - 资源ID - **ResourceType** (str) - distributed: 分布式版Redis,或者分布式Memcache;single:主备版Redis,或者单机Memcache;performance:高性能版 - - **RewriteTime** (int) - 主备Redis返回运维时间 0//0点 1 //1点 以此类推 - - **Role** (str) - 表示实例是主库还是从库,master,slave + - **RewriteTime** (int) - 主备redis和分布式redis运维时间0 //0点1 //1点以此类推单机版memcache不返回该项 + - **Role** (str) - 表示实例是主库还是从库,master,slave仅主备redis返回该项参数 + - **SSLCertExpireTime** (int) - 证书过期时间 + - **SSLEnable** (bool) - 实例是否开启SSL + - **SSLVersion** (str) - SSL版本 + - **SecPolicy** (int) - 安全策略。1:内网隔离,2:加密通信,3:内网隔离+加密通信 - **Size** (int) - 容量单位GB - - **State** (str) - 实例状态 Starting // 创建中 Creating // 初始化中 CreateFail // 创建失败 Fail // 创建失败 Deleting // 删除中 DeleteFail // 删除失败 Running // 运行 Resizing // 容量调整中 ResizeFail // 容量调整失败 Configing // 配置中 ConfigFail // 配置失败Restarting // 重启中SetPasswordFail //设置密码失败 + - **SlaveZone** (str) - 跨机房URedis,slave redis所在可用区,参见 `可用区列表 `_ + - **State** (str) - 实例状态Starting // 创建中Creating // 初始化中Deleting // 删除中CreateFail // 创建失败DeleteFail // 删除失败Resizing // 容量调整中ResizeFail // 容量调整失败Disasting // 容灾中Running // 运行SetPassword // 设置密码SetPasswordFail // 设置密码失败ISolation // 关闭Replicating // 同步中ReplicateDone // 数据同步完成ExecTimeout // 待重试SlaveRecovering // 备库恢复中ReplicateFail // 同步失败DelayUpgrade // 待扩容迁移 VersionUpgrading // 升级中VersionUpgradeFail // 升级失败UpgradeMemInit // 任务初始化ClusterUpgrading // 规格调整中SSLSwitching // 修改TLS中SSLSwitchFail // 修改TLS失败 - **SubnetId** (str) - 子网 + - **SupportAofRollback** (bool) - 实例是否支持回档 - **Tag** (str) - 业务组名称 + - **Type** (str) - 空间类型:single(无热备),double(热备) + - **UDACEnable** (bool) - 实例是否有加入到自治中心 - **UsedSize** (int) - 使用量单位MB - **VPCId** (str) - vpc - **Version** (str) - Redis版本信息 - - **VirtualIP** (str) - - **Zone** (str) - 实例所在可用区,或者master redis所在可用区,参见 `可用区列表 `_ @@ -623,11 +750,11 @@ def describe_umem_backup_url( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **BackupId** (str) - (Required) 备份Id - **SpaceId** (str) - (Required) 资源id - - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ + - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ - **BlockId** (str) - 分片id **Response** @@ -709,6 +836,7 @@ def describe_umem_price( - **ChargeType** (str) - Year, Month, Dynamic 如果不指定,则一次性获取三种计费 - **ClusterMode** (str) - 数据库类型,RWMode为读写分离 - **HighPerformance** (bool) - 实例类型是否为性能增强型。默认为false,或者不填,true为性能增强型。 + - **ProxyCnt** (int) - umem 代理个数 - **ProxySize** (int) - umem 代理CPU核心数 - **Quantity** (int) - 购买UMem的时长,默认值为1 - **UlbMode** (str) - umem分布式代理类型,默认false,true为负载均衡型代理 @@ -759,6 +887,13 @@ def describe_umem_space( **Response Model** + **UMemSpaceAddressSet** + - **IP** (str) - UMem实例内网访问IP + - **Port** (int) - UMem实例访问Port + - **PrivateDomain** (str) - UMem实例内网访问域名地址,未开启状态下返回为空 + - **PublicIp** (str) - 开启外网状态下外网IP,否则为空 + + **UMemSpaceSet** - **Address** (list) - 见 **UMemSpaceAddressSet** 模型定义 - **AofRollbackEnable** (bool) - 实例是否开启了回档 @@ -780,11 +915,6 @@ def describe_umem_space( - **Zone** (str) - 可用区,参见 `可用区列表 `_ - **UMemSpaceAddressSet** - - **IP** (str) - UMem实例访问IP - - **Port** (int) - UMem实例访问Port - - """ # build request d = { @@ -850,12 +980,12 @@ def describe_umem_cache_group( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **GroupId** (str) - 组的ID,如果指定则获取描述,否则为列表操 作,需指定Offset/Limit - **Limit** (int) - 分页显示的条目数, 默认值为20 - **Offset** (int) - 分页显示的起始偏移, 默认值为0 - - **Zone** (str) - 可用区。参见 `可用区列表 `_ + - **Zone** (str) - 可用区。参见 `可用区列表 `_ **Response** @@ -975,9 +1105,11 @@ def describe_uredis_backup( - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - - **GroupId** (str) - (Required) 组的ID + - **BackupId** (str) - 备份Id,若传入,则只返回该BackupId的备份信息 + - **GroupId** (str) - 组的ID,如果不传RegionType,GroupId为必传项 - **Limit** (int) - 分页显示的条目数, 默认值为10 - **Offset** (int) - 分页显示的起始偏移, 默认值为0 + - **RegionType** (str) - 用于区分跨可用备份以及普通备份。默认为normal。跨可用则分为(source, target) - **SlaveZone** (str) - 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) **Response** @@ -993,8 +1125,12 @@ def describe_uredis_backup( - **BackupSize** (int) - 备份文件大小, 以字节为单位 - **BackupTime** (int) - 备份时间 (UNIX时间戳) - **BackupType** (str) - 备份类型: Manual 手动 Auto 自动 + - **DstRegionName** (str) - 跨地域备份目标地域 - **GroupId** (str) - 对应的实例ID - **GroupName** (str) - 组名称 + - **MemorySize** (int) - 源实例容量大小 + - **RedisVersion** (str) - 源实例Redis版本 + - **SrcRegionName** (str) - 跨地域备份源地域 - **State** (str) - 备份的状态: Backuping 备份中 Success 备份成功 Error 备份失败 Expired 备份过期 - **Zone** (str) - 可用区,参见 `可用区列表 `_ @@ -1022,6 +1158,7 @@ def describe_uredis_backup_url( - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **BackupId** (str) - (Required) 备份ID - **GroupId** (str) - 实例ID + - **IsCrossRegion** (bool) - 默认为false,true时代表查询跨地域备份URL - **RegionFlag** (bool) - 是否是跨机房URedis(默认false) - **SlaveZone** (str) - 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) - **Zone** (str) - 可用区。参见 `可用区列表 `_ @@ -1140,6 +1277,7 @@ def describe_uredis_group( - **SubnetId** (str) - subnetid - **Tag** (str) - 业务组名称 - **Type** (str) - 空间类型:single(无热备),double(热备) + - **UDACEnable** (bool) - 实例是否有加入到自治中心 - **UsedSize** (int) - 使用量单位MB - **VPCId** (str) - vpcid - **Version** (str) - Redis版本信息 @@ -1208,10 +1346,10 @@ def describe_uredis_slowlog( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **GroupId** (str) - (Required) 资源ID - - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ + - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ - **Limit** (int) - 分页显示的条目数,默认为10 **Response** @@ -1250,6 +1388,7 @@ def describe_uredis_upgrade_price( - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **GroupId** (str) - (Required) 要升级的空间的GroupId,请参考DescribeURedisGroup接口 - **Size** (int) - (Required) 购买uredis大小,单位:GB,范围是[1-32] + - **ConvertType** (str) - 切换类型,执行类型切换时询价需要传入的参数。“HighPerformance”: 表示转换为性能加强型,“Normal”: 表示转换为普通主备版类型 - **HighPerformance** (bool) - 查询高性能Redis, 默认为false, 或者不填, 查询高性能为true - **Zone** (str) - 可用区。参见 `可用区列表 `_ @@ -1311,11 +1450,11 @@ def flushall_uredis_group( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **FlushType** (str) - (Required) FlushDb或FlushAll - **GroupId** (str) - (Required) 组的ID - - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ + - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ - **DbNum** (int) - 清空的db,FlushType为FlushDb,此项为必传项 - **OrganizationId** (int) - OrganizationId - **SlaveZone** (str) - 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) @@ -1343,14 +1482,14 @@ def get_umem_space_state( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **SpaceId** (str) - (Required) 内存空间ID - - **Zone** (str) - 可用区。参见 `可用区列表 `_ + - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ **Response** - - **State** (str) - Starting:创建中 Running:运行中 Fail:失败 + - **State** (list) - Starting:创建中 Running:运行中 Fail:失败 """ # build request @@ -1393,6 +1532,34 @@ def i_solation_uredis_group( resp = self.invoke("ISolationURedisGroup", d, **kwargs) return apis.ISolationURedisGroupResponseSchema().loads(resp) + def modify_umem_password( + self, req: typing.Optional[dict] = None, **kwargs + ) -> dict: + """ModifyUMemPassword - 更改分布式redis密码 + + **Request** + + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **Password** (str) - (Required) 新密码字符串,要求长度为6~36个字符,且只能包含英文、数字以及-和下划线;并且需要base64加密;如要取消密码,此值为空字符串 + - **SpaceId** (str) - (Required) 资源id + - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ + + **Response** + + + """ + # build request + d = { + "ProjectId": self.config.project_id, + "Region": self.config.region, + } + req and d.update(req) + d = apis.ModifyUMemPasswordRequestSchema().dumps(d) + + resp = self.invoke("ModifyUMemPassword", d, **kwargs) + return apis.ModifyUMemPasswordResponseSchema().loads(resp) + def modify_umem_space_name( self, req: typing.Optional[dict] = None, **kwargs ) -> dict: @@ -1400,11 +1567,11 @@ def modify_umem_space_name( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **Name** (str) - (Required) 新的名称,长度(6<=size<=63) - **SpaceId** (str) - (Required) UMem内存空间ID - - **Zone** (str) - 可用区。参见 `可用区列表 `_ + - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ **Response** @@ -1459,10 +1626,11 @@ def modify_uredis_group_name( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **GroupId** (str) - (Required) 组的ID - **Name** (str) - (Required) Redis组名称 (范围[6-63],只能包含英文、数字以及符号-和_) + - **Zone** (str) - 可用区。参见 `可用区列表 `_ **Response** @@ -1486,12 +1654,12 @@ def modify_uredis_group_password( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **GroupId** (str) - (Required) 组的ID - **Password** (str) - (Required) 新密码字符串,要求长度为6~36个字符,且只能包含英文、数字以及-和下划线;并且需要base64加密;如要取消密码,此值为空字符串, - **ResourceType** (str) - - - **Zone** (str) - 可用区。参见 `可用区列表 `_ + - **Zone** (str) - 可用区。参见 `可用区列表 `_ **Response** @@ -1553,10 +1721,10 @@ def remove_ud_redis_data( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **SpaceId** (str) - (Required) 实例id - - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ + - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ **Response** @@ -1634,6 +1802,35 @@ def resize_umem_space( resp = self.invoke("ResizeUMemSpace", d, **kwargs) return apis.ResizeUMemSpaceResponseSchema().loads(resp) + def resize_umem_cache_group( + self, req: typing.Optional[dict] = None, **kwargs + ) -> dict: + """ResizeUMemcacheGroup - 调整memcache实例的容量 + + **Request** + + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **GroupId** (str) - (Required) umemcache资源ID + - **Size** (int) - (Required) 内存大小, 单位:GB 目前支持1/2/4/8/16/32五种规格(暂时只支持扩容) + - **CouponId** (int) - 代金券ID + - **Zone** (str) - 可用区。参见 `可用区列表 `_ + + **Response** + + + """ + # build request + d = { + "ProjectId": self.config.project_id, + "Region": self.config.region, + } + req and d.update(req) + d = apis.ResizeUMemcacheGroupRequestSchema().dumps(d) + + resp = self.invoke("ResizeUMemcacheGroup", d, **kwargs) + return apis.ResizeUMemcacheGroupResponseSchema().loads(resp) + def resize_uredis_group( self, req: typing.Optional[dict] = None, **kwargs ) -> dict: @@ -1667,6 +1864,36 @@ def resize_uredis_group( resp = self.invoke("ResizeURedisGroup", d, **kwargs) return apis.ResizeURedisGroupResponseSchema().loads(resp) + def resize_uhproxy( + self, req: typing.Optional[dict] = None, **kwargs + ) -> dict: + """ResizeUhproxy - 分布式Redis代理规格调整 + + **Request** + + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **NewCPU** (int) - (Required) 代理目标核数 + - **ProxyId** (str) - (Required) 代理id + - **SpaceId** (str) - (Required) 分布式Redis资源ID + - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ + - **CouponId** (str) - 使用的代金券id + + **Response** + + + """ + # build request + d = { + "ProjectId": self.config.project_id, + "Region": self.config.region, + } + req and d.update(req) + d = apis.ResizeUhproxyRequestSchema().dumps(d) + + resp = self.invoke("ResizeUhproxy", d, **kwargs) + return apis.ResizeUhproxyResponseSchema().loads(resp) + def restart_umem_cache_group( self, req: typing.Optional[dict] = None, **kwargs ) -> dict: @@ -1674,10 +1901,10 @@ def restart_umem_cache_group( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **GroupId** (str) - (Required) 组的ID - - **Zone** (str) - (Required) 可用区。参见 `可用区列表 `_ + - **Zone** (str) - 可用区。参见 `可用区列表 `_ **Response** @@ -1701,10 +1928,10 @@ def restart_uredis_group( **Request** - - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ + - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ + - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - **GroupId** (str) - (Required) 资源ID - - **Zone** (str) - 可用区。参见 `可用区列表 `_ + - **Zone** (str) - 可用区。参见 `可用区列表 `_ **Response** @@ -1778,9 +2005,12 @@ def update_uredis_backup_strategy( - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 `_ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 `_ - - **BackupTime** (str) - (Required) 备份时间,默认为0 - **GroupId** (str) - (Required) 组的ID - **AutoBackup** (str) - 是否打开默认备份功能。enable(打开),disable(关闭),默认enable + - **BackupTime** (str) - 备份时间,默认为0 + - **DstRegion** (str) - 跨可用备份目标地域(当Operation为modify时必选) + - **OperationType** (str) - 操作类型,不传默认为normal(即操控自动备份打开以及时间),modify(修改跨地域备份策略),close(关闭跨地域备份策略) + - **SaveDays** (int) - 保存天数(当Operation为modify时必选) - **SlaveZone** (str) - 跨机房URedis,slave所在可用区(必须和Zone在同一Region,且不可相同) - **Zone** (str) - 可用区。参见 `可用区列表 `_ diff --git a/ucloud/services/umem/schemas/apis.py b/ucloud/services/umem/schemas/apis.py index 4a57bd0..d234eec 100644 --- a/ucloud/services/umem/schemas/apis.py +++ b/ucloud/services/umem/schemas/apis.py @@ -80,6 +80,7 @@ class CreateScanHotBigKeysRequestSchema(schema.RequestSchema): "IsRetry": fields.Bool(required=False, dump_to="IsRetry"), "ProjectId": fields.Str(required=False, dump_to="ProjectId"), "Region": fields.Str(required=True, dump_to="Region"), + "SpaceId": fields.Str(required=False, dump_to="SpaceId"), "TaskId": fields.Str(required=False, dump_to="TaskId"), "Type": fields.Str(required=True, dump_to="Type"), "Zone": fields.Str(required=True, dump_to="Zone"), @@ -92,6 +93,36 @@ class CreateScanHotBigKeysResponseSchema(schema.ResponseSchema): fields = {} +""" +API: CreateUDRedisUhproxy + +添加分布式Redis代理 +""" + + +class CreateUDRedisUhproxyRequestSchema(schema.RequestSchema): + """CreateUDRedisUhproxy - 添加分布式Redis代理""" + + fields = { + "CPU": fields.Int(required=True, dump_to="CPU"), + "CouponId": fields.Str(required=False, dump_to="CouponId"), + "Port": fields.Int(required=False, dump_to="Port"), + "ProjectId": fields.Str(required=False, dump_to="ProjectId"), + "ProxyCnt": fields.Int(required=False, dump_to="ProxyCnt"), + "Region": fields.Str(required=True, dump_to="Region"), + "SpaceId": fields.Str(required=True, dump_to="SpaceId"), + "Zone": fields.Str(required=True, dump_to="Zone"), + } + + +class CreateUDRedisUhproxyResponseSchema(schema.ResponseSchema): + """CreateUDRedisUhproxy - 添加分布式Redis代理""" + + fields = { + "ResourceId": fields.Str(required=True, load_from="ResourceId"), + } + + """ API: CreateUMemBackup @@ -290,6 +321,31 @@ class CreateURedisGroupResponseSchema(schema.ResponseSchema): } +""" +API: DeleteUDRedisProxy + +删除分布式Redis代理 +""" + + +class DeleteUDRedisProxyRequestSchema(schema.RequestSchema): + """DeleteUDRedisProxy - 删除分布式Redis代理""" + + fields = { + "ProjectId": fields.Str(required=False, dump_to="ProjectId"), + "ProxyId": fields.Str(required=True, dump_to="ProxyId"), + "Region": fields.Str(required=True, dump_to="Region"), + "SpaceId": fields.Str(required=True, dump_to="SpaceId"), + "Zone": fields.Str(required=True, dump_to="Zone"), + } + + +class DeleteUDRedisProxyResponseSchema(schema.ResponseSchema): + """DeleteUDRedisProxy - 删除分布式Redis代理""" + + fields = {} + + """ API: DeleteUMemSpace @@ -304,7 +360,7 @@ class DeleteUMemSpaceRequestSchema(schema.RequestSchema): "ProjectId": fields.Str(required=False, dump_to="ProjectId"), "Region": fields.Str(required=True, dump_to="Region"), "SpaceId": fields.Str(required=True, dump_to="SpaceId"), - "Zone": fields.Str(required=False, dump_to="Zone"), + "Zone": fields.Str(required=True, dump_to="Zone"), } @@ -361,6 +417,39 @@ class DeleteURedisGroupResponseSchema(schema.ResponseSchema): fields = {} +""" +API: DescribeUDRedisProxyClientList + +查询分布式代理客户端连接信息 +""" + + +class DescribeUDRedisProxyClientListRequestSchema(schema.RequestSchema): + """DescribeUDRedisProxyClientList - 查询分布式代理客户端连接信息""" + + fields = { + "ProjectId": fields.Str(required=False, dump_to="ProjectId"), + "ProxyId": fields.Str(required=True, dump_to="ProxyId"), + "Region": fields.Str(required=True, dump_to="Region"), + "SpaceId": fields.Str(required=True, dump_to="SpaceId"), + "Zone": fields.Str(required=True, dump_to="Zone"), + } + + +class DescribeUDRedisProxyClientListResponseSchema(schema.ResponseSchema): + """DescribeUDRedisProxyClientList - 查询分布式代理客户端连接信息""" + + fields = { + "Count": fields.Int(required=True, load_from="Count"), + "ProxyClientList": fields.List( + models.ProxyClientListSchema(), + required=True, + load_from="ProxyClientList", + ), + "Time": fields.Int(required=False, load_from="Time"), + } + + """ API: DescribeUDRedisProxyInfo @@ -405,6 +494,7 @@ class DescribeUDRedisSlowlogRequestSchema(schema.RequestSchema): "ProjectId": fields.Str(required=False, dump_to="ProjectId"), "ProxyId": fields.Str(required=False, dump_to="ProxyId"), "Region": fields.Str(required=True, dump_to="Region"), + "SpaceId": fields.Str(required=False, dump_to="SpaceId"), "Zone": fields.Str(required=True, dump_to="Zone"), } @@ -563,6 +653,7 @@ class DescribeUMemPriceRequestSchema(schema.RequestSchema): required=False, dump_to="HighPerformance" ), "ProjectId": fields.Str(required=True, dump_to="ProjectId"), + "ProxyCnt": fields.Int(required=False, dump_to="ProxyCnt"), "ProxySize": fields.Int(required=False, dump_to="ProxySize"), "Quantity": fields.Int(required=False, dump_to="Quantity"), "Region": fields.Str(required=True, dump_to="Region"), @@ -762,11 +853,13 @@ class DescribeURedisBackupRequestSchema(schema.RequestSchema): """DescribeURedisBackup - 查询主备redis备份""" fields = { - "GroupId": fields.Str(required=True, dump_to="GroupId"), + "BackupId": fields.Str(required=False, dump_to="BackupId"), + "GroupId": fields.Str(required=False, dump_to="GroupId"), "Limit": fields.Int(required=False, dump_to="Limit"), "Offset": fields.Int(required=False, dump_to="Offset"), "ProjectId": fields.Str(required=False, dump_to="ProjectId"), "Region": fields.Str(required=True, dump_to="Region"), + "RegionType": fields.Str(required=False, dump_to="RegionType"), "SlaveZone": fields.Str(required=False, dump_to="SlaveZone"), } @@ -795,6 +888,7 @@ class DescribeURedisBackupURLRequestSchema(schema.RequestSchema): fields = { "BackupId": fields.Str(required=True, dump_to="BackupId"), "GroupId": fields.Str(required=False, dump_to="GroupId"), + "IsCrossRegion": fields.Bool(required=False, dump_to="IsCrossRegion"), "ProjectId": fields.Str(required=False, dump_to="ProjectId"), "Region": fields.Str(required=True, dump_to="Region"), "RegionFlag": fields.Bool(required=False, dump_to="RegionFlag"), @@ -952,6 +1046,7 @@ class DescribeURedisUpgradePriceRequestSchema(schema.RequestSchema): """DescribeURedisUpgradePrice - 获取uredis升级价格信息""" fields = { + "ConvertType": fields.Str(required=False, dump_to="ConvertType"), "GroupId": fields.Str(required=True, dump_to="GroupId"), "HighPerformance": fields.Bool( required=False, dump_to="HighPerformance" @@ -1045,7 +1140,7 @@ class GetUMemSpaceStateRequestSchema(schema.RequestSchema): "ProjectId": fields.Str(required=False, dump_to="ProjectId"), "Region": fields.Str(required=True, dump_to="Region"), "SpaceId": fields.Str(required=True, dump_to="SpaceId"), - "Zone": fields.Str(required=False, dump_to="Zone"), + "Zone": fields.Str(required=True, dump_to="Zone"), } @@ -1053,7 +1148,7 @@ class GetUMemSpaceStateResponseSchema(schema.ResponseSchema): """GetUMemSpaceState - 获取UMem内存空间列表""" fields = { - "State": fields.Str(required=False, load_from="State"), + "State": fields.List(fields.Str(), required=False, load_from="State"), } @@ -1083,6 +1178,31 @@ class ISolationURedisGroupResponseSchema(schema.ResponseSchema): fields = {} +""" +API: ModifyUMemPassword + +更改分布式redis密码 +""" + + +class ModifyUMemPasswordRequestSchema(schema.RequestSchema): + """ModifyUMemPassword - 更改分布式redis密码""" + + fields = { + "Password": fields.Str(required=True, dump_to="Password"), + "ProjectId": fields.Str(required=False, dump_to="ProjectId"), + "Region": fields.Str(required=True, dump_to="Region"), + "SpaceId": fields.Str(required=True, dump_to="SpaceId"), + "Zone": fields.Str(required=True, dump_to="Zone"), + } + + +class ModifyUMemPasswordResponseSchema(schema.ResponseSchema): + """ModifyUMemPassword - 更改分布式redis密码""" + + fields = {} + + """ API: ModifyUMemSpaceName @@ -1098,7 +1218,7 @@ class ModifyUMemSpaceNameRequestSchema(schema.RequestSchema): "ProjectId": fields.Str(required=False, dump_to="ProjectId"), "Region": fields.Str(required=True, dump_to="Region"), "SpaceId": fields.Str(required=True, dump_to="SpaceId"), - "Zone": fields.Str(required=False, dump_to="Zone"), + "Zone": fields.Str(required=True, dump_to="Zone"), } @@ -1151,6 +1271,7 @@ class ModifyURedisGroupNameRequestSchema(schema.RequestSchema): "Name": fields.Str(required=True, dump_to="Name"), "ProjectId": fields.Str(required=False, dump_to="ProjectId"), "Region": fields.Str(required=True, dump_to="Region"), + "Zone": fields.Str(required=False, dump_to="Zone"), } @@ -1300,6 +1421,32 @@ class ResizeUMemSpaceResponseSchema(schema.ResponseSchema): fields = {} +""" +API: ResizeUMemcacheGroup + +调整memcache实例的容量 +""" + + +class ResizeUMemcacheGroupRequestSchema(schema.RequestSchema): + """ResizeUMemcacheGroup - 调整memcache实例的容量""" + + fields = { + "CouponId": fields.Int(required=False, dump_to="CouponId"), + "GroupId": fields.Str(required=True, dump_to="GroupId"), + "ProjectId": fields.Str(required=False, dump_to="ProjectId"), + "Region": fields.Str(required=True, dump_to="Region"), + "Size": fields.Int(required=True, dump_to="Size"), + "Zone": fields.Str(required=False, dump_to="Zone"), + } + + +class ResizeUMemcacheGroupResponseSchema(schema.ResponseSchema): + """ResizeUMemcacheGroup - 调整memcache实例的容量""" + + fields = {} + + """ API: ResizeURedisGroup @@ -1332,6 +1479,33 @@ class ResizeURedisGroupResponseSchema(schema.ResponseSchema): fields = {} +""" +API: ResizeUhproxy + +分布式Redis代理规格调整 +""" + + +class ResizeUhproxyRequestSchema(schema.RequestSchema): + """ResizeUhproxy - 分布式Redis代理规格调整""" + + fields = { + "CouponId": fields.Str(required=False, dump_to="CouponId"), + "NewCPU": fields.Int(required=True, dump_to="NewCPU"), + "ProjectId": fields.Str(required=False, dump_to="ProjectId"), + "ProxyId": fields.Str(required=True, dump_to="ProxyId"), + "Region": fields.Str(required=True, dump_to="Region"), + "SpaceId": fields.Str(required=True, dump_to="SpaceId"), + "Zone": fields.Str(required=True, dump_to="Zone"), + } + + +class ResizeUhproxyResponseSchema(schema.ResponseSchema): + """ResizeUhproxy - 分布式Redis代理规格调整""" + + fields = {} + + """ API: RestartUMemcacheGroup @@ -1346,7 +1520,7 @@ class RestartUMemcacheGroupRequestSchema(schema.RequestSchema): "GroupId": fields.Str(required=True, dump_to="GroupId"), "ProjectId": fields.Str(required=False, dump_to="ProjectId"), "Region": fields.Str(required=True, dump_to="Region"), - "Zone": fields.Str(required=True, dump_to="Zone"), + "Zone": fields.Str(required=False, dump_to="Zone"), } @@ -1436,10 +1610,13 @@ class UpdateURedisBackupStrategyRequestSchema(schema.RequestSchema): fields = { "AutoBackup": fields.Str(required=False, dump_to="AutoBackup"), - "BackupTime": fields.Str(required=True, dump_to="BackupTime"), + "BackupTime": fields.Str(required=False, dump_to="BackupTime"), + "DstRegion": fields.Str(required=False, dump_to="DstRegion"), "GroupId": fields.Str(required=True, dump_to="GroupId"), + "OperationType": fields.Str(required=False, dump_to="OperationType"), "ProjectId": fields.Str(required=False, dump_to="ProjectId"), "Region": fields.Str(required=True, dump_to="Region"), + "SaveDays": fields.Int(required=False, dump_to="SaveDays"), "SlaveZone": fields.Str(required=False, dump_to="SlaveZone"), "Zone": fields.Str(required=False, dump_to="Zone"), } diff --git a/ucloud/services/umem/schemas/models.py b/ucloud/services/umem/schemas/models.py index 7b8161c..5a5bcd6 100644 --- a/ucloud/services/umem/schemas/models.py +++ b/ucloud/services/umem/schemas/models.py @@ -3,13 +3,30 @@ from ucloud.core.typesystem import schema, fields +class ProxyClientListSchema(schema.ResponseSchema): + """ProxyClientList - 代理连接信息""" + + fields = { + "ConnCnt": fields.Int(required=True, load_from="ConnCnt"), + "Ip": fields.Str(required=True, load_from="Ip"), + } + + class UDRedisProxyInfoSchema(schema.ResponseSchema): """UDRedisProxyInfo - udredis代理信息""" fields = { + "CPU": fields.Int(required=True, load_from="CPU"), "ProxyId": fields.Str(required=True, load_from="ProxyId"), + "ProxyType": fields.Int(required=True, load_from="ProxyType"), + "PublicIp": fields.Str(required=False, load_from="PublicIp"), + "ReadMode": fields.Str(required=False, load_from="ReadMode"), + "ReadOnly": fields.Bool(required=False, load_from="ReadOnly"), "ResourceId": fields.Str(required=True, load_from="ResourceId"), "State": fields.Str(required=True, load_from="State"), + "SupportReadOnly": fields.Bool( + required=False, load_from="SupportReadOnly" + ), "Vip": fields.Str(required=True, load_from="Vip"), } @@ -26,6 +43,17 @@ class UDRedisSlowlogSetSchema(schema.ResponseSchema): } +class UMemSpaceAddressSetSchema(schema.ResponseSchema): + """UMemSpaceAddressSet - DescribeUMemSpace""" + + fields = { + "IP": fields.Str(required=False, load_from="IP"), + "Port": fields.Int(required=False, load_from="Port"), + "PrivateDomain": fields.Str(required=False, load_from="PrivateDomain"), + "PublicIp": fields.Str(required=False, load_from="PublicIp"), + } + + class UMemSlaveDataSetSchema(schema.ResponseSchema): """UMemSlaveDataSet - DescribeUMem""" @@ -33,9 +61,13 @@ class UMemSlaveDataSetSchema(schema.ResponseSchema): "ChargeType": fields.Str(required=False, load_from="ChargeType"), "ConfigId": fields.Str(required=False, load_from="ConfigId"), "CreateTime": fields.Int(required=False, load_from="CreateTime"), + "DefaultConfigId": fields.Str( + required=False, load_from="DefaultConfigId" + ), "ExpireTime": fields.Int(required=False, load_from="ExpireTime"), "GroupId": fields.Str(required=False, load_from="GroupId"), "GroupName": fields.Str(required=False, load_from="GroupName"), + "HasPassword": fields.Bool(required=False, load_from="HasPassword"), "MasterGroupId": fields.Str(required=False, load_from="MasterGroupId"), "MemorySize": fields.Int(required=False, load_from="MemorySize"), "ModifyTime": fields.Int(required=False, load_from="ModifyTime"), @@ -48,6 +80,7 @@ class UMemSlaveDataSetSchema(schema.ResponseSchema): "State": fields.Str(required=False, load_from="State"), "SubnetId": fields.Str(required=True, load_from="SubnetId"), "Tag": fields.Str(required=False, load_from="Tag"), + "UDACEnable": fields.Bool(required=False, load_from="UDACEnable"), "UsedSize": fields.Int(required=False, load_from="UsedSize"), "VPCId": fields.Str(required=True, load_from="VPCId"), "Version": fields.Str(required=False, load_from="Version"), @@ -56,43 +89,57 @@ class UMemSlaveDataSetSchema(schema.ResponseSchema): } -class UMemSpaceAddressSetSchema(schema.ResponseSchema): - """UMemSpaceAddressSet - DescribeUMemSpace""" - - fields = { - "IP": fields.Str(required=False, load_from="IP"), - "Port": fields.Int(required=False, load_from="Port"), - } - - class UMemDataSetSchema(schema.ResponseSchema): """UMemDataSet - DescribeUMem""" fields = { "Address": fields.List(UMemSpaceAddressSetSchema()), + "AofRollbackEnable": fields.Bool( + required=False, load_from="AofRollbackEnable" + ), "AutoBackup": fields.Str(required=False, load_from="AutoBackup"), "BackupTime": fields.Int(required=False, load_from="BackupTime"), "ChargeType": fields.Str(required=False, load_from="ChargeType"), "ConfigId": fields.Str(required=False, load_from="ConfigId"), "CreateTime": fields.Int(required=False, load_from="CreateTime"), "DataSet": fields.List(UMemSlaveDataSetSchema()), + "DefaultConfigId": fields.Str( + required=False, load_from="DefaultConfigId" + ), "ExpireTime": fields.Int(required=False, load_from="ExpireTime"), + "HasPassword": fields.Bool(required=False, load_from="HasPassword"), "HighAvailability": fields.Str( required=False, load_from="HighAvailability" ), + "IsHighPerformance": fields.Bool( + required=False, load_from="IsHighPerformance" + ), + "IsRWMode": fields.Bool(required=False, load_from="IsRWMode"), "Name": fields.Str(required=False, load_from="Name"), - "OwnSlave": fields.Str(required=True, load_from="OwnSlave"), + "OwnSlave": fields.Str(required=False, load_from="OwnSlave"), + "ProductType": fields.Int(required=False, load_from="ProductType"), "Protocol": fields.Str(required=False, load_from="Protocol"), + "ProxyName": fields.Str(required=False, load_from="ProxyName"), "ResourceId": fields.Str(required=False, load_from="ResourceId"), "ResourceType": fields.Str(required=False, load_from="ResourceType"), "RewriteTime": fields.Int(required=False, load_from="RewriteTime"), "Role": fields.Str(required=False, load_from="Role"), + "SSLCertExpireTime": fields.Int( + required=False, load_from="SSLCertExpireTime" + ), + "SSLEnable": fields.Bool(required=False, load_from="SSLEnable"), + "SSLVersion": fields.Str(required=False, load_from="SSLVersion"), + "SecPolicy": fields.Int(required=False, load_from="SecPolicy"), "Size": fields.Int(required=False, load_from="Size"), "SlaveZone": fields.Str(required=False, load_from="SlaveZone"), "State": fields.Str(required=False, load_from="State"), "SubnetId": fields.Str(required=False, load_from="SubnetId"), + "SupportAofRollback": fields.Bool( + required=False, load_from="SupportAofRollback" + ), "Tag": fields.Str(required=False, load_from="Tag"), "Type": fields.Str(required=False, load_from="Type"), + "UDACEnable": fields.Bool(required=False, load_from="UDACEnable"), "UsedSize": fields.Int(required=False, load_from="UsedSize"), "VPCId": fields.Str(required=False, load_from="VPCId"), "Version": fields.Str(required=False, load_from="Version"), @@ -229,8 +276,12 @@ class URedisBackupSetSchema(schema.ResponseSchema): "BackupSize": fields.Int(required=False, load_from="BackupSize"), "BackupTime": fields.Int(required=False, load_from="BackupTime"), "BackupType": fields.Str(required=False, load_from="BackupType"), + "DstRegionName": fields.Str(required=False, load_from="DstRegionName"), "GroupId": fields.Str(required=False, load_from="GroupId"), "GroupName": fields.Str(required=False, load_from="GroupName"), + "MemorySize": fields.Int(required=False, load_from="MemorySize"), + "RedisVersion": fields.Str(required=False, load_from="RedisVersion"), + "SrcRegionName": fields.Str(required=False, load_from="SrcRegionName"), "State": fields.Str(required=False, load_from="State"), "Zone": fields.Str(required=False, load_from="Zone"), } @@ -290,6 +341,7 @@ class URedisGroupSetSchema(schema.ResponseSchema): "SubnetId": fields.Str(required=False, load_from="SubnetId"), "Tag": fields.Str(required=False, load_from="Tag"), "Type": fields.Str(required=False, load_from="Type"), + "UDACEnable": fields.Bool(required=False, load_from="UDACEnable"), "UsedSize": fields.Int(required=False, load_from="UsedSize"), "VPCId": fields.Str(required=False, load_from="VPCId"), "Version": fields.Str(required=False, load_from="Version"), diff --git a/ucloud/version.py b/ucloud/version.py index 5d1c30c..5918e2d 100644 --- a/ucloud/version.py +++ b/ucloud/version.py @@ -1 +1 @@ -version = "0.11.132" +version = "0.11.133"