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,508 @@
|
|
|
1
|
+
from ksyun.common.abstract_model import AbstractModel
|
|
2
|
+
|
|
3
|
+
class CreateProjectRequest(AbstractModel):
|
|
4
|
+
"""CreateProject请求参数结构体
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
def __init__(self):
|
|
8
|
+
r"""创建新工程
|
|
9
|
+
:param ProjectName: 工程名称
|
|
10
|
+
:type PathPrefix: String
|
|
11
|
+
:param Description: 工程描述
|
|
12
|
+
:type PathPrefix: String
|
|
13
|
+
:param IamProjectId: 项目制ID,缺省时为默认项目
|
|
14
|
+
:type PathPrefix: Int
|
|
15
|
+
"""
|
|
16
|
+
self.ProjectName = None
|
|
17
|
+
self.Description = None
|
|
18
|
+
self.IamProjectId = None
|
|
19
|
+
|
|
20
|
+
def _deserialize(self, params):
|
|
21
|
+
if params.get("ProjectName"):
|
|
22
|
+
self.ProjectName = params.get("ProjectName")
|
|
23
|
+
if params.get("Description"):
|
|
24
|
+
self.Description = params.get("Description")
|
|
25
|
+
if params.get("IamProjectId"):
|
|
26
|
+
self.IamProjectId = params.get("IamProjectId")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class DescribeProjectRequest(AbstractModel):
|
|
30
|
+
"""DescribeProject请求参数结构体
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
def __init__(self):
|
|
34
|
+
r"""展示工程详情
|
|
35
|
+
:param ProjectName: 工程名称
|
|
36
|
+
:type PathPrefix: String
|
|
37
|
+
"""
|
|
38
|
+
self.ProjectName = None
|
|
39
|
+
|
|
40
|
+
def _deserialize(self, params):
|
|
41
|
+
if params.get("ProjectName"):
|
|
42
|
+
self.ProjectName = params.get("ProjectName")
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class UpdateProjectRequest(AbstractModel):
|
|
46
|
+
"""UpdateProject请求参数结构体
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
def __init__(self):
|
|
50
|
+
r"""更新工程信息
|
|
51
|
+
:param ProjectName: 工程名称
|
|
52
|
+
:type PathPrefix: String
|
|
53
|
+
:param Description: 工程描述
|
|
54
|
+
:type PathPrefix: String
|
|
55
|
+
:param IamProjectId: 项目制id,缺省时为默认项目
|
|
56
|
+
:type PathPrefix: Int
|
|
57
|
+
"""
|
|
58
|
+
self.ProjectName = None
|
|
59
|
+
self.Description = None
|
|
60
|
+
self.IamProjectId = None
|
|
61
|
+
|
|
62
|
+
def _deserialize(self, params):
|
|
63
|
+
if params.get("ProjectName"):
|
|
64
|
+
self.ProjectName = params.get("ProjectName")
|
|
65
|
+
if params.get("Description"):
|
|
66
|
+
self.Description = params.get("Description")
|
|
67
|
+
if params.get("IamProjectId"):
|
|
68
|
+
self.IamProjectId = params.get("IamProjectId")
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class DeleteProjectRequest(AbstractModel):
|
|
72
|
+
"""DeleteProject请求参数结构体
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
def __init__(self):
|
|
76
|
+
r"""删除该工程
|
|
77
|
+
:param ProjectName: 工程名称
|
|
78
|
+
:type PathPrefix: String
|
|
79
|
+
"""
|
|
80
|
+
self.ProjectName = None
|
|
81
|
+
|
|
82
|
+
def _deserialize(self, params):
|
|
83
|
+
if params.get("ProjectName"):
|
|
84
|
+
self.ProjectName = params.get("ProjectName")
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class ListProjectsRequest(AbstractModel):
|
|
88
|
+
"""ListProjects请求参数结构体
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
def __init__(self):
|
|
92
|
+
r"""查看工程列表
|
|
93
|
+
:param ProjectName: 工程名称
|
|
94
|
+
:type PathPrefix: String
|
|
95
|
+
:param Description: 工程描述
|
|
96
|
+
:type PathPrefix: String
|
|
97
|
+
:param Page: 返回记录的页码,从0开始
|
|
98
|
+
:type PathPrefix: Int
|
|
99
|
+
:param Size: 每页返回最大条目,最大值500
|
|
100
|
+
:type PathPrefix: Int
|
|
101
|
+
"""
|
|
102
|
+
self.ProjectName = None
|
|
103
|
+
self.Description = None
|
|
104
|
+
self.Page = None
|
|
105
|
+
self.Size = None
|
|
106
|
+
|
|
107
|
+
def _deserialize(self, params):
|
|
108
|
+
if params.get("ProjectName"):
|
|
109
|
+
self.ProjectName = params.get("ProjectName")
|
|
110
|
+
if params.get("Description"):
|
|
111
|
+
self.Description = params.get("Description")
|
|
112
|
+
if params.get("Page"):
|
|
113
|
+
self.Page = params.get("Page")
|
|
114
|
+
if params.get("Size"):
|
|
115
|
+
self.Size = params.get("Size")
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class CreateLogPoolRequest(AbstractModel):
|
|
119
|
+
"""CreateLogPool请求参数结构体
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
def __init__(self):
|
|
123
|
+
r"""创建日志池
|
|
124
|
+
:param ProjectName: 工程名称
|
|
125
|
+
:type PathPrefix: String
|
|
126
|
+
:param LogPoolName: 日志池名称
|
|
127
|
+
:type PathPrefix: String
|
|
128
|
+
:param RetentionDays: 数据保存时间,单位为天,范围1~3600
|
|
129
|
+
:type PathPrefix: Int
|
|
130
|
+
:param Partitions: 分区个数,2-64
|
|
131
|
+
:type PathPrefix: Int
|
|
132
|
+
:param Description: 日志池描述
|
|
133
|
+
:type PathPrefix: String
|
|
134
|
+
"""
|
|
135
|
+
self.ProjectName = None
|
|
136
|
+
self.LogPoolName = None
|
|
137
|
+
self.RetentionDays = None
|
|
138
|
+
self.Partitions = None
|
|
139
|
+
self.Description = None
|
|
140
|
+
|
|
141
|
+
def _deserialize(self, params):
|
|
142
|
+
if params.get("ProjectName"):
|
|
143
|
+
self.ProjectName = params.get("ProjectName")
|
|
144
|
+
if params.get("LogPoolName"):
|
|
145
|
+
self.LogPoolName = params.get("LogPoolName")
|
|
146
|
+
if params.get("RetentionDays"):
|
|
147
|
+
self.RetentionDays = params.get("RetentionDays")
|
|
148
|
+
if params.get("Partitions"):
|
|
149
|
+
self.Partitions = params.get("Partitions")
|
|
150
|
+
if params.get("Description"):
|
|
151
|
+
self.Description = params.get("Description")
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
class DescribeLogPoolRequest(AbstractModel):
|
|
155
|
+
"""DescribeLogPool请求参数结构体
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
def __init__(self):
|
|
159
|
+
r"""日志池详情
|
|
160
|
+
:param ProjectName: 工程名称
|
|
161
|
+
:type PathPrefix: String
|
|
162
|
+
:param LogPoolName: 日志池名称
|
|
163
|
+
:type PathPrefix: String
|
|
164
|
+
"""
|
|
165
|
+
self.ProjectName = None
|
|
166
|
+
self.LogPoolName = None
|
|
167
|
+
|
|
168
|
+
def _deserialize(self, params):
|
|
169
|
+
if params.get("ProjectName"):
|
|
170
|
+
self.ProjectName = params.get("ProjectName")
|
|
171
|
+
if params.get("LogPoolName"):
|
|
172
|
+
self.LogPoolName = params.get("LogPoolName")
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
class UpdateLogPoolRequest(AbstractModel):
|
|
176
|
+
"""UpdateLogPool请求参数结构体
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
def __init__(self):
|
|
180
|
+
r"""修改日志池
|
|
181
|
+
:param ProjectName: 工程名称
|
|
182
|
+
:type PathPrefix: String
|
|
183
|
+
:param LogPoolName: 日志池名称
|
|
184
|
+
:type PathPrefix: String
|
|
185
|
+
:param LogPoolId: 日志池ID
|
|
186
|
+
:type PathPrefix: String
|
|
187
|
+
:param RetentionDays: 数据保存时间,单位为天,范围1~3600
|
|
188
|
+
:type PathPrefix: Int
|
|
189
|
+
:param Partitions: 分区数量
|
|
190
|
+
:type PathPrefix: Int
|
|
191
|
+
:param Description: 日志池描述
|
|
192
|
+
:type PathPrefix: String
|
|
193
|
+
:param Config:
|
|
194
|
+
:type PathPrefix: Object
|
|
195
|
+
"""
|
|
196
|
+
self.ProjectName = None
|
|
197
|
+
self.LogPoolName = None
|
|
198
|
+
self.LogPoolId = None
|
|
199
|
+
self.RetentionDays = None
|
|
200
|
+
self.Partitions = None
|
|
201
|
+
self.Description = None
|
|
202
|
+
self.Config = None
|
|
203
|
+
|
|
204
|
+
def _deserialize(self, params):
|
|
205
|
+
if params.get("ProjectName"):
|
|
206
|
+
self.ProjectName = params.get("ProjectName")
|
|
207
|
+
if params.get("LogPoolName"):
|
|
208
|
+
self.LogPoolName = params.get("LogPoolName")
|
|
209
|
+
if params.get("LogPoolId"):
|
|
210
|
+
self.LogPoolId = params.get("LogPoolId")
|
|
211
|
+
if params.get("RetentionDays"):
|
|
212
|
+
self.RetentionDays = params.get("RetentionDays")
|
|
213
|
+
if params.get("Partitions"):
|
|
214
|
+
self.Partitions = params.get("Partitions")
|
|
215
|
+
if params.get("Description"):
|
|
216
|
+
self.Description = params.get("Description")
|
|
217
|
+
if params.get("Config"):
|
|
218
|
+
self.Config = params.get("Config")
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
class DeleteLogPoolRequest(AbstractModel):
|
|
222
|
+
"""DeleteLogPool请求参数结构体
|
|
223
|
+
"""
|
|
224
|
+
|
|
225
|
+
def __init__(self):
|
|
226
|
+
r"""删除日志池
|
|
227
|
+
:param ProjectName: 工程名称
|
|
228
|
+
:type PathPrefix: String
|
|
229
|
+
:param LogPoolId: 日志池ID
|
|
230
|
+
:type PathPrefix: String
|
|
231
|
+
"""
|
|
232
|
+
self.ProjectName = None
|
|
233
|
+
self.LogPoolId = None
|
|
234
|
+
|
|
235
|
+
def _deserialize(self, params):
|
|
236
|
+
if params.get("ProjectName"):
|
|
237
|
+
self.ProjectName = params.get("ProjectName")
|
|
238
|
+
if params.get("LogPoolId"):
|
|
239
|
+
self.LogPoolId = params.get("LogPoolId")
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
class ListLogPoolsRequest(AbstractModel):
|
|
243
|
+
"""ListLogPools请求参数结构体
|
|
244
|
+
"""
|
|
245
|
+
|
|
246
|
+
def __init__(self):
|
|
247
|
+
r"""获取日志池列表
|
|
248
|
+
:param ProjectName: 工程名称
|
|
249
|
+
:type PathPrefix: String
|
|
250
|
+
:param LogPoolName: 根据日志池名称筛选日志池,支持模糊搜索
|
|
251
|
+
:type PathPrefix: String
|
|
252
|
+
:param Page: 页码,从0开始
|
|
253
|
+
:type PathPrefix: Int
|
|
254
|
+
:param Size: 每页返回最大条目,最大值500
|
|
255
|
+
:type PathPrefix: Int
|
|
256
|
+
:param Tags: 需要筛选的标签
|
|
257
|
+
:type PathPrefix: Object
|
|
258
|
+
"""
|
|
259
|
+
self.ProjectName = None
|
|
260
|
+
self.LogPoolName = None
|
|
261
|
+
self.Page = None
|
|
262
|
+
self.Size = None
|
|
263
|
+
self.Tags = None
|
|
264
|
+
|
|
265
|
+
def _deserialize(self, params):
|
|
266
|
+
if params.get("ProjectName"):
|
|
267
|
+
self.ProjectName = params.get("ProjectName")
|
|
268
|
+
if params.get("LogPoolName"):
|
|
269
|
+
self.LogPoolName = params.get("LogPoolName")
|
|
270
|
+
if params.get("Page"):
|
|
271
|
+
self.Page = params.get("Page")
|
|
272
|
+
if params.get("Size"):
|
|
273
|
+
self.Size = params.get("Size")
|
|
274
|
+
if params.get("Tags"):
|
|
275
|
+
self.Tags = params.get("Tags")
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
class GetLogsRequest(AbstractModel):
|
|
279
|
+
"""GetLogs请求参数结构体
|
|
280
|
+
"""
|
|
281
|
+
|
|
282
|
+
def __init__(self):
|
|
283
|
+
r"""查询日志池
|
|
284
|
+
:param ProjectName: 工程名称
|
|
285
|
+
:type PathPrefix: String
|
|
286
|
+
:param LogPoolName: 日志池名称
|
|
287
|
+
:type PathPrefix: String
|
|
288
|
+
:param LogPoolId: 日志池ID
|
|
289
|
+
:type PathPrefix: String
|
|
290
|
+
:param From: 查询开始时间,unix时间戳
|
|
291
|
+
:type PathPrefix: Int
|
|
292
|
+
:param To: 查询结束时间,unix时间戳
|
|
293
|
+
:type PathPrefix: Int
|
|
294
|
+
:param Query: 查询分析语法。关于查询分析的详细语法,详见查询语法,不填的情况下 返回原始日志
|
|
295
|
+
:type PathPrefix: String
|
|
296
|
+
:param Offset: 偏移页数,从0开始
|
|
297
|
+
仅支持运算符语法
|
|
298
|
+
:type PathPrefix: Int
|
|
299
|
+
:param Size: 查询结果条数
|
|
300
|
+
仅支持运算符语法
|
|
301
|
+
:type PathPrefix: Int
|
|
302
|
+
:param HitsOpen: 是否按时间间隔统计数据行数,当该值为true时,interval参数为必填
|
|
303
|
+
:type PathPrefix: Boolean
|
|
304
|
+
:param Interval: 数据统计时间间隔
|
|
305
|
+
示例:10s、5m、1h
|
|
306
|
+
:type PathPrefix: String
|
|
307
|
+
"""
|
|
308
|
+
self.ProjectName = None
|
|
309
|
+
self.LogPoolName = None
|
|
310
|
+
self.LogPoolId = None
|
|
311
|
+
self.From_field = None
|
|
312
|
+
self.To = None
|
|
313
|
+
self.Query = None
|
|
314
|
+
self.Offset = None
|
|
315
|
+
self.Size = None
|
|
316
|
+
self.HitsOpen = None
|
|
317
|
+
self.Interval = None
|
|
318
|
+
|
|
319
|
+
def _deserialize(self, params):
|
|
320
|
+
if params.get("ProjectName"):
|
|
321
|
+
self.ProjectName = params.get("ProjectName")
|
|
322
|
+
if params.get("LogPoolName"):
|
|
323
|
+
self.LogPoolName = params.get("LogPoolName")
|
|
324
|
+
if params.get("LogPoolId"):
|
|
325
|
+
self.LogPoolId = params.get("LogPoolId")
|
|
326
|
+
if params.get("From"):
|
|
327
|
+
self.From_field = params.get("From")
|
|
328
|
+
if params.get("To"):
|
|
329
|
+
self.To = params.get("To")
|
|
330
|
+
if params.get("Query"):
|
|
331
|
+
self.Query = params.get("Query")
|
|
332
|
+
if params.get("Offset"):
|
|
333
|
+
self.Offset = params.get("Offset")
|
|
334
|
+
if params.get("Size"):
|
|
335
|
+
self.Size = params.get("Size")
|
|
336
|
+
if params.get("HitsOpen"):
|
|
337
|
+
self.HitsOpen = params.get("HitsOpen")
|
|
338
|
+
if params.get("Interval"):
|
|
339
|
+
self.Interval = params.get("Interval")
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
class CreateQuickSearchRequest(AbstractModel):
|
|
343
|
+
"""CreateQuickSearch请求参数结构体
|
|
344
|
+
"""
|
|
345
|
+
|
|
346
|
+
def __init__(self):
|
|
347
|
+
r"""存为快速查询
|
|
348
|
+
:param ProjectName: 工程名称
|
|
349
|
+
:type PathPrefix: String
|
|
350
|
+
:param LogPoolName: 日志池名称
|
|
351
|
+
:type PathPrefix: String
|
|
352
|
+
:param QuickSearchName: 快速查询名称
|
|
353
|
+
:type PathPrefix: String
|
|
354
|
+
:param Query: 查询语句
|
|
355
|
+
:type PathPrefix: String
|
|
356
|
+
:param Description: 快速查询的备注
|
|
357
|
+
:type PathPrefix: String
|
|
358
|
+
:param TimeRange: 查询数据的时间范围
|
|
359
|
+
{
|
|
360
|
+
"from": 1737388800000,
|
|
361
|
+
"to": 1737444861000,
|
|
362
|
+
"key": "h",
|
|
363
|
+
"value": -24,
|
|
364
|
+
"start": 21,
|
|
365
|
+
"startKey": "m",
|
|
366
|
+
"end": 2,
|
|
367
|
+
"endKey": "s",
|
|
368
|
+
"tab": "Absolute|Relative",
|
|
369
|
+
"label": "近15分钟"
|
|
370
|
+
}
|
|
371
|
+
:type PathPrefix: String
|
|
372
|
+
"""
|
|
373
|
+
self.ProjectName = None
|
|
374
|
+
self.LogPoolName = None
|
|
375
|
+
self.QuickSearchName = None
|
|
376
|
+
self.Query = None
|
|
377
|
+
self.Description = None
|
|
378
|
+
self.TimeRange = None
|
|
379
|
+
|
|
380
|
+
def _deserialize(self, params):
|
|
381
|
+
if params.get("ProjectName"):
|
|
382
|
+
self.ProjectName = params.get("ProjectName")
|
|
383
|
+
if params.get("LogPoolName"):
|
|
384
|
+
self.LogPoolName = params.get("LogPoolName")
|
|
385
|
+
if params.get("QuickSearchName"):
|
|
386
|
+
self.QuickSearchName = params.get("QuickSearchName")
|
|
387
|
+
if params.get("Query"):
|
|
388
|
+
self.Query = params.get("Query")
|
|
389
|
+
if params.get("Description"):
|
|
390
|
+
self.Description = params.get("Description")
|
|
391
|
+
if params.get("TimeRange"):
|
|
392
|
+
self.TimeRange = params.get("TimeRange")
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
class ListQuickSearchsRequest(AbstractModel):
|
|
396
|
+
"""ListQuickSearchs请求参数结构体
|
|
397
|
+
"""
|
|
398
|
+
|
|
399
|
+
def __init__(self):
|
|
400
|
+
r"""获取快速查询列表
|
|
401
|
+
:param ProjectName: 工程名称
|
|
402
|
+
:type PathPrefix: String
|
|
403
|
+
:param LogPoolName: 日志池名称
|
|
404
|
+
:type PathPrefix: String
|
|
405
|
+
:param Filter: 根据快速查询名称过滤列表,支持模糊搜索
|
|
406
|
+
:type PathPrefix: String
|
|
407
|
+
:param Page: 页码,从0开始
|
|
408
|
+
:type PathPrefix: Int
|
|
409
|
+
:param Size: 每页返回最大条目,默认 500(最大值)
|
|
410
|
+
:type PathPrefix: Int
|
|
411
|
+
"""
|
|
412
|
+
self.ProjectName = None
|
|
413
|
+
self.LogPoolName = None
|
|
414
|
+
self.Filter = None
|
|
415
|
+
self.Page = None
|
|
416
|
+
self.Size = None
|
|
417
|
+
|
|
418
|
+
def _deserialize(self, params):
|
|
419
|
+
if params.get("ProjectName"):
|
|
420
|
+
self.ProjectName = params.get("ProjectName")
|
|
421
|
+
if params.get("LogPoolName"):
|
|
422
|
+
self.LogPoolName = params.get("LogPoolName")
|
|
423
|
+
if params.get("Filter"):
|
|
424
|
+
self.Filter = params.get("Filter")
|
|
425
|
+
if params.get("Page"):
|
|
426
|
+
self.Page = params.get("Page")
|
|
427
|
+
if params.get("Size"):
|
|
428
|
+
self.Size = params.get("Size")
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
class DeleteQuickSearchsRequest(AbstractModel):
|
|
432
|
+
"""DeleteQuickSearchs请求参数结构体
|
|
433
|
+
"""
|
|
434
|
+
|
|
435
|
+
def __init__(self):
|
|
436
|
+
r"""删除快速查询
|
|
437
|
+
:param ProjectName: 工程名称
|
|
438
|
+
:type PathPrefix: String
|
|
439
|
+
:param LogPoolName: 日志池名称
|
|
440
|
+
:type PathPrefix: String
|
|
441
|
+
:param QuickSearchName: 快速查询名称
|
|
442
|
+
:type PathPrefix: String
|
|
443
|
+
"""
|
|
444
|
+
self.ProjectName = None
|
|
445
|
+
self.LogPoolName = None
|
|
446
|
+
self.QuickSearchName = None
|
|
447
|
+
|
|
448
|
+
def _deserialize(self, params):
|
|
449
|
+
if params.get("ProjectName"):
|
|
450
|
+
self.ProjectName = params.get("ProjectName")
|
|
451
|
+
if params.get("LogPoolName"):
|
|
452
|
+
self.LogPoolName = params.get("LogPoolName")
|
|
453
|
+
if params.get("QuickSearchName"):
|
|
454
|
+
self.QuickSearchName = params.get("QuickSearchName")
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
class CreateDownloadTaskRequest(AbstractModel):
|
|
458
|
+
"""CreateDownloadTask请求参数结构体
|
|
459
|
+
"""
|
|
460
|
+
|
|
461
|
+
def __init__(self):
|
|
462
|
+
r"""创建日志下载任务
|
|
463
|
+
:param ProjectName: 工程名称
|
|
464
|
+
:type PathPrefix: String
|
|
465
|
+
:param LogPoolNames: 日志池名称
|
|
466
|
+
:type PathPrefix: String
|
|
467
|
+
:param Config: 下载参数
|
|
468
|
+
:type PathPrefix: Object
|
|
469
|
+
"""
|
|
470
|
+
self.ProjectName = None
|
|
471
|
+
self.LogPoolNames = None
|
|
472
|
+
self.Config = None
|
|
473
|
+
|
|
474
|
+
def _deserialize(self, params):
|
|
475
|
+
if params.get("ProjectName"):
|
|
476
|
+
self.ProjectName = params.get("ProjectName")
|
|
477
|
+
if params.get("LogPoolNames"):
|
|
478
|
+
self.LogPoolNames = params.get("LogPoolNames")
|
|
479
|
+
if params.get("Config"):
|
|
480
|
+
self.Config = params.get("Config")
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
class ListDownloadTasksRequest(AbstractModel):
|
|
484
|
+
"""ListDownloadTasks请求参数结构体
|
|
485
|
+
"""
|
|
486
|
+
|
|
487
|
+
def __init__(self):
|
|
488
|
+
r"""查看日志下载任务
|
|
489
|
+
:param ProjectName: 工程名称
|
|
490
|
+
:type PathPrefix: String
|
|
491
|
+
:param Page: 返回记录的页码,从0开始
|
|
492
|
+
:type PathPrefix: String
|
|
493
|
+
:param Size: 每页返回最大条目,最大值500
|
|
494
|
+
:type PathPrefix: String
|
|
495
|
+
"""
|
|
496
|
+
self.ProjectName = None
|
|
497
|
+
self.Page = None
|
|
498
|
+
self.Size = None
|
|
499
|
+
|
|
500
|
+
def _deserialize(self, params):
|
|
501
|
+
if params.get("ProjectName"):
|
|
502
|
+
self.ProjectName = params.get("ProjectName")
|
|
503
|
+
if params.get("Page"):
|
|
504
|
+
self.Page = params.get("Page")
|
|
505
|
+
if params.get("Size"):
|
|
506
|
+
self.Size = params.get("Size")
|
|
507
|
+
|
|
508
|
+
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,192 @@
|
|
|
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 KlsClient(AbstractClient):
|
|
8
|
+
_apiVersion = '2017-01-01'
|
|
9
|
+
_endpoint = 'kls.api.ksyun.com'
|
|
10
|
+
_service = 'kls'
|
|
11
|
+
def ListStreamDurations(self, request):
|
|
12
|
+
"""查询主播流时长接口
|
|
13
|
+
:param request: Request instance for ListStreamDurations.
|
|
14
|
+
:type request: :class:`ksyun.client.kls.v20170101.models.ListStreamDurationsRequest`
|
|
15
|
+
"""
|
|
16
|
+
try:
|
|
17
|
+
params = request._serialize()
|
|
18
|
+
body = self.call_judge("ListStreamDurations", 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 ListHistoryPubStreamsErrInfo(self, request):
|
|
35
|
+
"""查询流历史流错误信息
|
|
36
|
+
:param request: Request instance for ListHistoryPubStreamsErrInfo.
|
|
37
|
+
:type request: :class:`ksyun.client.kls.v20170101.models.ListHistoryPubStreamsErrInfoRequest`
|
|
38
|
+
"""
|
|
39
|
+
try:
|
|
40
|
+
params = request._serialize()
|
|
41
|
+
body = self.call_judge("ListHistoryPubStreamsErrInfo", 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 ListHistoryPubStreamsInfo(self, request):
|
|
58
|
+
"""查询流历史信息接口
|
|
59
|
+
:param request: Request instance for ListHistoryPubStreamsInfo.
|
|
60
|
+
:type request: :class:`ksyun.client.kls.v20170101.models.ListHistoryPubStreamsInfoRequest`
|
|
61
|
+
"""
|
|
62
|
+
try:
|
|
63
|
+
params = request._serialize()
|
|
64
|
+
body = self.call_judge("ListHistoryPubStreamsInfo", 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 ForbidStream(self, request):
|
|
81
|
+
"""禁止单路直播流推送
|
|
82
|
+
:param request: Request instance for ForbidStream.
|
|
83
|
+
:type request: :class:`ksyun.client.kls.v20170101.models.ForbidStreamRequest`
|
|
84
|
+
"""
|
|
85
|
+
try:
|
|
86
|
+
params = request._serialize()
|
|
87
|
+
body = self.call_judge("ForbidStream", 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 ResumeStream(self, request):
|
|
104
|
+
"""恢复单路直播流推送
|
|
105
|
+
:param request: Request instance for ResumeStream.
|
|
106
|
+
:type request: :class:`ksyun.client.kls.v20170101.models.ResumeStreamRequest`
|
|
107
|
+
"""
|
|
108
|
+
try:
|
|
109
|
+
params = request._serialize()
|
|
110
|
+
body = self.call_judge("ResumeStream", 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 GetBlacklist(self, request):
|
|
127
|
+
"""查询黑名单列表
|
|
128
|
+
:param request: Request instance for GetBlacklist.
|
|
129
|
+
:type request: :class:`ksyun.client.kls.v20170101.models.GetBlacklistRequest`
|
|
130
|
+
"""
|
|
131
|
+
try:
|
|
132
|
+
params = request._serialize()
|
|
133
|
+
body = self.call_judge("GetBlacklist", 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 CheckBlacklist(self, request):
|
|
150
|
+
"""检查流是否在黑名单内
|
|
151
|
+
:param request: Request instance for CheckBlacklist.
|
|
152
|
+
:type request: :class:`ksyun.client.kls.v20170101.models.CheckBlacklistRequest`
|
|
153
|
+
"""
|
|
154
|
+
try:
|
|
155
|
+
params = request._serialize()
|
|
156
|
+
body = self.call_judge("CheckBlacklist", 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 ListRealtimeStreamsInfo(self, request):
|
|
173
|
+
"""获取流实时信息
|
|
174
|
+
:param request: Request instance for ListRealtimeStreamsInfo.
|
|
175
|
+
:type request: :class:`ksyun.client.kls.v20170101.models.ListRealtimeStreamsInfoRequest`
|
|
176
|
+
"""
|
|
177
|
+
try:
|
|
178
|
+
params = request._serialize()
|
|
179
|
+
body = self.call_judge("ListRealtimeStreamsInfo", 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))
|