kingsoftcloud-sdk-python 1.1.1__py2.py3-none-any.whl → 1.5.8.49__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kingsoftcloud_sdk_python-1.5.8.49.dist-info/METADATA +71 -0
- kingsoftcloud_sdk_python-1.5.8.49.dist-info/RECORD +337 -0
- {kingsoftcloud_sdk_python-1.1.1.dist-info → kingsoftcloud_sdk_python-1.5.8.49.dist-info}/WHEEL +1 -1
- ksyun/__init__.py +1 -1
- ksyun/client/actiontrail/v20190401/client.py +2 -4
- ksyun/client/aicp/v20240612/client.py +1344 -0
- ksyun/client/aicp/v20240612/models.py +1963 -0
- ksyun/client/aicp/v20251212/__init__.py +0 -0
- ksyun/client/aicp/v20251212/client.py +56 -0
- ksyun/client/aicp/v20251212/models.py +114 -0
- ksyun/client/bill/v20180601/client.py +6 -77
- ksyun/client/bill/v20180601/models.py +29 -41
- ksyun/client/bill/v20220601/__init__.py +0 -0
- ksyun/client/bill/v20220601/client.py +54 -0
- ksyun/client/bill/v20220601/models.py +54 -0
- ksyun/client/bill_union/v20200101/client.py +81 -14
- ksyun/client/bill_union/v20200101/models.py +119 -3
- ksyun/client/bill_union/v20221222/__init__.py +0 -0
- ksyun/client/bill_union/v20221222/client.py +146 -0
- ksyun/client/bill_union/v20221222/models.py +193 -0
- ksyun/client/bill_union/v20250801/__init__.py +0 -0
- ksyun/client/bill_union/v20250801/client.py +54 -0
- ksyun/client/bill_union/v20250801/models.py +64 -0
- ksyun/client/bws/v20160304/client.py +33 -12
- ksyun/client/bws/v20160304/models.py +51 -0
- ksyun/client/cdn/__init__.py +0 -0
- ksyun/client/cdn/v20160901/__init__.py +0 -0
- ksyun/client/cdn/v20160901/client.py +77 -0
- ksyun/client/cdn/v20160901/models.py +51 -0
- ksyun/client/cdn/v20200630/__init__.py +0 -0
- ksyun/client/cdn/v20200630/client.py +399 -0
- ksyun/client/cdn/v20200630/models.py +826 -0
- ksyun/client/cdn/v20200901/__init__.py +0 -0
- ksyun/client/cdn/v20200901/client.py +169 -0
- ksyun/client/cdn/v20200901/models.py +224 -0
- ksyun/client/cdn/v20211201/__init__.py +0 -0
- ksyun/client/cdn/v20211201/client.py +31 -0
- ksyun/client/cdn/v20211201/models.py +23 -0
- ksyun/client/cdn/v3/__init__.py +0 -0
- ksyun/client/cdn/v3/client.py +997 -0
- ksyun/client/cdn/v3/models.py +1323 -0
- ksyun/client/cen/__init__.py +0 -0
- ksyun/client/cen/v20160304/__init__.py +0 -0
- ksyun/client/cen/v20160304/client.py +606 -0
- ksyun/client/cen/v20160304/models.py +718 -0
- ksyun/client/clickhouse/__init__.py +0 -0
- ksyun/client/clickhouse/v20210101/__init__.py +0 -0
- ksyun/client/clickhouse/v20210101/client.py +905 -0
- ksyun/client/clickhouse/v20210101/models.py +1127 -0
- ksyun/client/cloud_advisor/__init__.py +0 -0
- ksyun/client/cloud_advisor/v20250610/__init__.py +0 -0
- ksyun/client/cloud_advisor/v20250610/client.py +77 -0
- ksyun/client/cloud_advisor/v20250610/models.py +80 -0
- ksyun/client/dmp/__init__.py +0 -0
- ksyun/client/dmp/v20240101/__init__.py +0 -0
- ksyun/client/dmp/v20240101/client.py +468 -0
- ksyun/client/dmp/v20240101/models.py +423 -0
- ksyun/client/dts/__init__.py +0 -0
- ksyun/client/dts/v20180108/__init__.py +0 -0
- ksyun/client/dts/v20180108/client.py +445 -0
- ksyun/client/dts/v20180108/models.py +734 -0
- ksyun/client/ebs/v20160304/client.py +260 -55
- ksyun/client/ebs/v20160304/models.py +320 -66
- ksyun/client/eip/v20160304/client.py +127 -14
- ksyun/client/eip/v20160304/models.py +95 -1
- ksyun/client/epc/v20151101/client.py +1309 -184
- ksyun/client/epc/v20151101/models.py +2623 -137
- ksyun/client/iam/v20151101/client.py +325 -120
- ksyun/client/iam/v20151101/models.py +284 -28
- ksyun/client/iam/v20240513/__init__.py +0 -0
- ksyun/client/iam/v20240513/client.py +31 -0
- ksyun/client/iam/v20240513/models.py +33 -0
- ksyun/client/iam/v20240703/__init__.py +0 -0
- ksyun/client/iam/v20240703/client.py +31 -0
- ksyun/client/iam/v20240703/models.py +18 -0
- ksyun/client/influxdb/__init__.py +0 -0
- ksyun/client/influxdb/v20191010/__init__.py +0 -0
- ksyun/client/influxdb/v20191010/client.py +629 -0
- ksyun/client/influxdb/v20191010/models.py +655 -0
- ksyun/client/kad/v20161122/client.py +56 -12
- ksyun/client/kad/v20161122/models.py +38 -0
- ksyun/client/kce/__init__.py +0 -0
- ksyun/client/kce/v20180314/__init__.py +0 -0
- ksyun/client/kce/v20180314/client.py +399 -0
- ksyun/client/kce/v20180314/models.py +374 -0
- ksyun/client/kce/v20190806/__init__.py +0 -0
- ksyun/client/kce/v20190806/client.py +790 -0
- ksyun/client/kce/v20190806/models.py +1099 -0
- ksyun/client/kce/v20201231/__init__.py +0 -0
- ksyun/client/{slb/v20171210 → kce/v20201231}/client.py +10 -12
- ksyun/client/kce/v20201231/models.py +137 -0
- ksyun/client/kce/v20230101/__init__.py +0 -0
- ksyun/client/kce/v20230101/client.py +215 -0
- ksyun/client/kce/v20230101/models.py +259 -0
- ksyun/client/kce/v20230306/__init__.py +0 -0
- ksyun/client/kce/v20230306/client.py +514 -0
- ksyun/client/kce/v20230306/models.py +655 -0
- ksyun/client/kce/v20231115/__init__.py +0 -0
- ksyun/client/kce/v20231115/client.py +54 -0
- ksyun/client/kce/v20231115/models.py +59 -0
- ksyun/client/kce2/__init__.py +0 -0
- ksyun/client/kce2/v20230101/__init__.py +0 -0
- ksyun/client/kce2/v20230101/client.py +353 -0
- ksyun/client/kce2/v20230101/models.py +483 -0
- ksyun/client/kcf/__init__.py +0 -0
- ksyun/client/kcf/v20211215/__init__.py +0 -0
- ksyun/client/kcf/v20211215/client.py +215 -0
- ksyun/client/kcf/v20211215/models.py +313 -0
- ksyun/client/kci/__init__.py +0 -0
- ksyun/client/kci/v20200702/__init__.py +0 -0
- ksyun/client/kci/v20200702/client.py +353 -0
- ksyun/client/kci/v20200702/models.py +614 -0
- ksyun/client/kcm/__init__.py +0 -0
- ksyun/client/kcm/v20160304/__init__.py +0 -0
- ksyun/client/kcm/v20160304/client.py +238 -0
- ksyun/client/kcm/v20160304/models.py +394 -0
- ksyun/client/kcrs/__init__.py +0 -0
- ksyun/client/kcrs/v20211109/__init__.py +0 -0
- ksyun/client/kcrs/v20211109/client.py +1020 -0
- ksyun/client/kcrs/v20211109/models.py +1282 -0
- ksyun/client/kcs/__init__.py +0 -0
- ksyun/client/kcs/v20160701/__init__.py +0 -0
- ksyun/client/kcs/v20160701/client.py +1526 -0
- ksyun/client/kcs/v20160701/models.py +1917 -0
- ksyun/client/kcs/v20170401/__init__.py +0 -0
- ksyun/client/kcs/v20170401/client.py +31 -0
- ksyun/client/kcs/v20170401/models.py +28 -0
- ksyun/client/kcs/v20240701/__init__.py +0 -0
- ksyun/client/kcs/v20240701/client.py +31 -0
- ksyun/client/kcs/v20240701/models.py +23 -0
- ksyun/client/kead/v20200101/client.py +48 -4
- ksyun/client/kead/v20200101/models.py +52 -42
- ksyun/client/kec/v20160304/client.py +890 -223
- ksyun/client/kec/v20160304/models.py +1377 -140
- ksyun/client/ked/__init__.py +0 -0
- ksyun/client/ked/v1/__init__.py +0 -0
- ksyun/client/ked/v1/client.py +1020 -0
- ksyun/client/ked/v1/models.py +1132 -0
- ksyun/client/kes/__init__.py +0 -0
- ksyun/client/kes/v20201215/__init__.py +0 -0
- ksyun/client/kes/v20201215/client.py +192 -0
- ksyun/client/kes/v20201215/models.py +252 -0
- ksyun/client/ket/__init__.py +0 -0
- ksyun/client/ket/v20170101/__init__.py +0 -0
- ksyun/client/ket/v20170101/client.py +192 -0
- ksyun/client/ket/v20170101/models.py +265 -0
- ksyun/client/kfw/__init__.py +0 -0
- ksyun/client/kfw/v20160304/__init__.py +0 -0
- ksyun/client/kfw/v20160304/client.py +692 -0
- ksyun/client/kfw/v20160304/models.py +1029 -0
- ksyun/client/kingpay/__init__.py +0 -0
- ksyun/client/kingpay/v1/__init__.py +0 -0
- ksyun/client/kingpay/v1/client.py +31 -0
- ksyun/client/kingpay/v1/models.py +18 -0
- ksyun/client/kkms/__init__.py +0 -0
- ksyun/client/kkms/v20160304/__init__.py +0 -0
- ksyun/client/kkms/v20160304/client.py +192 -0
- ksyun/client/kkms/v20160304/models.py +185 -0
- ksyun/client/klog/__init__.py +0 -0
- ksyun/client/klog/v20200731/__init__.py +0 -0
- ksyun/client/klog/v20200731/client.py +376 -0
- ksyun/client/klog/v20200731/models.py +508 -0
- ksyun/client/kls/__init__.py +0 -0
- ksyun/client/kls/v20170101/__init__.py +0 -0
- ksyun/client/kls/v20170101/client.py +192 -0
- ksyun/client/kls/v20170101/models.py +320 -0
- ksyun/client/kmr/__init__.py +0 -0
- ksyun/client/kmr/v20210902/__init__.py +0 -0
- ksyun/client/kmr/v20210902/client.py +537 -0
- ksyun/client/kmr/v20210902/models.py +536 -0
- ksyun/client/kmr/v20231231/__init__.py +0 -0
- ksyun/client/kmr/v20231231/client.py +169 -0
- ksyun/client/kmr/v20231231/models.py +201 -0
- ksyun/client/kmr/v20240814/__init__.py +0 -0
- ksyun/client/kmr/v20240814/client.py +445 -0
- ksyun/client/kmr/v20240814/models.py +523 -0
- ksyun/client/knad/__init__.py +0 -0
- ksyun/client/knad/v20230323/__init__.py +0 -0
- ksyun/client/knad/v20230323/client.py +399 -0
- ksyun/client/knad/v20230323/models.py +470 -0
- ksyun/client/kpfs/__init__.py +0 -0
- ksyun/client/kpfs/v20240930/__init__.py +0 -0
- ksyun/client/kpfs/v20240930/client.py +217 -0
- ksyun/client/kpfs/v20240930/models.py +396 -0
- ksyun/client/krds/__init__.py +0 -0
- ksyun/client/krds/v20160701/__init__.py +0 -0
- ksyun/client/krds/v20160701/client.py +2101 -0
- ksyun/client/krds/v20160701/models.py +2722 -0
- ksyun/client/krds/v20200825/__init__.py +0 -0
- ksyun/client/krds/v20200825/client.py +238 -0
- ksyun/client/krds/v20200825/models.py +336 -0
- ksyun/client/memcached/__init__.py +0 -0
- ksyun/client/memcached/v20180627/__init__.py +0 -0
- ksyun/client/memcached/v20180627/client.py +307 -0
- ksyun/client/memcached/v20180627/models.py +317 -0
- ksyun/client/milvus/__init__.py +0 -0
- ksyun/client/milvus/v20231010/__init__.py +0 -0
- ksyun/client/milvus/v20231010/client.py +445 -0
- ksyun/client/milvus/v20231010/models.py +520 -0
- ksyun/client/mongodb/v20170101/client.py +312 -84
- ksyun/client/mongodb/v20170101/models.py +251 -34
- ksyun/client/mongodb/v20250101/__init__.py +0 -0
- ksyun/client/mongodb/v20250101/client.py +31 -0
- ksyun/client/mongodb/v20250101/models.py +18 -0
- ksyun/client/monitor/__init__.py +0 -0
- ksyun/client/monitor/v20100525/__init__.py +0 -0
- ksyun/client/monitor/v20100525/client.py +54 -0
- ksyun/client/monitor/v20100525/models.py +108 -0
- ksyun/client/monitor/v20181114/__init__.py +0 -0
- ksyun/client/monitor/v20181114/client.py +31 -0
- ksyun/client/monitor/v20181114/models.py +59 -0
- ksyun/client/monitor/v20210101/__init__.py +0 -0
- ksyun/client/monitor/v20210101/client.py +284 -0
- ksyun/client/monitor/v20210101/models.py +330 -0
- ksyun/client/monitor/v20220101/__init__.py +0 -0
- ksyun/client/monitor/v20220101/client.py +54 -0
- ksyun/client/monitor/v20220101/models.py +32 -0
- ksyun/client/monitor/v20250101/__init__.py +0 -0
- ksyun/client/monitor/v20250101/client.py +121 -0
- ksyun/client/monitor/v20250101/models.py +188 -0
- ksyun/client/pdns/__init__.py +0 -0
- ksyun/client/pdns/v20160304/__init__.py +0 -0
- ksyun/client/pdns/v20160304/client.py +813 -0
- ksyun/client/pdns/v20160304/models.py +805 -0
- ksyun/client/postgresql/__init__.py +0 -0
- ksyun/client/postgresql/v20181225/__init__.py +0 -0
- ksyun/client/postgresql/v20181225/client.py +1158 -0
- ksyun/client/postgresql/v20181225/models.py +1629 -0
- ksyun/client/rabbitmq/__init__.py +0 -0
- ksyun/client/rabbitmq/v20191017/__init__.py +0 -0
- ksyun/client/rabbitmq/v20191017/client.py +445 -0
- ksyun/client/rabbitmq/v20191017/models.py +413 -0
- ksyun/client/relyt/__init__.py +0 -0
- ksyun/client/relyt/v20240117/__init__.py +0 -0
- ksyun/client/{bill_union/v20211209 → relyt/v20240117}/client.py +10 -12
- ksyun/client/relyt/v20240117/models.py +23 -0
- ksyun/client/resourcemanager/v20210320/client.py +16 -18
- ksyun/client/sks/v20151101/client.py +11 -13
- ksyun/client/sks/v20151101/models.py +28 -2
- ksyun/client/slb/v20160304/client.py +1099 -112
- ksyun/client/slb/v20160304/models.py +1697 -24
- ksyun/client/slb/v20250430/__init__.py +0 -0
- ksyun/client/slb/v20250430/client.py +813 -0
- ksyun/client/slb/v20250430/models.py +1372 -0
- ksyun/client/sqlserver/__init__.py +0 -0
- ksyun/client/sqlserver/v20190425/__init__.py +0 -0
- ksyun/client/sqlserver/v20190425/client.py +1066 -0
- ksyun/client/sqlserver/v20190425/models.py +1528 -0
- ksyun/client/sts/v20151101/client.py +23 -2
- ksyun/client/sts/v20151101/models.py +54 -1
- ksyun/client/tagv2/v20200901/client.py +60 -16
- ksyun/client/tagv2/v20200901/models.py +56 -4
- ksyun/client/ter/__init__.py +0 -0
- ksyun/client/ter/v20240415/__init__.py +0 -0
- ksyun/client/ter/v20240415/client.py +123 -0
- ksyun/client/ter/v20240415/models.py +115 -0
- ksyun/client/tidb/__init__.py +0 -0
- ksyun/client/tidb/v20210520/__init__.py +0 -0
- ksyun/client/tidb/v20210520/client.py +928 -0
- ksyun/client/tidb/v20210520/models.py +1162 -0
- ksyun/client/trade/v20200114/client.py +2 -4
- ksyun/client/trade/v20200831/client.py +2 -4
- ksyun/client/trade/v20250220/__init__.py +0 -0
- ksyun/client/trade/v20250220/client.py +100 -0
- ksyun/client/trade/v20250220/models.py +91 -0
- ksyun/client/trade/v20250321/__init__.py +0 -0
- ksyun/client/trade/v20250321/client.py +100 -0
- ksyun/client/trade/v20250321/models.py +71 -0
- ksyun/client/trade/v20250828/__init__.py +0 -0
- ksyun/client/trade/v20250828/client.py +31 -0
- ksyun/client/trade/v20250828/models.py +81 -0
- ksyun/client/vpc/v20160304/client.py +1377 -229
- ksyun/client/vpc/v20160304/models.py +1540 -138
- ksyun/client/waf/__init__.py +0 -0
- ksyun/client/waf/v20200707/__init__.py +0 -0
- ksyun/client/waf/v20200707/client.py +468 -0
- ksyun/client/waf/v20200707/models.py +738 -0
- ksyun/common/abstract_client.py +57 -21
- ksyun/common/abstract_model.py +3 -3
- ksyun/common/common_client.py +2 -0
- ksyun/common/credential.py +2 -0
- ksyun/common/exception/ksyun_sdk_exception.py +11 -7
- ksyun/common/http/request.py +45 -6
- ksyun/common/profile/client_profile.py +3 -0
- ksyun/common/profile/http_profile.py +28 -1
- kingsoftcloud_sdk_python-1.1.1.dist-info/METADATA +0 -47
- kingsoftcloud_sdk_python-1.1.1.dist-info/RECORD +0 -105
- ksyun/client/bill_union/v20211209/models.py +0 -38
- ksyun/client/slb/v20171210/models.py +0 -33
- ksyun/common/sign.py +0 -33
- {kingsoftcloud_sdk_python-1.1.1.dist-info → kingsoftcloud_sdk_python-1.5.8.49.dist-info/licenses}/LICENSE +0 -0
- {kingsoftcloud_sdk_python-1.1.1.dist-info → kingsoftcloud_sdk_python-1.5.8.49.dist-info}/top_level.txt +0 -0
- /ksyun/client/{bill_union/v20211209 → aicp}/__init__.py +0 -0
- /ksyun/client/{slb/v20171210 → aicp/v20240612}/__init__.py +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
from ksyun.common.abstract_model import AbstractModel
|
|
2
|
+
|
|
3
|
+
class ListInstancesRequest(AbstractModel):
|
|
4
|
+
"""ListInstances请求参数结构体
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
def __init__(self):
|
|
8
|
+
r"""查询实例列表
|
|
9
|
+
:param PageNumber: 当前页码 从0开始
|
|
10
|
+
:type PathPrefix: Int
|
|
11
|
+
:param PageSize: 当前页内数据的个数
|
|
12
|
+
:type PathPrefix: Int
|
|
13
|
+
:param InstanceStatus: - “Running”: 集群当前正在运行并执行其任务。
|
|
14
|
+
- “Creating”: 集群正在创建或初始化中。
|
|
15
|
+
- “Upgrade”: 集群正在升级到更新的版本或配置。
|
|
16
|
+
- “Downgrade”: 集群正在降级到旧的版本或配置。
|
|
17
|
+
- “ScaleOut”: 集群正在通过增加更多资源或实例来扩展容量。
|
|
18
|
+
- “ScaleIn”: 集群正在通过移除资源或实例来缩减容量。
|
|
19
|
+
- “Restart”: 集群正在重启,通常是为了应用更新或从错误中恢复。
|
|
20
|
+
- “Reconfig”: 集群正在重新配置新的设置或参数。
|
|
21
|
+
- “Freezing”: 集群正在冻结或暂停中。
|
|
22
|
+
- “Freeze”: 集群当前已冻结或暂停。
|
|
23
|
+
- “CreateFailed”: 集群创建或初始化失败。
|
|
24
|
+
- “Terminated”: 集群已终止,不再运行。
|
|
25
|
+
- “Deleting”: 集群正在删除或移除中。
|
|
26
|
+
:type PathPrefix: Array
|
|
27
|
+
:param InstanceNameOrId: 实例名称或ID,用于标识特定的集群实例。
|
|
28
|
+
:type PathPrefix: String
|
|
29
|
+
"""
|
|
30
|
+
self.PageNumber = None
|
|
31
|
+
self.PageSize = None
|
|
32
|
+
self.InstanceStatus = None
|
|
33
|
+
self.InstanceNameOrId = None
|
|
34
|
+
|
|
35
|
+
def _deserialize(self, params):
|
|
36
|
+
if params.get("PageNumber"):
|
|
37
|
+
self.PageNumber = params.get("PageNumber")
|
|
38
|
+
if params.get("PageSize"):
|
|
39
|
+
self.PageSize = params.get("PageSize")
|
|
40
|
+
if params.get("InstanceStatus"):
|
|
41
|
+
self.InstanceStatus = params.get("InstanceStatus")
|
|
42
|
+
if params.get("InstanceNameOrId"):
|
|
43
|
+
self.InstanceNameOrId = params.get("InstanceNameOrId")
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class GetInstanceDetailRequest(AbstractModel):
|
|
47
|
+
"""GetInstanceDetail请求参数结构体
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
def __init__(self):
|
|
51
|
+
r"""实例信息
|
|
52
|
+
:param InstanceId: 实例ID,用于唯一标识一个实例
|
|
53
|
+
:type PathPrefix: String
|
|
54
|
+
"""
|
|
55
|
+
self.InstanceId = None
|
|
56
|
+
|
|
57
|
+
def _deserialize(self, params):
|
|
58
|
+
if params.get("InstanceId"):
|
|
59
|
+
self.InstanceId = params.get("InstanceId")
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class ModifyHostsRequest(AbstractModel):
|
|
63
|
+
"""ModifyHosts请求参数结构体
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
def __init__(self):
|
|
67
|
+
r"""修改域名解析地址
|
|
68
|
+
:param InstanceId: 实例ID
|
|
69
|
+
:type PathPrefix: String
|
|
70
|
+
:param TunaHosts: TunaHosts
|
|
71
|
+
:type PathPrefix: Array
|
|
72
|
+
"""
|
|
73
|
+
self.InstanceId = None
|
|
74
|
+
self.TunaHosts = None
|
|
75
|
+
|
|
76
|
+
def _deserialize(self, params):
|
|
77
|
+
if params.get("InstanceId"):
|
|
78
|
+
self.InstanceId = params.get("InstanceId")
|
|
79
|
+
if params.get("TunaHosts"):
|
|
80
|
+
self.TunaHosts = params.get("TunaHosts")
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class ListAutoScaleHistoryRequest(AbstractModel):
|
|
84
|
+
"""ListAutoScaleHistory请求参数结构体
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
def __init__(self):
|
|
88
|
+
r"""查看弹性伸缩策略历史
|
|
89
|
+
:param InstanceId: 实例ID,用于唯一标识一个实例
|
|
90
|
+
:type PathPrefix: String
|
|
91
|
+
:param ExecAtStart: 执行时间范围的起始时间
|
|
92
|
+
:type PathPrefix: String
|
|
93
|
+
:param ExecAtEnd: 执行时间范围的结束时间
|
|
94
|
+
:type PathPrefix: String
|
|
95
|
+
:param PolicyName: 策略名称(左右模糊匹配)
|
|
96
|
+
:type PathPrefix: String
|
|
97
|
+
:param PageNumber: 页码,从0开始
|
|
98
|
+
:type PathPrefix: Int
|
|
99
|
+
:param PageSize: 每页记录数
|
|
100
|
+
:type PathPrefix: Int
|
|
101
|
+
"""
|
|
102
|
+
self.InstanceId = None
|
|
103
|
+
self.ExecAtStart = None
|
|
104
|
+
self.ExecAtEnd = None
|
|
105
|
+
self.PolicyName = None
|
|
106
|
+
self.PageNumber = None
|
|
107
|
+
self.PageSize = None
|
|
108
|
+
|
|
109
|
+
def _deserialize(self, params):
|
|
110
|
+
if params.get("InstanceId"):
|
|
111
|
+
self.InstanceId = params.get("InstanceId")
|
|
112
|
+
if params.get("ExecAtStart"):
|
|
113
|
+
self.ExecAtStart = params.get("ExecAtStart")
|
|
114
|
+
if params.get("ExecAtEnd"):
|
|
115
|
+
self.ExecAtEnd = params.get("ExecAtEnd")
|
|
116
|
+
if params.get("PolicyName"):
|
|
117
|
+
self.PolicyName = params.get("PolicyName")
|
|
118
|
+
if params.get("PageNumber"):
|
|
119
|
+
self.PageNumber = params.get("PageNumber")
|
|
120
|
+
if params.get("PageSize"):
|
|
121
|
+
self.PageSize = params.get("PageSize")
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class CreateAutoScalePolicyRequest(AbstractModel):
|
|
125
|
+
"""CreateAutoScalePolicy请求参数结构体
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
def __init__(self):
|
|
129
|
+
r"""新增弹性伸缩策略
|
|
130
|
+
:param InstanceId: 实例ID,用于唯一标识一个实例
|
|
131
|
+
:type PathPrefix: String
|
|
132
|
+
:param PolicyName: 策略名称
|
|
133
|
+
:type PathPrefix: String
|
|
134
|
+
:param ChargeType: 支持 Minutely (按量付费) 和 Daily (按量付费(按日月结))
|
|
135
|
+
:type PathPrefix: String
|
|
136
|
+
:param ExecuteCycle: 支持如下参数:
|
|
137
|
+
|
|
138
|
+
- Daily 每天执行
|
|
139
|
+
- Weekly 每周特定天数
|
|
140
|
+
- Monthly 每月特定天数
|
|
141
|
+
- Once 仅执行一次
|
|
142
|
+
:type PathPrefix: String
|
|
143
|
+
:param ExecuteRules: 参数根据 ExecuteCycle 的不同而有所不同。请根据实际的执行周期传入对应的规则。
|
|
144
|
+
:type PathPrefix: Object
|
|
145
|
+
"""
|
|
146
|
+
self.InstanceId = None
|
|
147
|
+
self.PolicyName = None
|
|
148
|
+
self.ChargeType = None
|
|
149
|
+
self.ExecuteCycle = None
|
|
150
|
+
self.ExecuteRules = None
|
|
151
|
+
|
|
152
|
+
def _deserialize(self, params):
|
|
153
|
+
if params.get("InstanceId"):
|
|
154
|
+
self.InstanceId = params.get("InstanceId")
|
|
155
|
+
if params.get("PolicyName"):
|
|
156
|
+
self.PolicyName = params.get("PolicyName")
|
|
157
|
+
if params.get("ChargeType"):
|
|
158
|
+
self.ChargeType = params.get("ChargeType")
|
|
159
|
+
if params.get("ExecuteCycle"):
|
|
160
|
+
self.ExecuteCycle = params.get("ExecuteCycle")
|
|
161
|
+
if params.get("ExecuteRules"):
|
|
162
|
+
self.ExecuteRules = params.get("ExecuteRules")
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class ListAutoScalePolicyRequest(AbstractModel):
|
|
166
|
+
"""ListAutoScalePolicy请求参数结构体
|
|
167
|
+
"""
|
|
168
|
+
|
|
169
|
+
def __init__(self):
|
|
170
|
+
r"""查看弹性伸缩策略
|
|
171
|
+
:param InstanceId: 实例ID,用于唯一标识一个实例
|
|
172
|
+
:type PathPrefix: String
|
|
173
|
+
"""
|
|
174
|
+
self.InstanceId = None
|
|
175
|
+
|
|
176
|
+
def _deserialize(self, params):
|
|
177
|
+
if params.get("InstanceId"):
|
|
178
|
+
self.InstanceId = params.get("InstanceId")
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
class DeleteAutoScalePolicyRequest(AbstractModel):
|
|
182
|
+
"""DeleteAutoScalePolicy请求参数结构体
|
|
183
|
+
"""
|
|
184
|
+
|
|
185
|
+
def __init__(self):
|
|
186
|
+
r"""删除弹性伸缩策略
|
|
187
|
+
:param InstanceId: 实例ID,用于唯一标识一个实例
|
|
188
|
+
:type PathPrefix: String
|
|
189
|
+
:param PolicyId: 策略ID
|
|
190
|
+
:type PathPrefix: String
|
|
191
|
+
"""
|
|
192
|
+
self.InstanceId = None
|
|
193
|
+
self.PolicyId = None
|
|
194
|
+
|
|
195
|
+
def _deserialize(self, params):
|
|
196
|
+
if params.get("InstanceId"):
|
|
197
|
+
self.InstanceId = params.get("InstanceId")
|
|
198
|
+
if params.get("PolicyId"):
|
|
199
|
+
self.PolicyId = params.get("PolicyId")
|
|
200
|
+
|
|
201
|
+
|
|
File without changes
|
|
@@ -0,0 +1,445 @@
|
|
|
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 KmrClient(AbstractClient):
|
|
8
|
+
_apiVersion = '2024-08-14'
|
|
9
|
+
_endpoint = 'kmr.api.ksyun.com'
|
|
10
|
+
_service = 'kmr'
|
|
11
|
+
def DetailWorkspace(self, request):
|
|
12
|
+
"""获取工作空间详情
|
|
13
|
+
:param request: Request instance for DetailWorkspace.
|
|
14
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.DetailWorkspaceRequest`
|
|
15
|
+
"""
|
|
16
|
+
try:
|
|
17
|
+
params = request._serialize()
|
|
18
|
+
body = self.call_judge("DetailWorkspace", 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 ListWorkspaces(self, request):
|
|
35
|
+
"""获取工作空间列表
|
|
36
|
+
:param request: Request instance for ListWorkspaces.
|
|
37
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.ListWorkspacesRequest`
|
|
38
|
+
"""
|
|
39
|
+
try:
|
|
40
|
+
params = request._serialize()
|
|
41
|
+
body = self.call_judge("ListWorkspaces", params, "application/json")
|
|
42
|
+
response = json.loads(body)
|
|
43
|
+
if "Error" not in response:
|
|
44
|
+
return body
|
|
45
|
+
else:
|
|
46
|
+
code = response["Error"]["Code"]
|
|
47
|
+
message = response["Error"]["Message"]
|
|
48
|
+
req_id = response["RequestId"]
|
|
49
|
+
raise KsyunSDKException(code, message, req_id)
|
|
50
|
+
except Exception as e:
|
|
51
|
+
if isinstance(e, KsyunSDKException):
|
|
52
|
+
raise
|
|
53
|
+
else:
|
|
54
|
+
raise KsyunSDKException(message=str(e))
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def StartJobRun(self, request):
|
|
58
|
+
"""提交Spark作业
|
|
59
|
+
:param request: Request instance for StartJobRun.
|
|
60
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.StartJobRunRequest`
|
|
61
|
+
"""
|
|
62
|
+
try:
|
|
63
|
+
params = request._serialize()
|
|
64
|
+
body = self.call_judge("StartJobRun", params, "application/json")
|
|
65
|
+
response = json.loads(body)
|
|
66
|
+
if "Error" not in response:
|
|
67
|
+
return body
|
|
68
|
+
else:
|
|
69
|
+
code = response["Error"]["Code"]
|
|
70
|
+
message = response["Error"]["Message"]
|
|
71
|
+
req_id = response["RequestId"]
|
|
72
|
+
raise KsyunSDKException(code, message, req_id)
|
|
73
|
+
except Exception as e:
|
|
74
|
+
if isinstance(e, KsyunSDKException):
|
|
75
|
+
raise
|
|
76
|
+
else:
|
|
77
|
+
raise KsyunSDKException(message=str(e))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def GetJobRun(self, request):
|
|
81
|
+
"""获取Spark作业详情
|
|
82
|
+
:param request: Request instance for GetJobRun.
|
|
83
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.GetJobRunRequest`
|
|
84
|
+
"""
|
|
85
|
+
try:
|
|
86
|
+
params = request._serialize()
|
|
87
|
+
body = self.call_judge("GetJobRun", params, "application/json")
|
|
88
|
+
response = json.loads(body)
|
|
89
|
+
if "Error" not in response:
|
|
90
|
+
return body
|
|
91
|
+
else:
|
|
92
|
+
code = response["Error"]["Code"]
|
|
93
|
+
message = response["Error"]["Message"]
|
|
94
|
+
req_id = response["RequestId"]
|
|
95
|
+
raise KsyunSDKException(code, message, req_id)
|
|
96
|
+
except Exception as e:
|
|
97
|
+
if isinstance(e, KsyunSDKException):
|
|
98
|
+
raise
|
|
99
|
+
else:
|
|
100
|
+
raise KsyunSDKException(message=str(e))
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def ListJobRuns(self, request):
|
|
104
|
+
"""获取Spark作业信息列表
|
|
105
|
+
:param request: Request instance for ListJobRuns.
|
|
106
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.ListJobRunsRequest`
|
|
107
|
+
"""
|
|
108
|
+
try:
|
|
109
|
+
params = request._serialize()
|
|
110
|
+
body = self.call_judge("ListJobRuns", params, "application/json")
|
|
111
|
+
response = json.loads(body)
|
|
112
|
+
if "Error" not in response:
|
|
113
|
+
return body
|
|
114
|
+
else:
|
|
115
|
+
code = response["Error"]["Code"]
|
|
116
|
+
message = response["Error"]["Message"]
|
|
117
|
+
req_id = response["RequestId"]
|
|
118
|
+
raise KsyunSDKException(code, message, req_id)
|
|
119
|
+
except Exception as e:
|
|
120
|
+
if isinstance(e, KsyunSDKException):
|
|
121
|
+
raise
|
|
122
|
+
else:
|
|
123
|
+
raise KsyunSDKException(message=str(e))
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def CancelJobRun(self, request):
|
|
127
|
+
"""停止Spark作业运行
|
|
128
|
+
:param request: Request instance for CancelJobRun.
|
|
129
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.CancelJobRunRequest`
|
|
130
|
+
"""
|
|
131
|
+
try:
|
|
132
|
+
params = request._serialize()
|
|
133
|
+
body = self.call_judge("CancelJobRun", params, "application/json")
|
|
134
|
+
response = json.loads(body)
|
|
135
|
+
if "Error" not in response:
|
|
136
|
+
return body
|
|
137
|
+
else:
|
|
138
|
+
code = response["Error"]["Code"]
|
|
139
|
+
message = response["Error"]["Message"]
|
|
140
|
+
req_id = response["RequestId"]
|
|
141
|
+
raise KsyunSDKException(code, message, req_id)
|
|
142
|
+
except Exception as e:
|
|
143
|
+
if isinstance(e, KsyunSDKException):
|
|
144
|
+
raise
|
|
145
|
+
else:
|
|
146
|
+
raise KsyunSDKException(message=str(e))
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def ListExecutor(self, request):
|
|
150
|
+
"""获取作业Executor列表
|
|
151
|
+
:param request: Request instance for ListExecutor.
|
|
152
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.ListExecutorRequest`
|
|
153
|
+
"""
|
|
154
|
+
try:
|
|
155
|
+
params = request._serialize()
|
|
156
|
+
body = self.call_judge("ListExecutor", 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 StartRayJobRun(self, request):
|
|
173
|
+
"""提交Ray作业
|
|
174
|
+
:param request: Request instance for StartRayJobRun.
|
|
175
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.StartRayJobRunRequest`
|
|
176
|
+
"""
|
|
177
|
+
try:
|
|
178
|
+
params = request._serialize()
|
|
179
|
+
body = self.call_judge("StartRayJobRun", 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 GetRayJobRun(self, request):
|
|
196
|
+
"""GetRayJobRun
|
|
197
|
+
:param request: Request instance for GetRayJobRun.
|
|
198
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.GetRayJobRunRequest`
|
|
199
|
+
"""
|
|
200
|
+
try:
|
|
201
|
+
params = request._serialize()
|
|
202
|
+
body = self.call_judge("GetRayJobRun", 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))
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
def ListRayJobRuns(self, request):
|
|
219
|
+
"""ListRayJobRuns
|
|
220
|
+
:param request: Request instance for ListRayJobRuns.
|
|
221
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.ListRayJobRunsRequest`
|
|
222
|
+
"""
|
|
223
|
+
try:
|
|
224
|
+
params = request._serialize()
|
|
225
|
+
body = self.call_judge("ListRayJobRuns", params, "application/json")
|
|
226
|
+
response = json.loads(body)
|
|
227
|
+
if "Error" not in response:
|
|
228
|
+
return body
|
|
229
|
+
else:
|
|
230
|
+
code = response["Error"]["Code"]
|
|
231
|
+
message = response["Error"]["Message"]
|
|
232
|
+
req_id = response["RequestId"]
|
|
233
|
+
raise KsyunSDKException(code, message, req_id)
|
|
234
|
+
except Exception as e:
|
|
235
|
+
if isinstance(e, KsyunSDKException):
|
|
236
|
+
raise
|
|
237
|
+
else:
|
|
238
|
+
raise KsyunSDKException(message=str(e))
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def CancelRayJobRun(self, request):
|
|
242
|
+
"""停止Ray作业运行
|
|
243
|
+
:param request: Request instance for CancelRayJobRun.
|
|
244
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.CancelRayJobRunRequest`
|
|
245
|
+
"""
|
|
246
|
+
try:
|
|
247
|
+
params = request._serialize()
|
|
248
|
+
body = self.call_judge("CancelRayJobRun", params, "application/json")
|
|
249
|
+
response = json.loads(body)
|
|
250
|
+
if "Error" not in response:
|
|
251
|
+
return body
|
|
252
|
+
else:
|
|
253
|
+
code = response["Error"]["Code"]
|
|
254
|
+
message = response["Error"]["Message"]
|
|
255
|
+
req_id = response["RequestId"]
|
|
256
|
+
raise KsyunSDKException(code, message, req_id)
|
|
257
|
+
except Exception as e:
|
|
258
|
+
if isinstance(e, KsyunSDKException):
|
|
259
|
+
raise
|
|
260
|
+
else:
|
|
261
|
+
raise KsyunSDKException(message=str(e))
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
def StartFlinkJobRun(self, request):
|
|
265
|
+
"""提交Flink作业
|
|
266
|
+
:param request: Request instance for StartFlinkJobRun.
|
|
267
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.StartFlinkJobRunRequest`
|
|
268
|
+
"""
|
|
269
|
+
try:
|
|
270
|
+
params = request._serialize()
|
|
271
|
+
body = self.call_judge("StartFlinkJobRun", params, "application/json")
|
|
272
|
+
response = json.loads(body)
|
|
273
|
+
if "Error" not in response:
|
|
274
|
+
return body
|
|
275
|
+
else:
|
|
276
|
+
code = response["Error"]["Code"]
|
|
277
|
+
message = response["Error"]["Message"]
|
|
278
|
+
req_id = response["RequestId"]
|
|
279
|
+
raise KsyunSDKException(code, message, req_id)
|
|
280
|
+
except Exception as e:
|
|
281
|
+
if isinstance(e, KsyunSDKException):
|
|
282
|
+
raise
|
|
283
|
+
else:
|
|
284
|
+
raise KsyunSDKException(message=str(e))
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
def GetFlinkJobRun(self, request):
|
|
288
|
+
"""获取Flink作业详情
|
|
289
|
+
:param request: Request instance for GetFlinkJobRun.
|
|
290
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.GetFlinkJobRunRequest`
|
|
291
|
+
"""
|
|
292
|
+
try:
|
|
293
|
+
params = request._serialize()
|
|
294
|
+
body = self.call_judge("GetFlinkJobRun", params, "application/json")
|
|
295
|
+
response = json.loads(body)
|
|
296
|
+
if "Error" not in response:
|
|
297
|
+
return body
|
|
298
|
+
else:
|
|
299
|
+
code = response["Error"]["Code"]
|
|
300
|
+
message = response["Error"]["Message"]
|
|
301
|
+
req_id = response["RequestId"]
|
|
302
|
+
raise KsyunSDKException(code, message, req_id)
|
|
303
|
+
except Exception as e:
|
|
304
|
+
if isinstance(e, KsyunSDKException):
|
|
305
|
+
raise
|
|
306
|
+
else:
|
|
307
|
+
raise KsyunSDKException(message=str(e))
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
def ListFlinkJobRuns(self, request):
|
|
311
|
+
"""获取Flink作业列表
|
|
312
|
+
:param request: Request instance for ListFlinkJobRuns.
|
|
313
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.ListFlinkJobRunsRequest`
|
|
314
|
+
"""
|
|
315
|
+
try:
|
|
316
|
+
params = request._serialize()
|
|
317
|
+
body = self.call_judge("ListFlinkJobRuns", params, "application/json")
|
|
318
|
+
response = json.loads(body)
|
|
319
|
+
if "Error" not in response:
|
|
320
|
+
return body
|
|
321
|
+
else:
|
|
322
|
+
code = response["Error"]["Code"]
|
|
323
|
+
message = response["Error"]["Message"]
|
|
324
|
+
req_id = response["RequestId"]
|
|
325
|
+
raise KsyunSDKException(code, message, req_id)
|
|
326
|
+
except Exception as e:
|
|
327
|
+
if isinstance(e, KsyunSDKException):
|
|
328
|
+
raise
|
|
329
|
+
else:
|
|
330
|
+
raise KsyunSDKException(message=str(e))
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
def CancelFlinkJobRun(self, request):
|
|
334
|
+
"""停止Flink作业运行
|
|
335
|
+
:param request: Request instance for CancelFlinkJobRun.
|
|
336
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.CancelFlinkJobRunRequest`
|
|
337
|
+
"""
|
|
338
|
+
try:
|
|
339
|
+
params = request._serialize()
|
|
340
|
+
body = self.call_judge("CancelFlinkJobRun", params, "application/json")
|
|
341
|
+
response = json.loads(body)
|
|
342
|
+
if "Error" not in response:
|
|
343
|
+
return body
|
|
344
|
+
else:
|
|
345
|
+
code = response["Error"]["Code"]
|
|
346
|
+
message = response["Error"]["Message"]
|
|
347
|
+
req_id = response["RequestId"]
|
|
348
|
+
raise KsyunSDKException(code, message, req_id)
|
|
349
|
+
except Exception as e:
|
|
350
|
+
if isinstance(e, KsyunSDKException):
|
|
351
|
+
raise
|
|
352
|
+
else:
|
|
353
|
+
raise KsyunSDKException(message=str(e))
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
def SuspendFlinkJobRun(self, request):
|
|
357
|
+
"""挂起Flink作业
|
|
358
|
+
:param request: Request instance for SuspendFlinkJobRun.
|
|
359
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.SuspendFlinkJobRunRequest`
|
|
360
|
+
"""
|
|
361
|
+
try:
|
|
362
|
+
params = request._serialize()
|
|
363
|
+
body = self.call_judge("SuspendFlinkJobRun", params, "application/json")
|
|
364
|
+
response = json.loads(body)
|
|
365
|
+
if "Error" not in response:
|
|
366
|
+
return body
|
|
367
|
+
else:
|
|
368
|
+
code = response["Error"]["Code"]
|
|
369
|
+
message = response["Error"]["Message"]
|
|
370
|
+
req_id = response["RequestId"]
|
|
371
|
+
raise KsyunSDKException(code, message, req_id)
|
|
372
|
+
except Exception as e:
|
|
373
|
+
if isinstance(e, KsyunSDKException):
|
|
374
|
+
raise
|
|
375
|
+
else:
|
|
376
|
+
raise KsyunSDKException(message=str(e))
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
def RestartFlinkJobRun(self, request):
|
|
380
|
+
"""重启Flink作业
|
|
381
|
+
:param request: Request instance for RestartFlinkJobRun.
|
|
382
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.RestartFlinkJobRunRequest`
|
|
383
|
+
"""
|
|
384
|
+
try:
|
|
385
|
+
params = request._serialize()
|
|
386
|
+
body = self.call_judge("RestartFlinkJobRun", params, "application/json")
|
|
387
|
+
response = json.loads(body)
|
|
388
|
+
if "Error" not in response:
|
|
389
|
+
return body
|
|
390
|
+
else:
|
|
391
|
+
code = response["Error"]["Code"]
|
|
392
|
+
message = response["Error"]["Message"]
|
|
393
|
+
req_id = response["RequestId"]
|
|
394
|
+
raise KsyunSDKException(code, message, req_id)
|
|
395
|
+
except Exception as e:
|
|
396
|
+
if isinstance(e, KsyunSDKException):
|
|
397
|
+
raise
|
|
398
|
+
else:
|
|
399
|
+
raise KsyunSDKException(message=str(e))
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
def DescribeMetricList(self, request):
|
|
403
|
+
"""获取监控指标项
|
|
404
|
+
:param request: Request instance for DescribeMetricList.
|
|
405
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.DescribeMetricListRequest`
|
|
406
|
+
"""
|
|
407
|
+
try:
|
|
408
|
+
params = request._serialize()
|
|
409
|
+
body = self.call_judge("DescribeMetricList", params, "application/json")
|
|
410
|
+
response = json.loads(body)
|
|
411
|
+
if "Error" not in response:
|
|
412
|
+
return body
|
|
413
|
+
else:
|
|
414
|
+
code = response["Error"]["Code"]
|
|
415
|
+
message = response["Error"]["Message"]
|
|
416
|
+
req_id = response["RequestId"]
|
|
417
|
+
raise KsyunSDKException(code, message, req_id)
|
|
418
|
+
except Exception as e:
|
|
419
|
+
if isinstance(e, KsyunSDKException):
|
|
420
|
+
raise
|
|
421
|
+
else:
|
|
422
|
+
raise KsyunSDKException(message=str(e))
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
def QueryMetrics(self, request):
|
|
426
|
+
"""获取监控指标详情
|
|
427
|
+
:param request: Request instance for QueryMetrics.
|
|
428
|
+
:type request: :class:`ksyun.client.kmr.v20240814.models.QueryMetricsRequest`
|
|
429
|
+
"""
|
|
430
|
+
try:
|
|
431
|
+
params = request._serialize()
|
|
432
|
+
body = self.call_judge("QueryMetrics", params, "application/json")
|
|
433
|
+
response = json.loads(body)
|
|
434
|
+
if "Error" not in response:
|
|
435
|
+
return body
|
|
436
|
+
else:
|
|
437
|
+
code = response["Error"]["Code"]
|
|
438
|
+
message = response["Error"]["Message"]
|
|
439
|
+
req_id = response["RequestId"]
|
|
440
|
+
raise KsyunSDKException(code, message, req_id)
|
|
441
|
+
except Exception as e:
|
|
442
|
+
if isinstance(e, KsyunSDKException):
|
|
443
|
+
raise
|
|
444
|
+
else:
|
|
445
|
+
raise KsyunSDKException(message=str(e))
|