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,313 @@
|
|
|
1
|
+
from ksyun.common.abstract_model import AbstractModel
|
|
2
|
+
|
|
3
|
+
class GetLogDateRequest(AbstractModel):
|
|
4
|
+
"""GetLogDate请求参数结构体
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
def __init__(self):
|
|
8
|
+
r"""查询云函数日志信息
|
|
9
|
+
:param id:
|
|
10
|
+
:type PathPrefix: Int
|
|
11
|
+
"""
|
|
12
|
+
self.id = None
|
|
13
|
+
|
|
14
|
+
def _deserialize(self, params):
|
|
15
|
+
if params.get("id"):
|
|
16
|
+
self.id = params.get("id")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class CreateFunctionRequest(AbstractModel):
|
|
20
|
+
"""CreateFunction请求参数结构体
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
def __init__(self):
|
|
24
|
+
r"""创建云函数
|
|
25
|
+
:param Id: 函数ID
|
|
26
|
+
:type PathPrefix: String
|
|
27
|
+
:param Name: 函数名称
|
|
28
|
+
:type PathPrefix: String
|
|
29
|
+
:param Namespace: 命名空间
|
|
30
|
+
:type PathPrefix: String
|
|
31
|
+
:param Runtime: 运行时环境,支持的值:Java8、Java11、Java17、Go1、Nodejs16、Nodejs14、Nodejs12、Nodejs10、Python3.10
|
|
32
|
+
:type PathPrefix: String
|
|
33
|
+
:param CaPort: 应用端口 1 ≤ CaPort ≤ 65535
|
|
34
|
+
:type PathPrefix: Int
|
|
35
|
+
:param StartupCommand: 启动命令,如 ["./start.sh", "-c", "config.yaml"], [ "python","python-test.py"], [ "node","nodejs-test.js"], [ "java","-jar","demo.jar"]
|
|
36
|
+
:type PathPrefix: Array
|
|
37
|
+
:param Description: 函数描述 最多 32 个 Unicode 字符
|
|
38
|
+
:type PathPrefix: String
|
|
39
|
+
:param Timeout: 函数超时时间,单位:秒,默认180秒 。若指定,需满足1 ≤ Timeout ≤ 86400
|
|
40
|
+
:type PathPrefix: Int
|
|
41
|
+
:param MemorySize: 函数内存大小,单位:MB,默认512MB。若指定,若指定,必须满足 MemorySize ≤ 3072 且 MemorySize % 64 == 0
|
|
42
|
+
:type PathPrefix: Int
|
|
43
|
+
:param SingleInstanceConcurrency: 单实例并发数,默认1 1 ≤ SingleInstanceConcurrency ≤ 100;
|
|
44
|
+
:type PathPrefix: Int
|
|
45
|
+
:param InternetAccess: 是否允许访问公网,默认false
|
|
46
|
+
:type PathPrefix: Boolean
|
|
47
|
+
:param Code:
|
|
48
|
+
:type PathPrefix: Object
|
|
49
|
+
:param Environment: 环境变量配置
|
|
50
|
+
:type PathPrefix: Object
|
|
51
|
+
:param VpcConfig: VPC配置信息
|
|
52
|
+
:type PathPrefix: Object
|
|
53
|
+
:param LogConfig: 日志配置信息
|
|
54
|
+
:type PathPrefix: Object
|
|
55
|
+
:param LivenessProbeConfig: 存活探针配置
|
|
56
|
+
:type PathPrefix: Object
|
|
57
|
+
:param ReadinessProbeConfig: 就绪探针配置
|
|
58
|
+
:type PathPrefix: Object
|
|
59
|
+
:param Layers: Layer列表,格式为“name#version”,如 “layer#1”
|
|
60
|
+
:type PathPrefix: Array
|
|
61
|
+
"""
|
|
62
|
+
self.Id = None
|
|
63
|
+
self.Name = None
|
|
64
|
+
self.Namespace = None
|
|
65
|
+
self.Runtime = None
|
|
66
|
+
self.CaPort = None
|
|
67
|
+
self.StartupCommand = None
|
|
68
|
+
self.Description = None
|
|
69
|
+
self.Timeout = None
|
|
70
|
+
self.MemorySize = None
|
|
71
|
+
self.SingleInstanceConcurrency = None
|
|
72
|
+
self.InternetAccess = None
|
|
73
|
+
self.Code = None
|
|
74
|
+
self.Environment = None
|
|
75
|
+
self.VpcConfig = None
|
|
76
|
+
self.LogConfig = None
|
|
77
|
+
self.LivenessProbeConfig = None
|
|
78
|
+
self.ReadinessProbeConfig = None
|
|
79
|
+
self.Layers = None
|
|
80
|
+
|
|
81
|
+
def _deserialize(self, params):
|
|
82
|
+
if params.get("Id"):
|
|
83
|
+
self.Id = params.get("Id")
|
|
84
|
+
if params.get("Name"):
|
|
85
|
+
self.Name = params.get("Name")
|
|
86
|
+
if params.get("Namespace"):
|
|
87
|
+
self.Namespace = params.get("Namespace")
|
|
88
|
+
if params.get("Runtime"):
|
|
89
|
+
self.Runtime = params.get("Runtime")
|
|
90
|
+
if params.get("CaPort"):
|
|
91
|
+
self.CaPort = params.get("CaPort")
|
|
92
|
+
if params.get("StartupCommand"):
|
|
93
|
+
self.StartupCommand = params.get("StartupCommand")
|
|
94
|
+
if params.get("Description"):
|
|
95
|
+
self.Description = params.get("Description")
|
|
96
|
+
if params.get("Timeout"):
|
|
97
|
+
self.Timeout = params.get("Timeout")
|
|
98
|
+
if params.get("MemorySize"):
|
|
99
|
+
self.MemorySize = params.get("MemorySize")
|
|
100
|
+
if params.get("SingleInstanceConcurrency"):
|
|
101
|
+
self.SingleInstanceConcurrency = params.get("SingleInstanceConcurrency")
|
|
102
|
+
if params.get("InternetAccess"):
|
|
103
|
+
self.InternetAccess = params.get("InternetAccess")
|
|
104
|
+
if params.get("Code"):
|
|
105
|
+
self.Code = params.get("Code")
|
|
106
|
+
if params.get("Environment"):
|
|
107
|
+
self.Environment = params.get("Environment")
|
|
108
|
+
if params.get("VpcConfig"):
|
|
109
|
+
self.VpcConfig = params.get("VpcConfig")
|
|
110
|
+
if params.get("LogConfig"):
|
|
111
|
+
self.LogConfig = params.get("LogConfig")
|
|
112
|
+
if params.get("LivenessProbeConfig"):
|
|
113
|
+
self.LivenessProbeConfig = params.get("LivenessProbeConfig")
|
|
114
|
+
if params.get("ReadinessProbeConfig"):
|
|
115
|
+
self.ReadinessProbeConfig = params.get("ReadinessProbeConfig")
|
|
116
|
+
if params.get("Layers"):
|
|
117
|
+
self.Layers = params.get("Layers")
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
class CheckFunctionServiceRequest(AbstractModel):
|
|
121
|
+
"""CheckFunctionService请求参数结构体
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
def __init__(self):
|
|
125
|
+
r"""检测用户是否开通函数服务
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
def _deserialize(self, params):
|
|
129
|
+
return
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
class OpenFunctionServiceRequest(AbstractModel):
|
|
133
|
+
"""OpenFunctionService请求参数结构体
|
|
134
|
+
"""
|
|
135
|
+
|
|
136
|
+
def __init__(self):
|
|
137
|
+
r"""开通函数服务
|
|
138
|
+
"""
|
|
139
|
+
|
|
140
|
+
def _deserialize(self, params):
|
|
141
|
+
return
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class DeleteFunctionRequest(AbstractModel):
|
|
145
|
+
"""DeleteFunction请求参数结构体
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
def __init__(self):
|
|
149
|
+
r"""删除云函数
|
|
150
|
+
:param Id: 函数ID
|
|
151
|
+
:type PathPrefix: String
|
|
152
|
+
"""
|
|
153
|
+
self.Id = None
|
|
154
|
+
|
|
155
|
+
def _deserialize(self, params):
|
|
156
|
+
if params.get("Id"):
|
|
157
|
+
self.Id = params.get("Id")
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
class CreateTriggerRequest(AbstractModel):
|
|
161
|
+
"""CreateTrigger请求参数结构体
|
|
162
|
+
"""
|
|
163
|
+
|
|
164
|
+
def __init__(self):
|
|
165
|
+
r"""创建触发器
|
|
166
|
+
:param FunctionId: 函数ID
|
|
167
|
+
:type PathPrefix: String
|
|
168
|
+
:param TriggerName: 触发器名称,在函数内唯一
|
|
169
|
+
:type PathPrefix: String
|
|
170
|
+
:param Type: 触发器类型,http/ks3
|
|
171
|
+
:type PathPrefix: String
|
|
172
|
+
:param Enable: 触发器启用状态,true表示启用,false表示禁用。默认为true。并且仅在Type为ks3时有效
|
|
173
|
+
:type PathPrefix: Boolean
|
|
174
|
+
:param TriggerDesc: 触发器配置
|
|
175
|
+
:type PathPrefix: Object
|
|
176
|
+
"""
|
|
177
|
+
self.FunctionId = None
|
|
178
|
+
self.TriggerName = None
|
|
179
|
+
self.Type = None
|
|
180
|
+
self.Enable = None
|
|
181
|
+
self.TriggerDesc = None
|
|
182
|
+
|
|
183
|
+
def _deserialize(self, params):
|
|
184
|
+
if params.get("FunctionId"):
|
|
185
|
+
self.FunctionId = params.get("FunctionId")
|
|
186
|
+
if params.get("TriggerName"):
|
|
187
|
+
self.TriggerName = params.get("TriggerName")
|
|
188
|
+
if params.get("Type"):
|
|
189
|
+
self.Type = params.get("Type")
|
|
190
|
+
if params.get("Enable"):
|
|
191
|
+
self.Enable = params.get("Enable")
|
|
192
|
+
if params.get("TriggerDesc"):
|
|
193
|
+
self.TriggerDesc = params.get("TriggerDesc")
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
class DeleteTriggerRequest(AbstractModel):
|
|
197
|
+
"""DeleteTrigger请求参数结构体
|
|
198
|
+
"""
|
|
199
|
+
|
|
200
|
+
def __init__(self):
|
|
201
|
+
r"""删除触发器
|
|
202
|
+
:param Id: 触发器ID
|
|
203
|
+
:type PathPrefix: String
|
|
204
|
+
"""
|
|
205
|
+
self.Id = None
|
|
206
|
+
|
|
207
|
+
def _deserialize(self, params):
|
|
208
|
+
if params.get("Id"):
|
|
209
|
+
self.Id = params.get("Id")
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
class ModifyFunctionRequest(AbstractModel):
|
|
213
|
+
"""ModifyFunction请求参数结构体
|
|
214
|
+
"""
|
|
215
|
+
|
|
216
|
+
def __init__(self):
|
|
217
|
+
r"""更新函数配置
|
|
218
|
+
:param Id: 函数ID
|
|
219
|
+
:type PathPrefix: String
|
|
220
|
+
:param Runtime: 运行时环境,支持的值:Java8、Java11、Java17、Go1、Nodejs16、Nodejs14、Nodejs12、Nodejs10、Python3.10
|
|
221
|
+
:type PathPrefix: String
|
|
222
|
+
:param CaPort: 容器应用端口 1 ≤ CaPort ≤ 65535
|
|
223
|
+
:type PathPrefix: Int
|
|
224
|
+
:param StartupCommand: 启动命令,如 ["./start.sh", "-c", "config.yaml"]
|
|
225
|
+
:type PathPrefix: Array
|
|
226
|
+
:param Timeout: 函数超时时间,单位:秒,默认180秒 。若指定,需满足1 ≤ Timeout ≤ 86400
|
|
227
|
+
:type PathPrefix: Int
|
|
228
|
+
:param MemorySize: 函数内存大小,单位:MB,默认512MB。若指定,必须满足 MemorySize ≤ 3072 且 MemorySize % 64 == 0
|
|
229
|
+
:type PathPrefix: Int
|
|
230
|
+
:param SingleInstanceConcurrency: 单实例并发数,默认1 1 ≤ SingleInstanceConcurrency ≤ 100;
|
|
231
|
+
:type PathPrefix: Int
|
|
232
|
+
:param InternetAccess: 是否允许访问公网,默认false
|
|
233
|
+
:type PathPrefix: Boolean
|
|
234
|
+
:param Code: 函数代码配置
|
|
235
|
+
:type PathPrefix: Object
|
|
236
|
+
:param Environment: 环境变量配置
|
|
237
|
+
:type PathPrefix: Object
|
|
238
|
+
:param VpcConfig: VPC配置信息
|
|
239
|
+
:type PathPrefix: Object
|
|
240
|
+
:param LogConfig: 日志配置信息
|
|
241
|
+
:type PathPrefix: Object
|
|
242
|
+
:param LivenessProbeConfig: 存活探针配置
|
|
243
|
+
:type PathPrefix: Object
|
|
244
|
+
:param ReadinessProbeConfig: 就绪探针配置
|
|
245
|
+
:type PathPrefix: Object
|
|
246
|
+
:param Layers: Layer列表,格式为“name#version”,如 “layer#1”
|
|
247
|
+
:type PathPrefix: Array
|
|
248
|
+
"""
|
|
249
|
+
self.Id = None
|
|
250
|
+
self.Runtime = None
|
|
251
|
+
self.CaPort = None
|
|
252
|
+
self.StartupCommand = None
|
|
253
|
+
self.Timeout = None
|
|
254
|
+
self.MemorySize = None
|
|
255
|
+
self.SingleInstanceConcurrency = None
|
|
256
|
+
self.InternetAccess = None
|
|
257
|
+
self.Code = None
|
|
258
|
+
self.Environment = None
|
|
259
|
+
self.VpcConfig = None
|
|
260
|
+
self.LogConfig = None
|
|
261
|
+
self.LivenessProbeConfig = None
|
|
262
|
+
self.ReadinessProbeConfig = None
|
|
263
|
+
self.Layers = None
|
|
264
|
+
|
|
265
|
+
def _deserialize(self, params):
|
|
266
|
+
if params.get("Id"):
|
|
267
|
+
self.Id = params.get("Id")
|
|
268
|
+
if params.get("Runtime"):
|
|
269
|
+
self.Runtime = params.get("Runtime")
|
|
270
|
+
if params.get("CaPort"):
|
|
271
|
+
self.CaPort = params.get("CaPort")
|
|
272
|
+
if params.get("StartupCommand"):
|
|
273
|
+
self.StartupCommand = params.get("StartupCommand")
|
|
274
|
+
if params.get("Timeout"):
|
|
275
|
+
self.Timeout = params.get("Timeout")
|
|
276
|
+
if params.get("MemorySize"):
|
|
277
|
+
self.MemorySize = params.get("MemorySize")
|
|
278
|
+
if params.get("SingleInstanceConcurrency"):
|
|
279
|
+
self.SingleInstanceConcurrency = params.get("SingleInstanceConcurrency")
|
|
280
|
+
if params.get("InternetAccess"):
|
|
281
|
+
self.InternetAccess = params.get("InternetAccess")
|
|
282
|
+
if params.get("Code"):
|
|
283
|
+
self.Code = params.get("Code")
|
|
284
|
+
if params.get("Environment"):
|
|
285
|
+
self.Environment = params.get("Environment")
|
|
286
|
+
if params.get("VpcConfig"):
|
|
287
|
+
self.VpcConfig = params.get("VpcConfig")
|
|
288
|
+
if params.get("LogConfig"):
|
|
289
|
+
self.LogConfig = params.get("LogConfig")
|
|
290
|
+
if params.get("LivenessProbeConfig"):
|
|
291
|
+
self.LivenessProbeConfig = params.get("LivenessProbeConfig")
|
|
292
|
+
if params.get("ReadinessProbeConfig"):
|
|
293
|
+
self.ReadinessProbeConfig = params.get("ReadinessProbeConfig")
|
|
294
|
+
if params.get("Layers"):
|
|
295
|
+
self.Layers = params.get("Layers")
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
class DescribeTriggersRequest(AbstractModel):
|
|
299
|
+
"""DescribeTriggers请求参数结构体
|
|
300
|
+
"""
|
|
301
|
+
|
|
302
|
+
def __init__(self):
|
|
303
|
+
r"""获取触发器列表
|
|
304
|
+
:param FunctionId: 函数Id
|
|
305
|
+
:type PathPrefix: String
|
|
306
|
+
"""
|
|
307
|
+
self.FunctionId = None
|
|
308
|
+
|
|
309
|
+
def _deserialize(self, params):
|
|
310
|
+
if params.get("FunctionId"):
|
|
311
|
+
self.FunctionId = params.get("FunctionId")
|
|
312
|
+
|
|
313
|
+
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,353 @@
|
|
|
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 KciClient(AbstractClient):
|
|
8
|
+
_apiVersion = '2020-07-02'
|
|
9
|
+
_endpoint = 'kci.api.ksyun.com'
|
|
10
|
+
_service = 'kci'
|
|
11
|
+
def CreateContainerGroup(self, request):
|
|
12
|
+
"""创建容器实例组
|
|
13
|
+
:param request: Request instance for CreateContainerGroup.
|
|
14
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.CreateContainerGroupRequest`
|
|
15
|
+
"""
|
|
16
|
+
try:
|
|
17
|
+
params = request._serialize()
|
|
18
|
+
body = self.call_judge("CreateContainerGroup", 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 DescribeContainerGroup(self, request):
|
|
35
|
+
"""查询容器实例组
|
|
36
|
+
:param request: Request instance for DescribeContainerGroup.
|
|
37
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.DescribeContainerGroupRequest`
|
|
38
|
+
"""
|
|
39
|
+
try:
|
|
40
|
+
params = request._serialize()
|
|
41
|
+
body = self.call_judge("DescribeContainerGroup", params, "application/x-www-form-urlencoded")
|
|
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 DeleteContainerGroup(self, request):
|
|
58
|
+
"""删除容器实例组
|
|
59
|
+
:param request: Request instance for DeleteContainerGroup.
|
|
60
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.DeleteContainerGroupRequest`
|
|
61
|
+
"""
|
|
62
|
+
try:
|
|
63
|
+
params = request._serialize()
|
|
64
|
+
body = self.call_judge("DeleteContainerGroup", 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 DescribeContainerLog(self, request):
|
|
81
|
+
"""查询容器实例组日志
|
|
82
|
+
:param request: Request instance for DescribeContainerLog.
|
|
83
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.DescribeContainerLogRequest`
|
|
84
|
+
"""
|
|
85
|
+
try:
|
|
86
|
+
params = request._serialize()
|
|
87
|
+
body = self.call_judge("DescribeContainerLog", 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 DescribeRegions(self, request):
|
|
104
|
+
"""查询有权限创建容器实例的机房列表
|
|
105
|
+
:param request: Request instance for DescribeRegions.
|
|
106
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.DescribeRegionsRequest`
|
|
107
|
+
"""
|
|
108
|
+
try:
|
|
109
|
+
params = request._serialize()
|
|
110
|
+
body = self.call_judge("DescribeRegions", 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 ExecContainerCommand(self, request):
|
|
127
|
+
"""生成执行容器命令的webSocketUri
|
|
128
|
+
:param request: Request instance for ExecContainerCommand.
|
|
129
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.ExecContainerCommandRequest`
|
|
130
|
+
"""
|
|
131
|
+
try:
|
|
132
|
+
params = request._serialize()
|
|
133
|
+
body = self.call_judge("ExecContainerCommand", params, "application/x-www-form-urlencoded")
|
|
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 DescribeContainerGroupCount(self, request):
|
|
150
|
+
"""查询容器实例数量
|
|
151
|
+
:param request: Request instance for DescribeContainerGroupCount.
|
|
152
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.DescribeContainerGroupCountRequest`
|
|
153
|
+
"""
|
|
154
|
+
try:
|
|
155
|
+
params = request._serialize()
|
|
156
|
+
body = self.call_judge("DescribeContainerGroupCount", 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 DescribeContainerGroupEvents(self, request):
|
|
173
|
+
"""查询容器实例事件信息
|
|
174
|
+
:param request: Request instance for DescribeContainerGroupEvents.
|
|
175
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.DescribeContainerGroupEventsRequest`
|
|
176
|
+
"""
|
|
177
|
+
try:
|
|
178
|
+
params = request._serialize()
|
|
179
|
+
body = self.call_judge("DescribeContainerGroupEvents", params, "application/x-www-form-urlencoded")
|
|
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 DescribeKciPackages(self, request):
|
|
196
|
+
"""查询容器实例在各机房可用区支持的标准规格大小
|
|
197
|
+
:param request: Request instance for DescribeKciPackages.
|
|
198
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.DescribeKciPackagesRequest`
|
|
199
|
+
"""
|
|
200
|
+
try:
|
|
201
|
+
params = request._serialize()
|
|
202
|
+
body = self.call_judge("DescribeKciPackages", 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))
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
def CreateImageCache(self, request):
|
|
219
|
+
"""创建容器实例镜像缓存
|
|
220
|
+
:param request: Request instance for CreateImageCache.
|
|
221
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.CreateImageCacheRequest`
|
|
222
|
+
"""
|
|
223
|
+
try:
|
|
224
|
+
params = request._serialize()
|
|
225
|
+
body = self.call_judge("CreateImageCache", params, "application/x-www-form-urlencoded")
|
|
226
|
+
response = json.loads(body)
|
|
227
|
+
if "Error" not in response:
|
|
228
|
+
return body
|
|
229
|
+
else:
|
|
230
|
+
code = response["Error"]["Code"]
|
|
231
|
+
message = response["Error"]["Message"]
|
|
232
|
+
req_id = response["RequestId"]
|
|
233
|
+
raise KsyunSDKException(code, message, req_id)
|
|
234
|
+
except Exception as e:
|
|
235
|
+
if isinstance(e, KsyunSDKException):
|
|
236
|
+
raise
|
|
237
|
+
else:
|
|
238
|
+
raise KsyunSDKException(message=str(e))
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def DeleteImageCache(self, request):
|
|
242
|
+
"""删除容器实例镜像缓存
|
|
243
|
+
:param request: Request instance for DeleteImageCache.
|
|
244
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.DeleteImageCacheRequest`
|
|
245
|
+
"""
|
|
246
|
+
try:
|
|
247
|
+
params = request._serialize()
|
|
248
|
+
body = self.call_judge("DeleteImageCache", params, "application/x-www-form-urlencoded")
|
|
249
|
+
response = json.loads(body)
|
|
250
|
+
if "Error" not in response:
|
|
251
|
+
return body
|
|
252
|
+
else:
|
|
253
|
+
code = response["Error"]["Code"]
|
|
254
|
+
message = response["Error"]["Message"]
|
|
255
|
+
req_id = response["RequestId"]
|
|
256
|
+
raise KsyunSDKException(code, message, req_id)
|
|
257
|
+
except Exception as e:
|
|
258
|
+
if isinstance(e, KsyunSDKException):
|
|
259
|
+
raise
|
|
260
|
+
else:
|
|
261
|
+
raise KsyunSDKException(message=str(e))
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
def DescribeImageCache(self, request):
|
|
265
|
+
"""查询容器实例镜像缓存
|
|
266
|
+
:param request: Request instance for DescribeImageCache.
|
|
267
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.DescribeImageCacheRequest`
|
|
268
|
+
"""
|
|
269
|
+
try:
|
|
270
|
+
params = request._serialize()
|
|
271
|
+
body = self.call_judge("DescribeImageCache", params, "application/x-www-form-urlencoded")
|
|
272
|
+
response = json.loads(body)
|
|
273
|
+
if "Error" not in response:
|
|
274
|
+
return body
|
|
275
|
+
else:
|
|
276
|
+
code = response["Error"]["Code"]
|
|
277
|
+
message = response["Error"]["Message"]
|
|
278
|
+
req_id = response["RequestId"]
|
|
279
|
+
raise KsyunSDKException(code, message, req_id)
|
|
280
|
+
except Exception as e:
|
|
281
|
+
if isinstance(e, KsyunSDKException):
|
|
282
|
+
raise
|
|
283
|
+
else:
|
|
284
|
+
raise KsyunSDKException(message=str(e))
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
def MatchImageCache(self, request):
|
|
288
|
+
"""匹配容器实例镜像缓存
|
|
289
|
+
:param request: Request instance for MatchImageCache.
|
|
290
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.MatchImageCacheRequest`
|
|
291
|
+
"""
|
|
292
|
+
try:
|
|
293
|
+
params = request._serialize()
|
|
294
|
+
body = self.call_judge("MatchImageCache", params, "application/x-www-form-urlencoded")
|
|
295
|
+
response = json.loads(body)
|
|
296
|
+
if "Error" not in response:
|
|
297
|
+
return body
|
|
298
|
+
else:
|
|
299
|
+
code = response["Error"]["Code"]
|
|
300
|
+
message = response["Error"]["Message"]
|
|
301
|
+
req_id = response["RequestId"]
|
|
302
|
+
raise KsyunSDKException(code, message, req_id)
|
|
303
|
+
except Exception as e:
|
|
304
|
+
if isinstance(e, KsyunSDKException):
|
|
305
|
+
raise
|
|
306
|
+
else:
|
|
307
|
+
raise KsyunSDKException(message=str(e))
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
def DescribeImageCacheEvent(self, request):
|
|
311
|
+
"""查询镜像缓存制作事件
|
|
312
|
+
:param request: Request instance for DescribeImageCacheEvent.
|
|
313
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.DescribeImageCacheEventRequest`
|
|
314
|
+
"""
|
|
315
|
+
try:
|
|
316
|
+
params = request._serialize()
|
|
317
|
+
body = self.call_judge("DescribeImageCacheEvent", params, "application/x-www-form-urlencoded")
|
|
318
|
+
response = json.loads(body)
|
|
319
|
+
if "Error" not in response:
|
|
320
|
+
return body
|
|
321
|
+
else:
|
|
322
|
+
code = response["Error"]["Code"]
|
|
323
|
+
message = response["Error"]["Message"]
|
|
324
|
+
req_id = response["RequestId"]
|
|
325
|
+
raise KsyunSDKException(code, message, req_id)
|
|
326
|
+
except Exception as e:
|
|
327
|
+
if isinstance(e, KsyunSDKException):
|
|
328
|
+
raise
|
|
329
|
+
else:
|
|
330
|
+
raise KsyunSDKException(message=str(e))
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
def UpdateImageCache(self, request):
|
|
334
|
+
"""更新容器实例镜像缓存
|
|
335
|
+
:param request: Request instance for UpdateImageCache.
|
|
336
|
+
:type request: :class:`ksyun.client.kci.v20200702.models.UpdateImageCacheRequest`
|
|
337
|
+
"""
|
|
338
|
+
try:
|
|
339
|
+
params = request._serialize()
|
|
340
|
+
body = self.call_judge("UpdateImageCache", params, "application/x-www-form-urlencoded")
|
|
341
|
+
response = json.loads(body)
|
|
342
|
+
if "Error" not in response:
|
|
343
|
+
return body
|
|
344
|
+
else:
|
|
345
|
+
code = response["Error"]["Code"]
|
|
346
|
+
message = response["Error"]["Message"]
|
|
347
|
+
req_id = response["RequestId"]
|
|
348
|
+
raise KsyunSDKException(code, message, req_id)
|
|
349
|
+
except Exception as e:
|
|
350
|
+
if isinstance(e, KsyunSDKException):
|
|
351
|
+
raise
|
|
352
|
+
else:
|
|
353
|
+
raise KsyunSDKException(message=str(e))
|