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
|
File without changes
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
from ksyun.common.exception.ksyun_sdk_exception import KsyunSDKException
|
|
4
|
+
from ksyun.common.abstract_client import AbstractClient
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class AicpClient(AbstractClient):
|
|
8
|
+
_apiVersion = '2025-12-12'
|
|
9
|
+
_endpoint = 'aicp.api.ksyun.com'
|
|
10
|
+
_service = 'aicp'
|
|
11
|
+
def CreateTrainJob(self, request):
|
|
12
|
+
"""创建训练任务
|
|
13
|
+
:param request: Request instance for CreateTrainJob.
|
|
14
|
+
:type request: :class:`ksyun.client.aicp.v20251212.models.CreateTrainJobRequest`
|
|
15
|
+
"""
|
|
16
|
+
try:
|
|
17
|
+
params = request._serialize()
|
|
18
|
+
body = self.call_judge("CreateTrainJob", params, "application/json")
|
|
19
|
+
response = json.loads(body)
|
|
20
|
+
if "Error" not in response:
|
|
21
|
+
return body
|
|
22
|
+
else:
|
|
23
|
+
code = response["Error"]["Code"]
|
|
24
|
+
message = response["Error"]["Message"]
|
|
25
|
+
req_id = response["RequestId"]
|
|
26
|
+
raise KsyunSDKException(code, message, req_id)
|
|
27
|
+
except Exception as e:
|
|
28
|
+
if isinstance(e, KsyunSDKException):
|
|
29
|
+
raise
|
|
30
|
+
else:
|
|
31
|
+
raise KsyunSDKException(message=str(e))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def DescribeTrainJobs(self, request):
|
|
35
|
+
"""查询训练任务
|
|
36
|
+
:param request: Request instance for DescribeTrainJobs.
|
|
37
|
+
:type request: :class:`ksyun.client.aicp.v20251212.models.DescribeTrainJobsRequest`
|
|
38
|
+
"""
|
|
39
|
+
try:
|
|
40
|
+
params = request._serialize()
|
|
41
|
+
body = self.call_judge("DescribeTrainJobs", params, "application/x-www-form-urlencoded")
|
|
42
|
+
response = json.loads(body)
|
|
43
|
+
if "Error" not in response:
|
|
44
|
+
return body
|
|
45
|
+
else:
|
|
46
|
+
code = response["Error"]["Code"]
|
|
47
|
+
message = response["Error"]["Message"]
|
|
48
|
+
req_id = response["RequestId"]
|
|
49
|
+
raise KsyunSDKException(code, message, req_id)
|
|
50
|
+
except Exception as e:
|
|
51
|
+
if isinstance(e, KsyunSDKException):
|
|
52
|
+
raise
|
|
53
|
+
else:
|
|
54
|
+
raise KsyunSDKException(message=str(e))
|
|
55
|
+
|
|
56
|
+
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
from ksyun.common.abstract_model import AbstractModel
|
|
2
|
+
|
|
3
|
+
class CreateTrainJobRequest(AbstractModel):
|
|
4
|
+
"""CreateTrainJob请求参数结构体
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
def __init__(self):
|
|
8
|
+
r"""创建训练任务
|
|
9
|
+
:param TrainJobName: 训练任务名称,名称规范:1-64个字符,允许字母 中文 数字 - _ . / ( )
|
|
10
|
+
:type PathPrefix: String
|
|
11
|
+
:param Description: 描述信息
|
|
12
|
+
:type PathPrefix: String
|
|
13
|
+
:param ResourcePoolId: 资源组ID
|
|
14
|
+
:type PathPrefix: String
|
|
15
|
+
:param Priority: 优先级
|
|
16
|
+
:type PathPrefix: String
|
|
17
|
+
:param QueueName: 队列名称
|
|
18
|
+
:type PathPrefix: String
|
|
19
|
+
:param Framework: 训练框架
|
|
20
|
+
:type PathPrefix: String
|
|
21
|
+
:param AccessType: 权限配置-可见范围
|
|
22
|
+
:type PathPrefix: String
|
|
23
|
+
:param SelfHealing: GPU故障自愈
|
|
24
|
+
:type PathPrefix: Boolean
|
|
25
|
+
:param MaxRuntimeHour: 最长运行时长(小时)
|
|
26
|
+
:type PathPrefix: Long
|
|
27
|
+
:param JobRunOnCPU: 节点亲和性-仅调度到CPU节点
|
|
28
|
+
:type PathPrefix: Boolean
|
|
29
|
+
:param SupportTensorboard: 开启Tensorboard
|
|
30
|
+
:type PathPrefix: Boolean
|
|
31
|
+
:param StorageConfigs: 存储配置信息
|
|
32
|
+
:type PathPrefix: Array
|
|
33
|
+
:param Roles: 角色资源配置信息
|
|
34
|
+
:type PathPrefix: Array
|
|
35
|
+
"""
|
|
36
|
+
self.TrainJobName = None
|
|
37
|
+
self.Description = None
|
|
38
|
+
self.ResourcePoolId = None
|
|
39
|
+
self.Priority = None
|
|
40
|
+
self.QueueName = None
|
|
41
|
+
self.Framework = None
|
|
42
|
+
self.AccessType = None
|
|
43
|
+
self.SelfHealing = None
|
|
44
|
+
self.MaxRuntimeHour = None
|
|
45
|
+
self.JobRunOnCPU = None
|
|
46
|
+
self.SupportTensorboard = None
|
|
47
|
+
self.StorageConfigs = None
|
|
48
|
+
self.Roles = None
|
|
49
|
+
|
|
50
|
+
def _deserialize(self, params):
|
|
51
|
+
if params.get("TrainJobName"):
|
|
52
|
+
self.TrainJobName = params.get("TrainJobName")
|
|
53
|
+
if params.get("Description"):
|
|
54
|
+
self.Description = params.get("Description")
|
|
55
|
+
if params.get("ResourcePoolId"):
|
|
56
|
+
self.ResourcePoolId = params.get("ResourcePoolId")
|
|
57
|
+
if params.get("Priority"):
|
|
58
|
+
self.Priority = params.get("Priority")
|
|
59
|
+
if params.get("QueueName"):
|
|
60
|
+
self.QueueName = params.get("QueueName")
|
|
61
|
+
if params.get("Framework"):
|
|
62
|
+
self.Framework = params.get("Framework")
|
|
63
|
+
if params.get("AccessType"):
|
|
64
|
+
self.AccessType = params.get("AccessType")
|
|
65
|
+
if params.get("SelfHealing"):
|
|
66
|
+
self.SelfHealing = params.get("SelfHealing")
|
|
67
|
+
if params.get("MaxRuntimeHour"):
|
|
68
|
+
self.MaxRuntimeHour = params.get("MaxRuntimeHour")
|
|
69
|
+
if params.get("JobRunOnCPU"):
|
|
70
|
+
self.JobRunOnCPU = params.get("JobRunOnCPU")
|
|
71
|
+
if params.get("SupportTensorboard"):
|
|
72
|
+
self.SupportTensorboard = params.get("SupportTensorboard")
|
|
73
|
+
if params.get("StorageConfigs"):
|
|
74
|
+
self.StorageConfigs = params.get("StorageConfigs")
|
|
75
|
+
if params.get("Roles"):
|
|
76
|
+
self.Roles = params.get("Roles")
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class DescribeTrainJobsRequest(AbstractModel):
|
|
80
|
+
"""DescribeTrainJobs请求参数结构体
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
def __init__(self):
|
|
84
|
+
r"""查询训练任务
|
|
85
|
+
:param TrainJobId: 多个训练任务的ID
|
|
86
|
+
:type PathPrefix: Filter
|
|
87
|
+
:param Filter: 筛选Filter
|
|
88
|
+
:type PathPrefix: Filter
|
|
89
|
+
:param PageSize: 单次调用可返回的最大条目数量
|
|
90
|
+
:type PathPrefix: Int
|
|
91
|
+
:param Page: 页码
|
|
92
|
+
:type PathPrefix: Int
|
|
93
|
+
:param TrainJobName: 训练任务名称(支持模糊搜索)
|
|
94
|
+
:type PathPrefix: String
|
|
95
|
+
"""
|
|
96
|
+
self.TrainJobId = None
|
|
97
|
+
self.Filter = None
|
|
98
|
+
self.PageSize = None
|
|
99
|
+
self.Page = None
|
|
100
|
+
self.TrainJobName = None
|
|
101
|
+
|
|
102
|
+
def _deserialize(self, params):
|
|
103
|
+
if params.get("TrainJobId"):
|
|
104
|
+
self.TrainJobId = params.get("TrainJobId")
|
|
105
|
+
if params.get("Filter"):
|
|
106
|
+
self.Filter = params.get("Filter")
|
|
107
|
+
if params.get("PageSize"):
|
|
108
|
+
self.PageSize = params.get("PageSize")
|
|
109
|
+
if params.get("Page"):
|
|
110
|
+
self.Page = params.get("Page")
|
|
111
|
+
if params.get("TrainJobName"):
|
|
112
|
+
self.TrainJobName = params.get("TrainJobName")
|
|
113
|
+
|
|
114
|
+
|
|
@@ -15,7 +15,7 @@ class BillClient(AbstractClient):
|
|
|
15
15
|
"""
|
|
16
16
|
try:
|
|
17
17
|
params = request._serialize()
|
|
18
|
-
body = self.
|
|
18
|
+
body = self.call_judge("GetMonthBill", params, "application/json")
|
|
19
19
|
response = json.loads(body)
|
|
20
20
|
if "Error" not in response:
|
|
21
21
|
return body
|
|
@@ -28,7 +28,7 @@ class BillClient(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 GetPostpayDetailBill(self, request):
|
|
@@ -38,7 +38,7 @@ class BillClient(AbstractClient):
|
|
|
38
38
|
"""
|
|
39
39
|
try:
|
|
40
40
|
params = request._serialize()
|
|
41
|
-
body = self.
|
|
41
|
+
body = self.call_judge("GetPostpayDetailBill", params, "application/json")
|
|
42
42
|
response = json.loads(body)
|
|
43
43
|
if "Error" not in response:
|
|
44
44
|
return body
|
|
@@ -51,30 +51,7 @@ class BillClient(AbstractClient):
|
|
|
51
51
|
if isinstance(e, KsyunSDKException):
|
|
52
52
|
raise
|
|
53
53
|
else:
|
|
54
|
-
raise KsyunSDKException(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
def GetPostpayDetailBillCSV(self, request):
|
|
58
|
-
"""导出账单明细
|
|
59
|
-
:param request: Request instance for GetPostpayDetailBillCSV.
|
|
60
|
-
:type request: :class:`ksyun.client.bill.v20180601.models.GetPostpayDetailBillCSVRequest`
|
|
61
|
-
"""
|
|
62
|
-
try:
|
|
63
|
-
params = request._serialize()
|
|
64
|
-
body = self.call("GetPostpayDetailBillCSV", params)
|
|
65
|
-
response = json.loads(body)
|
|
66
|
-
if "Error" not in response:
|
|
67
|
-
return body
|
|
68
|
-
else:
|
|
69
|
-
code = response["Error"]["Code"]
|
|
70
|
-
message = response["Error"]["Message"]
|
|
71
|
-
req_id = response["RequestId"]
|
|
72
|
-
raise KsyunSDKException(code, message, req_id)
|
|
73
|
-
except Exception as e:
|
|
74
|
-
if isinstance(e, KsyunSDKException):
|
|
75
|
-
raise
|
|
76
|
-
else:
|
|
77
|
-
raise KsyunSDKException(e.message, e.message)
|
|
54
|
+
raise KsyunSDKException(message=str(e))
|
|
78
55
|
|
|
79
56
|
|
|
80
57
|
def GetProductCode(self, request):
|
|
@@ -84,7 +61,7 @@ class BillClient(AbstractClient):
|
|
|
84
61
|
"""
|
|
85
62
|
try:
|
|
86
63
|
params = request._serialize()
|
|
87
|
-
body = self.
|
|
64
|
+
body = self.call_judge("GetProductCode", params, "application/json")
|
|
88
65
|
response = json.loads(body)
|
|
89
66
|
if "Error" not in response:
|
|
90
67
|
return body
|
|
@@ -97,52 +74,4 @@ class BillClient(AbstractClient):
|
|
|
97
74
|
if isinstance(e, KsyunSDKException):
|
|
98
75
|
raise
|
|
99
76
|
else:
|
|
100
|
-
raise KsyunSDKException(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
def getMonthConsume(self, request):
|
|
104
|
-
"""获取日耗月账单
|
|
105
|
-
:param request: Request instance for getMonthConsume.
|
|
106
|
-
:type request: :class:`ksyun.client.bill.v20180601.models.getMonthConsumeRequest`
|
|
107
|
-
"""
|
|
108
|
-
try:
|
|
109
|
-
params = request._serialize()
|
|
110
|
-
body = self.call("getMonthConsume", params)
|
|
111
|
-
response = json.loads(body)
|
|
112
|
-
if "Error" not in response:
|
|
113
|
-
return body
|
|
114
|
-
else:
|
|
115
|
-
code = response["Error"]["Code"]
|
|
116
|
-
message = response["Error"]["Message"]
|
|
117
|
-
req_id = response["RequestId"]
|
|
118
|
-
raise KsyunSDKException(code, message, req_id)
|
|
119
|
-
except Exception as e:
|
|
120
|
-
if isinstance(e, KsyunSDKException):
|
|
121
|
-
raise
|
|
122
|
-
else:
|
|
123
|
-
raise KsyunSDKException(e.message, e.message)
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
def getPostpayDetailConsume(self, request):
|
|
127
|
-
"""获取日耗账单明细
|
|
128
|
-
:param request: Request instance for getPostpayDetailConsume.
|
|
129
|
-
:type request: :class:`ksyun.client.bill.v20180601.models.getPostpayDetailConsumeRequest`
|
|
130
|
-
"""
|
|
131
|
-
try:
|
|
132
|
-
params = request._serialize()
|
|
133
|
-
body = self.call("getPostpayDetailConsume", params)
|
|
134
|
-
response = json.loads(body)
|
|
135
|
-
if "Error" not in response:
|
|
136
|
-
return body
|
|
137
|
-
else:
|
|
138
|
-
code = response["Error"]["Code"]
|
|
139
|
-
message = response["Error"]["Message"]
|
|
140
|
-
req_id = response["RequestId"]
|
|
141
|
-
raise KsyunSDKException(code, message, req_id)
|
|
142
|
-
except Exception as e:
|
|
143
|
-
if isinstance(e, KsyunSDKException):
|
|
144
|
-
raise
|
|
145
|
-
else:
|
|
146
|
-
raise KsyunSDKException(e.message, e.message)
|
|
147
|
-
|
|
148
|
-
|
|
77
|
+
raise KsyunSDKException(message=str(e))
|
|
@@ -6,14 +6,19 @@ class GetMonthBillRequest(AbstractModel):
|
|
|
6
6
|
|
|
7
7
|
def __init__(self):
|
|
8
8
|
r"""获取月账单
|
|
9
|
-
:param
|
|
9
|
+
:param BillStartMonth: 必选参数,账单开始月份
|
|
10
|
+
:type PathPrefix: String
|
|
11
|
+
:param BillEndMonth: 必选参数,账单结束月份
|
|
10
12
|
:type PathPrefix: String
|
|
11
13
|
"""
|
|
12
|
-
self.
|
|
14
|
+
self.BillStartMonth = None
|
|
15
|
+
self.BillEndMonth = None
|
|
13
16
|
|
|
14
17
|
def _deserialize(self, params):
|
|
15
|
-
if params.get("
|
|
16
|
-
self.
|
|
18
|
+
if params.get("BillStartMonth"):
|
|
19
|
+
self.BillStartMonth = params.get("BillStartMonth")
|
|
20
|
+
if params.get("BillEndMonth"):
|
|
21
|
+
self.BillEndMonth = params.get("BillEndMonth")
|
|
17
22
|
|
|
18
23
|
|
|
19
24
|
class GetPostpayDetailBillRequest(AbstractModel):
|
|
@@ -22,22 +27,29 @@ class GetPostpayDetailBillRequest(AbstractModel):
|
|
|
22
27
|
|
|
23
28
|
def __init__(self):
|
|
24
29
|
r"""获取账单明细
|
|
30
|
+
:param BillStartMonth: 必选参数,账单开始月份,eg. 2018-06
|
|
31
|
+
:type PathPrefix: String
|
|
32
|
+
:param BillEndMonth: 必选参数,账单结束月份
|
|
33
|
+
:type PathPrefix: String
|
|
34
|
+
:param ProductCode: 可选参数,产品类型对应的Code。eg. KEC,不传获取所有产品类型的账单,取值可以参考产品线映射关系
|
|
35
|
+
:type PathPrefix: String
|
|
36
|
+
:param ProjectId: 可选参数,项目组Id,不传获取所有项目Id
|
|
37
|
+
:type PathPrefix: String
|
|
25
38
|
"""
|
|
39
|
+
self.BillStartMonth = None
|
|
40
|
+
self.BillEndMonth = None
|
|
41
|
+
self.ProductCode = None
|
|
42
|
+
self.ProjectId = None
|
|
26
43
|
|
|
27
44
|
def _deserialize(self, params):
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
r"""导出账单明细
|
|
37
|
-
"""
|
|
38
|
-
|
|
39
|
-
def _deserialize(self, params):
|
|
40
|
-
return
|
|
45
|
+
if params.get("BillStartMonth"):
|
|
46
|
+
self.BillStartMonth = params.get("BillStartMonth")
|
|
47
|
+
if params.get("BillEndMonth"):
|
|
48
|
+
self.BillEndMonth = params.get("BillEndMonth")
|
|
49
|
+
if params.get("ProductCode"):
|
|
50
|
+
self.ProductCode = params.get("ProductCode")
|
|
51
|
+
if params.get("ProjectId"):
|
|
52
|
+
self.ProjectId = params.get("ProjectId")
|
|
41
53
|
|
|
42
54
|
|
|
43
55
|
class GetProductCodeRequest(AbstractModel):
|
|
@@ -52,27 +64,3 @@ class GetProductCodeRequest(AbstractModel):
|
|
|
52
64
|
return
|
|
53
65
|
|
|
54
66
|
|
|
55
|
-
class GetMonthConsumeRequest(AbstractModel):
|
|
56
|
-
"""GetMonthConsume请求参数结构体
|
|
57
|
-
"""
|
|
58
|
-
|
|
59
|
-
def __init__(self):
|
|
60
|
-
r"""获取日耗月账单
|
|
61
|
-
"""
|
|
62
|
-
|
|
63
|
-
def _deserialize(self, params):
|
|
64
|
-
return
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
class GetPostpayDetailConsumeRequest(AbstractModel):
|
|
68
|
-
"""GetPostpayDetailConsume请求参数结构体
|
|
69
|
-
"""
|
|
70
|
-
|
|
71
|
-
def __init__(self):
|
|
72
|
-
r"""获取日耗账单明细
|
|
73
|
-
"""
|
|
74
|
-
|
|
75
|
-
def _deserialize(self, params):
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
|
|
File without changes
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
from ksyun.common.exception.ksyun_sdk_exception import KsyunSDKException
|
|
4
|
+
from ksyun.common.abstract_client import AbstractClient
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class BillClient(AbstractClient):
|
|
8
|
+
_apiVersion = '2022-06-01'
|
|
9
|
+
_endpoint = 'bill.api.ksyun.com'
|
|
10
|
+
_service = 'bill'
|
|
11
|
+
def GetMonthConsume(self, request):
|
|
12
|
+
"""获取日耗月账单
|
|
13
|
+
:param request: Request instance for GetMonthConsume.
|
|
14
|
+
:type request: :class:`ksyun.client.bill.v20220601.models.GetMonthConsumeRequest`
|
|
15
|
+
"""
|
|
16
|
+
try:
|
|
17
|
+
params = request._serialize()
|
|
18
|
+
body = self.call_judge("GetMonthConsume", params, "application/json")
|
|
19
|
+
response = json.loads(body)
|
|
20
|
+
if "Error" not in response:
|
|
21
|
+
return body
|
|
22
|
+
else:
|
|
23
|
+
code = response["Error"]["Code"]
|
|
24
|
+
message = response["Error"]["Message"]
|
|
25
|
+
req_id = response["RequestId"]
|
|
26
|
+
raise KsyunSDKException(code, message, req_id)
|
|
27
|
+
except Exception as e:
|
|
28
|
+
if isinstance(e, KsyunSDKException):
|
|
29
|
+
raise
|
|
30
|
+
else:
|
|
31
|
+
raise KsyunSDKException(message=str(e))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def GetPostpayDetailConsume(self, request):
|
|
35
|
+
"""获取日耗账单明细
|
|
36
|
+
:param request: Request instance for GetPostpayDetailConsume.
|
|
37
|
+
:type request: :class:`ksyun.client.bill.v20220601.models.GetPostpayDetailConsumeRequest`
|
|
38
|
+
"""
|
|
39
|
+
try:
|
|
40
|
+
params = request._serialize()
|
|
41
|
+
body = self.call_judge("GetPostpayDetailConsume", params, "application/json")
|
|
42
|
+
response = json.loads(body)
|
|
43
|
+
if "Error" not in response:
|
|
44
|
+
return body
|
|
45
|
+
else:
|
|
46
|
+
code = response["Error"]["Code"]
|
|
47
|
+
message = response["Error"]["Message"]
|
|
48
|
+
req_id = response["RequestId"]
|
|
49
|
+
raise KsyunSDKException(code, message, req_id)
|
|
50
|
+
except Exception as e:
|
|
51
|
+
if isinstance(e, KsyunSDKException):
|
|
52
|
+
raise
|
|
53
|
+
else:
|
|
54
|
+
raise KsyunSDKException(message=str(e))
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
from ksyun.common.abstract_model import AbstractModel
|
|
2
|
+
|
|
3
|
+
class GetMonthConsumeRequest(AbstractModel):
|
|
4
|
+
"""GetMonthConsume请求参数结构体
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
def __init__(self):
|
|
8
|
+
r"""获取日耗月账单
|
|
9
|
+
:param BillMonth: 必选参数,账单月份必选参数,账单月份YYYY-MM
|
|
10
|
+
:type PathPrefix: String
|
|
11
|
+
"""
|
|
12
|
+
self.BillMonth = None
|
|
13
|
+
|
|
14
|
+
def _deserialize(self, params):
|
|
15
|
+
if params.get("BillMonth"):
|
|
16
|
+
self.BillMonth = params.get("BillMonth")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class GetPostpayDetailConsumeRequest(AbstractModel):
|
|
20
|
+
"""GetPostpayDetailConsume请求参数结构体
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
def __init__(self):
|
|
24
|
+
r"""获取日耗账单明细
|
|
25
|
+
:param BillMonth: 必选参数,账单月份,eg. 2018-06
|
|
26
|
+
:type PathPrefix: String
|
|
27
|
+
:param ProductCode: 可选参数,产品类型对应的Code。eg. KEC,不传获取所有产品类型的账单,取值可以参考产品线映射关系
|
|
28
|
+
:type PathPrefix: String
|
|
29
|
+
:param ProjectId: 可选参数,项目组Id,不传获取所有项目Id
|
|
30
|
+
:type PathPrefix: String
|
|
31
|
+
:param PageNo: 可选参数,页码,不传默认为0
|
|
32
|
+
:type PathPrefix: Int
|
|
33
|
+
:param PageSize: 可选参数,每页数量,不传默认为1,最大只允许传5000
|
|
34
|
+
:type PathPrefix: Int
|
|
35
|
+
"""
|
|
36
|
+
self.BillMonth = None
|
|
37
|
+
self.ProductCode = None
|
|
38
|
+
self.ProjectId = None
|
|
39
|
+
self.PageNo = None
|
|
40
|
+
self.PageSize = None
|
|
41
|
+
|
|
42
|
+
def _deserialize(self, params):
|
|
43
|
+
if params.get("BillMonth"):
|
|
44
|
+
self.BillMonth = params.get("BillMonth")
|
|
45
|
+
if params.get("ProductCode"):
|
|
46
|
+
self.ProductCode = params.get("ProductCode")
|
|
47
|
+
if params.get("ProjectId"):
|
|
48
|
+
self.ProjectId = params.get("ProjectId")
|
|
49
|
+
if params.get("PageNo"):
|
|
50
|
+
self.PageNo = params.get("PageNo")
|
|
51
|
+
if params.get("PageSize"):
|
|
52
|
+
self.PageSize = params.get("PageSize")
|
|
53
|
+
|
|
54
|
+
|
|
@@ -9,13 +9,13 @@ class Bill_unionClient(AbstractClient):
|
|
|
9
9
|
_endpoint = 'bill-union.api.ksyun.com'
|
|
10
10
|
_service = 'bill-union'
|
|
11
11
|
def DescribeBillSummaryByPayMode(self, request):
|
|
12
|
-
"""
|
|
12
|
+
"""获取计费类别汇总账单(费用账单接口,推荐使用,包含预付费、实时付费、后付费)
|
|
13
13
|
:param request: Request instance for DescribeBillSummaryByPayMode.
|
|
14
14
|
:type request: :class:`ksyun.client.bill_union.v20200101.models.DescribeBillSummaryByPayModeRequest`
|
|
15
15
|
"""
|
|
16
16
|
try:
|
|
17
17
|
params = request._serialize()
|
|
18
|
-
body = self.
|
|
18
|
+
body = self.call_judge("DescribeBillSummaryByPayMode", params, "application/x-www-form-urlencoded")
|
|
19
19
|
response = json.loads(body)
|
|
20
20
|
if "Error" not in response:
|
|
21
21
|
return body
|
|
@@ -28,7 +28,7 @@ class Bill_unionClient(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 DescribeBillSummaryByProduct(self, request):
|
|
@@ -38,7 +38,7 @@ class Bill_unionClient(AbstractClient):
|
|
|
38
38
|
"""
|
|
39
39
|
try:
|
|
40
40
|
params = request._serialize()
|
|
41
|
-
body = self.
|
|
41
|
+
body = self.call_judge("DescribeBillSummaryByProduct", params, "application/json")
|
|
42
42
|
response = json.loads(body)
|
|
43
43
|
if "Error" not in response:
|
|
44
44
|
return body
|
|
@@ -51,17 +51,17 @@ class Bill_unionClient(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 DescribeBillSummaryByProject(self, request):
|
|
58
|
-
"""
|
|
58
|
+
"""按项目制获取账单汇总金额(费用账单接口,推荐使用,包含预付费、实时付费、后付费)
|
|
59
59
|
:param request: Request instance for DescribeBillSummaryByProject.
|
|
60
60
|
:type request: :class:`ksyun.client.bill_union.v20200101.models.DescribeBillSummaryByProjectRequest`
|
|
61
61
|
"""
|
|
62
62
|
try:
|
|
63
63
|
params = request._serialize()
|
|
64
|
-
body = self.
|
|
64
|
+
body = self.call_judge("DescribeBillSummaryByProject", params, "application/x-www-form-urlencoded")
|
|
65
65
|
response = json.loads(body)
|
|
66
66
|
if "Error" not in response:
|
|
67
67
|
return body
|
|
@@ -74,7 +74,7 @@ class Bill_unionClient(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 DescribeInstanceSummaryBills(self, request):
|
|
@@ -84,7 +84,7 @@ class Bill_unionClient(AbstractClient):
|
|
|
84
84
|
"""
|
|
85
85
|
try:
|
|
86
86
|
params = request._serialize()
|
|
87
|
-
body = self.
|
|
87
|
+
body = self.call_judge("DescribeInstanceSummaryBills", params, "application/json")
|
|
88
88
|
response = json.loads(body)
|
|
89
89
|
if "Error" not in response:
|
|
90
90
|
return body
|
|
@@ -97,7 +97,7 @@ class Bill_unionClient(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 DescribeProductCode(self, request):
|
|
@@ -107,7 +107,7 @@ class Bill_unionClient(AbstractClient):
|
|
|
107
107
|
"""
|
|
108
108
|
try:
|
|
109
109
|
params = request._serialize()
|
|
110
|
-
body = self.
|
|
110
|
+
body = self.call_judge("DescribeProductCode", params, "application/json")
|
|
111
111
|
response = json.loads(body)
|
|
112
112
|
if "Error" not in response:
|
|
113
113
|
return body
|
|
@@ -120,7 +120,7 @@ class Bill_unionClient(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 DescribeSplitItemBillDetails(self, request):
|
|
@@ -130,7 +130,7 @@ class Bill_unionClient(AbstractClient):
|
|
|
130
130
|
"""
|
|
131
131
|
try:
|
|
132
132
|
params = request._serialize()
|
|
133
|
-
body = self.
|
|
133
|
+
body = self.call_judge("DescribeSplitItemBillDetails", params, "application/json")
|
|
134
134
|
response = json.loads(body)
|
|
135
135
|
if "Error" not in response:
|
|
136
136
|
return body
|
|
@@ -143,6 +143,73 @@ class Bill_unionClient(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
|
+
def DescribeMiItemBills(self, request):
|
|
150
|
+
"""小米计费项账单
|
|
151
|
+
:param request: Request instance for DescribeMiItemBills.
|
|
152
|
+
:type request: :class:`ksyun.client.bill_union.v20200101.models.DescribeMiItemBillsRequest`
|
|
153
|
+
"""
|
|
154
|
+
try:
|
|
155
|
+
params = request._serialize()
|
|
156
|
+
body = self.call_judge("DescribeMiItemBills", params, "application/json")
|
|
157
|
+
response = json.loads(body)
|
|
158
|
+
if "Error" not in response:
|
|
159
|
+
return body
|
|
160
|
+
else:
|
|
161
|
+
code = response["Error"]["Code"]
|
|
162
|
+
message = response["Error"]["Message"]
|
|
163
|
+
req_id = response["RequestId"]
|
|
164
|
+
raise KsyunSDKException(code, message, req_id)
|
|
165
|
+
except Exception as e:
|
|
166
|
+
if isinstance(e, KsyunSDKException):
|
|
167
|
+
raise
|
|
168
|
+
else:
|
|
169
|
+
raise KsyunSDKException(message=str(e))
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def DescribeSplitItemDayBillDetails(self, request):
|
|
173
|
+
"""分页查询分拆项账单明细
|
|
174
|
+
:param request: Request instance for DescribeSplitItemDayBillDetails.
|
|
175
|
+
:type request: :class:`ksyun.client.bill_union.v20200101.models.DescribeSplitItemDayBillDetailsRequest`
|
|
176
|
+
"""
|
|
177
|
+
try:
|
|
178
|
+
params = request._serialize()
|
|
179
|
+
body = self.call_judge("DescribeSplitItemDayBillDetails", params, "application/json")
|
|
180
|
+
response = json.loads(body)
|
|
181
|
+
if "Error" not in response:
|
|
182
|
+
return body
|
|
183
|
+
else:
|
|
184
|
+
code = response["Error"]["Code"]
|
|
185
|
+
message = response["Error"]["Message"]
|
|
186
|
+
req_id = response["RequestId"]
|
|
187
|
+
raise KsyunSDKException(code, message, req_id)
|
|
188
|
+
except Exception as e:
|
|
189
|
+
if isinstance(e, KsyunSDKException):
|
|
190
|
+
raise
|
|
191
|
+
else:
|
|
192
|
+
raise KsyunSDKException(message=str(e))
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
def ListProductGroups(self, request):
|
|
196
|
+
"""获取产品线详情列表
|
|
197
|
+
:param request: Request instance for ListProductGroups.
|
|
198
|
+
:type request: :class:`ksyun.client.bill_union.v20200101.models.ListProductGroupsRequest`
|
|
199
|
+
"""
|
|
200
|
+
try:
|
|
201
|
+
params = request._serialize()
|
|
202
|
+
body = self.call_judge("ListProductGroups", params, "application/json")
|
|
203
|
+
response = json.loads(body)
|
|
204
|
+
if "Error" not in response:
|
|
205
|
+
return body
|
|
206
|
+
else:
|
|
207
|
+
code = response["Error"]["Code"]
|
|
208
|
+
message = response["Error"]["Message"]
|
|
209
|
+
req_id = response["RequestId"]
|
|
210
|
+
raise KsyunSDKException(code, message, req_id)
|
|
211
|
+
except Exception as e:
|
|
212
|
+
if isinstance(e, KsyunSDKException):
|
|
213
|
+
raise
|
|
214
|
+
else:
|
|
215
|
+
raise KsyunSDKException(message=str(e))
|