kingsoftcloud-sdk-python 1.1.1__py2.py3-none-any.whl → 1.5.8.49__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kingsoftcloud_sdk_python-1.5.8.49.dist-info/METADATA +71 -0
- kingsoftcloud_sdk_python-1.5.8.49.dist-info/RECORD +337 -0
- {kingsoftcloud_sdk_python-1.1.1.dist-info → kingsoftcloud_sdk_python-1.5.8.49.dist-info}/WHEEL +1 -1
- ksyun/__init__.py +1 -1
- ksyun/client/actiontrail/v20190401/client.py +2 -4
- ksyun/client/aicp/v20240612/client.py +1344 -0
- ksyun/client/aicp/v20240612/models.py +1963 -0
- ksyun/client/aicp/v20251212/__init__.py +0 -0
- ksyun/client/aicp/v20251212/client.py +56 -0
- ksyun/client/aicp/v20251212/models.py +114 -0
- ksyun/client/bill/v20180601/client.py +6 -77
- ksyun/client/bill/v20180601/models.py +29 -41
- ksyun/client/bill/v20220601/__init__.py +0 -0
- ksyun/client/bill/v20220601/client.py +54 -0
- ksyun/client/bill/v20220601/models.py +54 -0
- ksyun/client/bill_union/v20200101/client.py +81 -14
- ksyun/client/bill_union/v20200101/models.py +119 -3
- ksyun/client/bill_union/v20221222/__init__.py +0 -0
- ksyun/client/bill_union/v20221222/client.py +146 -0
- ksyun/client/bill_union/v20221222/models.py +193 -0
- ksyun/client/bill_union/v20250801/__init__.py +0 -0
- ksyun/client/bill_union/v20250801/client.py +54 -0
- ksyun/client/bill_union/v20250801/models.py +64 -0
- ksyun/client/bws/v20160304/client.py +33 -12
- ksyun/client/bws/v20160304/models.py +51 -0
- ksyun/client/cdn/__init__.py +0 -0
- ksyun/client/cdn/v20160901/__init__.py +0 -0
- ksyun/client/cdn/v20160901/client.py +77 -0
- ksyun/client/cdn/v20160901/models.py +51 -0
- ksyun/client/cdn/v20200630/__init__.py +0 -0
- ksyun/client/cdn/v20200630/client.py +399 -0
- ksyun/client/cdn/v20200630/models.py +826 -0
- ksyun/client/cdn/v20200901/__init__.py +0 -0
- ksyun/client/cdn/v20200901/client.py +169 -0
- ksyun/client/cdn/v20200901/models.py +224 -0
- ksyun/client/cdn/v20211201/__init__.py +0 -0
- ksyun/client/cdn/v20211201/client.py +31 -0
- ksyun/client/cdn/v20211201/models.py +23 -0
- ksyun/client/cdn/v3/__init__.py +0 -0
- ksyun/client/cdn/v3/client.py +997 -0
- ksyun/client/cdn/v3/models.py +1323 -0
- ksyun/client/cen/__init__.py +0 -0
- ksyun/client/cen/v20160304/__init__.py +0 -0
- ksyun/client/cen/v20160304/client.py +606 -0
- ksyun/client/cen/v20160304/models.py +718 -0
- ksyun/client/clickhouse/__init__.py +0 -0
- ksyun/client/clickhouse/v20210101/__init__.py +0 -0
- ksyun/client/clickhouse/v20210101/client.py +905 -0
- ksyun/client/clickhouse/v20210101/models.py +1127 -0
- ksyun/client/cloud_advisor/__init__.py +0 -0
- ksyun/client/cloud_advisor/v20250610/__init__.py +0 -0
- ksyun/client/cloud_advisor/v20250610/client.py +77 -0
- ksyun/client/cloud_advisor/v20250610/models.py +80 -0
- ksyun/client/dmp/__init__.py +0 -0
- ksyun/client/dmp/v20240101/__init__.py +0 -0
- ksyun/client/dmp/v20240101/client.py +468 -0
- ksyun/client/dmp/v20240101/models.py +423 -0
- ksyun/client/dts/__init__.py +0 -0
- ksyun/client/dts/v20180108/__init__.py +0 -0
- ksyun/client/dts/v20180108/client.py +445 -0
- ksyun/client/dts/v20180108/models.py +734 -0
- ksyun/client/ebs/v20160304/client.py +260 -55
- ksyun/client/ebs/v20160304/models.py +320 -66
- ksyun/client/eip/v20160304/client.py +127 -14
- ksyun/client/eip/v20160304/models.py +95 -1
- ksyun/client/epc/v20151101/client.py +1309 -184
- ksyun/client/epc/v20151101/models.py +2623 -137
- ksyun/client/iam/v20151101/client.py +325 -120
- ksyun/client/iam/v20151101/models.py +284 -28
- ksyun/client/iam/v20240513/__init__.py +0 -0
- ksyun/client/iam/v20240513/client.py +31 -0
- ksyun/client/iam/v20240513/models.py +33 -0
- ksyun/client/iam/v20240703/__init__.py +0 -0
- ksyun/client/iam/v20240703/client.py +31 -0
- ksyun/client/iam/v20240703/models.py +18 -0
- ksyun/client/influxdb/__init__.py +0 -0
- ksyun/client/influxdb/v20191010/__init__.py +0 -0
- ksyun/client/influxdb/v20191010/client.py +629 -0
- ksyun/client/influxdb/v20191010/models.py +655 -0
- ksyun/client/kad/v20161122/client.py +56 -12
- ksyun/client/kad/v20161122/models.py +38 -0
- ksyun/client/kce/__init__.py +0 -0
- ksyun/client/kce/v20180314/__init__.py +0 -0
- ksyun/client/kce/v20180314/client.py +399 -0
- ksyun/client/kce/v20180314/models.py +374 -0
- ksyun/client/kce/v20190806/__init__.py +0 -0
- ksyun/client/kce/v20190806/client.py +790 -0
- ksyun/client/kce/v20190806/models.py +1099 -0
- ksyun/client/kce/v20201231/__init__.py +0 -0
- ksyun/client/{slb/v20171210 → kce/v20201231}/client.py +10 -12
- ksyun/client/kce/v20201231/models.py +137 -0
- ksyun/client/kce/v20230101/__init__.py +0 -0
- ksyun/client/kce/v20230101/client.py +215 -0
- ksyun/client/kce/v20230101/models.py +259 -0
- ksyun/client/kce/v20230306/__init__.py +0 -0
- ksyun/client/kce/v20230306/client.py +514 -0
- ksyun/client/kce/v20230306/models.py +655 -0
- ksyun/client/kce/v20231115/__init__.py +0 -0
- ksyun/client/kce/v20231115/client.py +54 -0
- ksyun/client/kce/v20231115/models.py +59 -0
- ksyun/client/kce2/__init__.py +0 -0
- ksyun/client/kce2/v20230101/__init__.py +0 -0
- ksyun/client/kce2/v20230101/client.py +353 -0
- ksyun/client/kce2/v20230101/models.py +483 -0
- ksyun/client/kcf/__init__.py +0 -0
- ksyun/client/kcf/v20211215/__init__.py +0 -0
- ksyun/client/kcf/v20211215/client.py +215 -0
- ksyun/client/kcf/v20211215/models.py +313 -0
- ksyun/client/kci/__init__.py +0 -0
- ksyun/client/kci/v20200702/__init__.py +0 -0
- ksyun/client/kci/v20200702/client.py +353 -0
- ksyun/client/kci/v20200702/models.py +614 -0
- ksyun/client/kcm/__init__.py +0 -0
- ksyun/client/kcm/v20160304/__init__.py +0 -0
- ksyun/client/kcm/v20160304/client.py +238 -0
- ksyun/client/kcm/v20160304/models.py +394 -0
- ksyun/client/kcrs/__init__.py +0 -0
- ksyun/client/kcrs/v20211109/__init__.py +0 -0
- ksyun/client/kcrs/v20211109/client.py +1020 -0
- ksyun/client/kcrs/v20211109/models.py +1282 -0
- ksyun/client/kcs/__init__.py +0 -0
- ksyun/client/kcs/v20160701/__init__.py +0 -0
- ksyun/client/kcs/v20160701/client.py +1526 -0
- ksyun/client/kcs/v20160701/models.py +1917 -0
- ksyun/client/kcs/v20170401/__init__.py +0 -0
- ksyun/client/kcs/v20170401/client.py +31 -0
- ksyun/client/kcs/v20170401/models.py +28 -0
- ksyun/client/kcs/v20240701/__init__.py +0 -0
- ksyun/client/kcs/v20240701/client.py +31 -0
- ksyun/client/kcs/v20240701/models.py +23 -0
- ksyun/client/kead/v20200101/client.py +48 -4
- ksyun/client/kead/v20200101/models.py +52 -42
- ksyun/client/kec/v20160304/client.py +890 -223
- ksyun/client/kec/v20160304/models.py +1377 -140
- ksyun/client/ked/__init__.py +0 -0
- ksyun/client/ked/v1/__init__.py +0 -0
- ksyun/client/ked/v1/client.py +1020 -0
- ksyun/client/ked/v1/models.py +1132 -0
- ksyun/client/kes/__init__.py +0 -0
- ksyun/client/kes/v20201215/__init__.py +0 -0
- ksyun/client/kes/v20201215/client.py +192 -0
- ksyun/client/kes/v20201215/models.py +252 -0
- ksyun/client/ket/__init__.py +0 -0
- ksyun/client/ket/v20170101/__init__.py +0 -0
- ksyun/client/ket/v20170101/client.py +192 -0
- ksyun/client/ket/v20170101/models.py +265 -0
- ksyun/client/kfw/__init__.py +0 -0
- ksyun/client/kfw/v20160304/__init__.py +0 -0
- ksyun/client/kfw/v20160304/client.py +692 -0
- ksyun/client/kfw/v20160304/models.py +1029 -0
- ksyun/client/kingpay/__init__.py +0 -0
- ksyun/client/kingpay/v1/__init__.py +0 -0
- ksyun/client/kingpay/v1/client.py +31 -0
- ksyun/client/kingpay/v1/models.py +18 -0
- ksyun/client/kkms/__init__.py +0 -0
- ksyun/client/kkms/v20160304/__init__.py +0 -0
- ksyun/client/kkms/v20160304/client.py +192 -0
- ksyun/client/kkms/v20160304/models.py +185 -0
- ksyun/client/klog/__init__.py +0 -0
- ksyun/client/klog/v20200731/__init__.py +0 -0
- ksyun/client/klog/v20200731/client.py +376 -0
- ksyun/client/klog/v20200731/models.py +508 -0
- ksyun/client/kls/__init__.py +0 -0
- ksyun/client/kls/v20170101/__init__.py +0 -0
- ksyun/client/kls/v20170101/client.py +192 -0
- ksyun/client/kls/v20170101/models.py +320 -0
- ksyun/client/kmr/__init__.py +0 -0
- ksyun/client/kmr/v20210902/__init__.py +0 -0
- ksyun/client/kmr/v20210902/client.py +537 -0
- ksyun/client/kmr/v20210902/models.py +536 -0
- ksyun/client/kmr/v20231231/__init__.py +0 -0
- ksyun/client/kmr/v20231231/client.py +169 -0
- ksyun/client/kmr/v20231231/models.py +201 -0
- ksyun/client/kmr/v20240814/__init__.py +0 -0
- ksyun/client/kmr/v20240814/client.py +445 -0
- ksyun/client/kmr/v20240814/models.py +523 -0
- ksyun/client/knad/__init__.py +0 -0
- ksyun/client/knad/v20230323/__init__.py +0 -0
- ksyun/client/knad/v20230323/client.py +399 -0
- ksyun/client/knad/v20230323/models.py +470 -0
- ksyun/client/kpfs/__init__.py +0 -0
- ksyun/client/kpfs/v20240930/__init__.py +0 -0
- ksyun/client/kpfs/v20240930/client.py +217 -0
- ksyun/client/kpfs/v20240930/models.py +396 -0
- ksyun/client/krds/__init__.py +0 -0
- ksyun/client/krds/v20160701/__init__.py +0 -0
- ksyun/client/krds/v20160701/client.py +2101 -0
- ksyun/client/krds/v20160701/models.py +2722 -0
- ksyun/client/krds/v20200825/__init__.py +0 -0
- ksyun/client/krds/v20200825/client.py +238 -0
- ksyun/client/krds/v20200825/models.py +336 -0
- ksyun/client/memcached/__init__.py +0 -0
- ksyun/client/memcached/v20180627/__init__.py +0 -0
- ksyun/client/memcached/v20180627/client.py +307 -0
- ksyun/client/memcached/v20180627/models.py +317 -0
- ksyun/client/milvus/__init__.py +0 -0
- ksyun/client/milvus/v20231010/__init__.py +0 -0
- ksyun/client/milvus/v20231010/client.py +445 -0
- ksyun/client/milvus/v20231010/models.py +520 -0
- ksyun/client/mongodb/v20170101/client.py +312 -84
- ksyun/client/mongodb/v20170101/models.py +251 -34
- ksyun/client/mongodb/v20250101/__init__.py +0 -0
- ksyun/client/mongodb/v20250101/client.py +31 -0
- ksyun/client/mongodb/v20250101/models.py +18 -0
- ksyun/client/monitor/__init__.py +0 -0
- ksyun/client/monitor/v20100525/__init__.py +0 -0
- ksyun/client/monitor/v20100525/client.py +54 -0
- ksyun/client/monitor/v20100525/models.py +108 -0
- ksyun/client/monitor/v20181114/__init__.py +0 -0
- ksyun/client/monitor/v20181114/client.py +31 -0
- ksyun/client/monitor/v20181114/models.py +59 -0
- ksyun/client/monitor/v20210101/__init__.py +0 -0
- ksyun/client/monitor/v20210101/client.py +284 -0
- ksyun/client/monitor/v20210101/models.py +330 -0
- ksyun/client/monitor/v20220101/__init__.py +0 -0
- ksyun/client/monitor/v20220101/client.py +54 -0
- ksyun/client/monitor/v20220101/models.py +32 -0
- ksyun/client/monitor/v20250101/__init__.py +0 -0
- ksyun/client/monitor/v20250101/client.py +121 -0
- ksyun/client/monitor/v20250101/models.py +188 -0
- ksyun/client/pdns/__init__.py +0 -0
- ksyun/client/pdns/v20160304/__init__.py +0 -0
- ksyun/client/pdns/v20160304/client.py +813 -0
- ksyun/client/pdns/v20160304/models.py +805 -0
- ksyun/client/postgresql/__init__.py +0 -0
- ksyun/client/postgresql/v20181225/__init__.py +0 -0
- ksyun/client/postgresql/v20181225/client.py +1158 -0
- ksyun/client/postgresql/v20181225/models.py +1629 -0
- ksyun/client/rabbitmq/__init__.py +0 -0
- ksyun/client/rabbitmq/v20191017/__init__.py +0 -0
- ksyun/client/rabbitmq/v20191017/client.py +445 -0
- ksyun/client/rabbitmq/v20191017/models.py +413 -0
- ksyun/client/relyt/__init__.py +0 -0
- ksyun/client/relyt/v20240117/__init__.py +0 -0
- ksyun/client/{bill_union/v20211209 → relyt/v20240117}/client.py +10 -12
- ksyun/client/relyt/v20240117/models.py +23 -0
- ksyun/client/resourcemanager/v20210320/client.py +16 -18
- ksyun/client/sks/v20151101/client.py +11 -13
- ksyun/client/sks/v20151101/models.py +28 -2
- ksyun/client/slb/v20160304/client.py +1099 -112
- ksyun/client/slb/v20160304/models.py +1697 -24
- ksyun/client/slb/v20250430/__init__.py +0 -0
- ksyun/client/slb/v20250430/client.py +813 -0
- ksyun/client/slb/v20250430/models.py +1372 -0
- ksyun/client/sqlserver/__init__.py +0 -0
- ksyun/client/sqlserver/v20190425/__init__.py +0 -0
- ksyun/client/sqlserver/v20190425/client.py +1066 -0
- ksyun/client/sqlserver/v20190425/models.py +1528 -0
- ksyun/client/sts/v20151101/client.py +23 -2
- ksyun/client/sts/v20151101/models.py +54 -1
- ksyun/client/tagv2/v20200901/client.py +60 -16
- ksyun/client/tagv2/v20200901/models.py +56 -4
- ksyun/client/ter/__init__.py +0 -0
- ksyun/client/ter/v20240415/__init__.py +0 -0
- ksyun/client/ter/v20240415/client.py +123 -0
- ksyun/client/ter/v20240415/models.py +115 -0
- ksyun/client/tidb/__init__.py +0 -0
- ksyun/client/tidb/v20210520/__init__.py +0 -0
- ksyun/client/tidb/v20210520/client.py +928 -0
- ksyun/client/tidb/v20210520/models.py +1162 -0
- ksyun/client/trade/v20200114/client.py +2 -4
- ksyun/client/trade/v20200831/client.py +2 -4
- ksyun/client/trade/v20250220/__init__.py +0 -0
- ksyun/client/trade/v20250220/client.py +100 -0
- ksyun/client/trade/v20250220/models.py +91 -0
- ksyun/client/trade/v20250321/__init__.py +0 -0
- ksyun/client/trade/v20250321/client.py +100 -0
- ksyun/client/trade/v20250321/models.py +71 -0
- ksyun/client/trade/v20250828/__init__.py +0 -0
- ksyun/client/trade/v20250828/client.py +31 -0
- ksyun/client/trade/v20250828/models.py +81 -0
- ksyun/client/vpc/v20160304/client.py +1377 -229
- ksyun/client/vpc/v20160304/models.py +1540 -138
- ksyun/client/waf/__init__.py +0 -0
- ksyun/client/waf/v20200707/__init__.py +0 -0
- ksyun/client/waf/v20200707/client.py +468 -0
- ksyun/client/waf/v20200707/models.py +738 -0
- ksyun/common/abstract_client.py +57 -21
- ksyun/common/abstract_model.py +3 -3
- ksyun/common/common_client.py +2 -0
- ksyun/common/credential.py +2 -0
- ksyun/common/exception/ksyun_sdk_exception.py +11 -7
- ksyun/common/http/request.py +45 -6
- ksyun/common/profile/client_profile.py +3 -0
- ksyun/common/profile/http_profile.py +28 -1
- kingsoftcloud_sdk_python-1.1.1.dist-info/METADATA +0 -47
- kingsoftcloud_sdk_python-1.1.1.dist-info/RECORD +0 -105
- ksyun/client/bill_union/v20211209/models.py +0 -38
- ksyun/client/slb/v20171210/models.py +0 -33
- ksyun/common/sign.py +0 -33
- {kingsoftcloud_sdk_python-1.1.1.dist-info → kingsoftcloud_sdk_python-1.5.8.49.dist-info/licenses}/LICENSE +0 -0
- {kingsoftcloud_sdk_python-1.1.1.dist-info → kingsoftcloud_sdk_python-1.5.8.49.dist-info}/top_level.txt +0 -0
- /ksyun/client/{bill_union/v20211209 → aicp}/__init__.py +0 -0
- /ksyun/client/{slb/v20171210 → aicp/v20240612}/__init__.py +0 -0
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
from ksyun.common.abstract_model import AbstractModel
|
|
2
|
+
|
|
3
|
+
class CreateClusterRequest(AbstractModel):
|
|
4
|
+
"""CreateCluster请求参数结构体
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
def __init__(self):
|
|
8
|
+
r"""创建容器集群
|
|
9
|
+
:param ClusterName: 集群名称
|
|
10
|
+
有效值:2-64个字符,支持中文,英文,数字,以及特殊字符-_
|
|
11
|
+
|
|
12
|
+
:type PathPrefix: String
|
|
13
|
+
:param ClusterDesc: 集群描述,255个字符以内。
|
|
14
|
+
:type PathPrefix: String
|
|
15
|
+
:param ClusterManageMode: 集群部署方式
|
|
16
|
+
INDEPENDENT_CLUSTER:独立部署集群MANAGED_CLUSTER: 托管集群
|
|
17
|
+
:type PathPrefix: String
|
|
18
|
+
:param ProjectId: 所属项目ID
|
|
19
|
+
:type PathPrefix: String
|
|
20
|
+
:param KubernetesVersion: K8S版本:v1.26.11,v1.28.7,v1.30.6
|
|
21
|
+
|
|
22
|
+
:type PathPrefix: String
|
|
23
|
+
:param Network: 集群网络信息
|
|
24
|
+
:type PathPrefix: Object
|
|
25
|
+
:param NodeInstanceSet: 节点相关配置
|
|
26
|
+
:type PathPrefix: Array
|
|
27
|
+
:param Addons: addon插件配置
|
|
28
|
+
:type PathPrefix: Array
|
|
29
|
+
"""
|
|
30
|
+
self.ClusterName = None
|
|
31
|
+
self.ClusterDesc = None
|
|
32
|
+
self.ClusterManageMode = None
|
|
33
|
+
self.ProjectId = None
|
|
34
|
+
self.KubernetesVersion = None
|
|
35
|
+
self.Network = None
|
|
36
|
+
self.NodeInstanceSet = None
|
|
37
|
+
self.Addons = None
|
|
38
|
+
|
|
39
|
+
def _deserialize(self, params):
|
|
40
|
+
if params.get("ClusterName"):
|
|
41
|
+
self.ClusterName = params.get("ClusterName")
|
|
42
|
+
if params.get("ClusterDesc"):
|
|
43
|
+
self.ClusterDesc = params.get("ClusterDesc")
|
|
44
|
+
if params.get("ClusterManageMode"):
|
|
45
|
+
self.ClusterManageMode = params.get("ClusterManageMode")
|
|
46
|
+
if params.get("ProjectId"):
|
|
47
|
+
self.ProjectId = params.get("ProjectId")
|
|
48
|
+
if params.get("KubernetesVersion"):
|
|
49
|
+
self.KubernetesVersion = params.get("KubernetesVersion")
|
|
50
|
+
if params.get("Network"):
|
|
51
|
+
self.Network = params.get("Network")
|
|
52
|
+
if params.get("NodeInstanceSet"):
|
|
53
|
+
self.NodeInstanceSet = params.get("NodeInstanceSet")
|
|
54
|
+
if params.get("Addons"):
|
|
55
|
+
self.Addons = params.get("Addons")
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class DescribeClustersRequest(AbstractModel):
|
|
59
|
+
"""DescribeClusters请求参数结构体
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
def __init__(self):
|
|
63
|
+
r"""查询集群列表
|
|
64
|
+
:param ClusterIds: 集群ID
|
|
65
|
+
:type PathPrefix: Array
|
|
66
|
+
:param MaxResults: 值范围0-50
|
|
67
|
+
默认值:10
|
|
68
|
+
:type PathPrefix: Int
|
|
69
|
+
:param Marker: 分页参数
|
|
70
|
+
游标起始位置,每次查询返回
|
|
71
|
+
:type PathPrefix: Int
|
|
72
|
+
"""
|
|
73
|
+
self.ClusterIds = None
|
|
74
|
+
self.MaxResults = None
|
|
75
|
+
self.Marker = None
|
|
76
|
+
|
|
77
|
+
def _deserialize(self, params):
|
|
78
|
+
if params.get("ClusterIds"):
|
|
79
|
+
self.ClusterIds = params.get("ClusterIds")
|
|
80
|
+
if params.get("MaxResults"):
|
|
81
|
+
self.MaxResults = params.get("MaxResults")
|
|
82
|
+
if params.get("Marker"):
|
|
83
|
+
self.Marker = params.get("Marker")
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class DeleteClusterRequest(AbstractModel):
|
|
87
|
+
"""DeleteCluster请求参数结构体
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
def __init__(self):
|
|
91
|
+
r"""删除容器集群
|
|
92
|
+
:param ClusterId: 集群ID
|
|
93
|
+
:type PathPrefix: String
|
|
94
|
+
:param InstanceDelete: 是否删除主机
|
|
95
|
+
:type PathPrefix: Boolean
|
|
96
|
+
:param SecurityGroupDelete: 默认为fasle
|
|
97
|
+
为ture时会尝试删除集群安全组
|
|
98
|
+
为false时不会尝试删除集群安全组
|
|
99
|
+
:type PathPrefix: Boolean
|
|
100
|
+
:param PrivateLbDelete: 是否删除私网负载均衡实例(如果是alb且为公私网合一,则只需要删除私网负载均衡即可)
|
|
101
|
+
:type PathPrefix: Boolean
|
|
102
|
+
:param PublicLbDelete: 是否删除公网负载均衡实例
|
|
103
|
+
:type PathPrefix: Boolean
|
|
104
|
+
"""
|
|
105
|
+
self.ClusterId = None
|
|
106
|
+
self.InstanceDelete = None
|
|
107
|
+
self.SecurityGroupDelete = None
|
|
108
|
+
self.PrivateLbDelete = None
|
|
109
|
+
self.PublicLbDelete = None
|
|
110
|
+
|
|
111
|
+
def _deserialize(self, params):
|
|
112
|
+
if params.get("ClusterId"):
|
|
113
|
+
self.ClusterId = params.get("ClusterId")
|
|
114
|
+
if params.get("InstanceDelete"):
|
|
115
|
+
self.InstanceDelete = params.get("InstanceDelete")
|
|
116
|
+
if params.get("SecurityGroupDelete"):
|
|
117
|
+
self.SecurityGroupDelete = params.get("SecurityGroupDelete")
|
|
118
|
+
if params.get("PrivateLbDelete"):
|
|
119
|
+
self.PrivateLbDelete = params.get("PrivateLbDelete")
|
|
120
|
+
if params.get("PublicLbDelete"):
|
|
121
|
+
self.PublicLbDelete = params.get("PublicLbDelete")
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class ModifyClusterRequest(AbstractModel):
|
|
125
|
+
"""ModifyCluster请求参数结构体
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
def __init__(self):
|
|
129
|
+
r"""修改集群配置
|
|
130
|
+
:param ClusterId: 集群ID
|
|
131
|
+
:type PathPrefix: String
|
|
132
|
+
:param ClusterDesc: 集群新描述信息
|
|
133
|
+
:type PathPrefix: String
|
|
134
|
+
:param SANs: 更新SANs(覆盖更新)
|
|
135
|
+
:type PathPrefix: Array
|
|
136
|
+
:param PublicApiServer: 是否开启apiserver,开启则需要填enable 字段为true,如果关闭,则enable字段为false,不修改,这不填该字段
|
|
137
|
+
:type PathPrefix: Object
|
|
138
|
+
:param VpcCNI: 是否开启VpcCNI,开启enable字段为ture,关闭则enable字段为false,不修改则不填
|
|
139
|
+
|
|
140
|
+
:type PathPrefix: Object
|
|
141
|
+
"""
|
|
142
|
+
self.ClusterId = None
|
|
143
|
+
self.ClusterDesc = None
|
|
144
|
+
self.SANs = None
|
|
145
|
+
self.PublicApiServer = None
|
|
146
|
+
self.VpcCNI = None
|
|
147
|
+
|
|
148
|
+
def _deserialize(self, params):
|
|
149
|
+
if params.get("ClusterId"):
|
|
150
|
+
self.ClusterId = params.get("ClusterId")
|
|
151
|
+
if params.get("ClusterDesc"):
|
|
152
|
+
self.ClusterDesc = params.get("ClusterDesc")
|
|
153
|
+
if params.get("SANs"):
|
|
154
|
+
self.SANs = params.get("SANs")
|
|
155
|
+
if params.get("PublicApiServer"):
|
|
156
|
+
self.PublicApiServer = params.get("PublicApiServer")
|
|
157
|
+
if params.get("VpcCNI"):
|
|
158
|
+
self.VpcCNI = params.get("VpcCNI")
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
class DescribeNodesRequest(AbstractModel):
|
|
162
|
+
"""DescribeNodes请求参数结构体
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
def __init__(self):
|
|
166
|
+
r"""查询集群节点列表
|
|
167
|
+
:param ClusterId: 集群ID
|
|
168
|
+
:type PathPrefix: String
|
|
169
|
+
:param KceNodeIds: 节点id,与InstanceIds 二选一填即可,如果两者均为空,则查询集群下所有的节点
|
|
170
|
+
|
|
171
|
+
:type PathPrefix: Array
|
|
172
|
+
:param Marker: 游标起始位置
|
|
173
|
+
默认值:0
|
|
174
|
+
|
|
175
|
+
:type PathPrefix: Int
|
|
176
|
+
:param MaxResults: 分页参数,每页最大数
|
|
177
|
+
值范围0-50
|
|
178
|
+
默认值:10
|
|
179
|
+
:type PathPrefix: Int
|
|
180
|
+
:param InstanceIds: 实例id ,与KceNodeIds 二选一填即可,如果两者均为空,则查询集群下所有的节点
|
|
181
|
+
:type PathPrefix: Array
|
|
182
|
+
"""
|
|
183
|
+
self.ClusterId = None
|
|
184
|
+
self.KceNodeIds = None
|
|
185
|
+
self.Marker = None
|
|
186
|
+
self.MaxResults = None
|
|
187
|
+
self.InstanceIds = None
|
|
188
|
+
|
|
189
|
+
def _deserialize(self, params):
|
|
190
|
+
if params.get("ClusterId"):
|
|
191
|
+
self.ClusterId = params.get("ClusterId")
|
|
192
|
+
if params.get("KceNodeIds"):
|
|
193
|
+
self.KceNodeIds = params.get("KceNodeIds")
|
|
194
|
+
if params.get("Marker"):
|
|
195
|
+
self.Marker = params.get("Marker")
|
|
196
|
+
if params.get("MaxResults"):
|
|
197
|
+
self.MaxResults = params.get("MaxResults")
|
|
198
|
+
if params.get("InstanceIds"):
|
|
199
|
+
self.InstanceIds = params.get("InstanceIds")
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
class DeleteNodeRequest(AbstractModel):
|
|
203
|
+
"""DeleteNode请求参数结构体
|
|
204
|
+
"""
|
|
205
|
+
|
|
206
|
+
def __init__(self):
|
|
207
|
+
r"""删除集群节点
|
|
208
|
+
:param ClusterId: 集群ID
|
|
209
|
+
:type PathPrefix: String
|
|
210
|
+
:param NodeIds:
|
|
211
|
+
:type PathPrefix: Array
|
|
212
|
+
:param InstanceDelete: 是否删除主机实例
|
|
213
|
+
:type PathPrefix: Boolean
|
|
214
|
+
:param KceNodeIds: 节点id集合,同实例 id集合必须二选一
|
|
215
|
+
:type PathPrefix: String
|
|
216
|
+
:param InstanceIds: 实例id 集合,同节点 id集合必须二选一
|
|
217
|
+
:type PathPrefix: Array
|
|
218
|
+
"""
|
|
219
|
+
self.ClusterId = None
|
|
220
|
+
self.NodeIds = None
|
|
221
|
+
self.InstanceDelete = None
|
|
222
|
+
self.KceNodeIds = None
|
|
223
|
+
self.InstanceIds = None
|
|
224
|
+
|
|
225
|
+
def _deserialize(self, params):
|
|
226
|
+
if params.get("ClusterId"):
|
|
227
|
+
self.ClusterId = params.get("ClusterId")
|
|
228
|
+
if params.get("NodeIds"):
|
|
229
|
+
self.NodeIds = params.get("NodeIds")
|
|
230
|
+
if params.get("InstanceDelete"):
|
|
231
|
+
self.InstanceDelete = params.get("InstanceDelete")
|
|
232
|
+
if params.get("KceNodeIds"):
|
|
233
|
+
self.KceNodeIds = params.get("KceNodeIds")
|
|
234
|
+
if params.get("InstanceIds"):
|
|
235
|
+
self.InstanceIds = params.get("InstanceIds")
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
class ModifyNodeRequest(AbstractModel):
|
|
239
|
+
"""ModifyNode请求参数结构体
|
|
240
|
+
"""
|
|
241
|
+
|
|
242
|
+
def __init__(self):
|
|
243
|
+
r"""修改节点组件
|
|
244
|
+
:param ClusteId: 集群ID
|
|
245
|
+
:type PathPrefix: String
|
|
246
|
+
:param KceNodeId: 节点id,同实例 id必须二选一
|
|
247
|
+
:type PathPrefix: String
|
|
248
|
+
:param InstanceId: 实例id ,同节点 id必须二选一
|
|
249
|
+
:type PathPrefix: String
|
|
250
|
+
:param Components: 组件列表
|
|
251
|
+
:type PathPrefix: Array
|
|
252
|
+
"""
|
|
253
|
+
self.ClusteId = None
|
|
254
|
+
self.KceNodeId = None
|
|
255
|
+
self.InstanceId = None
|
|
256
|
+
self.Components = None
|
|
257
|
+
|
|
258
|
+
def _deserialize(self, params):
|
|
259
|
+
if params.get("ClusteId"):
|
|
260
|
+
self.ClusteId = params.get("ClusteId")
|
|
261
|
+
if params.get("KceNodeId"):
|
|
262
|
+
self.KceNodeId = params.get("KceNodeId")
|
|
263
|
+
if params.get("InstanceId"):
|
|
264
|
+
self.InstanceId = params.get("InstanceId")
|
|
265
|
+
if params.get("Components"):
|
|
266
|
+
self.Components = params.get("Components")
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
class DescribeComponentListRequest(AbstractModel):
|
|
270
|
+
"""DescribeComponentList请求参数结构体
|
|
271
|
+
"""
|
|
272
|
+
|
|
273
|
+
def __init__(self):
|
|
274
|
+
r"""查询可安装的组件列表
|
|
275
|
+
:param K8sVersion: K8S 版本
|
|
276
|
+
:type PathPrefix: String
|
|
277
|
+
"""
|
|
278
|
+
self.K8sVersion = None
|
|
279
|
+
|
|
280
|
+
def _deserialize(self, params):
|
|
281
|
+
if params.get("K8sVersion"):
|
|
282
|
+
self.K8sVersion = params.get("K8sVersion")
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
class DescribeNodeComponentsRequest(AbstractModel):
|
|
286
|
+
"""DescribeNodeComponents请求参数结构体
|
|
287
|
+
"""
|
|
288
|
+
|
|
289
|
+
def __init__(self):
|
|
290
|
+
r"""查询节点组件列表
|
|
291
|
+
:param ClusterId: 集群ID
|
|
292
|
+
:type PathPrefix: String
|
|
293
|
+
:param ClusterName: 集群名称
|
|
294
|
+
:type PathPrefix: String
|
|
295
|
+
:param NodeNames: 节点名称
|
|
296
|
+
:type PathPrefix: Array
|
|
297
|
+
:param NodeIds: 节点ID
|
|
298
|
+
:type PathPrefix: String
|
|
299
|
+
:param Marker: 游标起始位置
|
|
300
|
+
:type PathPrefix: Int
|
|
301
|
+
:param MaxResults: 分页参数,每页最大数
|
|
302
|
+
:type PathPrefix: Int
|
|
303
|
+
"""
|
|
304
|
+
self.ClusterId = None
|
|
305
|
+
self.ClusterName = None
|
|
306
|
+
self.NodeNames = None
|
|
307
|
+
self.NodeIds = None
|
|
308
|
+
self.Marker = None
|
|
309
|
+
self.MaxResults = None
|
|
310
|
+
|
|
311
|
+
def _deserialize(self, params):
|
|
312
|
+
if params.get("ClusterId"):
|
|
313
|
+
self.ClusterId = params.get("ClusterId")
|
|
314
|
+
if params.get("ClusterName"):
|
|
315
|
+
self.ClusterName = params.get("ClusterName")
|
|
316
|
+
if params.get("NodeNames"):
|
|
317
|
+
self.NodeNames = params.get("NodeNames")
|
|
318
|
+
if params.get("NodeIds"):
|
|
319
|
+
self.NodeIds = params.get("NodeIds")
|
|
320
|
+
if params.get("Marker"):
|
|
321
|
+
self.Marker = params.get("Marker")
|
|
322
|
+
if params.get("MaxResults"):
|
|
323
|
+
self.MaxResults = params.get("MaxResults")
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
class DescribeNetworkRequest(AbstractModel):
|
|
327
|
+
"""DescribeNetwork请求参数结构体
|
|
328
|
+
"""
|
|
329
|
+
|
|
330
|
+
def __init__(self):
|
|
331
|
+
r"""查询集群网络
|
|
332
|
+
:param ClusterId: 集群ID
|
|
333
|
+
:type PathPrefix: String
|
|
334
|
+
:param ClusterName: 集群名称
|
|
335
|
+
:type PathPrefix: String
|
|
336
|
+
"""
|
|
337
|
+
self.ClusterId = None
|
|
338
|
+
self.ClusterName = None
|
|
339
|
+
|
|
340
|
+
def _deserialize(self, params):
|
|
341
|
+
if params.get("ClusterId"):
|
|
342
|
+
self.ClusterId = params.get("ClusterId")
|
|
343
|
+
if params.get("ClusterName"):
|
|
344
|
+
self.ClusterName = params.get("ClusterName")
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
class DescribeComponentParamsRequest(AbstractModel):
|
|
348
|
+
"""DescribeComponentParams请求参数结构体
|
|
349
|
+
"""
|
|
350
|
+
|
|
351
|
+
def __init__(self):
|
|
352
|
+
r"""查询组件参数版本
|
|
353
|
+
:param ClusterId: 集群ID
|
|
354
|
+
:type PathPrefix: String
|
|
355
|
+
:param Components: 组件查询条件
|
|
356
|
+
:type PathPrefix: Array
|
|
357
|
+
:param Marker: 游标起始位置
|
|
358
|
+
:type PathPrefix: Int
|
|
359
|
+
:param MaxResults: 分页参数,每页最大数
|
|
360
|
+
:type PathPrefix: Int
|
|
361
|
+
"""
|
|
362
|
+
self.ClusterId = None
|
|
363
|
+
self.Components = None
|
|
364
|
+
self.Marker = None
|
|
365
|
+
self.MaxResults = None
|
|
366
|
+
|
|
367
|
+
def _deserialize(self, params):
|
|
368
|
+
if params.get("ClusterId"):
|
|
369
|
+
self.ClusterId = params.get("ClusterId")
|
|
370
|
+
if params.get("Components"):
|
|
371
|
+
self.Components = params.get("Components")
|
|
372
|
+
if params.get("Marker"):
|
|
373
|
+
self.Marker = params.get("Marker")
|
|
374
|
+
if params.get("MaxResults"):
|
|
375
|
+
self.MaxResults = params.get("MaxResults")
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
class DescribeEventLogsRequest(AbstractModel):
|
|
379
|
+
"""DescribeEventLogs请求参数结构体
|
|
380
|
+
"""
|
|
381
|
+
|
|
382
|
+
def __init__(self):
|
|
383
|
+
r"""查询集群事件日志
|
|
384
|
+
:param ClusterId: 集群ID
|
|
385
|
+
:type PathPrefix: String
|
|
386
|
+
:param ClusterName: 集群名称
|
|
387
|
+
:type PathPrefix: String
|
|
388
|
+
:param NodeId: 节点ID
|
|
389
|
+
:type PathPrefix: String
|
|
390
|
+
:param NodeName: 节点名称
|
|
391
|
+
:type PathPrefix: String
|
|
392
|
+
:param Inner: 是否查询内部事件
|
|
393
|
+
:type PathPrefix: Boolean
|
|
394
|
+
:param Marker: 分页参数 游标起始位置,
|
|
395
|
+
每次查询返回
|
|
396
|
+
:type PathPrefix: Int
|
|
397
|
+
:param MaxResults: 分页参数,每页最大数
|
|
398
|
+
|
|
399
|
+
:type PathPrefix: Int
|
|
400
|
+
"""
|
|
401
|
+
self.ClusterId = None
|
|
402
|
+
self.ClusterName = None
|
|
403
|
+
self.NodeId = None
|
|
404
|
+
self.NodeName = None
|
|
405
|
+
self.Inner = None
|
|
406
|
+
self.Marker = None
|
|
407
|
+
self.MaxResults = None
|
|
408
|
+
|
|
409
|
+
def _deserialize(self, params):
|
|
410
|
+
if params.get("ClusterId"):
|
|
411
|
+
self.ClusterId = params.get("ClusterId")
|
|
412
|
+
if params.get("ClusterName"):
|
|
413
|
+
self.ClusterName = params.get("ClusterName")
|
|
414
|
+
if params.get("NodeId"):
|
|
415
|
+
self.NodeId = params.get("NodeId")
|
|
416
|
+
if params.get("NodeName"):
|
|
417
|
+
self.NodeName = params.get("NodeName")
|
|
418
|
+
if params.get("Inner"):
|
|
419
|
+
self.Inner = params.get("Inner")
|
|
420
|
+
if params.get("Marker"):
|
|
421
|
+
self.Marker = params.get("Marker")
|
|
422
|
+
if params.get("MaxResults"):
|
|
423
|
+
self.MaxResults = params.get("MaxResults")
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
class DescribeClusterVersionListRequest(AbstractModel):
|
|
427
|
+
"""DescribeClusterVersionList请求参数结构体
|
|
428
|
+
"""
|
|
429
|
+
|
|
430
|
+
def __init__(self):
|
|
431
|
+
r"""查询集群版本信息
|
|
432
|
+
:param K8sVersion:
|
|
433
|
+
:type PathPrefix: String
|
|
434
|
+
"""
|
|
435
|
+
self.K8sVersion = None
|
|
436
|
+
|
|
437
|
+
def _deserialize(self, params):
|
|
438
|
+
if params.get("K8sVersion"):
|
|
439
|
+
self.K8sVersion = params.get("K8sVersion")
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
class AddKecNodesRequest(AbstractModel):
|
|
443
|
+
"""AddKecNodes请求参数结构体
|
|
444
|
+
"""
|
|
445
|
+
|
|
446
|
+
def __init__(self):
|
|
447
|
+
r"""给集群添加新kec节点或已有kec节点
|
|
448
|
+
:param ClusterId: 集群id
|
|
449
|
+
:type PathPrefix: String
|
|
450
|
+
:param NodeInstanceSet: 节点信息
|
|
451
|
+
:type PathPrefix: Object
|
|
452
|
+
"""
|
|
453
|
+
self.ClusterId = None
|
|
454
|
+
self.NodeInstanceSet = None
|
|
455
|
+
|
|
456
|
+
def _deserialize(self, params):
|
|
457
|
+
if params.get("ClusterId"):
|
|
458
|
+
self.ClusterId = params.get("ClusterId")
|
|
459
|
+
if params.get("NodeInstanceSet"):
|
|
460
|
+
self.NodeInstanceSet = params.get("NodeInstanceSet")
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
class AddEpcNodesRequest(AbstractModel):
|
|
464
|
+
"""AddEpcNodes请求参数结构体
|
|
465
|
+
"""
|
|
466
|
+
|
|
467
|
+
def __init__(self):
|
|
468
|
+
r"""给集群添加新Epc节点或已有Epc节点
|
|
469
|
+
:param ClusterId: 集群id
|
|
470
|
+
:type PathPrefix: String
|
|
471
|
+
:param NodeInstanceSet: 节点信息
|
|
472
|
+
:type PathPrefix: Array
|
|
473
|
+
"""
|
|
474
|
+
self.ClusterId = None
|
|
475
|
+
self.NodeInstanceSet = None
|
|
476
|
+
|
|
477
|
+
def _deserialize(self, params):
|
|
478
|
+
if params.get("ClusterId"):
|
|
479
|
+
self.ClusterId = params.get("ClusterId")
|
|
480
|
+
if params.get("NodeInstanceSet"):
|
|
481
|
+
self.NodeInstanceSet = params.get("NodeInstanceSet")
|
|
482
|
+
|
|
483
|
+
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
from ksyun.common.exception.ksyun_sdk_exception import KsyunSDKException
|
|
4
|
+
from ksyun.common.abstract_client import AbstractClient
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class KcfClient(AbstractClient):
|
|
8
|
+
_apiVersion = '2021-12-15'
|
|
9
|
+
_endpoint = 'kcf.api.ksyun.com'
|
|
10
|
+
_service = 'kcf'
|
|
11
|
+
def GetLogDate(self, request):
|
|
12
|
+
"""查询云函数日志信息
|
|
13
|
+
:param request: Request instance for GetLogDate.
|
|
14
|
+
:type request: :class:`ksyun.client.kcf.v20211215.models.GetLogDateRequest`
|
|
15
|
+
"""
|
|
16
|
+
try:
|
|
17
|
+
params = request._serialize()
|
|
18
|
+
body = self.call_judge("GetLogDate", params, "application/x-www-form-urlencoded")
|
|
19
|
+
response = json.loads(body)
|
|
20
|
+
if "Error" not in response:
|
|
21
|
+
return body
|
|
22
|
+
else:
|
|
23
|
+
code = response["Error"]["Code"]
|
|
24
|
+
message = response["Error"]["Message"]
|
|
25
|
+
req_id = response["RequestId"]
|
|
26
|
+
raise KsyunSDKException(code, message, req_id)
|
|
27
|
+
except Exception as e:
|
|
28
|
+
if isinstance(e, KsyunSDKException):
|
|
29
|
+
raise
|
|
30
|
+
else:
|
|
31
|
+
raise KsyunSDKException(message=str(e))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def CreateFunction(self, request):
|
|
35
|
+
"""创建云函数
|
|
36
|
+
:param request: Request instance for CreateFunction.
|
|
37
|
+
:type request: :class:`ksyun.client.kcf.v20211215.models.CreateFunctionRequest`
|
|
38
|
+
"""
|
|
39
|
+
try:
|
|
40
|
+
params = request._serialize()
|
|
41
|
+
body = self.call_judge("CreateFunction", params, "application/json")
|
|
42
|
+
response = json.loads(body)
|
|
43
|
+
if "Error" not in response:
|
|
44
|
+
return body
|
|
45
|
+
else:
|
|
46
|
+
code = response["Error"]["Code"]
|
|
47
|
+
message = response["Error"]["Message"]
|
|
48
|
+
req_id = response["RequestId"]
|
|
49
|
+
raise KsyunSDKException(code, message, req_id)
|
|
50
|
+
except Exception as e:
|
|
51
|
+
if isinstance(e, KsyunSDKException):
|
|
52
|
+
raise
|
|
53
|
+
else:
|
|
54
|
+
raise KsyunSDKException(message=str(e))
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def CheckFunctionService(self, request):
|
|
58
|
+
"""检测用户是否开通函数服务
|
|
59
|
+
:param request: Request instance for CheckFunctionService.
|
|
60
|
+
:type request: :class:`ksyun.client.kcf.v20211215.models.CheckFunctionServiceRequest`
|
|
61
|
+
"""
|
|
62
|
+
try:
|
|
63
|
+
params = request._serialize()
|
|
64
|
+
body = self.call_judge("CheckFunctionService", params, "application/x-www-form-urlencoded")
|
|
65
|
+
response = json.loads(body)
|
|
66
|
+
if "Error" not in response:
|
|
67
|
+
return body
|
|
68
|
+
else:
|
|
69
|
+
code = response["Error"]["Code"]
|
|
70
|
+
message = response["Error"]["Message"]
|
|
71
|
+
req_id = response["RequestId"]
|
|
72
|
+
raise KsyunSDKException(code, message, req_id)
|
|
73
|
+
except Exception as e:
|
|
74
|
+
if isinstance(e, KsyunSDKException):
|
|
75
|
+
raise
|
|
76
|
+
else:
|
|
77
|
+
raise KsyunSDKException(message=str(e))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def OpenFunctionService(self, request):
|
|
81
|
+
"""开通函数服务
|
|
82
|
+
:param request: Request instance for OpenFunctionService.
|
|
83
|
+
:type request: :class:`ksyun.client.kcf.v20211215.models.OpenFunctionServiceRequest`
|
|
84
|
+
"""
|
|
85
|
+
try:
|
|
86
|
+
params = request._serialize()
|
|
87
|
+
body = self.call_judge("OpenFunctionService", params, "application/x-www-form-urlencoded")
|
|
88
|
+
response = json.loads(body)
|
|
89
|
+
if "Error" not in response:
|
|
90
|
+
return body
|
|
91
|
+
else:
|
|
92
|
+
code = response["Error"]["Code"]
|
|
93
|
+
message = response["Error"]["Message"]
|
|
94
|
+
req_id = response["RequestId"]
|
|
95
|
+
raise KsyunSDKException(code, message, req_id)
|
|
96
|
+
except Exception as e:
|
|
97
|
+
if isinstance(e, KsyunSDKException):
|
|
98
|
+
raise
|
|
99
|
+
else:
|
|
100
|
+
raise KsyunSDKException(message=str(e))
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def DeleteFunction(self, request):
|
|
104
|
+
"""删除云函数
|
|
105
|
+
:param request: Request instance for DeleteFunction.
|
|
106
|
+
:type request: :class:`ksyun.client.kcf.v20211215.models.DeleteFunctionRequest`
|
|
107
|
+
"""
|
|
108
|
+
try:
|
|
109
|
+
params = request._serialize()
|
|
110
|
+
body = self.call_judge("DeleteFunction", params, "application/x-www-form-urlencoded")
|
|
111
|
+
response = json.loads(body)
|
|
112
|
+
if "Error" not in response:
|
|
113
|
+
return body
|
|
114
|
+
else:
|
|
115
|
+
code = response["Error"]["Code"]
|
|
116
|
+
message = response["Error"]["Message"]
|
|
117
|
+
req_id = response["RequestId"]
|
|
118
|
+
raise KsyunSDKException(code, message, req_id)
|
|
119
|
+
except Exception as e:
|
|
120
|
+
if isinstance(e, KsyunSDKException):
|
|
121
|
+
raise
|
|
122
|
+
else:
|
|
123
|
+
raise KsyunSDKException(message=str(e))
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def CreateTrigger(self, request):
|
|
127
|
+
"""创建触发器
|
|
128
|
+
:param request: Request instance for CreateTrigger.
|
|
129
|
+
:type request: :class:`ksyun.client.kcf.v20211215.models.CreateTriggerRequest`
|
|
130
|
+
"""
|
|
131
|
+
try:
|
|
132
|
+
params = request._serialize()
|
|
133
|
+
body = self.call_judge("CreateTrigger", params, "application/json")
|
|
134
|
+
response = json.loads(body)
|
|
135
|
+
if "Error" not in response:
|
|
136
|
+
return body
|
|
137
|
+
else:
|
|
138
|
+
code = response["Error"]["Code"]
|
|
139
|
+
message = response["Error"]["Message"]
|
|
140
|
+
req_id = response["RequestId"]
|
|
141
|
+
raise KsyunSDKException(code, message, req_id)
|
|
142
|
+
except Exception as e:
|
|
143
|
+
if isinstance(e, KsyunSDKException):
|
|
144
|
+
raise
|
|
145
|
+
else:
|
|
146
|
+
raise KsyunSDKException(message=str(e))
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def DeleteTrigger(self, request):
|
|
150
|
+
"""删除触发器
|
|
151
|
+
:param request: Request instance for DeleteTrigger.
|
|
152
|
+
:type request: :class:`ksyun.client.kcf.v20211215.models.DeleteTriggerRequest`
|
|
153
|
+
"""
|
|
154
|
+
try:
|
|
155
|
+
params = request._serialize()
|
|
156
|
+
body = self.call_judge("DeleteTrigger", params, "application/x-www-form-urlencoded")
|
|
157
|
+
response = json.loads(body)
|
|
158
|
+
if "Error" not in response:
|
|
159
|
+
return body
|
|
160
|
+
else:
|
|
161
|
+
code = response["Error"]["Code"]
|
|
162
|
+
message = response["Error"]["Message"]
|
|
163
|
+
req_id = response["RequestId"]
|
|
164
|
+
raise KsyunSDKException(code, message, req_id)
|
|
165
|
+
except Exception as e:
|
|
166
|
+
if isinstance(e, KsyunSDKException):
|
|
167
|
+
raise
|
|
168
|
+
else:
|
|
169
|
+
raise KsyunSDKException(message=str(e))
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def ModifyFunction(self, request):
|
|
173
|
+
"""更新函数配置
|
|
174
|
+
:param request: Request instance for ModifyFunction.
|
|
175
|
+
:type request: :class:`ksyun.client.kcf.v20211215.models.ModifyFunctionRequest`
|
|
176
|
+
"""
|
|
177
|
+
try:
|
|
178
|
+
params = request._serialize()
|
|
179
|
+
body = self.call_judge("ModifyFunction", params, "application/json")
|
|
180
|
+
response = json.loads(body)
|
|
181
|
+
if "Error" not in response:
|
|
182
|
+
return body
|
|
183
|
+
else:
|
|
184
|
+
code = response["Error"]["Code"]
|
|
185
|
+
message = response["Error"]["Message"]
|
|
186
|
+
req_id = response["RequestId"]
|
|
187
|
+
raise KsyunSDKException(code, message, req_id)
|
|
188
|
+
except Exception as e:
|
|
189
|
+
if isinstance(e, KsyunSDKException):
|
|
190
|
+
raise
|
|
191
|
+
else:
|
|
192
|
+
raise KsyunSDKException(message=str(e))
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
def DescribeTriggers(self, request):
|
|
196
|
+
"""获取触发器列表
|
|
197
|
+
:param request: Request instance for DescribeTriggers.
|
|
198
|
+
:type request: :class:`ksyun.client.kcf.v20211215.models.DescribeTriggersRequest`
|
|
199
|
+
"""
|
|
200
|
+
try:
|
|
201
|
+
params = request._serialize()
|
|
202
|
+
body = self.call_judge("DescribeTriggers", params, "application/x-www-form-urlencoded")
|
|
203
|
+
response = json.loads(body)
|
|
204
|
+
if "Error" not in response:
|
|
205
|
+
return body
|
|
206
|
+
else:
|
|
207
|
+
code = response["Error"]["Code"]
|
|
208
|
+
message = response["Error"]["Message"]
|
|
209
|
+
req_id = response["RequestId"]
|
|
210
|
+
raise KsyunSDKException(code, message, req_id)
|
|
211
|
+
except Exception as e:
|
|
212
|
+
if isinstance(e, KsyunSDKException):
|
|
213
|
+
raise
|
|
214
|
+
else:
|
|
215
|
+
raise KsyunSDKException(message=str(e))
|