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
|
@@ -15,7 +15,7 @@ class KecClient(AbstractClient):
|
|
|
15
15
|
"""
|
|
16
16
|
try:
|
|
17
17
|
params = request._serialize()
|
|
18
|
-
body = self.
|
|
18
|
+
body = self.call_judge("DescribeInstances", params, "application/x-www-form-urlencoded")
|
|
19
19
|
response = json.loads(body)
|
|
20
20
|
if "Error" not in response:
|
|
21
21
|
return body
|
|
@@ -28,17 +28,17 @@ class KecClient(AbstractClient):
|
|
|
28
28
|
if isinstance(e, KsyunSDKException):
|
|
29
29
|
raise
|
|
30
30
|
else:
|
|
31
|
-
raise KsyunSDKException(
|
|
31
|
+
raise KsyunSDKException(message=str(e))
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
def RunInstances(self, request):
|
|
35
|
-
"""
|
|
35
|
+
"""创建实例信息
|
|
36
36
|
:param request: Request instance for RunInstances.
|
|
37
37
|
:type request: :class:`ksyun.client.kec.v20160304.models.RunInstancesRequest`
|
|
38
38
|
"""
|
|
39
39
|
try:
|
|
40
40
|
params = request._serialize()
|
|
41
|
-
body = self.
|
|
41
|
+
body = self.call_judge("RunInstances", params, "application/x-www-form-urlencoded")
|
|
42
42
|
response = json.loads(body)
|
|
43
43
|
if "Error" not in response:
|
|
44
44
|
return body
|
|
@@ -51,17 +51,17 @@ class KecClient(AbstractClient):
|
|
|
51
51
|
if isinstance(e, KsyunSDKException):
|
|
52
52
|
raise
|
|
53
53
|
else:
|
|
54
|
-
raise KsyunSDKException(
|
|
54
|
+
raise KsyunSDKException(message=str(e))
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
def StartInstances(self, request):
|
|
58
|
-
"""
|
|
58
|
+
"""启动实例接口
|
|
59
59
|
:param request: Request instance for StartInstances.
|
|
60
60
|
:type request: :class:`ksyun.client.kec.v20160304.models.StartInstancesRequest`
|
|
61
61
|
"""
|
|
62
62
|
try:
|
|
63
63
|
params = request._serialize()
|
|
64
|
-
body = self.
|
|
64
|
+
body = self.call_judge("StartInstances", params, "application/x-www-form-urlencoded")
|
|
65
65
|
response = json.loads(body)
|
|
66
66
|
if "Error" not in response:
|
|
67
67
|
return body
|
|
@@ -74,17 +74,17 @@ class KecClient(AbstractClient):
|
|
|
74
74
|
if isinstance(e, KsyunSDKException):
|
|
75
75
|
raise
|
|
76
76
|
else:
|
|
77
|
-
raise KsyunSDKException(
|
|
77
|
+
raise KsyunSDKException(message=str(e))
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
def StopInstances(self, request):
|
|
81
|
-
"""
|
|
81
|
+
"""关闭实例接口
|
|
82
82
|
:param request: Request instance for StopInstances.
|
|
83
83
|
:type request: :class:`ksyun.client.kec.v20160304.models.StopInstancesRequest`
|
|
84
84
|
"""
|
|
85
85
|
try:
|
|
86
86
|
params = request._serialize()
|
|
87
|
-
body = self.
|
|
87
|
+
body = self.call_judge("StopInstances", params, "application/x-www-form-urlencoded")
|
|
88
88
|
response = json.loads(body)
|
|
89
89
|
if "Error" not in response:
|
|
90
90
|
return body
|
|
@@ -97,17 +97,17 @@ class KecClient(AbstractClient):
|
|
|
97
97
|
if isinstance(e, KsyunSDKException):
|
|
98
98
|
raise
|
|
99
99
|
else:
|
|
100
|
-
raise KsyunSDKException(
|
|
100
|
+
raise KsyunSDKException(message=str(e))
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
def RebootInstances(self, request):
|
|
104
|
-
"""
|
|
104
|
+
"""重启实例接口
|
|
105
105
|
:param request: Request instance for RebootInstances.
|
|
106
106
|
:type request: :class:`ksyun.client.kec.v20160304.models.RebootInstancesRequest`
|
|
107
107
|
"""
|
|
108
108
|
try:
|
|
109
109
|
params = request._serialize()
|
|
110
|
-
body = self.
|
|
110
|
+
body = self.call_judge("RebootInstances", params, "application/x-www-form-urlencoded")
|
|
111
111
|
response = json.loads(body)
|
|
112
112
|
if "Error" not in response:
|
|
113
113
|
return body
|
|
@@ -120,7 +120,7 @@ class KecClient(AbstractClient):
|
|
|
120
120
|
if isinstance(e, KsyunSDKException):
|
|
121
121
|
raise
|
|
122
122
|
else:
|
|
123
|
-
raise KsyunSDKException(
|
|
123
|
+
raise KsyunSDKException(message=str(e))
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
def ModifyInstanceAttribute(self, request):
|
|
@@ -130,7 +130,7 @@ class KecClient(AbstractClient):
|
|
|
130
130
|
"""
|
|
131
131
|
try:
|
|
132
132
|
params = request._serialize()
|
|
133
|
-
body = self.
|
|
133
|
+
body = self.call_judge("ModifyInstanceAttribute", params, "application/x-www-form-urlencoded")
|
|
134
134
|
response = json.loads(body)
|
|
135
135
|
if "Error" not in response:
|
|
136
136
|
return body
|
|
@@ -143,7 +143,7 @@ class KecClient(AbstractClient):
|
|
|
143
143
|
if isinstance(e, KsyunSDKException):
|
|
144
144
|
raise
|
|
145
145
|
else:
|
|
146
|
-
raise KsyunSDKException(
|
|
146
|
+
raise KsyunSDKException(message=str(e))
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
def ModifyInstanceType(self, request):
|
|
@@ -153,7 +153,7 @@ class KecClient(AbstractClient):
|
|
|
153
153
|
"""
|
|
154
154
|
try:
|
|
155
155
|
params = request._serialize()
|
|
156
|
-
body = self.
|
|
156
|
+
body = self.call_judge("ModifyInstanceType", params, "application/x-www-form-urlencoded")
|
|
157
157
|
response = json.loads(body)
|
|
158
158
|
if "Error" not in response:
|
|
159
159
|
return body
|
|
@@ -166,17 +166,17 @@ class KecClient(AbstractClient):
|
|
|
166
166
|
if isinstance(e, KsyunSDKException):
|
|
167
167
|
raise
|
|
168
168
|
else:
|
|
169
|
-
raise KsyunSDKException(
|
|
169
|
+
raise KsyunSDKException(message=str(e))
|
|
170
170
|
|
|
171
171
|
|
|
172
172
|
def TerminateInstances(self, request):
|
|
173
|
-
"""
|
|
173
|
+
"""销毁实例接口
|
|
174
174
|
:param request: Request instance for TerminateInstances.
|
|
175
175
|
:type request: :class:`ksyun.client.kec.v20160304.models.TerminateInstancesRequest`
|
|
176
176
|
"""
|
|
177
177
|
try:
|
|
178
178
|
params = request._serialize()
|
|
179
|
-
body = self.
|
|
179
|
+
body = self.call_judge("TerminateInstances", params, "application/x-www-form-urlencoded")
|
|
180
180
|
response = json.loads(body)
|
|
181
181
|
if "Error" not in response:
|
|
182
182
|
return body
|
|
@@ -189,7 +189,7 @@ class KecClient(AbstractClient):
|
|
|
189
189
|
if isinstance(e, KsyunSDKException):
|
|
190
190
|
raise
|
|
191
191
|
else:
|
|
192
|
-
raise KsyunSDKException(
|
|
192
|
+
raise KsyunSDKException(message=str(e))
|
|
193
193
|
|
|
194
194
|
|
|
195
195
|
def DescribeImages(self, request):
|
|
@@ -199,7 +199,7 @@ class KecClient(AbstractClient):
|
|
|
199
199
|
"""
|
|
200
200
|
try:
|
|
201
201
|
params = request._serialize()
|
|
202
|
-
body = self.
|
|
202
|
+
body = self.call_judge("DescribeImages", params, "application/x-www-form-urlencoded")
|
|
203
203
|
response = json.loads(body)
|
|
204
204
|
if "Error" not in response:
|
|
205
205
|
return body
|
|
@@ -212,7 +212,7 @@ class KecClient(AbstractClient):
|
|
|
212
212
|
if isinstance(e, KsyunSDKException):
|
|
213
213
|
raise
|
|
214
214
|
else:
|
|
215
|
-
raise KsyunSDKException(
|
|
215
|
+
raise KsyunSDKException(message=str(e))
|
|
216
216
|
|
|
217
217
|
|
|
218
218
|
def ModifyImageAttribute(self, request):
|
|
@@ -222,7 +222,7 @@ class KecClient(AbstractClient):
|
|
|
222
222
|
"""
|
|
223
223
|
try:
|
|
224
224
|
params = request._serialize()
|
|
225
|
-
body = self.
|
|
225
|
+
body = self.call_judge("ModifyImageAttribute", params, "application/x-www-form-urlencoded")
|
|
226
226
|
response = json.loads(body)
|
|
227
227
|
if "Error" not in response:
|
|
228
228
|
return body
|
|
@@ -235,7 +235,7 @@ class KecClient(AbstractClient):
|
|
|
235
235
|
if isinstance(e, KsyunSDKException):
|
|
236
236
|
raise
|
|
237
237
|
else:
|
|
238
|
-
raise KsyunSDKException(
|
|
238
|
+
raise KsyunSDKException(message=str(e))
|
|
239
239
|
|
|
240
240
|
|
|
241
241
|
def ModifyInstanceImage(self, request):
|
|
@@ -245,7 +245,7 @@ class KecClient(AbstractClient):
|
|
|
245
245
|
"""
|
|
246
246
|
try:
|
|
247
247
|
params = request._serialize()
|
|
248
|
-
body = self.
|
|
248
|
+
body = self.call_judge("ModifyInstanceImage", params, "application/x-www-form-urlencoded")
|
|
249
249
|
response = json.loads(body)
|
|
250
250
|
if "Error" not in response:
|
|
251
251
|
return body
|
|
@@ -258,17 +258,17 @@ class KecClient(AbstractClient):
|
|
|
258
258
|
if isinstance(e, KsyunSDKException):
|
|
259
259
|
raise
|
|
260
260
|
else:
|
|
261
|
-
raise KsyunSDKException(
|
|
261
|
+
raise KsyunSDKException(message=str(e))
|
|
262
262
|
|
|
263
263
|
|
|
264
264
|
def CreateImage(self, request):
|
|
265
|
-
"""
|
|
265
|
+
"""创建镜像接口
|
|
266
266
|
:param request: Request instance for CreateImage.
|
|
267
267
|
:type request: :class:`ksyun.client.kec.v20160304.models.CreateImageRequest`
|
|
268
268
|
"""
|
|
269
269
|
try:
|
|
270
270
|
params = request._serialize()
|
|
271
|
-
body = self.
|
|
271
|
+
body = self.call_judge("CreateImage", params, "application/x-www-form-urlencoded")
|
|
272
272
|
response = json.loads(body)
|
|
273
273
|
if "Error" not in response:
|
|
274
274
|
return body
|
|
@@ -281,7 +281,7 @@ class KecClient(AbstractClient):
|
|
|
281
281
|
if isinstance(e, KsyunSDKException):
|
|
282
282
|
raise
|
|
283
283
|
else:
|
|
284
|
-
raise KsyunSDKException(
|
|
284
|
+
raise KsyunSDKException(message=str(e))
|
|
285
285
|
|
|
286
286
|
|
|
287
287
|
def RemoveImages(self, request):
|
|
@@ -291,7 +291,7 @@ class KecClient(AbstractClient):
|
|
|
291
291
|
"""
|
|
292
292
|
try:
|
|
293
293
|
params = request._serialize()
|
|
294
|
-
body = self.
|
|
294
|
+
body = self.call_judge("RemoveImages", params, "application/x-www-form-urlencoded")
|
|
295
295
|
response = json.loads(body)
|
|
296
296
|
if "Error" not in response:
|
|
297
297
|
return body
|
|
@@ -304,7 +304,7 @@ class KecClient(AbstractClient):
|
|
|
304
304
|
if isinstance(e, KsyunSDKException):
|
|
305
305
|
raise
|
|
306
306
|
else:
|
|
307
|
-
raise KsyunSDKException(
|
|
307
|
+
raise KsyunSDKException(message=str(e))
|
|
308
308
|
|
|
309
309
|
|
|
310
310
|
def ModifyNetworkInterfaceAttribute(self, request):
|
|
@@ -314,7 +314,7 @@ class KecClient(AbstractClient):
|
|
|
314
314
|
"""
|
|
315
315
|
try:
|
|
316
316
|
params = request._serialize()
|
|
317
|
-
body = self.
|
|
317
|
+
body = self.call_judge("ModifyNetworkInterfaceAttribute", params, "application/x-www-form-urlencoded")
|
|
318
318
|
response = json.loads(body)
|
|
319
319
|
if "Error" not in response:
|
|
320
320
|
return body
|
|
@@ -327,7 +327,7 @@ class KecClient(AbstractClient):
|
|
|
327
327
|
if isinstance(e, KsyunSDKException):
|
|
328
328
|
raise
|
|
329
329
|
else:
|
|
330
|
-
raise KsyunSDKException(
|
|
330
|
+
raise KsyunSDKException(message=str(e))
|
|
331
331
|
|
|
332
332
|
|
|
333
333
|
def AttachNetworkInterface(self, request):
|
|
@@ -337,7 +337,7 @@ class KecClient(AbstractClient):
|
|
|
337
337
|
"""
|
|
338
338
|
try:
|
|
339
339
|
params = request._serialize()
|
|
340
|
-
body = self.
|
|
340
|
+
body = self.call_judge("AttachNetworkInterface", params, "application/x-www-form-urlencoded")
|
|
341
341
|
response = json.loads(body)
|
|
342
342
|
if "Error" not in response:
|
|
343
343
|
return body
|
|
@@ -350,7 +350,7 @@ class KecClient(AbstractClient):
|
|
|
350
350
|
if isinstance(e, KsyunSDKException):
|
|
351
351
|
raise
|
|
352
352
|
else:
|
|
353
|
-
raise KsyunSDKException(
|
|
353
|
+
raise KsyunSDKException(message=str(e))
|
|
354
354
|
|
|
355
355
|
|
|
356
356
|
def DetachNetworkInterface(self, request):
|
|
@@ -360,7 +360,7 @@ class KecClient(AbstractClient):
|
|
|
360
360
|
"""
|
|
361
361
|
try:
|
|
362
362
|
params = request._serialize()
|
|
363
|
-
body = self.
|
|
363
|
+
body = self.call_judge("DetachNetworkInterface", params, "application/x-www-form-urlencoded")
|
|
364
364
|
response = json.loads(body)
|
|
365
365
|
if "Error" not in response:
|
|
366
366
|
return body
|
|
@@ -373,7 +373,7 @@ class KecClient(AbstractClient):
|
|
|
373
373
|
if isinstance(e, KsyunSDKException):
|
|
374
374
|
raise
|
|
375
375
|
else:
|
|
376
|
-
raise KsyunSDKException(
|
|
376
|
+
raise KsyunSDKException(message=str(e))
|
|
377
377
|
|
|
378
378
|
|
|
379
379
|
def DescribeLocalVolumes(self, request):
|
|
@@ -383,7 +383,7 @@ class KecClient(AbstractClient):
|
|
|
383
383
|
"""
|
|
384
384
|
try:
|
|
385
385
|
params = request._serialize()
|
|
386
|
-
body = self.
|
|
386
|
+
body = self.call_judge("DescribeLocalVolumes", params, "application/x-www-form-urlencoded")
|
|
387
387
|
response = json.loads(body)
|
|
388
388
|
if "Error" not in response:
|
|
389
389
|
return body
|
|
@@ -396,7 +396,7 @@ class KecClient(AbstractClient):
|
|
|
396
396
|
if isinstance(e, KsyunSDKException):
|
|
397
397
|
raise
|
|
398
398
|
else:
|
|
399
|
-
raise KsyunSDKException(
|
|
399
|
+
raise KsyunSDKException(message=str(e))
|
|
400
400
|
|
|
401
401
|
|
|
402
402
|
def CreateLocalVolumeSnapshot(self, request):
|
|
@@ -406,7 +406,7 @@ class KecClient(AbstractClient):
|
|
|
406
406
|
"""
|
|
407
407
|
try:
|
|
408
408
|
params = request._serialize()
|
|
409
|
-
body = self.
|
|
409
|
+
body = self.call_judge("CreateLocalVolumeSnapshot", params, "application/x-www-form-urlencoded")
|
|
410
410
|
response = json.loads(body)
|
|
411
411
|
if "Error" not in response:
|
|
412
412
|
return body
|
|
@@ -419,7 +419,7 @@ class KecClient(AbstractClient):
|
|
|
419
419
|
if isinstance(e, KsyunSDKException):
|
|
420
420
|
raise
|
|
421
421
|
else:
|
|
422
|
-
raise KsyunSDKException(
|
|
422
|
+
raise KsyunSDKException(message=str(e))
|
|
423
423
|
|
|
424
424
|
|
|
425
425
|
def DescribeLocalVolumeSnapshots(self, request):
|
|
@@ -429,7 +429,7 @@ class KecClient(AbstractClient):
|
|
|
429
429
|
"""
|
|
430
430
|
try:
|
|
431
431
|
params = request._serialize()
|
|
432
|
-
body = self.
|
|
432
|
+
body = self.call_judge("DescribeLocalVolumeSnapshots", params, "application/x-www-form-urlencoded")
|
|
433
433
|
response = json.loads(body)
|
|
434
434
|
if "Error" not in response:
|
|
435
435
|
return body
|
|
@@ -442,7 +442,7 @@ class KecClient(AbstractClient):
|
|
|
442
442
|
if isinstance(e, KsyunSDKException):
|
|
443
443
|
raise
|
|
444
444
|
else:
|
|
445
|
-
raise KsyunSDKException(
|
|
445
|
+
raise KsyunSDKException(message=str(e))
|
|
446
446
|
|
|
447
447
|
|
|
448
448
|
def RollbackLocalVolume(self, request):
|
|
@@ -452,7 +452,7 @@ class KecClient(AbstractClient):
|
|
|
452
452
|
"""
|
|
453
453
|
try:
|
|
454
454
|
params = request._serialize()
|
|
455
|
-
body = self.
|
|
455
|
+
body = self.call_judge("RollbackLocalVolume", params, "application/x-www-form-urlencoded")
|
|
456
456
|
response = json.loads(body)
|
|
457
457
|
if "Error" not in response:
|
|
458
458
|
return body
|
|
@@ -465,7 +465,7 @@ class KecClient(AbstractClient):
|
|
|
465
465
|
if isinstance(e, KsyunSDKException):
|
|
466
466
|
raise
|
|
467
467
|
else:
|
|
468
|
-
raise KsyunSDKException(
|
|
468
|
+
raise KsyunSDKException(message=str(e))
|
|
469
469
|
|
|
470
470
|
|
|
471
471
|
def DeleteLocalVolumeSnapshot(self, request):
|
|
@@ -475,7 +475,7 @@ class KecClient(AbstractClient):
|
|
|
475
475
|
"""
|
|
476
476
|
try:
|
|
477
477
|
params = request._serialize()
|
|
478
|
-
body = self.
|
|
478
|
+
body = self.call_judge("DeleteLocalVolumeSnapshot", params, "application/x-www-form-urlencoded")
|
|
479
479
|
response = json.loads(body)
|
|
480
480
|
if "Error" not in response:
|
|
481
481
|
return body
|
|
@@ -488,7 +488,7 @@ class KecClient(AbstractClient):
|
|
|
488
488
|
if isinstance(e, KsyunSDKException):
|
|
489
489
|
raise
|
|
490
490
|
else:
|
|
491
|
-
raise KsyunSDKException(
|
|
491
|
+
raise KsyunSDKException(message=str(e))
|
|
492
492
|
|
|
493
493
|
|
|
494
494
|
def ModifyDataGuardGroups(self, request):
|
|
@@ -498,7 +498,7 @@ class KecClient(AbstractClient):
|
|
|
498
498
|
"""
|
|
499
499
|
try:
|
|
500
500
|
params = request._serialize()
|
|
501
|
-
body = self.
|
|
501
|
+
body = self.call_judge("ModifyDataGuardGroups", params, "application/x-www-form-urlencoded")
|
|
502
502
|
response = json.loads(body)
|
|
503
503
|
if "Error" not in response:
|
|
504
504
|
return body
|
|
@@ -511,7 +511,7 @@ class KecClient(AbstractClient):
|
|
|
511
511
|
if isinstance(e, KsyunSDKException):
|
|
512
512
|
raise
|
|
513
513
|
else:
|
|
514
|
-
raise KsyunSDKException(
|
|
514
|
+
raise KsyunSDKException(message=str(e))
|
|
515
515
|
|
|
516
516
|
|
|
517
517
|
def DescribeDataGuardCapacity(self, request):
|
|
@@ -521,7 +521,7 @@ class KecClient(AbstractClient):
|
|
|
521
521
|
"""
|
|
522
522
|
try:
|
|
523
523
|
params = request._serialize()
|
|
524
|
-
body = self.
|
|
524
|
+
body = self.call_judge("DescribeDataGuardCapacity", params, "application/x-www-form-urlencoded")
|
|
525
525
|
response = json.loads(body)
|
|
526
526
|
if "Error" not in response:
|
|
527
527
|
return body
|
|
@@ -534,7 +534,7 @@ class KecClient(AbstractClient):
|
|
|
534
534
|
if isinstance(e, KsyunSDKException):
|
|
535
535
|
raise
|
|
536
536
|
else:
|
|
537
|
-
raise KsyunSDKException(
|
|
537
|
+
raise KsyunSDKException(message=str(e))
|
|
538
538
|
|
|
539
539
|
|
|
540
540
|
def CreateDataGuardGroup(self, request):
|
|
@@ -544,7 +544,7 @@ class KecClient(AbstractClient):
|
|
|
544
544
|
"""
|
|
545
545
|
try:
|
|
546
546
|
params = request._serialize()
|
|
547
|
-
body = self.
|
|
547
|
+
body = self.call_judge("CreateDataGuardGroup", params, "application/x-www-form-urlencoded")
|
|
548
548
|
response = json.loads(body)
|
|
549
549
|
if "Error" not in response:
|
|
550
550
|
return body
|
|
@@ -557,7 +557,7 @@ class KecClient(AbstractClient):
|
|
|
557
557
|
if isinstance(e, KsyunSDKException):
|
|
558
558
|
raise
|
|
559
559
|
else:
|
|
560
|
-
raise KsyunSDKException(
|
|
560
|
+
raise KsyunSDKException(message=str(e))
|
|
561
561
|
|
|
562
562
|
|
|
563
563
|
def DeleteDataGuardGroups(self, request):
|
|
@@ -567,7 +567,7 @@ class KecClient(AbstractClient):
|
|
|
567
567
|
"""
|
|
568
568
|
try:
|
|
569
569
|
params = request._serialize()
|
|
570
|
-
body = self.
|
|
570
|
+
body = self.call_judge("DeleteDataGuardGroups", params, "application/x-www-form-urlencoded")
|
|
571
571
|
response = json.loads(body)
|
|
572
572
|
if "Error" not in response:
|
|
573
573
|
return body
|
|
@@ -580,7 +580,7 @@ class KecClient(AbstractClient):
|
|
|
580
580
|
if isinstance(e, KsyunSDKException):
|
|
581
581
|
raise
|
|
582
582
|
else:
|
|
583
|
-
raise KsyunSDKException(
|
|
583
|
+
raise KsyunSDKException(message=str(e))
|
|
584
584
|
|
|
585
585
|
|
|
586
586
|
def DescribeDataGuardGroup(self, request):
|
|
@@ -590,7 +590,7 @@ class KecClient(AbstractClient):
|
|
|
590
590
|
"""
|
|
591
591
|
try:
|
|
592
592
|
params = request._serialize()
|
|
593
|
-
body = self.
|
|
593
|
+
body = self.call_judge("DescribeDataGuardGroup", params, "application/x-www-form-urlencoded")
|
|
594
594
|
response = json.loads(body)
|
|
595
595
|
if "Error" not in response:
|
|
596
596
|
return body
|
|
@@ -603,7 +603,7 @@ class KecClient(AbstractClient):
|
|
|
603
603
|
if isinstance(e, KsyunSDKException):
|
|
604
604
|
raise
|
|
605
605
|
else:
|
|
606
|
-
raise KsyunSDKException(
|
|
606
|
+
raise KsyunSDKException(message=str(e))
|
|
607
607
|
|
|
608
608
|
|
|
609
609
|
def RemoveVmFromDataGuard(self, request):
|
|
@@ -613,7 +613,7 @@ class KecClient(AbstractClient):
|
|
|
613
613
|
"""
|
|
614
614
|
try:
|
|
615
615
|
params = request._serialize()
|
|
616
|
-
body = self.
|
|
616
|
+
body = self.call_judge("RemoveVmFromDataGuard", params, "application/x-www-form-urlencoded")
|
|
617
617
|
response = json.loads(body)
|
|
618
618
|
if "Error" not in response:
|
|
619
619
|
return body
|
|
@@ -626,7 +626,7 @@ class KecClient(AbstractClient):
|
|
|
626
626
|
if isinstance(e, KsyunSDKException):
|
|
627
627
|
raise
|
|
628
628
|
else:
|
|
629
|
-
raise KsyunSDKException(
|
|
629
|
+
raise KsyunSDKException(message=str(e))
|
|
630
630
|
|
|
631
631
|
|
|
632
632
|
def CreateDedicatedHosts(self, request):
|
|
@@ -636,7 +636,7 @@ class KecClient(AbstractClient):
|
|
|
636
636
|
"""
|
|
637
637
|
try:
|
|
638
638
|
params = request._serialize()
|
|
639
|
-
body = self.
|
|
639
|
+
body = self.call_judge("CreateDedicatedHosts", params, "application/x-www-form-urlencoded")
|
|
640
640
|
response = json.loads(body)
|
|
641
641
|
if "Error" not in response:
|
|
642
642
|
return body
|
|
@@ -649,17 +649,17 @@ class KecClient(AbstractClient):
|
|
|
649
649
|
if isinstance(e, KsyunSDKException):
|
|
650
650
|
raise
|
|
651
651
|
else:
|
|
652
|
-
raise KsyunSDKException(
|
|
652
|
+
raise KsyunSDKException(message=str(e))
|
|
653
653
|
|
|
654
654
|
|
|
655
|
-
def
|
|
656
|
-
"""
|
|
657
|
-
:param request: Request instance for
|
|
658
|
-
:type request: :class:`ksyun.client.kec.v20160304.models.
|
|
655
|
+
def DeleteDedicatedHost(self, request):
|
|
656
|
+
"""删除专属宿主机
|
|
657
|
+
:param request: Request instance for DeleteDedicatedHost.
|
|
658
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.DeleteDedicatedHostRequest`
|
|
659
659
|
"""
|
|
660
660
|
try:
|
|
661
661
|
params = request._serialize()
|
|
662
|
-
body = self.
|
|
662
|
+
body = self.call_judge("DeleteDedicatedHost", params, "application/x-www-form-urlencoded")
|
|
663
663
|
response = json.loads(body)
|
|
664
664
|
if "Error" not in response:
|
|
665
665
|
return body
|
|
@@ -672,7 +672,7 @@ class KecClient(AbstractClient):
|
|
|
672
672
|
if isinstance(e, KsyunSDKException):
|
|
673
673
|
raise
|
|
674
674
|
else:
|
|
675
|
-
raise KsyunSDKException(
|
|
675
|
+
raise KsyunSDKException(message=str(e))
|
|
676
676
|
|
|
677
677
|
|
|
678
678
|
def DescribeDedicatedHosts(self, request):
|
|
@@ -682,7 +682,7 @@ class KecClient(AbstractClient):
|
|
|
682
682
|
"""
|
|
683
683
|
try:
|
|
684
684
|
params = request._serialize()
|
|
685
|
-
body = self.
|
|
685
|
+
body = self.call_judge("DescribeDedicatedHosts", params, "application/x-www-form-urlencoded")
|
|
686
686
|
response = json.loads(body)
|
|
687
687
|
if "Error" not in response:
|
|
688
688
|
return body
|
|
@@ -695,7 +695,145 @@ class KecClient(AbstractClient):
|
|
|
695
695
|
if isinstance(e, KsyunSDKException):
|
|
696
696
|
raise
|
|
697
697
|
else:
|
|
698
|
-
raise KsyunSDKException(
|
|
698
|
+
raise KsyunSDKException(message=str(e))
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
def CreateAutoSnapshotPolicy(self, request):
|
|
702
|
+
"""创建自动快照策略
|
|
703
|
+
:param request: Request instance for CreateAutoSnapshotPolicy.
|
|
704
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.CreateAutoSnapshotPolicyRequest`
|
|
705
|
+
"""
|
|
706
|
+
try:
|
|
707
|
+
params = request._serialize()
|
|
708
|
+
body = self.call_judge("CreateAutoSnapshotPolicy", params, "application/x-www-form-urlencoded")
|
|
709
|
+
response = json.loads(body)
|
|
710
|
+
if "Error" not in response:
|
|
711
|
+
return body
|
|
712
|
+
else:
|
|
713
|
+
code = response["Error"]["Code"]
|
|
714
|
+
message = response["Error"]["Message"]
|
|
715
|
+
req_id = response["RequestId"]
|
|
716
|
+
raise KsyunSDKException(code, message, req_id)
|
|
717
|
+
except Exception as e:
|
|
718
|
+
if isinstance(e, KsyunSDKException):
|
|
719
|
+
raise
|
|
720
|
+
else:
|
|
721
|
+
raise KsyunSDKException(message=str(e))
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
def DeleteAutoSnapshotPolicy(self, request):
|
|
725
|
+
"""删除自动快照策略
|
|
726
|
+
:param request: Request instance for DeleteAutoSnapshotPolicy.
|
|
727
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.DeleteAutoSnapshotPolicyRequest`
|
|
728
|
+
"""
|
|
729
|
+
try:
|
|
730
|
+
params = request._serialize()
|
|
731
|
+
body = self.call_judge("DeleteAutoSnapshotPolicy", params, "application/x-www-form-urlencoded")
|
|
732
|
+
response = json.loads(body)
|
|
733
|
+
if "Error" not in response:
|
|
734
|
+
return body
|
|
735
|
+
else:
|
|
736
|
+
code = response["Error"]["Code"]
|
|
737
|
+
message = response["Error"]["Message"]
|
|
738
|
+
req_id = response["RequestId"]
|
|
739
|
+
raise KsyunSDKException(code, message, req_id)
|
|
740
|
+
except Exception as e:
|
|
741
|
+
if isinstance(e, KsyunSDKException):
|
|
742
|
+
raise
|
|
743
|
+
else:
|
|
744
|
+
raise KsyunSDKException(message=str(e))
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
def ModifyAutoSnapshotPolicy(self, request):
|
|
748
|
+
"""修改自动快照策略
|
|
749
|
+
:param request: Request instance for ModifyAutoSnapshotPolicy.
|
|
750
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.ModifyAutoSnapshotPolicyRequest`
|
|
751
|
+
"""
|
|
752
|
+
try:
|
|
753
|
+
params = request._serialize()
|
|
754
|
+
body = self.call_judge("ModifyAutoSnapshotPolicy", params, "application/x-www-form-urlencoded")
|
|
755
|
+
response = json.loads(body)
|
|
756
|
+
if "Error" not in response:
|
|
757
|
+
return body
|
|
758
|
+
else:
|
|
759
|
+
code = response["Error"]["Code"]
|
|
760
|
+
message = response["Error"]["Message"]
|
|
761
|
+
req_id = response["RequestId"]
|
|
762
|
+
raise KsyunSDKException(code, message, req_id)
|
|
763
|
+
except Exception as e:
|
|
764
|
+
if isinstance(e, KsyunSDKException):
|
|
765
|
+
raise
|
|
766
|
+
else:
|
|
767
|
+
raise KsyunSDKException(message=str(e))
|
|
768
|
+
|
|
769
|
+
|
|
770
|
+
def DescribeAutoSnapshotPolicy(self, request):
|
|
771
|
+
"""查询自动快照策略
|
|
772
|
+
:param request: Request instance for DescribeAutoSnapshotPolicy.
|
|
773
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.DescribeAutoSnapshotPolicyRequest`
|
|
774
|
+
"""
|
|
775
|
+
try:
|
|
776
|
+
params = request._serialize()
|
|
777
|
+
body = self.call_judge("DescribeAutoSnapshotPolicy", params, "application/x-www-form-urlencoded")
|
|
778
|
+
response = json.loads(body)
|
|
779
|
+
if "Error" not in response:
|
|
780
|
+
return body
|
|
781
|
+
else:
|
|
782
|
+
code = response["Error"]["Code"]
|
|
783
|
+
message = response["Error"]["Message"]
|
|
784
|
+
req_id = response["RequestId"]
|
|
785
|
+
raise KsyunSDKException(code, message, req_id)
|
|
786
|
+
except Exception as e:
|
|
787
|
+
if isinstance(e, KsyunSDKException):
|
|
788
|
+
raise
|
|
789
|
+
else:
|
|
790
|
+
raise KsyunSDKException(message=str(e))
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
def ApplyAutoSnapshotPolicy(self, request):
|
|
794
|
+
"""执行自动快照策略
|
|
795
|
+
:param request: Request instance for ApplyAutoSnapshotPolicy.
|
|
796
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.ApplyAutoSnapshotPolicyRequest`
|
|
797
|
+
"""
|
|
798
|
+
try:
|
|
799
|
+
params = request._serialize()
|
|
800
|
+
body = self.call_judge("ApplyAutoSnapshotPolicy", params, "application/x-www-form-urlencoded")
|
|
801
|
+
response = json.loads(body)
|
|
802
|
+
if "Error" not in response:
|
|
803
|
+
return body
|
|
804
|
+
else:
|
|
805
|
+
code = response["Error"]["Code"]
|
|
806
|
+
message = response["Error"]["Message"]
|
|
807
|
+
req_id = response["RequestId"]
|
|
808
|
+
raise KsyunSDKException(code, message, req_id)
|
|
809
|
+
except Exception as e:
|
|
810
|
+
if isinstance(e, KsyunSDKException):
|
|
811
|
+
raise
|
|
812
|
+
else:
|
|
813
|
+
raise KsyunSDKException(message=str(e))
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
def CancelAutoSnapshotPolicy(self, request):
|
|
817
|
+
"""消执行自动快照策略
|
|
818
|
+
:param request: Request instance for CancelAutoSnapshotPolicy.
|
|
819
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.CancelAutoSnapshotPolicyRequest`
|
|
820
|
+
"""
|
|
821
|
+
try:
|
|
822
|
+
params = request._serialize()
|
|
823
|
+
body = self.call_judge("CancelAutoSnapshotPolicy", params, "application/x-www-form-urlencoded")
|
|
824
|
+
response = json.loads(body)
|
|
825
|
+
if "Error" not in response:
|
|
826
|
+
return body
|
|
827
|
+
else:
|
|
828
|
+
code = response["Error"]["Code"]
|
|
829
|
+
message = response["Error"]["Message"]
|
|
830
|
+
req_id = response["RequestId"]
|
|
831
|
+
raise KsyunSDKException(code, message, req_id)
|
|
832
|
+
except Exception as e:
|
|
833
|
+
if isinstance(e, KsyunSDKException):
|
|
834
|
+
raise
|
|
835
|
+
else:
|
|
836
|
+
raise KsyunSDKException(message=str(e))
|
|
699
837
|
|
|
700
838
|
|
|
701
839
|
def DescribeScalingConfiguration(self, request):
|
|
@@ -705,7 +843,7 @@ class KecClient(AbstractClient):
|
|
|
705
843
|
"""
|
|
706
844
|
try:
|
|
707
845
|
params = request._serialize()
|
|
708
|
-
body = self.
|
|
846
|
+
body = self.call_judge("DescribeScalingConfiguration", params, "application/x-www-form-urlencoded")
|
|
709
847
|
response = json.loads(body)
|
|
710
848
|
if "Error" not in response:
|
|
711
849
|
return body
|
|
@@ -718,7 +856,7 @@ class KecClient(AbstractClient):
|
|
|
718
856
|
if isinstance(e, KsyunSDKException):
|
|
719
857
|
raise
|
|
720
858
|
else:
|
|
721
|
-
raise KsyunSDKException(
|
|
859
|
+
raise KsyunSDKException(message=str(e))
|
|
722
860
|
|
|
723
861
|
|
|
724
862
|
def CreateScalingConfiguration(self, request):
|
|
@@ -728,7 +866,7 @@ class KecClient(AbstractClient):
|
|
|
728
866
|
"""
|
|
729
867
|
try:
|
|
730
868
|
params = request._serialize()
|
|
731
|
-
body = self.
|
|
869
|
+
body = self.call_judge("CreateScalingConfiguration", params, "application/x-www-form-urlencoded")
|
|
732
870
|
response = json.loads(body)
|
|
733
871
|
if "Error" not in response:
|
|
734
872
|
return body
|
|
@@ -741,7 +879,7 @@ class KecClient(AbstractClient):
|
|
|
741
879
|
if isinstance(e, KsyunSDKException):
|
|
742
880
|
raise
|
|
743
881
|
else:
|
|
744
|
-
raise KsyunSDKException(
|
|
882
|
+
raise KsyunSDKException(message=str(e))
|
|
745
883
|
|
|
746
884
|
|
|
747
885
|
def DeleteScalingConfiguration(self, request):
|
|
@@ -751,7 +889,7 @@ class KecClient(AbstractClient):
|
|
|
751
889
|
"""
|
|
752
890
|
try:
|
|
753
891
|
params = request._serialize()
|
|
754
|
-
body = self.
|
|
892
|
+
body = self.call_judge("DeleteScalingConfiguration", params, "application/x-www-form-urlencoded")
|
|
755
893
|
response = json.loads(body)
|
|
756
894
|
if "Error" not in response:
|
|
757
895
|
return body
|
|
@@ -764,7 +902,7 @@ class KecClient(AbstractClient):
|
|
|
764
902
|
if isinstance(e, KsyunSDKException):
|
|
765
903
|
raise
|
|
766
904
|
else:
|
|
767
|
-
raise KsyunSDKException(
|
|
905
|
+
raise KsyunSDKException(message=str(e))
|
|
768
906
|
|
|
769
907
|
|
|
770
908
|
def CreateScalingGroup(self, request):
|
|
@@ -774,7 +912,7 @@ class KecClient(AbstractClient):
|
|
|
774
912
|
"""
|
|
775
913
|
try:
|
|
776
914
|
params = request._serialize()
|
|
777
|
-
body = self.
|
|
915
|
+
body = self.call_judge("CreateScalingGroup", params, "application/x-www-form-urlencoded")
|
|
778
916
|
response = json.loads(body)
|
|
779
917
|
if "Error" not in response:
|
|
780
918
|
return body
|
|
@@ -787,7 +925,7 @@ class KecClient(AbstractClient):
|
|
|
787
925
|
if isinstance(e, KsyunSDKException):
|
|
788
926
|
raise
|
|
789
927
|
else:
|
|
790
|
-
raise KsyunSDKException(
|
|
928
|
+
raise KsyunSDKException(message=str(e))
|
|
791
929
|
|
|
792
930
|
|
|
793
931
|
def DescribeScalingGroup(self, request):
|
|
@@ -797,7 +935,7 @@ class KecClient(AbstractClient):
|
|
|
797
935
|
"""
|
|
798
936
|
try:
|
|
799
937
|
params = request._serialize()
|
|
800
|
-
body = self.
|
|
938
|
+
body = self.call_judge("DescribeScalingGroup", params, "application/x-www-form-urlencoded")
|
|
801
939
|
response = json.loads(body)
|
|
802
940
|
if "Error" not in response:
|
|
803
941
|
return body
|
|
@@ -810,7 +948,7 @@ class KecClient(AbstractClient):
|
|
|
810
948
|
if isinstance(e, KsyunSDKException):
|
|
811
949
|
raise
|
|
812
950
|
else:
|
|
813
|
-
raise KsyunSDKException(
|
|
951
|
+
raise KsyunSDKException(message=str(e))
|
|
814
952
|
|
|
815
953
|
|
|
816
954
|
def ModifyScalingGroup(self, request):
|
|
@@ -820,7 +958,7 @@ class KecClient(AbstractClient):
|
|
|
820
958
|
"""
|
|
821
959
|
try:
|
|
822
960
|
params = request._serialize()
|
|
823
|
-
body = self.
|
|
961
|
+
body = self.call_judge("ModifyScalingGroup", params, "application/x-www-form-urlencoded")
|
|
824
962
|
response = json.loads(body)
|
|
825
963
|
if "Error" not in response:
|
|
826
964
|
return body
|
|
@@ -833,7 +971,7 @@ class KecClient(AbstractClient):
|
|
|
833
971
|
if isinstance(e, KsyunSDKException):
|
|
834
972
|
raise
|
|
835
973
|
else:
|
|
836
|
-
raise KsyunSDKException(
|
|
974
|
+
raise KsyunSDKException(message=str(e))
|
|
837
975
|
|
|
838
976
|
|
|
839
977
|
def SetKvmProtectedDetach(self, request):
|
|
@@ -843,7 +981,7 @@ class KecClient(AbstractClient):
|
|
|
843
981
|
"""
|
|
844
982
|
try:
|
|
845
983
|
params = request._serialize()
|
|
846
|
-
body = self.
|
|
984
|
+
body = self.call_judge("SetKvmProtectedDetach", params, "application/x-www-form-urlencoded")
|
|
847
985
|
response = json.loads(body)
|
|
848
986
|
if "Error" not in response:
|
|
849
987
|
return body
|
|
@@ -856,7 +994,7 @@ class KecClient(AbstractClient):
|
|
|
856
994
|
if isinstance(e, KsyunSDKException):
|
|
857
995
|
raise
|
|
858
996
|
else:
|
|
859
|
-
raise KsyunSDKException(
|
|
997
|
+
raise KsyunSDKException(message=str(e))
|
|
860
998
|
|
|
861
999
|
|
|
862
1000
|
def DescribeScalingInstance(self, request):
|
|
@@ -866,7 +1004,7 @@ class KecClient(AbstractClient):
|
|
|
866
1004
|
"""
|
|
867
1005
|
try:
|
|
868
1006
|
params = request._serialize()
|
|
869
|
-
body = self.
|
|
1007
|
+
body = self.call_judge("DescribeScalingInstance", params, "application/x-www-form-urlencoded")
|
|
870
1008
|
response = json.loads(body)
|
|
871
1009
|
if "Error" not in response:
|
|
872
1010
|
return body
|
|
@@ -879,7 +1017,7 @@ class KecClient(AbstractClient):
|
|
|
879
1017
|
if isinstance(e, KsyunSDKException):
|
|
880
1018
|
raise
|
|
881
1019
|
else:
|
|
882
|
-
raise KsyunSDKException(
|
|
1020
|
+
raise KsyunSDKException(message=str(e))
|
|
883
1021
|
|
|
884
1022
|
|
|
885
1023
|
def AttachInstance(self, request):
|
|
@@ -889,7 +1027,7 @@ class KecClient(AbstractClient):
|
|
|
889
1027
|
"""
|
|
890
1028
|
try:
|
|
891
1029
|
params = request._serialize()
|
|
892
|
-
body = self.
|
|
1030
|
+
body = self.call_judge("AttachInstance", params, "application/x-www-form-urlencoded")
|
|
893
1031
|
response = json.loads(body)
|
|
894
1032
|
if "Error" not in response:
|
|
895
1033
|
return body
|
|
@@ -902,7 +1040,7 @@ class KecClient(AbstractClient):
|
|
|
902
1040
|
if isinstance(e, KsyunSDKException):
|
|
903
1041
|
raise
|
|
904
1042
|
else:
|
|
905
|
-
raise KsyunSDKException(
|
|
1043
|
+
raise KsyunSDKException(message=str(e))
|
|
906
1044
|
|
|
907
1045
|
|
|
908
1046
|
def DetachInstance(self, request):
|
|
@@ -912,7 +1050,7 @@ class KecClient(AbstractClient):
|
|
|
912
1050
|
"""
|
|
913
1051
|
try:
|
|
914
1052
|
params = request._serialize()
|
|
915
|
-
body = self.
|
|
1053
|
+
body = self.call_judge("DetachInstance", params, "application/x-www-form-urlencoded")
|
|
916
1054
|
response = json.loads(body)
|
|
917
1055
|
if "Error" not in response:
|
|
918
1056
|
return body
|
|
@@ -925,7 +1063,7 @@ class KecClient(AbstractClient):
|
|
|
925
1063
|
if isinstance(e, KsyunSDKException):
|
|
926
1064
|
raise
|
|
927
1065
|
else:
|
|
928
|
-
raise KsyunSDKException(
|
|
1066
|
+
raise KsyunSDKException(message=str(e))
|
|
929
1067
|
|
|
930
1068
|
|
|
931
1069
|
def DescribeScalingActivity(self, request):
|
|
@@ -935,7 +1073,7 @@ class KecClient(AbstractClient):
|
|
|
935
1073
|
"""
|
|
936
1074
|
try:
|
|
937
1075
|
params = request._serialize()
|
|
938
|
-
body = self.
|
|
1076
|
+
body = self.call_judge("DescribeScalingActivity", params, "application/x-www-form-urlencoded")
|
|
939
1077
|
response = json.loads(body)
|
|
940
1078
|
if "Error" not in response:
|
|
941
1079
|
return body
|
|
@@ -948,7 +1086,7 @@ class KecClient(AbstractClient):
|
|
|
948
1086
|
if isinstance(e, KsyunSDKException):
|
|
949
1087
|
raise
|
|
950
1088
|
else:
|
|
951
|
-
raise KsyunSDKException(
|
|
1089
|
+
raise KsyunSDKException(message=str(e))
|
|
952
1090
|
|
|
953
1091
|
|
|
954
1092
|
def DeleteScalingGroup(self, request):
|
|
@@ -958,7 +1096,7 @@ class KecClient(AbstractClient):
|
|
|
958
1096
|
"""
|
|
959
1097
|
try:
|
|
960
1098
|
params = request._serialize()
|
|
961
|
-
body = self.
|
|
1099
|
+
body = self.call_judge("DeleteScalingGroup", params, "application/x-www-form-urlencoded")
|
|
962
1100
|
response = json.loads(body)
|
|
963
1101
|
if "Error" not in response:
|
|
964
1102
|
return body
|
|
@@ -971,7 +1109,7 @@ class KecClient(AbstractClient):
|
|
|
971
1109
|
if isinstance(e, KsyunSDKException):
|
|
972
1110
|
raise
|
|
973
1111
|
else:
|
|
974
|
-
raise KsyunSDKException(
|
|
1112
|
+
raise KsyunSDKException(message=str(e))
|
|
975
1113
|
|
|
976
1114
|
|
|
977
1115
|
def DisableScalingGroup(self, request):
|
|
@@ -981,7 +1119,7 @@ class KecClient(AbstractClient):
|
|
|
981
1119
|
"""
|
|
982
1120
|
try:
|
|
983
1121
|
params = request._serialize()
|
|
984
|
-
body = self.
|
|
1122
|
+
body = self.call_judge("DisableScalingGroup", params, "application/x-www-form-urlencoded")
|
|
985
1123
|
response = json.loads(body)
|
|
986
1124
|
if "Error" not in response:
|
|
987
1125
|
return body
|
|
@@ -994,7 +1132,7 @@ class KecClient(AbstractClient):
|
|
|
994
1132
|
if isinstance(e, KsyunSDKException):
|
|
995
1133
|
raise
|
|
996
1134
|
else:
|
|
997
|
-
raise KsyunSDKException(
|
|
1135
|
+
raise KsyunSDKException(message=str(e))
|
|
998
1136
|
|
|
999
1137
|
|
|
1000
1138
|
def EnableScalingGroup(self, request):
|
|
@@ -1004,7 +1142,7 @@ class KecClient(AbstractClient):
|
|
|
1004
1142
|
"""
|
|
1005
1143
|
try:
|
|
1006
1144
|
params = request._serialize()
|
|
1007
|
-
body = self.
|
|
1145
|
+
body = self.call_judge("EnableScalingGroup", params, "application/x-www-form-urlencoded")
|
|
1008
1146
|
response = json.loads(body)
|
|
1009
1147
|
if "Error" not in response:
|
|
1010
1148
|
return body
|
|
@@ -1017,7 +1155,7 @@ class KecClient(AbstractClient):
|
|
|
1017
1155
|
if isinstance(e, KsyunSDKException):
|
|
1018
1156
|
raise
|
|
1019
1157
|
else:
|
|
1020
|
-
raise KsyunSDKException(
|
|
1158
|
+
raise KsyunSDKException(message=str(e))
|
|
1021
1159
|
|
|
1022
1160
|
|
|
1023
1161
|
def DescribeScalingNotification(self, request):
|
|
@@ -1027,7 +1165,7 @@ class KecClient(AbstractClient):
|
|
|
1027
1165
|
"""
|
|
1028
1166
|
try:
|
|
1029
1167
|
params = request._serialize()
|
|
1030
|
-
body = self.
|
|
1168
|
+
body = self.call_judge("DescribeScalingNotification", params, "application/x-www-form-urlencoded")
|
|
1031
1169
|
response = json.loads(body)
|
|
1032
1170
|
if "Error" not in response:
|
|
1033
1171
|
return body
|
|
@@ -1040,7 +1178,7 @@ class KecClient(AbstractClient):
|
|
|
1040
1178
|
if isinstance(e, KsyunSDKException):
|
|
1041
1179
|
raise
|
|
1042
1180
|
else:
|
|
1043
|
-
raise KsyunSDKException(
|
|
1181
|
+
raise KsyunSDKException(message=str(e))
|
|
1044
1182
|
|
|
1045
1183
|
|
|
1046
1184
|
def CreateScalingNotification(self, request):
|
|
@@ -1050,7 +1188,7 @@ class KecClient(AbstractClient):
|
|
|
1050
1188
|
"""
|
|
1051
1189
|
try:
|
|
1052
1190
|
params = request._serialize()
|
|
1053
|
-
body = self.
|
|
1191
|
+
body = self.call_judge("CreateScalingNotification", params, "application/x-www-form-urlencoded")
|
|
1054
1192
|
response = json.loads(body)
|
|
1055
1193
|
if "Error" not in response:
|
|
1056
1194
|
return body
|
|
@@ -1063,7 +1201,7 @@ class KecClient(AbstractClient):
|
|
|
1063
1201
|
if isinstance(e, KsyunSDKException):
|
|
1064
1202
|
raise
|
|
1065
1203
|
else:
|
|
1066
|
-
raise KsyunSDKException(
|
|
1204
|
+
raise KsyunSDKException(message=str(e))
|
|
1067
1205
|
|
|
1068
1206
|
|
|
1069
1207
|
def ModifyScalingNotification(self, request):
|
|
@@ -1073,7 +1211,7 @@ class KecClient(AbstractClient):
|
|
|
1073
1211
|
"""
|
|
1074
1212
|
try:
|
|
1075
1213
|
params = request._serialize()
|
|
1076
|
-
body = self.
|
|
1214
|
+
body = self.call_judge("ModifyScalingNotification", params, "application/x-www-form-urlencoded")
|
|
1077
1215
|
response = json.loads(body)
|
|
1078
1216
|
if "Error" not in response:
|
|
1079
1217
|
return body
|
|
@@ -1086,7 +1224,7 @@ class KecClient(AbstractClient):
|
|
|
1086
1224
|
if isinstance(e, KsyunSDKException):
|
|
1087
1225
|
raise
|
|
1088
1226
|
else:
|
|
1089
|
-
raise KsyunSDKException(
|
|
1227
|
+
raise KsyunSDKException(message=str(e))
|
|
1090
1228
|
|
|
1091
1229
|
|
|
1092
1230
|
def CreateScheduledTask(self, request):
|
|
@@ -1096,7 +1234,7 @@ class KecClient(AbstractClient):
|
|
|
1096
1234
|
"""
|
|
1097
1235
|
try:
|
|
1098
1236
|
params = request._serialize()
|
|
1099
|
-
body = self.
|
|
1237
|
+
body = self.call_judge("CreateScheduledTask", params, "application/x-www-form-urlencoded")
|
|
1100
1238
|
response = json.loads(body)
|
|
1101
1239
|
if "Error" not in response:
|
|
1102
1240
|
return body
|
|
@@ -1109,7 +1247,7 @@ class KecClient(AbstractClient):
|
|
|
1109
1247
|
if isinstance(e, KsyunSDKException):
|
|
1110
1248
|
raise
|
|
1111
1249
|
else:
|
|
1112
|
-
raise KsyunSDKException(
|
|
1250
|
+
raise KsyunSDKException(message=str(e))
|
|
1113
1251
|
|
|
1114
1252
|
|
|
1115
1253
|
def DescribeScheduledTask(self, request):
|
|
@@ -1119,7 +1257,7 @@ class KecClient(AbstractClient):
|
|
|
1119
1257
|
"""
|
|
1120
1258
|
try:
|
|
1121
1259
|
params = request._serialize()
|
|
1122
|
-
body = self.
|
|
1260
|
+
body = self.call_judge("DescribeScheduledTask", params, "application/x-www-form-urlencoded")
|
|
1123
1261
|
response = json.loads(body)
|
|
1124
1262
|
if "Error" not in response:
|
|
1125
1263
|
return body
|
|
@@ -1132,7 +1270,7 @@ class KecClient(AbstractClient):
|
|
|
1132
1270
|
if isinstance(e, KsyunSDKException):
|
|
1133
1271
|
raise
|
|
1134
1272
|
else:
|
|
1135
|
-
raise KsyunSDKException(
|
|
1273
|
+
raise KsyunSDKException(message=str(e))
|
|
1136
1274
|
|
|
1137
1275
|
|
|
1138
1276
|
def ModifyScheduledTask(self, request):
|
|
@@ -1142,7 +1280,7 @@ class KecClient(AbstractClient):
|
|
|
1142
1280
|
"""
|
|
1143
1281
|
try:
|
|
1144
1282
|
params = request._serialize()
|
|
1145
|
-
body = self.
|
|
1283
|
+
body = self.call_judge("ModifyScheduledTask", params, "application/x-www-form-urlencoded")
|
|
1146
1284
|
response = json.loads(body)
|
|
1147
1285
|
if "Error" not in response:
|
|
1148
1286
|
return body
|
|
@@ -1155,7 +1293,7 @@ class KecClient(AbstractClient):
|
|
|
1155
1293
|
if isinstance(e, KsyunSDKException):
|
|
1156
1294
|
raise
|
|
1157
1295
|
else:
|
|
1158
|
-
raise KsyunSDKException(
|
|
1296
|
+
raise KsyunSDKException(message=str(e))
|
|
1159
1297
|
|
|
1160
1298
|
|
|
1161
1299
|
def DeleteScheduledTask(self, request):
|
|
@@ -1165,7 +1303,7 @@ class KecClient(AbstractClient):
|
|
|
1165
1303
|
"""
|
|
1166
1304
|
try:
|
|
1167
1305
|
params = request._serialize()
|
|
1168
|
-
body = self.
|
|
1306
|
+
body = self.call_judge("DeleteScheduledTask", params, "application/x-www-form-urlencoded")
|
|
1169
1307
|
response = json.loads(body)
|
|
1170
1308
|
if "Error" not in response:
|
|
1171
1309
|
return body
|
|
@@ -1178,17 +1316,17 @@ class KecClient(AbstractClient):
|
|
|
1178
1316
|
if isinstance(e, KsyunSDKException):
|
|
1179
1317
|
raise
|
|
1180
1318
|
else:
|
|
1181
|
-
raise KsyunSDKException(
|
|
1319
|
+
raise KsyunSDKException(message=str(e))
|
|
1182
1320
|
|
|
1183
1321
|
|
|
1184
1322
|
def CreateScalingPolicy(self, request):
|
|
1185
|
-
"""
|
|
1323
|
+
"""创建自定义策略
|
|
1186
1324
|
:param request: Request instance for CreateScalingPolicy.
|
|
1187
1325
|
:type request: :class:`ksyun.client.kec.v20160304.models.CreateScalingPolicyRequest`
|
|
1188
1326
|
"""
|
|
1189
1327
|
try:
|
|
1190
1328
|
params = request._serialize()
|
|
1191
|
-
body = self.
|
|
1329
|
+
body = self.call_judge("CreateScalingPolicy", params, "application/x-www-form-urlencoded")
|
|
1192
1330
|
response = json.loads(body)
|
|
1193
1331
|
if "Error" not in response:
|
|
1194
1332
|
return body
|
|
@@ -1201,17 +1339,17 @@ class KecClient(AbstractClient):
|
|
|
1201
1339
|
if isinstance(e, KsyunSDKException):
|
|
1202
1340
|
raise
|
|
1203
1341
|
else:
|
|
1204
|
-
raise KsyunSDKException(
|
|
1342
|
+
raise KsyunSDKException(message=str(e))
|
|
1205
1343
|
|
|
1206
1344
|
|
|
1207
1345
|
def DescribeScalingPolicy(self, request):
|
|
1208
|
-
"""
|
|
1346
|
+
"""查询自定义策略
|
|
1209
1347
|
:param request: Request instance for DescribeScalingPolicy.
|
|
1210
1348
|
:type request: :class:`ksyun.client.kec.v20160304.models.DescribeScalingPolicyRequest`
|
|
1211
1349
|
"""
|
|
1212
1350
|
try:
|
|
1213
1351
|
params = request._serialize()
|
|
1214
|
-
body = self.
|
|
1352
|
+
body = self.call_judge("DescribeScalingPolicy", params, "application/x-www-form-urlencoded")
|
|
1215
1353
|
response = json.loads(body)
|
|
1216
1354
|
if "Error" not in response:
|
|
1217
1355
|
return body
|
|
@@ -1224,17 +1362,17 @@ class KecClient(AbstractClient):
|
|
|
1224
1362
|
if isinstance(e, KsyunSDKException):
|
|
1225
1363
|
raise
|
|
1226
1364
|
else:
|
|
1227
|
-
raise KsyunSDKException(
|
|
1365
|
+
raise KsyunSDKException(message=str(e))
|
|
1228
1366
|
|
|
1229
1367
|
|
|
1230
1368
|
def ModifyScalingPolicy(self, request):
|
|
1231
|
-
"""
|
|
1369
|
+
"""修改自定义策略
|
|
1232
1370
|
:param request: Request instance for ModifyScalingPolicy.
|
|
1233
1371
|
:type request: :class:`ksyun.client.kec.v20160304.models.ModifyScalingPolicyRequest`
|
|
1234
1372
|
"""
|
|
1235
1373
|
try:
|
|
1236
1374
|
params = request._serialize()
|
|
1237
|
-
body = self.
|
|
1375
|
+
body = self.call_judge("ModifyScalingPolicy", params, "application/x-www-form-urlencoded")
|
|
1238
1376
|
response = json.loads(body)
|
|
1239
1377
|
if "Error" not in response:
|
|
1240
1378
|
return body
|
|
@@ -1247,17 +1385,17 @@ class KecClient(AbstractClient):
|
|
|
1247
1385
|
if isinstance(e, KsyunSDKException):
|
|
1248
1386
|
raise
|
|
1249
1387
|
else:
|
|
1250
|
-
raise KsyunSDKException(
|
|
1388
|
+
raise KsyunSDKException(message=str(e))
|
|
1251
1389
|
|
|
1252
1390
|
|
|
1253
1391
|
def DeleteScalingPolicy(self, request):
|
|
1254
|
-
"""
|
|
1392
|
+
"""删除自定义策略
|
|
1255
1393
|
:param request: Request instance for DeleteScalingPolicy.
|
|
1256
1394
|
:type request: :class:`ksyun.client.kec.v20160304.models.DeleteScalingPolicyRequest`
|
|
1257
1395
|
"""
|
|
1258
1396
|
try:
|
|
1259
1397
|
params = request._serialize()
|
|
1260
|
-
body = self.
|
|
1398
|
+
body = self.call_judge("DeleteScalingPolicy", params, "application/x-www-form-urlencoded")
|
|
1261
1399
|
response = json.loads(body)
|
|
1262
1400
|
if "Error" not in response:
|
|
1263
1401
|
return body
|
|
@@ -1270,17 +1408,17 @@ class KecClient(AbstractClient):
|
|
|
1270
1408
|
if isinstance(e, KsyunSDKException):
|
|
1271
1409
|
raise
|
|
1272
1410
|
else:
|
|
1273
|
-
raise KsyunSDKException(
|
|
1411
|
+
raise KsyunSDKException(message=str(e))
|
|
1274
1412
|
|
|
1275
1413
|
|
|
1276
1414
|
def ImportImage(self, request):
|
|
1277
|
-
"""
|
|
1415
|
+
"""镜像导入接口
|
|
1278
1416
|
:param request: Request instance for ImportImage.
|
|
1279
1417
|
:type request: :class:`ksyun.client.kec.v20160304.models.ImportImageRequest`
|
|
1280
1418
|
"""
|
|
1281
1419
|
try:
|
|
1282
1420
|
params = request._serialize()
|
|
1283
|
-
body = self.
|
|
1421
|
+
body = self.call_judge("ImportImage", params, "application/x-www-form-urlencoded")
|
|
1284
1422
|
response = json.loads(body)
|
|
1285
1423
|
if "Error" not in response:
|
|
1286
1424
|
return body
|
|
@@ -1293,17 +1431,17 @@ class KecClient(AbstractClient):
|
|
|
1293
1431
|
if isinstance(e, KsyunSDKException):
|
|
1294
1432
|
raise
|
|
1295
1433
|
else:
|
|
1296
|
-
raise KsyunSDKException(
|
|
1434
|
+
raise KsyunSDKException(message=str(e))
|
|
1297
1435
|
|
|
1298
1436
|
|
|
1299
1437
|
def CopyImage(self, request):
|
|
1300
|
-
"""
|
|
1438
|
+
"""镜像复制接口
|
|
1301
1439
|
:param request: Request instance for CopyImage.
|
|
1302
1440
|
:type request: :class:`ksyun.client.kec.v20160304.models.CopyImageRequest`
|
|
1303
1441
|
"""
|
|
1304
1442
|
try:
|
|
1305
1443
|
params = request._serialize()
|
|
1306
|
-
body = self.
|
|
1444
|
+
body = self.call_judge("CopyImage", params, "application/x-www-form-urlencoded")
|
|
1307
1445
|
response = json.loads(body)
|
|
1308
1446
|
if "Error" not in response:
|
|
1309
1447
|
return body
|
|
@@ -1316,7 +1454,7 @@ class KecClient(AbstractClient):
|
|
|
1316
1454
|
if isinstance(e, KsyunSDKException):
|
|
1317
1455
|
raise
|
|
1318
1456
|
else:
|
|
1319
|
-
raise KsyunSDKException(
|
|
1457
|
+
raise KsyunSDKException(message=str(e))
|
|
1320
1458
|
|
|
1321
1459
|
|
|
1322
1460
|
def ModifyImageSharePermission(self, request):
|
|
@@ -1326,7 +1464,7 @@ class KecClient(AbstractClient):
|
|
|
1326
1464
|
"""
|
|
1327
1465
|
try:
|
|
1328
1466
|
params = request._serialize()
|
|
1329
|
-
body = self.
|
|
1467
|
+
body = self.call_judge("ModifyImageSharePermission", params, "application/x-www-form-urlencoded")
|
|
1330
1468
|
response = json.loads(body)
|
|
1331
1469
|
if "Error" not in response:
|
|
1332
1470
|
return body
|
|
@@ -1339,7 +1477,7 @@ class KecClient(AbstractClient):
|
|
|
1339
1477
|
if isinstance(e, KsyunSDKException):
|
|
1340
1478
|
raise
|
|
1341
1479
|
else:
|
|
1342
|
-
raise KsyunSDKException(
|
|
1480
|
+
raise KsyunSDKException(message=str(e))
|
|
1343
1481
|
|
|
1344
1482
|
|
|
1345
1483
|
def DescribeImageSharePermission(self, request):
|
|
@@ -1349,7 +1487,7 @@ class KecClient(AbstractClient):
|
|
|
1349
1487
|
"""
|
|
1350
1488
|
try:
|
|
1351
1489
|
params = request._serialize()
|
|
1352
|
-
body = self.
|
|
1490
|
+
body = self.call_judge("DescribeImageSharePermission", params, "application/x-www-form-urlencoded")
|
|
1353
1491
|
response = json.loads(body)
|
|
1354
1492
|
if "Error" not in response:
|
|
1355
1493
|
return body
|
|
@@ -1362,7 +1500,7 @@ class KecClient(AbstractClient):
|
|
|
1362
1500
|
if isinstance(e, KsyunSDKException):
|
|
1363
1501
|
raise
|
|
1364
1502
|
else:
|
|
1365
|
-
raise KsyunSDKException(
|
|
1503
|
+
raise KsyunSDKException(message=str(e))
|
|
1366
1504
|
|
|
1367
1505
|
|
|
1368
1506
|
def DescribeRegions(self, request):
|
|
@@ -1372,7 +1510,7 @@ class KecClient(AbstractClient):
|
|
|
1372
1510
|
"""
|
|
1373
1511
|
try:
|
|
1374
1512
|
params = request._serialize()
|
|
1375
|
-
body = self.
|
|
1513
|
+
body = self.call_judge("DescribeRegions", params, "application/x-www-form-urlencoded")
|
|
1376
1514
|
response = json.loads(body)
|
|
1377
1515
|
if "Error" not in response:
|
|
1378
1516
|
return body
|
|
@@ -1385,7 +1523,7 @@ class KecClient(AbstractClient):
|
|
|
1385
1523
|
if isinstance(e, KsyunSDKException):
|
|
1386
1524
|
raise
|
|
1387
1525
|
else:
|
|
1388
|
-
raise KsyunSDKException(
|
|
1526
|
+
raise KsyunSDKException(message=str(e))
|
|
1389
1527
|
|
|
1390
1528
|
|
|
1391
1529
|
def AttachKey(self, request):
|
|
@@ -1395,7 +1533,7 @@ class KecClient(AbstractClient):
|
|
|
1395
1533
|
"""
|
|
1396
1534
|
try:
|
|
1397
1535
|
params = request._serialize()
|
|
1398
|
-
body = self.
|
|
1536
|
+
body = self.call_judge("AttachKey", params, "application/x-www-form-urlencoded")
|
|
1399
1537
|
response = json.loads(body)
|
|
1400
1538
|
if "Error" not in response:
|
|
1401
1539
|
return body
|
|
@@ -1408,7 +1546,7 @@ class KecClient(AbstractClient):
|
|
|
1408
1546
|
if isinstance(e, KsyunSDKException):
|
|
1409
1547
|
raise
|
|
1410
1548
|
else:
|
|
1411
|
-
raise KsyunSDKException(
|
|
1549
|
+
raise KsyunSDKException(message=str(e))
|
|
1412
1550
|
|
|
1413
1551
|
|
|
1414
1552
|
def DetachKey(self, request):
|
|
@@ -1418,7 +1556,7 @@ class KecClient(AbstractClient):
|
|
|
1418
1556
|
"""
|
|
1419
1557
|
try:
|
|
1420
1558
|
params = request._serialize()
|
|
1421
|
-
body = self.
|
|
1559
|
+
body = self.call_judge("DetachKey", params, "application/x-www-form-urlencoded")
|
|
1422
1560
|
response = json.loads(body)
|
|
1423
1561
|
if "Error" not in response:
|
|
1424
1562
|
return body
|
|
@@ -1431,7 +1569,7 @@ class KecClient(AbstractClient):
|
|
|
1431
1569
|
if isinstance(e, KsyunSDKException):
|
|
1432
1570
|
raise
|
|
1433
1571
|
else:
|
|
1434
|
-
raise KsyunSDKException(
|
|
1572
|
+
raise KsyunSDKException(message=str(e))
|
|
1435
1573
|
|
|
1436
1574
|
|
|
1437
1575
|
def DescribeAvailabilityZones(self, request):
|
|
@@ -1441,7 +1579,7 @@ class KecClient(AbstractClient):
|
|
|
1441
1579
|
"""
|
|
1442
1580
|
try:
|
|
1443
1581
|
params = request._serialize()
|
|
1444
|
-
body = self.
|
|
1582
|
+
body = self.call_judge("DescribeAvailabilityZones", params, "application/x-www-form-urlencoded")
|
|
1445
1583
|
response = json.loads(body)
|
|
1446
1584
|
if "Error" not in response:
|
|
1447
1585
|
return body
|
|
@@ -1454,7 +1592,7 @@ class KecClient(AbstractClient):
|
|
|
1454
1592
|
if isinstance(e, KsyunSDKException):
|
|
1455
1593
|
raise
|
|
1456
1594
|
else:
|
|
1457
|
-
raise KsyunSDKException(
|
|
1595
|
+
raise KsyunSDKException(message=str(e))
|
|
1458
1596
|
|
|
1459
1597
|
|
|
1460
1598
|
def DescribeInstanceTypeConfigs(self, request):
|
|
@@ -1464,7 +1602,7 @@ class KecClient(AbstractClient):
|
|
|
1464
1602
|
"""
|
|
1465
1603
|
try:
|
|
1466
1604
|
params = request._serialize()
|
|
1467
|
-
body = self.
|
|
1605
|
+
body = self.call_judge("DescribeInstanceTypeConfigs", params, "application/x-www-form-urlencoded")
|
|
1468
1606
|
response = json.loads(body)
|
|
1469
1607
|
if "Error" not in response:
|
|
1470
1608
|
return body
|
|
@@ -1477,7 +1615,7 @@ class KecClient(AbstractClient):
|
|
|
1477
1615
|
if isinstance(e, KsyunSDKException):
|
|
1478
1616
|
raise
|
|
1479
1617
|
else:
|
|
1480
|
-
raise KsyunSDKException(
|
|
1618
|
+
raise KsyunSDKException(message=str(e))
|
|
1481
1619
|
|
|
1482
1620
|
|
|
1483
1621
|
def DescribeInstanceFamilys(self, request):
|
|
@@ -1487,7 +1625,7 @@ class KecClient(AbstractClient):
|
|
|
1487
1625
|
"""
|
|
1488
1626
|
try:
|
|
1489
1627
|
params = request._serialize()
|
|
1490
|
-
body = self.
|
|
1628
|
+
body = self.call_judge("DescribeInstanceFamilys", params, "application/x-www-form-urlencoded")
|
|
1491
1629
|
response = json.loads(body)
|
|
1492
1630
|
if "Error" not in response:
|
|
1493
1631
|
return body
|
|
@@ -1500,7 +1638,7 @@ class KecClient(AbstractClient):
|
|
|
1500
1638
|
if isinstance(e, KsyunSDKException):
|
|
1501
1639
|
raise
|
|
1502
1640
|
else:
|
|
1503
|
-
raise KsyunSDKException(
|
|
1641
|
+
raise KsyunSDKException(message=str(e))
|
|
1504
1642
|
|
|
1505
1643
|
|
|
1506
1644
|
def AddVmIntoDataGuard(self, request):
|
|
@@ -1510,7 +1648,7 @@ class KecClient(AbstractClient):
|
|
|
1510
1648
|
"""
|
|
1511
1649
|
try:
|
|
1512
1650
|
params = request._serialize()
|
|
1513
|
-
body = self.
|
|
1651
|
+
body = self.call_judge("AddVmIntoDataGuard", params, "application/x-www-form-urlencoded")
|
|
1514
1652
|
response = json.loads(body)
|
|
1515
1653
|
if "Error" not in response:
|
|
1516
1654
|
return body
|
|
@@ -1523,7 +1661,7 @@ class KecClient(AbstractClient):
|
|
|
1523
1661
|
if isinstance(e, KsyunSDKException):
|
|
1524
1662
|
raise
|
|
1525
1663
|
else:
|
|
1526
|
-
raise KsyunSDKException(
|
|
1664
|
+
raise KsyunSDKException(message=str(e))
|
|
1527
1665
|
|
|
1528
1666
|
|
|
1529
1667
|
def CreateFileSystem(self, request):
|
|
@@ -1533,7 +1671,7 @@ class KecClient(AbstractClient):
|
|
|
1533
1671
|
"""
|
|
1534
1672
|
try:
|
|
1535
1673
|
params = request._serialize()
|
|
1536
|
-
body = self.
|
|
1674
|
+
body = self.call_judge("CreateFileSystem", params, "application/x-www-form-urlencoded")
|
|
1537
1675
|
response = json.loads(body)
|
|
1538
1676
|
if "Error" not in response:
|
|
1539
1677
|
return body
|
|
@@ -1546,7 +1684,7 @@ class KecClient(AbstractClient):
|
|
|
1546
1684
|
if isinstance(e, KsyunSDKException):
|
|
1547
1685
|
raise
|
|
1548
1686
|
else:
|
|
1549
|
-
raise KsyunSDKException(
|
|
1687
|
+
raise KsyunSDKException(message=str(e))
|
|
1550
1688
|
|
|
1551
1689
|
|
|
1552
1690
|
def DeleteFileSystem(self, request):
|
|
@@ -1556,7 +1694,7 @@ class KecClient(AbstractClient):
|
|
|
1556
1694
|
"""
|
|
1557
1695
|
try:
|
|
1558
1696
|
params = request._serialize()
|
|
1559
|
-
body = self.
|
|
1697
|
+
body = self.call_judge("DeleteFileSystem", params, "application/x-www-form-urlencoded")
|
|
1560
1698
|
response = json.loads(body)
|
|
1561
1699
|
if "Error" not in response:
|
|
1562
1700
|
return body
|
|
@@ -1569,7 +1707,7 @@ class KecClient(AbstractClient):
|
|
|
1569
1707
|
if isinstance(e, KsyunSDKException):
|
|
1570
1708
|
raise
|
|
1571
1709
|
else:
|
|
1572
|
-
raise KsyunSDKException(
|
|
1710
|
+
raise KsyunSDKException(message=str(e))
|
|
1573
1711
|
|
|
1574
1712
|
|
|
1575
1713
|
def DescribeFileSystems(self, request):
|
|
@@ -1579,7 +1717,7 @@ class KecClient(AbstractClient):
|
|
|
1579
1717
|
"""
|
|
1580
1718
|
try:
|
|
1581
1719
|
params = request._serialize()
|
|
1582
|
-
body = self.
|
|
1720
|
+
body = self.call_judge("DescribeFileSystems", params, "application/x-www-form-urlencoded")
|
|
1583
1721
|
response = json.loads(body)
|
|
1584
1722
|
if "Error" not in response:
|
|
1585
1723
|
return body
|
|
@@ -1592,7 +1730,7 @@ class KecClient(AbstractClient):
|
|
|
1592
1730
|
if isinstance(e, KsyunSDKException):
|
|
1593
1731
|
raise
|
|
1594
1732
|
else:
|
|
1595
|
-
raise KsyunSDKException(
|
|
1733
|
+
raise KsyunSDKException(message=str(e))
|
|
1596
1734
|
|
|
1597
1735
|
|
|
1598
1736
|
def ModifyFileSystem(self, request):
|
|
@@ -1602,7 +1740,7 @@ class KecClient(AbstractClient):
|
|
|
1602
1740
|
"""
|
|
1603
1741
|
try:
|
|
1604
1742
|
params = request._serialize()
|
|
1605
|
-
body = self.
|
|
1743
|
+
body = self.call_judge("ModifyFileSystem", params, "application/x-www-form-urlencoded")
|
|
1606
1744
|
response = json.loads(body)
|
|
1607
1745
|
if "Error" not in response:
|
|
1608
1746
|
return body
|
|
@@ -1615,7 +1753,7 @@ class KecClient(AbstractClient):
|
|
|
1615
1753
|
if isinstance(e, KsyunSDKException):
|
|
1616
1754
|
raise
|
|
1617
1755
|
else:
|
|
1618
|
-
raise KsyunSDKException(
|
|
1756
|
+
raise KsyunSDKException(message=str(e))
|
|
1619
1757
|
|
|
1620
1758
|
|
|
1621
1759
|
def CreateMountTarget(self, request):
|
|
@@ -1625,7 +1763,7 @@ class KecClient(AbstractClient):
|
|
|
1625
1763
|
"""
|
|
1626
1764
|
try:
|
|
1627
1765
|
params = request._serialize()
|
|
1628
|
-
body = self.
|
|
1766
|
+
body = self.call_judge("CreateMountTarget", params, "application/x-www-form-urlencoded")
|
|
1629
1767
|
response = json.loads(body)
|
|
1630
1768
|
if "Error" not in response:
|
|
1631
1769
|
return body
|
|
@@ -1638,7 +1776,7 @@ class KecClient(AbstractClient):
|
|
|
1638
1776
|
if isinstance(e, KsyunSDKException):
|
|
1639
1777
|
raise
|
|
1640
1778
|
else:
|
|
1641
|
-
raise KsyunSDKException(
|
|
1779
|
+
raise KsyunSDKException(message=str(e))
|
|
1642
1780
|
|
|
1643
1781
|
|
|
1644
1782
|
def DeleteMountTarget(self, request):
|
|
@@ -1648,7 +1786,7 @@ class KecClient(AbstractClient):
|
|
|
1648
1786
|
"""
|
|
1649
1787
|
try:
|
|
1650
1788
|
params = request._serialize()
|
|
1651
|
-
body = self.
|
|
1789
|
+
body = self.call_judge("DeleteMountTarget", params, "application/x-www-form-urlencoded")
|
|
1652
1790
|
response = json.loads(body)
|
|
1653
1791
|
if "Error" not in response:
|
|
1654
1792
|
return body
|
|
@@ -1661,7 +1799,7 @@ class KecClient(AbstractClient):
|
|
|
1661
1799
|
if isinstance(e, KsyunSDKException):
|
|
1662
1800
|
raise
|
|
1663
1801
|
else:
|
|
1664
|
-
raise KsyunSDKException(
|
|
1802
|
+
raise KsyunSDKException(message=str(e))
|
|
1665
1803
|
|
|
1666
1804
|
|
|
1667
1805
|
def DescribeMountTargets(self, request):
|
|
@@ -1671,7 +1809,7 @@ class KecClient(AbstractClient):
|
|
|
1671
1809
|
"""
|
|
1672
1810
|
try:
|
|
1673
1811
|
params = request._serialize()
|
|
1674
|
-
body = self.
|
|
1812
|
+
body = self.call_judge("DescribeMountTargets", params, "application/x-www-form-urlencoded")
|
|
1675
1813
|
response = json.loads(body)
|
|
1676
1814
|
if "Error" not in response:
|
|
1677
1815
|
return body
|
|
@@ -1684,7 +1822,7 @@ class KecClient(AbstractClient):
|
|
|
1684
1822
|
if isinstance(e, KsyunSDKException):
|
|
1685
1823
|
raise
|
|
1686
1824
|
else:
|
|
1687
|
-
raise KsyunSDKException(
|
|
1825
|
+
raise KsyunSDKException(message=str(e))
|
|
1688
1826
|
|
|
1689
1827
|
|
|
1690
1828
|
def CreateModel(self, request):
|
|
@@ -1694,7 +1832,7 @@ class KecClient(AbstractClient):
|
|
|
1694
1832
|
"""
|
|
1695
1833
|
try:
|
|
1696
1834
|
params = request._serialize()
|
|
1697
|
-
body = self.
|
|
1835
|
+
body = self.call_judge("CreateModel", params, "application/x-www-form-urlencoded")
|
|
1698
1836
|
response = json.loads(body)
|
|
1699
1837
|
if "Error" not in response:
|
|
1700
1838
|
return body
|
|
@@ -1707,7 +1845,7 @@ class KecClient(AbstractClient):
|
|
|
1707
1845
|
if isinstance(e, KsyunSDKException):
|
|
1708
1846
|
raise
|
|
1709
1847
|
else:
|
|
1710
|
-
raise KsyunSDKException(
|
|
1848
|
+
raise KsyunSDKException(message=str(e))
|
|
1711
1849
|
|
|
1712
1850
|
|
|
1713
1851
|
def TerminateModels(self, request):
|
|
@@ -1717,7 +1855,7 @@ class KecClient(AbstractClient):
|
|
|
1717
1855
|
"""
|
|
1718
1856
|
try:
|
|
1719
1857
|
params = request._serialize()
|
|
1720
|
-
body = self.
|
|
1858
|
+
body = self.call_judge("TerminateModels", params, "application/x-www-form-urlencoded")
|
|
1721
1859
|
response = json.loads(body)
|
|
1722
1860
|
if "Error" not in response:
|
|
1723
1861
|
return body
|
|
@@ -1730,7 +1868,7 @@ class KecClient(AbstractClient):
|
|
|
1730
1868
|
if isinstance(e, KsyunSDKException):
|
|
1731
1869
|
raise
|
|
1732
1870
|
else:
|
|
1733
|
-
raise KsyunSDKException(
|
|
1871
|
+
raise KsyunSDKException(message=str(e))
|
|
1734
1872
|
|
|
1735
1873
|
|
|
1736
1874
|
def DescribeModels(self, request):
|
|
@@ -1740,7 +1878,7 @@ class KecClient(AbstractClient):
|
|
|
1740
1878
|
"""
|
|
1741
1879
|
try:
|
|
1742
1880
|
params = request._serialize()
|
|
1743
|
-
body = self.
|
|
1881
|
+
body = self.call_judge("DescribeModels", params, "application/x-www-form-urlencoded")
|
|
1744
1882
|
response = json.loads(body)
|
|
1745
1883
|
if "Error" not in response:
|
|
1746
1884
|
return body
|
|
@@ -1753,7 +1891,7 @@ class KecClient(AbstractClient):
|
|
|
1753
1891
|
if isinstance(e, KsyunSDKException):
|
|
1754
1892
|
raise
|
|
1755
1893
|
else:
|
|
1756
|
-
raise KsyunSDKException(
|
|
1894
|
+
raise KsyunSDKException(message=str(e))
|
|
1757
1895
|
|
|
1758
1896
|
|
|
1759
1897
|
def DescribeDedicatedCluster(self, request):
|
|
@@ -1763,7 +1901,7 @@ class KecClient(AbstractClient):
|
|
|
1763
1901
|
"""
|
|
1764
1902
|
try:
|
|
1765
1903
|
params = request._serialize()
|
|
1766
|
-
body = self.
|
|
1904
|
+
body = self.call_judge("DescribeDedicatedCluster", params, "application/x-www-form-urlencoded")
|
|
1767
1905
|
response = json.loads(body)
|
|
1768
1906
|
if "Error" not in response:
|
|
1769
1907
|
return body
|
|
@@ -1776,17 +1914,17 @@ class KecClient(AbstractClient):
|
|
|
1776
1914
|
if isinstance(e, KsyunSDKException):
|
|
1777
1915
|
raise
|
|
1778
1916
|
else:
|
|
1779
|
-
raise KsyunSDKException(
|
|
1917
|
+
raise KsyunSDKException(message=str(e))
|
|
1780
1918
|
|
|
1781
1919
|
|
|
1782
1920
|
def CreateDedicatedCluster(self, request):
|
|
1783
|
-
"""
|
|
1921
|
+
"""创建集群接口
|
|
1784
1922
|
:param request: Request instance for CreateDedicatedCluster.
|
|
1785
1923
|
:type request: :class:`ksyun.client.kec.v20160304.models.CreateDedicatedClusterRequest`
|
|
1786
1924
|
"""
|
|
1787
1925
|
try:
|
|
1788
1926
|
params = request._serialize()
|
|
1789
|
-
body = self.
|
|
1927
|
+
body = self.call_judge("CreateDedicatedCluster", params, "application/x-www-form-urlencoded")
|
|
1790
1928
|
response = json.loads(body)
|
|
1791
1929
|
if "Error" not in response:
|
|
1792
1930
|
return body
|
|
@@ -1799,17 +1937,17 @@ class KecClient(AbstractClient):
|
|
|
1799
1937
|
if isinstance(e, KsyunSDKException):
|
|
1800
1938
|
raise
|
|
1801
1939
|
else:
|
|
1802
|
-
raise KsyunSDKException(
|
|
1940
|
+
raise KsyunSDKException(message=str(e))
|
|
1803
1941
|
|
|
1804
1942
|
|
|
1805
1943
|
def DeleteDedicatedCluster(self, request):
|
|
1806
|
-
"""
|
|
1944
|
+
"""删除集群接口
|
|
1807
1945
|
:param request: Request instance for DeleteDedicatedCluster.
|
|
1808
1946
|
:type request: :class:`ksyun.client.kec.v20160304.models.DeleteDedicatedClusterRequest`
|
|
1809
1947
|
"""
|
|
1810
1948
|
try:
|
|
1811
1949
|
params = request._serialize()
|
|
1812
|
-
body = self.
|
|
1950
|
+
body = self.call_judge("DeleteDedicatedCluster", params, "application/x-www-form-urlencoded")
|
|
1813
1951
|
response = json.loads(body)
|
|
1814
1952
|
if "Error" not in response:
|
|
1815
1953
|
return body
|
|
@@ -1822,7 +1960,7 @@ class KecClient(AbstractClient):
|
|
|
1822
1960
|
if isinstance(e, KsyunSDKException):
|
|
1823
1961
|
raise
|
|
1824
1962
|
else:
|
|
1825
|
-
raise KsyunSDKException(
|
|
1963
|
+
raise KsyunSDKException(message=str(e))
|
|
1826
1964
|
|
|
1827
1965
|
|
|
1828
1966
|
def SetvCPU(self, request):
|
|
@@ -1832,7 +1970,7 @@ class KecClient(AbstractClient):
|
|
|
1832
1970
|
"""
|
|
1833
1971
|
try:
|
|
1834
1972
|
params = request._serialize()
|
|
1835
|
-
body = self.
|
|
1973
|
+
body = self.call_judge("SetvCPU", params, "application/x-www-form-urlencoded")
|
|
1836
1974
|
response = json.loads(body)
|
|
1837
1975
|
if "Error" not in response:
|
|
1838
1976
|
return body
|
|
@@ -1845,7 +1983,7 @@ class KecClient(AbstractClient):
|
|
|
1845
1983
|
if isinstance(e, KsyunSDKException):
|
|
1846
1984
|
raise
|
|
1847
1985
|
else:
|
|
1848
|
-
raise KsyunSDKException(
|
|
1986
|
+
raise KsyunSDKException(message=str(e))
|
|
1849
1987
|
|
|
1850
1988
|
|
|
1851
1989
|
def DedicatedHostMigrate(self, request):
|
|
@@ -1855,7 +1993,7 @@ class KecClient(AbstractClient):
|
|
|
1855
1993
|
"""
|
|
1856
1994
|
try:
|
|
1857
1995
|
params = request._serialize()
|
|
1858
|
-
body = self.
|
|
1996
|
+
body = self.call_judge("DedicatedHostMigrate", params, "application/x-www-form-urlencoded")
|
|
1859
1997
|
response = json.loads(body)
|
|
1860
1998
|
if "Error" not in response:
|
|
1861
1999
|
return body
|
|
@@ -1868,7 +2006,7 @@ class KecClient(AbstractClient):
|
|
|
1868
2006
|
if isinstance(e, KsyunSDKException):
|
|
1869
2007
|
raise
|
|
1870
2008
|
else:
|
|
1871
|
-
raise KsyunSDKException(
|
|
2009
|
+
raise KsyunSDKException(message=str(e))
|
|
1872
2010
|
|
|
1873
2011
|
|
|
1874
2012
|
def ModifyDedicatedClusterName(self, request):
|
|
@@ -1878,7 +2016,30 @@ class KecClient(AbstractClient):
|
|
|
1878
2016
|
"""
|
|
1879
2017
|
try:
|
|
1880
2018
|
params = request._serialize()
|
|
1881
|
-
body = self.
|
|
2019
|
+
body = self.call_judge("ModifyDedicatedClusterName", params, "application/x-www-form-urlencoded")
|
|
2020
|
+
response = json.loads(body)
|
|
2021
|
+
if "Error" not in response:
|
|
2022
|
+
return body
|
|
2023
|
+
else:
|
|
2024
|
+
code = response["Error"]["Code"]
|
|
2025
|
+
message = response["Error"]["Message"]
|
|
2026
|
+
req_id = response["RequestId"]
|
|
2027
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2028
|
+
except Exception as e:
|
|
2029
|
+
if isinstance(e, KsyunSDKException):
|
|
2030
|
+
raise
|
|
2031
|
+
else:
|
|
2032
|
+
raise KsyunSDKException(message=str(e))
|
|
2033
|
+
|
|
2034
|
+
|
|
2035
|
+
def InstanceMigrate(self, request):
|
|
2036
|
+
"""专属虚机迁移
|
|
2037
|
+
:param request: Request instance for InstanceMigrate.
|
|
2038
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.InstanceMigrateRequest`
|
|
2039
|
+
"""
|
|
2040
|
+
try:
|
|
2041
|
+
params = request._serialize()
|
|
2042
|
+
body = self.call_judge("InstanceMigrate", params, "application/x-www-form-urlencoded")
|
|
1882
2043
|
response = json.loads(body)
|
|
1883
2044
|
if "Error" not in response:
|
|
1884
2045
|
return body
|
|
@@ -1891,7 +2052,7 @@ class KecClient(AbstractClient):
|
|
|
1891
2052
|
if isinstance(e, KsyunSDKException):
|
|
1892
2053
|
raise
|
|
1893
2054
|
else:
|
|
1894
|
-
raise KsyunSDKException(
|
|
2055
|
+
raise KsyunSDKException(message=str(e))
|
|
1895
2056
|
|
|
1896
2057
|
|
|
1897
2058
|
def ModifyInstanceAutoDeleteTime(self, request):
|
|
@@ -1901,7 +2062,30 @@ class KecClient(AbstractClient):
|
|
|
1901
2062
|
"""
|
|
1902
2063
|
try:
|
|
1903
2064
|
params = request._serialize()
|
|
1904
|
-
body = self.
|
|
2065
|
+
body = self.call_judge("ModifyInstanceAutoDeleteTime", params, "application/x-www-form-urlencoded")
|
|
2066
|
+
response = json.loads(body)
|
|
2067
|
+
if "Error" not in response:
|
|
2068
|
+
return body
|
|
2069
|
+
else:
|
|
2070
|
+
code = response["Error"]["Code"]
|
|
2071
|
+
message = response["Error"]["Message"]
|
|
2072
|
+
req_id = response["RequestId"]
|
|
2073
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2074
|
+
except Exception as e:
|
|
2075
|
+
if isinstance(e, KsyunSDKException):
|
|
2076
|
+
raise
|
|
2077
|
+
else:
|
|
2078
|
+
raise KsyunSDKException(message=str(e))
|
|
2079
|
+
|
|
2080
|
+
|
|
2081
|
+
def DescribeKecInventory(self, request):
|
|
2082
|
+
"""查询云主机库存
|
|
2083
|
+
:param request: Request instance for DescribeKecInventory.
|
|
2084
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.DescribeKecInventoryRequest`
|
|
2085
|
+
"""
|
|
2086
|
+
try:
|
|
2087
|
+
params = request._serialize()
|
|
2088
|
+
body = self.call_judge("DescribeKecInventory", params, "application/x-www-form-urlencoded")
|
|
1905
2089
|
response = json.loads(body)
|
|
1906
2090
|
if "Error" not in response:
|
|
1907
2091
|
return body
|
|
@@ -1914,7 +2098,7 @@ class KecClient(AbstractClient):
|
|
|
1914
2098
|
if isinstance(e, KsyunSDKException):
|
|
1915
2099
|
raise
|
|
1916
2100
|
else:
|
|
1917
|
-
raise KsyunSDKException(
|
|
2101
|
+
raise KsyunSDKException(message=str(e))
|
|
1918
2102
|
|
|
1919
2103
|
|
|
1920
2104
|
def ModifyScalingConfiguration(self, request):
|
|
@@ -1924,7 +2108,7 @@ class KecClient(AbstractClient):
|
|
|
1924
2108
|
"""
|
|
1925
2109
|
try:
|
|
1926
2110
|
params = request._serialize()
|
|
1927
|
-
body = self.
|
|
2111
|
+
body = self.call_judge("ModifyScalingConfiguration", params, "application/x-www-form-urlencoded")
|
|
1928
2112
|
response = json.loads(body)
|
|
1929
2113
|
if "Error" not in response:
|
|
1930
2114
|
return body
|
|
@@ -1937,7 +2121,7 @@ class KecClient(AbstractClient):
|
|
|
1937
2121
|
if isinstance(e, KsyunSDKException):
|
|
1938
2122
|
raise
|
|
1939
2123
|
else:
|
|
1940
|
-
raise KsyunSDKException(
|
|
2124
|
+
raise KsyunSDKException(message=str(e))
|
|
1941
2125
|
|
|
1942
2126
|
|
|
1943
2127
|
def DescribeSpotPriceHistory(self, request):
|
|
@@ -1947,7 +2131,7 @@ class KecClient(AbstractClient):
|
|
|
1947
2131
|
"""
|
|
1948
2132
|
try:
|
|
1949
2133
|
params = request._serialize()
|
|
1950
|
-
body = self.
|
|
2134
|
+
body = self.call_judge("DescribeSpotPriceHistory", params, "application/x-www-form-urlencoded")
|
|
1951
2135
|
response = json.loads(body)
|
|
1952
2136
|
if "Error" not in response:
|
|
1953
2137
|
return body
|
|
@@ -1960,17 +2144,17 @@ class KecClient(AbstractClient):
|
|
|
1960
2144
|
if isinstance(e, KsyunSDKException):
|
|
1961
2145
|
raise
|
|
1962
2146
|
else:
|
|
1963
|
-
raise KsyunSDKException(
|
|
2147
|
+
raise KsyunSDKException(message=str(e))
|
|
1964
2148
|
|
|
1965
2149
|
|
|
1966
2150
|
def DescribePrice(self, request):
|
|
1967
|
-
"""
|
|
2151
|
+
"""查询实例价格
|
|
1968
2152
|
:param request: Request instance for DescribePrice.
|
|
1969
2153
|
:type request: :class:`ksyun.client.kec.v20160304.models.DescribePriceRequest`
|
|
1970
2154
|
"""
|
|
1971
2155
|
try:
|
|
1972
2156
|
params = request._serialize()
|
|
1973
|
-
body = self.
|
|
2157
|
+
body = self.call_judge("DescribePrice", params, "application/x-www-form-urlencoded")
|
|
1974
2158
|
response = json.loads(body)
|
|
1975
2159
|
if "Error" not in response:
|
|
1976
2160
|
return body
|
|
@@ -1983,7 +2167,7 @@ class KecClient(AbstractClient):
|
|
|
1983
2167
|
if isinstance(e, KsyunSDKException):
|
|
1984
2168
|
raise
|
|
1985
2169
|
else:
|
|
1986
|
-
raise KsyunSDKException(
|
|
2170
|
+
raise KsyunSDKException(message=str(e))
|
|
1987
2171
|
|
|
1988
2172
|
|
|
1989
2173
|
def EnableImageCaching(self, request):
|
|
@@ -1993,7 +2177,7 @@ class KecClient(AbstractClient):
|
|
|
1993
2177
|
"""
|
|
1994
2178
|
try:
|
|
1995
2179
|
params = request._serialize()
|
|
1996
|
-
body = self.
|
|
2180
|
+
body = self.call_judge("EnableImageCaching", params, "application/x-www-form-urlencoded")
|
|
1997
2181
|
response = json.loads(body)
|
|
1998
2182
|
if "Error" not in response:
|
|
1999
2183
|
return body
|
|
@@ -2006,7 +2190,7 @@ class KecClient(AbstractClient):
|
|
|
2006
2190
|
if isinstance(e, KsyunSDKException):
|
|
2007
2191
|
raise
|
|
2008
2192
|
else:
|
|
2009
|
-
raise KsyunSDKException(
|
|
2193
|
+
raise KsyunSDKException(message=str(e))
|
|
2010
2194
|
|
|
2011
2195
|
|
|
2012
2196
|
def DisableImageCaching(self, request):
|
|
@@ -2016,7 +2200,7 @@ class KecClient(AbstractClient):
|
|
|
2016
2200
|
"""
|
|
2017
2201
|
try:
|
|
2018
2202
|
params = request._serialize()
|
|
2019
|
-
body = self.
|
|
2203
|
+
body = self.call_judge("DisableImageCaching", params, "application/x-www-form-urlencoded")
|
|
2020
2204
|
response = json.loads(body)
|
|
2021
2205
|
if "Error" not in response:
|
|
2022
2206
|
return body
|
|
@@ -2029,7 +2213,7 @@ class KecClient(AbstractClient):
|
|
|
2029
2213
|
if isinstance(e, KsyunSDKException):
|
|
2030
2214
|
raise
|
|
2031
2215
|
else:
|
|
2032
|
-
raise KsyunSDKException(
|
|
2216
|
+
raise KsyunSDKException(message=str(e))
|
|
2033
2217
|
|
|
2034
2218
|
|
|
2035
2219
|
def ModifyLoadBalancers(self, request):
|
|
@@ -2039,7 +2223,7 @@ class KecClient(AbstractClient):
|
|
|
2039
2223
|
"""
|
|
2040
2224
|
try:
|
|
2041
2225
|
params = request._serialize()
|
|
2042
|
-
body = self.
|
|
2226
|
+
body = self.call_judge("ModifyLoadBalancers", params, "application/x-www-form-urlencoded")
|
|
2043
2227
|
response = json.loads(body)
|
|
2044
2228
|
if "Error" not in response:
|
|
2045
2229
|
return body
|
|
@@ -2052,7 +2236,7 @@ class KecClient(AbstractClient):
|
|
|
2052
2236
|
if isinstance(e, KsyunSDKException):
|
|
2053
2237
|
raise
|
|
2054
2238
|
else:
|
|
2055
|
-
raise KsyunSDKException(
|
|
2239
|
+
raise KsyunSDKException(message=str(e))
|
|
2056
2240
|
|
|
2057
2241
|
|
|
2058
2242
|
def AttachInstancesIamRole(self, request):
|
|
@@ -2062,7 +2246,7 @@ class KecClient(AbstractClient):
|
|
|
2062
2246
|
"""
|
|
2063
2247
|
try:
|
|
2064
2248
|
params = request._serialize()
|
|
2065
|
-
body = self.
|
|
2249
|
+
body = self.call_judge("AttachInstancesIamRole", params, "application/x-www-form-urlencoded")
|
|
2066
2250
|
response = json.loads(body)
|
|
2067
2251
|
if "Error" not in response:
|
|
2068
2252
|
return body
|
|
@@ -2075,7 +2259,7 @@ class KecClient(AbstractClient):
|
|
|
2075
2259
|
if isinstance(e, KsyunSDKException):
|
|
2076
2260
|
raise
|
|
2077
2261
|
else:
|
|
2078
|
-
raise KsyunSDKException(
|
|
2262
|
+
raise KsyunSDKException(message=str(e))
|
|
2079
2263
|
|
|
2080
2264
|
|
|
2081
2265
|
def DetachInstancesIamRole(self, request):
|
|
@@ -2085,7 +2269,30 @@ class KecClient(AbstractClient):
|
|
|
2085
2269
|
"""
|
|
2086
2270
|
try:
|
|
2087
2271
|
params = request._serialize()
|
|
2088
|
-
body = self.
|
|
2272
|
+
body = self.call_judge("DetachInstancesIamRole", params, "application/x-www-form-urlencoded")
|
|
2273
|
+
response = json.loads(body)
|
|
2274
|
+
if "Error" not in response:
|
|
2275
|
+
return body
|
|
2276
|
+
else:
|
|
2277
|
+
code = response["Error"]["Code"]
|
|
2278
|
+
message = response["Error"]["Message"]
|
|
2279
|
+
req_id = response["RequestId"]
|
|
2280
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2281
|
+
except Exception as e:
|
|
2282
|
+
if isinstance(e, KsyunSDKException):
|
|
2283
|
+
raise
|
|
2284
|
+
else:
|
|
2285
|
+
raise KsyunSDKException(message=str(e))
|
|
2286
|
+
|
|
2287
|
+
|
|
2288
|
+
def CopySnapshot(self, request):
|
|
2289
|
+
"""本地盘快照跨region复制
|
|
2290
|
+
:param request: Request instance for CopySnapshot.
|
|
2291
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.CopySnapshotRequest`
|
|
2292
|
+
"""
|
|
2293
|
+
try:
|
|
2294
|
+
params = request._serialize()
|
|
2295
|
+
body = self.call_judge("CopySnapshot", params, "application/x-www-form-urlencoded")
|
|
2089
2296
|
response = json.loads(body)
|
|
2090
2297
|
if "Error" not in response:
|
|
2091
2298
|
return body
|
|
@@ -2098,7 +2305,7 @@ class KecClient(AbstractClient):
|
|
|
2098
2305
|
if isinstance(e, KsyunSDKException):
|
|
2099
2306
|
raise
|
|
2100
2307
|
else:
|
|
2101
|
-
raise KsyunSDKException(
|
|
2308
|
+
raise KsyunSDKException(message=str(e))
|
|
2102
2309
|
|
|
2103
2310
|
|
|
2104
2311
|
def PreMigrateInstance(self, request):
|
|
@@ -2108,7 +2315,7 @@ class KecClient(AbstractClient):
|
|
|
2108
2315
|
"""
|
|
2109
2316
|
try:
|
|
2110
2317
|
params = request._serialize()
|
|
2111
|
-
body = self.
|
|
2318
|
+
body = self.call_judge("PreMigrateInstance", params, "application/x-www-form-urlencoded")
|
|
2112
2319
|
response = json.loads(body)
|
|
2113
2320
|
if "Error" not in response:
|
|
2114
2321
|
return body
|
|
@@ -2121,7 +2328,7 @@ class KecClient(AbstractClient):
|
|
|
2121
2328
|
if isinstance(e, KsyunSDKException):
|
|
2122
2329
|
raise
|
|
2123
2330
|
else:
|
|
2124
|
-
raise KsyunSDKException(
|
|
2331
|
+
raise KsyunSDKException(message=str(e))
|
|
2125
2332
|
|
|
2126
2333
|
|
|
2127
2334
|
def CancelPreMigrateInstance(self, request):
|
|
@@ -2131,7 +2338,53 @@ class KecClient(AbstractClient):
|
|
|
2131
2338
|
"""
|
|
2132
2339
|
try:
|
|
2133
2340
|
params = request._serialize()
|
|
2134
|
-
body = self.
|
|
2341
|
+
body = self.call_judge("CancelPreMigrateInstance", params, "application/x-www-form-urlencoded")
|
|
2342
|
+
response = json.loads(body)
|
|
2343
|
+
if "Error" not in response:
|
|
2344
|
+
return body
|
|
2345
|
+
else:
|
|
2346
|
+
code = response["Error"]["Code"]
|
|
2347
|
+
message = response["Error"]["Message"]
|
|
2348
|
+
req_id = response["RequestId"]
|
|
2349
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2350
|
+
except Exception as e:
|
|
2351
|
+
if isinstance(e, KsyunSDKException):
|
|
2352
|
+
raise
|
|
2353
|
+
else:
|
|
2354
|
+
raise KsyunSDKException(message=str(e))
|
|
2355
|
+
|
|
2356
|
+
|
|
2357
|
+
def SwitchImageType(self, request):
|
|
2358
|
+
"""镜像类型转换
|
|
2359
|
+
:param request: Request instance for SwitchImageType.
|
|
2360
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.SwitchImageTypeRequest`
|
|
2361
|
+
"""
|
|
2362
|
+
try:
|
|
2363
|
+
params = request._serialize()
|
|
2364
|
+
body = self.call_judge("SwitchImageType", params, "application/x-www-form-urlencoded")
|
|
2365
|
+
response = json.loads(body)
|
|
2366
|
+
if "Error" not in response:
|
|
2367
|
+
return body
|
|
2368
|
+
else:
|
|
2369
|
+
code = response["Error"]["Code"]
|
|
2370
|
+
message = response["Error"]["Message"]
|
|
2371
|
+
req_id = response["RequestId"]
|
|
2372
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2373
|
+
except Exception as e:
|
|
2374
|
+
if isinstance(e, KsyunSDKException):
|
|
2375
|
+
raise
|
|
2376
|
+
else:
|
|
2377
|
+
raise KsyunSDKException(message=str(e))
|
|
2378
|
+
|
|
2379
|
+
|
|
2380
|
+
def SetInstanceResourceProtect(self, request):
|
|
2381
|
+
"""设置实例的资源保护状态
|
|
2382
|
+
:param request: Request instance for SetInstanceResourceProtect.
|
|
2383
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.SetInstanceResourceProtectRequest`
|
|
2384
|
+
"""
|
|
2385
|
+
try:
|
|
2386
|
+
params = request._serialize()
|
|
2387
|
+
body = self.call_judge("SetInstanceResourceProtect", params, "application/x-www-form-urlencoded")
|
|
2135
2388
|
response = json.loads(body)
|
|
2136
2389
|
if "Error" not in response:
|
|
2137
2390
|
return body
|
|
@@ -2144,17 +2397,17 @@ class KecClient(AbstractClient):
|
|
|
2144
2397
|
if isinstance(e, KsyunSDKException):
|
|
2145
2398
|
raise
|
|
2146
2399
|
else:
|
|
2147
|
-
raise KsyunSDKException(
|
|
2400
|
+
raise KsyunSDKException(message=str(e))
|
|
2148
2401
|
|
|
2149
2402
|
|
|
2150
|
-
def
|
|
2151
|
-
"""
|
|
2152
|
-
:param request: Request instance for
|
|
2153
|
-
:type request: :class:`ksyun.client.kec.v20160304.models.
|
|
2403
|
+
def DescribeInstanceVncUrl(self, request):
|
|
2404
|
+
"""查询VNC管理终端地址
|
|
2405
|
+
:param request: Request instance for DescribeInstanceVncUrl.
|
|
2406
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.DescribeInstanceVncUrlRequest`
|
|
2154
2407
|
"""
|
|
2155
2408
|
try:
|
|
2156
2409
|
params = request._serialize()
|
|
2157
|
-
body = self.
|
|
2410
|
+
body = self.call_judge("DescribeInstanceVncUrl", params, "application/x-www-form-urlencoded")
|
|
2158
2411
|
response = json.loads(body)
|
|
2159
2412
|
if "Error" not in response:
|
|
2160
2413
|
return body
|
|
@@ -2167,17 +2420,38 @@ class KecClient(AbstractClient):
|
|
|
2167
2420
|
if isinstance(e, KsyunSDKException):
|
|
2168
2421
|
raise
|
|
2169
2422
|
else:
|
|
2170
|
-
raise KsyunSDKException(
|
|
2423
|
+
raise KsyunSDKException(message=str(e))
|
|
2171
2424
|
|
|
2425
|
+
def CreateSnapshot(self, request):
|
|
2426
|
+
"""创建文件系统快照
|
|
2427
|
+
:param request: Request instance for CreateSnapshot.
|
|
2428
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.CreateSnapshotRequest`
|
|
2429
|
+
"""
|
|
2430
|
+
try:
|
|
2431
|
+
params = request._serialize()
|
|
2432
|
+
body = self.call_judge("CreateSnapshot", params, "application/x-www-form-urlencoded")
|
|
2433
|
+
response = json.loads(body)
|
|
2434
|
+
if "Error" not in response:
|
|
2435
|
+
return body
|
|
2436
|
+
else:
|
|
2437
|
+
code = response["Error"]["Code"]
|
|
2438
|
+
message = response["Error"]["Message"]
|
|
2439
|
+
req_id = response["RequestId"]
|
|
2440
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2441
|
+
except Exception as e:
|
|
2442
|
+
if isinstance(e, KsyunSDKException):
|
|
2443
|
+
raise
|
|
2444
|
+
else:
|
|
2445
|
+
raise KsyunSDKException(message=str(e))
|
|
2172
2446
|
|
|
2173
|
-
def
|
|
2174
|
-
"""
|
|
2175
|
-
:param request: Request instance for
|
|
2176
|
-
:type request: :class:`ksyun.client.kec.v20160304.models.
|
|
2447
|
+
def UpdateSnapshot(self, request):
|
|
2448
|
+
"""修改文件系统快照
|
|
2449
|
+
:param request: Request instance for UpdateSnapshot.
|
|
2450
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.UpdateSnapshotRequest`
|
|
2177
2451
|
"""
|
|
2178
2452
|
try:
|
|
2179
2453
|
params = request._serialize()
|
|
2180
|
-
body = self.
|
|
2454
|
+
body = self.call_judge("UpdateSnapshot", params, "application/x-www-form-urlencoded")
|
|
2181
2455
|
response = json.loads(body)
|
|
2182
2456
|
if "Error" not in response:
|
|
2183
2457
|
return body
|
|
@@ -2190,17 +2464,38 @@ class KecClient(AbstractClient):
|
|
|
2190
2464
|
if isinstance(e, KsyunSDKException):
|
|
2191
2465
|
raise
|
|
2192
2466
|
else:
|
|
2193
|
-
raise KsyunSDKException(
|
|
2467
|
+
raise KsyunSDKException(message=str(e))
|
|
2194
2468
|
|
|
2469
|
+
def DeleteSnapshot(self, request):
|
|
2470
|
+
"""删除文件系统快照
|
|
2471
|
+
:param request: Request instance for DeleteSnapshot.
|
|
2472
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.DeleteSnapshotRequest`
|
|
2473
|
+
"""
|
|
2474
|
+
try:
|
|
2475
|
+
params = request._serialize()
|
|
2476
|
+
body = self.call_judge("DeleteSnapshot", params, "application/x-www-form-urlencoded")
|
|
2477
|
+
response = json.loads(body)
|
|
2478
|
+
if "Error" not in response:
|
|
2479
|
+
return body
|
|
2480
|
+
else:
|
|
2481
|
+
code = response["Error"]["Code"]
|
|
2482
|
+
message = response["Error"]["Message"]
|
|
2483
|
+
req_id = response["RequestId"]
|
|
2484
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2485
|
+
except Exception as e:
|
|
2486
|
+
if isinstance(e, KsyunSDKException):
|
|
2487
|
+
raise
|
|
2488
|
+
else:
|
|
2489
|
+
raise KsyunSDKException(message=str(e))
|
|
2195
2490
|
|
|
2196
|
-
def
|
|
2197
|
-
"""
|
|
2198
|
-
:param request: Request instance for
|
|
2199
|
-
:type request: :class:`ksyun.client.kec.v20160304.models.
|
|
2491
|
+
def RevertSnapshot(self, request):
|
|
2492
|
+
"""文件系统快照回滚
|
|
2493
|
+
:param request: Request instance for RevertSnapshot.
|
|
2494
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.RevertSnapshotRequest`
|
|
2200
2495
|
"""
|
|
2201
2496
|
try:
|
|
2202
2497
|
params = request._serialize()
|
|
2203
|
-
body = self.
|
|
2498
|
+
body = self.call_judge("RevertSnapshot", params, "application/x-www-form-urlencoded")
|
|
2204
2499
|
response = json.loads(body)
|
|
2205
2500
|
if "Error" not in response:
|
|
2206
2501
|
return body
|
|
@@ -2213,6 +2508,378 @@ class KecClient(AbstractClient):
|
|
|
2213
2508
|
if isinstance(e, KsyunSDKException):
|
|
2214
2509
|
raise
|
|
2215
2510
|
else:
|
|
2216
|
-
raise KsyunSDKException(
|
|
2511
|
+
raise KsyunSDKException(message=str(e))
|
|
2217
2512
|
|
|
2513
|
+
def DescribeSnapshotList(self, request):
|
|
2514
|
+
"""查询文件系统的快照信息
|
|
2515
|
+
:param request: Request instance for DescribeSnapshotList.
|
|
2516
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.DescribeSnapshotListRequest`
|
|
2517
|
+
"""
|
|
2518
|
+
try:
|
|
2519
|
+
params = request._serialize()
|
|
2520
|
+
body = self.call_judge("DescribeSnapshotList", params, "application/x-www-form-urlencoded")
|
|
2521
|
+
response = json.loads(body)
|
|
2522
|
+
if "Error" not in response:
|
|
2523
|
+
return body
|
|
2524
|
+
else:
|
|
2525
|
+
code = response["Error"]["Code"]
|
|
2526
|
+
message = response["Error"]["Message"]
|
|
2527
|
+
req_id = response["RequestId"]
|
|
2528
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2529
|
+
except Exception as e:
|
|
2530
|
+
if isinstance(e, KsyunSDKException):
|
|
2531
|
+
raise
|
|
2532
|
+
else:
|
|
2533
|
+
raise KsyunSDKException(message=str(e))
|
|
2218
2534
|
|
|
2535
|
+
def CreateSnapshotPolicy(self, request):
|
|
2536
|
+
"""创建文件系统自动快照策略
|
|
2537
|
+
:param request: Request instance for CreateSnapshotPolicy.
|
|
2538
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.CreateSnapshotPolicyRequest`
|
|
2539
|
+
"""
|
|
2540
|
+
try:
|
|
2541
|
+
params = request._serialize()
|
|
2542
|
+
body = self.call_judge("CreateSnapshotPolicy", params, "application/x-www-form-urlencoded")
|
|
2543
|
+
response = json.loads(body)
|
|
2544
|
+
if "Error" not in response:
|
|
2545
|
+
return body
|
|
2546
|
+
else:
|
|
2547
|
+
code = response["Error"]["Code"]
|
|
2548
|
+
message = response["Error"]["Message"]
|
|
2549
|
+
req_id = response["RequestId"]
|
|
2550
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2551
|
+
except Exception as e:
|
|
2552
|
+
if isinstance(e, KsyunSDKException):
|
|
2553
|
+
raise
|
|
2554
|
+
else:
|
|
2555
|
+
raise KsyunSDKException(message=str(e))
|
|
2556
|
+
|
|
2557
|
+
def UpdateSnapshotPolicy(self, request):
|
|
2558
|
+
"""修改文件系统自动快照策略
|
|
2559
|
+
:param request: Request instance for UpdateSnapshotPolicy.
|
|
2560
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.UpdateSnapshotPolicyRequest`
|
|
2561
|
+
"""
|
|
2562
|
+
try:
|
|
2563
|
+
params = request._serialize()
|
|
2564
|
+
body = self.call_judge("UpdateSnapshotPolicy", params, "application/x-www-form-urlencoded")
|
|
2565
|
+
response = json.loads(body)
|
|
2566
|
+
if "Error" not in response:
|
|
2567
|
+
return body
|
|
2568
|
+
else:
|
|
2569
|
+
code = response["Error"]["Code"]
|
|
2570
|
+
message = response["Error"]["Message"]
|
|
2571
|
+
req_id = response["RequestId"]
|
|
2572
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2573
|
+
except Exception as e:
|
|
2574
|
+
if isinstance(e, KsyunSDKException):
|
|
2575
|
+
raise
|
|
2576
|
+
else:
|
|
2577
|
+
raise KsyunSDKException(message=str(e))
|
|
2578
|
+
|
|
2579
|
+
def DeleteSnapshotPolicy(self, request):
|
|
2580
|
+
"""删除文件系统自动快照策略
|
|
2581
|
+
:param request: Request instance for DeleteSnapshotPolicy.
|
|
2582
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.DeleteSnapshotPolicyRequest`
|
|
2583
|
+
"""
|
|
2584
|
+
try:
|
|
2585
|
+
params = request._serialize()
|
|
2586
|
+
body = self.call_judge("DeleteSnapshotPolicy", params, "application/x-www-form-urlencoded")
|
|
2587
|
+
response = json.loads(body)
|
|
2588
|
+
if "Error" not in response:
|
|
2589
|
+
return body
|
|
2590
|
+
else:
|
|
2591
|
+
code = response["Error"]["Code"]
|
|
2592
|
+
message = response["Error"]["Message"]
|
|
2593
|
+
req_id = response["RequestId"]
|
|
2594
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2595
|
+
except Exception as e:
|
|
2596
|
+
if isinstance(e, KsyunSDKException):
|
|
2597
|
+
raise
|
|
2598
|
+
else:
|
|
2599
|
+
raise KsyunSDKException(message=str(e))
|
|
2600
|
+
|
|
2601
|
+
def ApplySnapshotPolicy(self, request):
|
|
2602
|
+
"""文件系统关联自动快照策略
|
|
2603
|
+
:param request: Request instance for ApplySnapshotPolicy.
|
|
2604
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.ApplySnapshotPolicyRequest`
|
|
2605
|
+
"""
|
|
2606
|
+
try:
|
|
2607
|
+
params = request._serialize()
|
|
2608
|
+
body = self.call_judge("ApplySnapshotPolicy", params, "application/x-www-form-urlencoded")
|
|
2609
|
+
response = json.loads(body)
|
|
2610
|
+
if "Error" not in response:
|
|
2611
|
+
return body
|
|
2612
|
+
else:
|
|
2613
|
+
code = response["Error"]["Code"]
|
|
2614
|
+
message = response["Error"]["Message"]
|
|
2615
|
+
req_id = response["RequestId"]
|
|
2616
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2617
|
+
except Exception as e:
|
|
2618
|
+
if isinstance(e, KsyunSDKException):
|
|
2619
|
+
raise
|
|
2620
|
+
else:
|
|
2621
|
+
raise KsyunSDKException(message=str(e))
|
|
2622
|
+
|
|
2623
|
+
def CancelSnapshotPolicy(self, request):
|
|
2624
|
+
"""文件系统移除自动快照策略
|
|
2625
|
+
:param request: Request instance for CancelSnapshotPolicy.
|
|
2626
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.CancelSnapshotPolicyRequest`
|
|
2627
|
+
"""
|
|
2628
|
+
try:
|
|
2629
|
+
params = request._serialize()
|
|
2630
|
+
body = self.call_judge("CancelSnapshotPolicy", params, "application/x-www-form-urlencoded")
|
|
2631
|
+
response = json.loads(body)
|
|
2632
|
+
if "Error" not in response:
|
|
2633
|
+
return body
|
|
2634
|
+
else:
|
|
2635
|
+
code = response["Error"]["Code"]
|
|
2636
|
+
message = response["Error"]["Message"]
|
|
2637
|
+
req_id = response["RequestId"]
|
|
2638
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2639
|
+
except Exception as e:
|
|
2640
|
+
if isinstance(e, KsyunSDKException):
|
|
2641
|
+
raise
|
|
2642
|
+
else:
|
|
2643
|
+
raise KsyunSDKException(message=str(e))
|
|
2644
|
+
|
|
2645
|
+
def DescribeSnapshotPolicyList(self, request):
|
|
2646
|
+
"""获取文件系统自动快照策略列表
|
|
2647
|
+
:param request: Request instance for DescribeSnapshotPolicyList.
|
|
2648
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.DescribeSnapshotPolicyListRequest`
|
|
2649
|
+
"""
|
|
2650
|
+
try:
|
|
2651
|
+
params = request._serialize()
|
|
2652
|
+
body = self.call_judge("DescribeSnapshotPolicyList", params, "application/x-www-form-urlencoded")
|
|
2653
|
+
response = json.loads(body)
|
|
2654
|
+
if "Error" not in response:
|
|
2655
|
+
return body
|
|
2656
|
+
else:
|
|
2657
|
+
code = response["Error"]["Code"]
|
|
2658
|
+
message = response["Error"]["Message"]
|
|
2659
|
+
req_id = response["RequestId"]
|
|
2660
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2661
|
+
except Exception as e:
|
|
2662
|
+
if isinstance(e, KsyunSDKException):
|
|
2663
|
+
raise
|
|
2664
|
+
else:
|
|
2665
|
+
raise KsyunSDKException(message=str(e))
|
|
2666
|
+
|
|
2667
|
+
def ModifyRecycleBinAttribute(self, request):
|
|
2668
|
+
"""修改回收站信息
|
|
2669
|
+
:param request: Request instance for ModifyRecycleBinAttribute.
|
|
2670
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.ModifyRecycleBinAttributeRequest`
|
|
2671
|
+
"""
|
|
2672
|
+
try:
|
|
2673
|
+
params = request._serialize()
|
|
2674
|
+
body = self.call_judge("ModifyRecycleBinAttribute", params, "application/x-www-form-urlencoded")
|
|
2675
|
+
response = json.loads(body)
|
|
2676
|
+
if "Error" not in response:
|
|
2677
|
+
return body
|
|
2678
|
+
else:
|
|
2679
|
+
code = response["Error"]["Code"]
|
|
2680
|
+
message = response["Error"]["Message"]
|
|
2681
|
+
req_id = response["RequestId"]
|
|
2682
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2683
|
+
except Exception as e:
|
|
2684
|
+
if isinstance(e, KsyunSDKException):
|
|
2685
|
+
raise
|
|
2686
|
+
else:
|
|
2687
|
+
raise KsyunSDKException(message=str(e))
|
|
2688
|
+
|
|
2689
|
+
def DescribeAccessGroups(self, request):
|
|
2690
|
+
"""查询权限组信息
|
|
2691
|
+
:param request: Request instance for DescribeAccessGroups.
|
|
2692
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.DescribeAccessGroupsRequest`
|
|
2693
|
+
"""
|
|
2694
|
+
try:
|
|
2695
|
+
params = request._serialize()
|
|
2696
|
+
body = self.call_judge("DescribeAccessGroups", params, "application/x-www-form-urlencoded")
|
|
2697
|
+
response = json.loads(body)
|
|
2698
|
+
if "Error" not in response:
|
|
2699
|
+
return body
|
|
2700
|
+
else:
|
|
2701
|
+
code = response["Error"]["Code"]
|
|
2702
|
+
message = response["Error"]["Message"]
|
|
2703
|
+
req_id = response["RequestId"]
|
|
2704
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2705
|
+
except Exception as e:
|
|
2706
|
+
if isinstance(e, KsyunSDKException):
|
|
2707
|
+
raise
|
|
2708
|
+
else:
|
|
2709
|
+
raise KsyunSDKException(message=str(e))
|
|
2710
|
+
|
|
2711
|
+
def CreateAccessGroup(self, request):
|
|
2712
|
+
"""创建权限组
|
|
2713
|
+
:param request: Request instance for CreateAccessGroup.
|
|
2714
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.CreateAccessGroupRequest`
|
|
2715
|
+
"""
|
|
2716
|
+
try:
|
|
2717
|
+
params = request._serialize()
|
|
2718
|
+
body = self.call_judge("CreateAccessGroup", params, "application/x-www-form-urlencoded")
|
|
2719
|
+
response = json.loads(body)
|
|
2720
|
+
if "Error" not in response:
|
|
2721
|
+
return body
|
|
2722
|
+
else:
|
|
2723
|
+
code = response["Error"]["Code"]
|
|
2724
|
+
message = response["Error"]["Message"]
|
|
2725
|
+
req_id = response["RequestId"]
|
|
2726
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2727
|
+
except Exception as e:
|
|
2728
|
+
if isinstance(e, KsyunSDKException):
|
|
2729
|
+
raise
|
|
2730
|
+
else:
|
|
2731
|
+
raise KsyunSDKException(message=str(e))
|
|
2732
|
+
|
|
2733
|
+
def ModifyAccessGroup(self, request):
|
|
2734
|
+
"""修改权限组
|
|
2735
|
+
:param request: Request instance for ModifyAccessGroup.
|
|
2736
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.ModifyAccessGroupRequest`
|
|
2737
|
+
"""
|
|
2738
|
+
try:
|
|
2739
|
+
params = request._serialize()
|
|
2740
|
+
body = self.call_judge("ModifyAccessGroup", params, "application/x-www-form-urlencoded")
|
|
2741
|
+
response = json.loads(body)
|
|
2742
|
+
if "Error" not in response:
|
|
2743
|
+
return body
|
|
2744
|
+
else:
|
|
2745
|
+
code = response["Error"]["Code"]
|
|
2746
|
+
message = response["Error"]["Message"]
|
|
2747
|
+
req_id = response["RequestId"]
|
|
2748
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2749
|
+
except Exception as e:
|
|
2750
|
+
if isinstance(e, KsyunSDKException):
|
|
2751
|
+
raise
|
|
2752
|
+
else:
|
|
2753
|
+
raise KsyunSDKException(message=str(e))
|
|
2754
|
+
|
|
2755
|
+
def DeleteAccessGroup(self, request):
|
|
2756
|
+
"""删除权限组
|
|
2757
|
+
:param request: Request instance for DeleteAccessGroup.
|
|
2758
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.DeleteAccessGroupRequest`
|
|
2759
|
+
"""
|
|
2760
|
+
try:
|
|
2761
|
+
params = request._serialize()
|
|
2762
|
+
body = self.call_judge("DeleteAccessGroup", params, "application/x-www-form-urlencoded")
|
|
2763
|
+
response = json.loads(body)
|
|
2764
|
+
if "Error" not in response:
|
|
2765
|
+
return body
|
|
2766
|
+
else:
|
|
2767
|
+
code = response["Error"]["Code"]
|
|
2768
|
+
message = response["Error"]["Message"]
|
|
2769
|
+
req_id = response["RequestId"]
|
|
2770
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2771
|
+
except Exception as e:
|
|
2772
|
+
if isinstance(e, KsyunSDKException):
|
|
2773
|
+
raise
|
|
2774
|
+
else:
|
|
2775
|
+
raise KsyunSDKException(message=str(e))
|
|
2776
|
+
|
|
2777
|
+
def DescribeAccessRules(self, request):
|
|
2778
|
+
"""查询权限组规则列表
|
|
2779
|
+
:param request: Request instance for DescribeAccessRules.
|
|
2780
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.DescribeAccessRulesRequest`
|
|
2781
|
+
"""
|
|
2782
|
+
try:
|
|
2783
|
+
params = request._serialize()
|
|
2784
|
+
body = self.call_judge("DescribeAccessRules", params, "application/x-www-form-urlencoded")
|
|
2785
|
+
response = json.loads(body)
|
|
2786
|
+
if "Error" not in response:
|
|
2787
|
+
return body
|
|
2788
|
+
else:
|
|
2789
|
+
code = response["Error"]["Code"]
|
|
2790
|
+
message = response["Error"]["Message"]
|
|
2791
|
+
req_id = response["RequestId"]
|
|
2792
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2793
|
+
except Exception as e:
|
|
2794
|
+
if isinstance(e, KsyunSDKException):
|
|
2795
|
+
raise
|
|
2796
|
+
else:
|
|
2797
|
+
raise KsyunSDKException(message=str(e))
|
|
2798
|
+
|
|
2799
|
+
def CreateAccessRule(self, request):
|
|
2800
|
+
"""创建权限组规则
|
|
2801
|
+
:param request: Request instance for CreateAccessRule.
|
|
2802
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.CreateAccessRuleRequest`
|
|
2803
|
+
"""
|
|
2804
|
+
try:
|
|
2805
|
+
params = request._serialize()
|
|
2806
|
+
body = self.call_judge("CreateAccessRule", params, "application/x-www-form-urlencoded")
|
|
2807
|
+
response = json.loads(body)
|
|
2808
|
+
if "Error" not in response:
|
|
2809
|
+
return body
|
|
2810
|
+
else:
|
|
2811
|
+
code = response["Error"]["Code"]
|
|
2812
|
+
message = response["Error"]["Message"]
|
|
2813
|
+
req_id = response["RequestId"]
|
|
2814
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2815
|
+
except Exception as e:
|
|
2816
|
+
if isinstance(e, KsyunSDKException):
|
|
2817
|
+
raise
|
|
2818
|
+
else:
|
|
2819
|
+
raise KsyunSDKException(message=str(e))
|
|
2820
|
+
|
|
2821
|
+
def ModifyAccessRule(self, request):
|
|
2822
|
+
"""修改权限组规则
|
|
2823
|
+
:param request: Request instance for ModifyAccessRule.
|
|
2824
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.ModifyAccessRuleRequest`
|
|
2825
|
+
"""
|
|
2826
|
+
try:
|
|
2827
|
+
params = request._serialize()
|
|
2828
|
+
body = self.call_judge("ModifyAccessRule", params, "application/x-www-form-urlencoded")
|
|
2829
|
+
response = json.loads(body)
|
|
2830
|
+
if "Error" not in response:
|
|
2831
|
+
return body
|
|
2832
|
+
else:
|
|
2833
|
+
code = response["Error"]["Code"]
|
|
2834
|
+
message = response["Error"]["Message"]
|
|
2835
|
+
req_id = response["RequestId"]
|
|
2836
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2837
|
+
except Exception as e:
|
|
2838
|
+
if isinstance(e, KsyunSDKException):
|
|
2839
|
+
raise
|
|
2840
|
+
else:
|
|
2841
|
+
raise KsyunSDKException(message=str(e))
|
|
2842
|
+
|
|
2843
|
+
def DeleteAccessRule(self, request):
|
|
2844
|
+
"""删除权限组规则
|
|
2845
|
+
:param request: Request instance for DeleteAccessRule.
|
|
2846
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.DeleteAccessRuleRequest`
|
|
2847
|
+
"""
|
|
2848
|
+
try:
|
|
2849
|
+
params = request._serialize()
|
|
2850
|
+
body = self.call_judge("DeleteAccessRule", params, "application/x-www-form-urlencoded")
|
|
2851
|
+
response = json.loads(body)
|
|
2852
|
+
if "Error" not in response:
|
|
2853
|
+
return body
|
|
2854
|
+
else:
|
|
2855
|
+
code = response["Error"]["Code"]
|
|
2856
|
+
message = response["Error"]["Message"]
|
|
2857
|
+
req_id = response["RequestId"]
|
|
2858
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2859
|
+
except Exception as e:
|
|
2860
|
+
if isinstance(e, KsyunSDKException):
|
|
2861
|
+
raise
|
|
2862
|
+
else:
|
|
2863
|
+
raise KsyunSDKException(message=str(e))
|
|
2864
|
+
|
|
2865
|
+
def ModifyMountTarget(self, request):
|
|
2866
|
+
"""修改文件系统挂载点
|
|
2867
|
+
:param request: Request instance for ModifyMountTarget.
|
|
2868
|
+
:type request: :class:`ksyun.client.kec.v20160304.models.ModifyMountTargetRequest`
|
|
2869
|
+
"""
|
|
2870
|
+
try:
|
|
2871
|
+
params = request._serialize()
|
|
2872
|
+
body = self.call_judge("ModifyMountTarget", params, "application/x-www-form-urlencoded")
|
|
2873
|
+
response = json.loads(body)
|
|
2874
|
+
if "Error" not in response:
|
|
2875
|
+
return body
|
|
2876
|
+
else:
|
|
2877
|
+
code = response["Error"]["Code"]
|
|
2878
|
+
message = response["Error"]["Message"]
|
|
2879
|
+
req_id = response["RequestId"]
|
|
2880
|
+
raise KsyunSDKException(code, message, req_id)
|
|
2881
|
+
except Exception as e:
|
|
2882
|
+
if isinstance(e, KsyunSDKException):
|
|
2883
|
+
raise
|
|
2884
|
+
else:
|
|
2885
|
+
raise KsyunSDKException(message=str(e))
|