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,470 @@
|
|
|
1
|
+
from ksyun.common.abstract_model import AbstractModel
|
|
2
|
+
|
|
3
|
+
class CreateKnadRequest(AbstractModel):
|
|
4
|
+
"""CreateKnad请求参数结构体
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
def __init__(self):
|
|
8
|
+
r"""创建原生高防
|
|
9
|
+
:param ServiceId: 原生高防套餐,即保底防护带宽
|
|
10
|
+
:type PathPrefix: String
|
|
11
|
+
:param KnadName: 原生高防实例名称
|
|
12
|
+
:type PathPrefix: String
|
|
13
|
+
:param Duration: 购买时长,单位月
|
|
14
|
+
示例值:当计费类型为包年包月时,有效值1-36;其他计费类型时,强制要求参数值为0
|
|
15
|
+
:type PathPrefix: Int
|
|
16
|
+
:param ProjectId: 实例所属项目ID
|
|
17
|
+
示例值:账户有权限的项目ID,0为默认项目
|
|
18
|
+
:type PathPrefix: String
|
|
19
|
+
:param Band: 基础防护能力,与套餐的大小保持一致
|
|
20
|
+
示例值:套餐为KNAD_2000G,band值为:2000
|
|
21
|
+
:type PathPrefix: Int
|
|
22
|
+
:param MaxBand: 弹性防护上限,攻击峰值超过保底防护的最大防护能力,取值为:
|
|
23
|
+
套餐KNAD_2000G:2000
|
|
24
|
+
套餐KNAD_1000G:1000、2000
|
|
25
|
+
套餐KNAD_300G:300-1000以100阶梯取值、2000
|
|
26
|
+
套餐KNAD_100G:100-1000以100阶梯取值
|
|
27
|
+
套餐KNAD_30G:30-100以10阶梯取值、100-600以100阶梯取值
|
|
28
|
+
:type PathPrefix: Int
|
|
29
|
+
:param IpCount: 可防护ip数,取值范围:10-100
|
|
30
|
+
:type PathPrefix: Int
|
|
31
|
+
:param BillType: 计费方式:1 (包年包月);5(按量付费(按日月结))
|
|
32
|
+
:type PathPrefix: Int
|
|
33
|
+
:param IdcBand: 清洗后正常业务带宽大小,取值范围:100-15000
|
|
34
|
+
:type PathPrefix: Int
|
|
35
|
+
"""
|
|
36
|
+
self.ServiceId = None
|
|
37
|
+
self.KnadName = None
|
|
38
|
+
self.Duration = None
|
|
39
|
+
self.ProjectId = None
|
|
40
|
+
self.Band = None
|
|
41
|
+
self.MaxBand = None
|
|
42
|
+
self.IpCount = None
|
|
43
|
+
self.BillType = None
|
|
44
|
+
self.IdcBand = None
|
|
45
|
+
|
|
46
|
+
def _deserialize(self, params):
|
|
47
|
+
if params.get("ServiceId"):
|
|
48
|
+
self.ServiceId = params.get("ServiceId")
|
|
49
|
+
if params.get("KnadName"):
|
|
50
|
+
self.KnadName = params.get("KnadName")
|
|
51
|
+
if params.get("Duration"):
|
|
52
|
+
self.Duration = params.get("Duration")
|
|
53
|
+
if params.get("ProjectId"):
|
|
54
|
+
self.ProjectId = params.get("ProjectId")
|
|
55
|
+
if params.get("Band"):
|
|
56
|
+
self.Band = params.get("Band")
|
|
57
|
+
if params.get("MaxBand"):
|
|
58
|
+
self.MaxBand = params.get("MaxBand")
|
|
59
|
+
if params.get("IpCount"):
|
|
60
|
+
self.IpCount = params.get("IpCount")
|
|
61
|
+
if params.get("BillType"):
|
|
62
|
+
self.BillType = params.get("BillType")
|
|
63
|
+
if params.get("IdcBand"):
|
|
64
|
+
self.IdcBand = params.get("IdcBand")
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class ModifyKnadRequest(AbstractModel):
|
|
68
|
+
"""ModifyKnad请求参数结构体
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
def __init__(self):
|
|
72
|
+
r"""调整防护能力
|
|
73
|
+
:param KnadId: 待调整防护能力的实例ID
|
|
74
|
+
:type PathPrefix: String
|
|
75
|
+
:param ServiceId: 目标原生高防套餐,即保底防护带宽
|
|
76
|
+
:type PathPrefix: String
|
|
77
|
+
:param IpCount: 目标可防护ip数,取值范围:10-100
|
|
78
|
+
:type PathPrefix: Int
|
|
79
|
+
:param Band: 基础防护能力,与套餐的大小保持一致
|
|
80
|
+
示例值:套餐为KNAD_2000G,band值为:2000
|
|
81
|
+
:type PathPrefix: Int
|
|
82
|
+
:param MaxBand: 弹性防护上限,攻击峰值超过保底防护的最大防护能力(Band不为空时候必传)
|
|
83
|
+
取值为:
|
|
84
|
+
套餐KNAD_2000G:2000
|
|
85
|
+
套餐KNAD_1000G:1000、2000
|
|
86
|
+
套餐KNAD_300G:300-1000以100阶梯取值、2000
|
|
87
|
+
套餐KNAD_100G:100-1000以100阶梯取值
|
|
88
|
+
套餐KNAD_30G:30-100以10阶梯取值、100-600以100阶梯取值
|
|
89
|
+
:type PathPrefix: Int
|
|
90
|
+
:param IdcBand: 清洗后正常业务带宽大小,取值范围:100-15000
|
|
91
|
+
:type PathPrefix: Int
|
|
92
|
+
"""
|
|
93
|
+
self.KnadId = None
|
|
94
|
+
self.ServiceId = None
|
|
95
|
+
self.IpCount = None
|
|
96
|
+
self.Band = None
|
|
97
|
+
self.MaxBand = None
|
|
98
|
+
self.IdcBand = None
|
|
99
|
+
|
|
100
|
+
def _deserialize(self, params):
|
|
101
|
+
if params.get("KnadId"):
|
|
102
|
+
self.KnadId = params.get("KnadId")
|
|
103
|
+
if params.get("ServiceId"):
|
|
104
|
+
self.ServiceId = params.get("ServiceId")
|
|
105
|
+
if params.get("IpCount"):
|
|
106
|
+
self.IpCount = params.get("IpCount")
|
|
107
|
+
if params.get("Band"):
|
|
108
|
+
self.Band = params.get("Band")
|
|
109
|
+
if params.get("MaxBand"):
|
|
110
|
+
self.MaxBand = params.get("MaxBand")
|
|
111
|
+
if params.get("IdcBand"):
|
|
112
|
+
self.IdcBand = params.get("IdcBand")
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class UnbindIpListRequest(AbstractModel):
|
|
116
|
+
"""UnbindIpList请求参数结构体
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
def __init__(self):
|
|
120
|
+
r"""设置防护对象-可选eip列表
|
|
121
|
+
"""
|
|
122
|
+
|
|
123
|
+
def _deserialize(self, params):
|
|
124
|
+
return
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class AssociateIpRequest(AbstractModel):
|
|
128
|
+
"""AssociateIp请求参数结构体
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
def __init__(self):
|
|
132
|
+
r"""绑定eip
|
|
133
|
+
:param KnadId:
|
|
134
|
+
:type PathPrefix: String
|
|
135
|
+
:param Ip: 高防实例绑定的全量eip列表(注:覆盖式更新!!在请求中提交需要绑定的完整eip列表参数)
|
|
136
|
+
:type PathPrefix: Array
|
|
137
|
+
"""
|
|
138
|
+
self.KnadId = None
|
|
139
|
+
self.Ip = None
|
|
140
|
+
|
|
141
|
+
def _deserialize(self, params):
|
|
142
|
+
if params.get("KnadId"):
|
|
143
|
+
self.KnadId = params.get("KnadId")
|
|
144
|
+
if params.get("Ip"):
|
|
145
|
+
self.Ip = params.get("Ip")
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
class DisassociateIpRequest(AbstractModel):
|
|
149
|
+
"""DisassociateIp请求参数结构体
|
|
150
|
+
"""
|
|
151
|
+
|
|
152
|
+
def __init__(self):
|
|
153
|
+
r"""解绑eip
|
|
154
|
+
:param Ip: 要解绑的ip
|
|
155
|
+
:type PathPrefix: Array
|
|
156
|
+
"""
|
|
157
|
+
self.Ip = None
|
|
158
|
+
|
|
159
|
+
def _deserialize(self, params):
|
|
160
|
+
if params.get("Ip"):
|
|
161
|
+
self.Ip = params.get("Ip")
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class DescribeKnadIpRequest(AbstractModel):
|
|
165
|
+
"""DescribeKnadIp请求参数结构体
|
|
166
|
+
"""
|
|
167
|
+
|
|
168
|
+
def __init__(self):
|
|
169
|
+
r"""已绑定eip列表
|
|
170
|
+
:param IpSort: 防护ip排序规则。
|
|
171
|
+
asc:升序;desc:降序
|
|
172
|
+
|
|
173
|
+
:type PathPrefix: String
|
|
174
|
+
:param IpStatusSort: 状态排序规则。
|
|
175
|
+
asc:升序;desc:降序
|
|
176
|
+
:type PathPrefix: String
|
|
177
|
+
:param BandSort: 防护能力排序规则。
|
|
178
|
+
asc:升序;desc:降序
|
|
179
|
+
:type PathPrefix: String
|
|
180
|
+
:param Ip: 单个eip address
|
|
181
|
+
:type PathPrefix: String
|
|
182
|
+
:param KnadId: 高防实例id
|
|
183
|
+
:type PathPrefix: String
|
|
184
|
+
:param ProjectId: 项目制id
|
|
185
|
+
:type PathPrefix: Array
|
|
186
|
+
:param PageSize: 每页条数
|
|
187
|
+
:type PathPrefix: Int
|
|
188
|
+
:param OffSet: 开始条数
|
|
189
|
+
:type PathPrefix: Int
|
|
190
|
+
"""
|
|
191
|
+
self.IpSort = None
|
|
192
|
+
self.IpStatusSort = None
|
|
193
|
+
self.BandSort = None
|
|
194
|
+
self.Ip = None
|
|
195
|
+
self.KnadId = None
|
|
196
|
+
self.ProjectId = None
|
|
197
|
+
self.PageSize = None
|
|
198
|
+
self.OffSet = None
|
|
199
|
+
|
|
200
|
+
def _deserialize(self, params):
|
|
201
|
+
if params.get("IpSort"):
|
|
202
|
+
self.IpSort = params.get("IpSort")
|
|
203
|
+
if params.get("IpStatusSort"):
|
|
204
|
+
self.IpStatusSort = params.get("IpStatusSort")
|
|
205
|
+
if params.get("BandSort"):
|
|
206
|
+
self.BandSort = params.get("BandSort")
|
|
207
|
+
if params.get("Ip"):
|
|
208
|
+
self.Ip = params.get("Ip")
|
|
209
|
+
if params.get("KnadId"):
|
|
210
|
+
self.KnadId = params.get("KnadId")
|
|
211
|
+
if params.get("ProjectId"):
|
|
212
|
+
self.ProjectId = params.get("ProjectId")
|
|
213
|
+
if params.get("PageSize"):
|
|
214
|
+
self.PageSize = params.get("PageSize")
|
|
215
|
+
if params.get("OffSet"):
|
|
216
|
+
self.OffSet = params.get("OffSet")
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
class DeleteKnadRequest(AbstractModel):
|
|
220
|
+
"""DeleteKnad请求参数结构体
|
|
221
|
+
"""
|
|
222
|
+
|
|
223
|
+
def __init__(self):
|
|
224
|
+
r"""退订高防实例(已绑弹性IP的高防实例无法退订)
|
|
225
|
+
:param KnadId:
|
|
226
|
+
:type PathPrefix: String
|
|
227
|
+
"""
|
|
228
|
+
self.KnadId = None
|
|
229
|
+
|
|
230
|
+
def _deserialize(self, params):
|
|
231
|
+
if params.get("KnadId"):
|
|
232
|
+
self.KnadId = params.get("KnadId")
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
class DescribeKnadRequest(AbstractModel):
|
|
236
|
+
"""DescribeKnad请求参数结构体
|
|
237
|
+
"""
|
|
238
|
+
|
|
239
|
+
def __init__(self):
|
|
240
|
+
r"""高防包列表
|
|
241
|
+
:param ProjectId: 项目制id
|
|
242
|
+
:type PathPrefix: Filter
|
|
243
|
+
:param KnadId:
|
|
244
|
+
:type PathPrefix: Filter
|
|
245
|
+
"""
|
|
246
|
+
self.ProjectId = None
|
|
247
|
+
self.KnadId = None
|
|
248
|
+
|
|
249
|
+
def _deserialize(self, params):
|
|
250
|
+
if params.get("ProjectId"):
|
|
251
|
+
self.ProjectId = params.get("ProjectId")
|
|
252
|
+
if params.get("KnadId"):
|
|
253
|
+
self.KnadId = params.get("KnadId")
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
class GetBWIpListRequest(AbstractModel):
|
|
257
|
+
"""GetBWIpList请求参数结构体
|
|
258
|
+
"""
|
|
259
|
+
|
|
260
|
+
def __init__(self):
|
|
261
|
+
r"""获取实例的黑白名单列表
|
|
262
|
+
:param KnadId:
|
|
263
|
+
:type PathPrefix: String
|
|
264
|
+
:param type: 策略类型(1: black, 2: white)
|
|
265
|
+
:type PathPrefix: Int
|
|
266
|
+
:param Ip: 要搜索的ip
|
|
267
|
+
:type PathPrefix: String
|
|
268
|
+
:param PageSize: 每页条数
|
|
269
|
+
:type PathPrefix: Int
|
|
270
|
+
:param OffSet: 开始条数
|
|
271
|
+
:type PathPrefix: Int
|
|
272
|
+
"""
|
|
273
|
+
self.KnadId = None
|
|
274
|
+
self.type = None
|
|
275
|
+
self.Ip = None
|
|
276
|
+
self.PageSize = None
|
|
277
|
+
self.OffSet = None
|
|
278
|
+
|
|
279
|
+
def _deserialize(self, params):
|
|
280
|
+
if params.get("KnadId"):
|
|
281
|
+
self.KnadId = params.get("KnadId")
|
|
282
|
+
if params.get("type"):
|
|
283
|
+
self.type = params.get("type")
|
|
284
|
+
if params.get("Ip"):
|
|
285
|
+
self.Ip = params.get("Ip")
|
|
286
|
+
if params.get("PageSize"):
|
|
287
|
+
self.PageSize = params.get("PageSize")
|
|
288
|
+
if params.get("OffSet"):
|
|
289
|
+
self.OffSet = params.get("OffSet")
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
class DeleteBWRequest(AbstractModel):
|
|
293
|
+
"""DeleteBW请求参数结构体
|
|
294
|
+
"""
|
|
295
|
+
|
|
296
|
+
def __init__(self):
|
|
297
|
+
r"""删除黑白名单
|
|
298
|
+
:param KnadId:
|
|
299
|
+
:type PathPrefix: String
|
|
300
|
+
:param IpId: 删除的IP的id
|
|
301
|
+
:type PathPrefix: Array
|
|
302
|
+
:param type: 策略类型(1: black, 2: white)
|
|
303
|
+
:type PathPrefix: Int
|
|
304
|
+
"""
|
|
305
|
+
self.KnadId = None
|
|
306
|
+
self.IpId = None
|
|
307
|
+
self.type = None
|
|
308
|
+
|
|
309
|
+
def _deserialize(self, params):
|
|
310
|
+
if params.get("KnadId"):
|
|
311
|
+
self.KnadId = params.get("KnadId")
|
|
312
|
+
if params.get("IpId"):
|
|
313
|
+
self.IpId = params.get("IpId")
|
|
314
|
+
if params.get("type"):
|
|
315
|
+
self.type = params.get("type")
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
class AddBWIpListRequest(AbstractModel):
|
|
319
|
+
"""AddBWIpList请求参数结构体
|
|
320
|
+
"""
|
|
321
|
+
|
|
322
|
+
def __init__(self):
|
|
323
|
+
r"""添加黑白名单
|
|
324
|
+
:param KnadId:
|
|
325
|
+
:type PathPrefix: String
|
|
326
|
+
:param Ip: 添加的IP段
|
|
327
|
+
:type PathPrefix: Array
|
|
328
|
+
:param type: 策略类型(1: black, 2: white)
|
|
329
|
+
:type PathPrefix: Int
|
|
330
|
+
"""
|
|
331
|
+
self.KnadId = None
|
|
332
|
+
self.Ip = None
|
|
333
|
+
self.type = None
|
|
334
|
+
|
|
335
|
+
def _deserialize(self, params):
|
|
336
|
+
if params.get("KnadId"):
|
|
337
|
+
self.KnadId = params.get("KnadId")
|
|
338
|
+
if params.get("Ip"):
|
|
339
|
+
self.Ip = params.get("Ip")
|
|
340
|
+
if params.get("type"):
|
|
341
|
+
self.type = params.get("type")
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
class GetZoneListRequest(AbstractModel):
|
|
345
|
+
"""GetZoneList请求参数结构体
|
|
346
|
+
"""
|
|
347
|
+
|
|
348
|
+
def __init__(self):
|
|
349
|
+
r"""获取地理位置列表
|
|
350
|
+
"""
|
|
351
|
+
|
|
352
|
+
def _deserialize(self, params):
|
|
353
|
+
return
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
class ModifyPolicyRequest(AbstractModel):
|
|
357
|
+
"""ModifyPolicy请求参数结构体
|
|
358
|
+
"""
|
|
359
|
+
|
|
360
|
+
def __init__(self):
|
|
361
|
+
r"""修改防护策略
|
|
362
|
+
:param KnadId:
|
|
363
|
+
:type PathPrefix: String
|
|
364
|
+
:param TemplateId: 防护模板ID(默认:1075)
|
|
365
|
+
:type PathPrefix: Int
|
|
366
|
+
:param UdpBlock: 是否封禁Udp(1:封禁 0:不封禁)
|
|
367
|
+
:type PathPrefix: Int
|
|
368
|
+
:param TcpBlock: 是否封禁Tcp(1:封禁 0:不封禁)
|
|
369
|
+
:type PathPrefix: Int
|
|
370
|
+
:param IcmpBlock: 是否封禁Icmp(1:封禁 0:不封禁)
|
|
371
|
+
:type PathPrefix: Int
|
|
372
|
+
"""
|
|
373
|
+
self.KnadId = None
|
|
374
|
+
self.TemplateId = None
|
|
375
|
+
self.UdpBlock = None
|
|
376
|
+
self.TcpBlock = None
|
|
377
|
+
self.IcmpBlock = None
|
|
378
|
+
|
|
379
|
+
def _deserialize(self, params):
|
|
380
|
+
if params.get("KnadId"):
|
|
381
|
+
self.KnadId = params.get("KnadId")
|
|
382
|
+
if params.get("TemplateId"):
|
|
383
|
+
self.TemplateId = params.get("TemplateId")
|
|
384
|
+
if params.get("UdpBlock"):
|
|
385
|
+
self.UdpBlock = params.get("UdpBlock")
|
|
386
|
+
if params.get("TcpBlock"):
|
|
387
|
+
self.TcpBlock = params.get("TcpBlock")
|
|
388
|
+
if params.get("IcmpBlock"):
|
|
389
|
+
self.IcmpBlock = params.get("IcmpBlock")
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
class ModifyBlockLocationRequest(AbstractModel):
|
|
393
|
+
"""ModifyBlockLocation请求参数结构体
|
|
394
|
+
"""
|
|
395
|
+
|
|
396
|
+
def __init__(self):
|
|
397
|
+
r"""设置封禁地域
|
|
398
|
+
:param KnadId:
|
|
399
|
+
:type PathPrefix: String
|
|
400
|
+
:param LocationBlock: 是否开启封禁(1:封禁; 0:不封禁)
|
|
401
|
+
:type PathPrefix: Int
|
|
402
|
+
:param Location: 要封禁的位置(例:['BeiJing','Other'])
|
|
403
|
+
:type PathPrefix: Array
|
|
404
|
+
"""
|
|
405
|
+
self.KnadId = None
|
|
406
|
+
self.LocationBlock = None
|
|
407
|
+
self.Location = None
|
|
408
|
+
|
|
409
|
+
def _deserialize(self, params):
|
|
410
|
+
if params.get("KnadId"):
|
|
411
|
+
self.KnadId = params.get("KnadId")
|
|
412
|
+
if params.get("LocationBlock"):
|
|
413
|
+
self.LocationBlock = params.get("LocationBlock")
|
|
414
|
+
if params.get("Location"):
|
|
415
|
+
self.Location = params.get("Location")
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
class GetBlockLocationsRequest(AbstractModel):
|
|
419
|
+
"""GetBlockLocations请求参数结构体
|
|
420
|
+
"""
|
|
421
|
+
|
|
422
|
+
def __init__(self):
|
|
423
|
+
r"""获取封禁区域
|
|
424
|
+
:param KnadId:
|
|
425
|
+
:type PathPrefix: String
|
|
426
|
+
"""
|
|
427
|
+
self.KnadId = None
|
|
428
|
+
|
|
429
|
+
def _deserialize(self, params):
|
|
430
|
+
if params.get("KnadId"):
|
|
431
|
+
self.KnadId = params.get("KnadId")
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
class GetKnadPolicyRequest(AbstractModel):
|
|
435
|
+
"""GetKnadPolicy请求参数结构体
|
|
436
|
+
"""
|
|
437
|
+
|
|
438
|
+
def __init__(self):
|
|
439
|
+
r"""获取实例的防护模板信息
|
|
440
|
+
:param KnadId:
|
|
441
|
+
:type PathPrefix: String
|
|
442
|
+
"""
|
|
443
|
+
self.KnadId = None
|
|
444
|
+
|
|
445
|
+
def _deserialize(self, params):
|
|
446
|
+
if params.get("KnadId"):
|
|
447
|
+
self.KnadId = params.get("KnadId")
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
class InsertEipsRequest(AbstractModel):
|
|
451
|
+
"""InsertEips请求参数结构体
|
|
452
|
+
"""
|
|
453
|
+
|
|
454
|
+
def __init__(self):
|
|
455
|
+
r"""增量绑定eip
|
|
456
|
+
:param KnadId:
|
|
457
|
+
:type PathPrefix: String
|
|
458
|
+
:param Ip: 高防实例绑定的eip列表
|
|
459
|
+
:type PathPrefix: Array
|
|
460
|
+
"""
|
|
461
|
+
self.KnadId = None
|
|
462
|
+
self.Ip = None
|
|
463
|
+
|
|
464
|
+
def _deserialize(self, params):
|
|
465
|
+
if params.get("KnadId"):
|
|
466
|
+
self.KnadId = params.get("KnadId")
|
|
467
|
+
if params.get("Ip"):
|
|
468
|
+
self.Ip = params.get("Ip")
|
|
469
|
+
|
|
470
|
+
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,217 @@
|
|
|
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 KpfsClient(AbstractClient):
|
|
8
|
+
_apiVersion = '2024-09-30'
|
|
9
|
+
_endpoint = 'kpfs.api.ksyun.com'
|
|
10
|
+
_service = 'kpfs'
|
|
11
|
+
def DescribeDirQuotaList(self, request):
|
|
12
|
+
"""查询目录配额列表
|
|
13
|
+
:param request: Request instance for DescribeDirQuotaList.
|
|
14
|
+
:type request: :class:`ksyun.client.kpfs.v20240930.models.DescribeDirQuotaListRequest`
|
|
15
|
+
"""
|
|
16
|
+
try:
|
|
17
|
+
params = request._serialize()
|
|
18
|
+
body = self.call_judge("DescribeDirQuotaList", params, "application/x-www-form-urlencoded")
|
|
19
|
+
response = json.loads(body)
|
|
20
|
+
if "Error" not in response:
|
|
21
|
+
return body
|
|
22
|
+
else:
|
|
23
|
+
code = response["Error"]["Code"]
|
|
24
|
+
message = response["Error"]["Message"]
|
|
25
|
+
req_id = response["RequestId"]
|
|
26
|
+
raise KsyunSDKException(code, message, req_id)
|
|
27
|
+
except Exception as e:
|
|
28
|
+
if isinstance(e, KsyunSDKException):
|
|
29
|
+
raise
|
|
30
|
+
else:
|
|
31
|
+
raise KsyunSDKException(message=str(e))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def DeleteDirQuota(self, request):
|
|
35
|
+
"""删除目录配额
|
|
36
|
+
:param request: Request instance for DeleteDirQuota.
|
|
37
|
+
:type request: :class:`ksyun.client.kpfs.v20240930.models.DeleteDirQuotaRequest`
|
|
38
|
+
"""
|
|
39
|
+
try:
|
|
40
|
+
params = request._serialize()
|
|
41
|
+
body = self.call_judge("DeleteDirQuota", 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 UpdateDirQuota(self, request):
|
|
58
|
+
"""修改目录配额
|
|
59
|
+
:param request: Request instance for UpdateDirQuota.
|
|
60
|
+
:type request: :class:`ksyun.client.kpfs.v20240930.models.UpdateDirQuotaRequest`
|
|
61
|
+
"""
|
|
62
|
+
try:
|
|
63
|
+
params = request._serialize()
|
|
64
|
+
body = self.call_judge("UpdateDirQuota", 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 CreateDirQuota(self, request):
|
|
81
|
+
"""新建目录配额
|
|
82
|
+
:param request: Request instance for CreateDirQuota.
|
|
83
|
+
:type request: :class:`ksyun.client.kpfs.v20240930.models.CreateDirQuotaRequest`
|
|
84
|
+
"""
|
|
85
|
+
try:
|
|
86
|
+
params = request._serialize()
|
|
87
|
+
body = self.call_judge("CreateDirQuota", 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 DescribeSubDirList(self, request):
|
|
104
|
+
"""查询文件系统或特定目录的子目录列表
|
|
105
|
+
:param request: Request instance for DescribeSubDirList.
|
|
106
|
+
:type request: :class:`ksyun.client.kpfs.v20240930.models.DescribeSubDirListRequest`
|
|
107
|
+
"""
|
|
108
|
+
try:
|
|
109
|
+
params = request._serialize()
|
|
110
|
+
body = self.call_judge("DescribeSubDirList", params, "application/x-www-form-urlencoded")
|
|
111
|
+
response = json.loads(body)
|
|
112
|
+
if "Error" not in response:
|
|
113
|
+
return body
|
|
114
|
+
else:
|
|
115
|
+
code = response["Error"]["Code"]
|
|
116
|
+
message = response["Error"]["Message"]
|
|
117
|
+
req_id = response["RequestId"]
|
|
118
|
+
raise KsyunSDKException(code, message, req_id)
|
|
119
|
+
except Exception as e:
|
|
120
|
+
if isinstance(e, KsyunSDKException):
|
|
121
|
+
raise
|
|
122
|
+
else:
|
|
123
|
+
raise KsyunSDKException(message=str(e))
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def DeleteDir(self, request):
|
|
127
|
+
"""删除文件系统目录
|
|
128
|
+
:param request: Request instance for DeleteDir.
|
|
129
|
+
:type request: :class:`ksyun.client.kpfs.v20240930.models.DeleteDirRequest`
|
|
130
|
+
"""
|
|
131
|
+
try:
|
|
132
|
+
params = request._serialize()
|
|
133
|
+
body = self.call_judge("DeleteDir", 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 UpdateDir(self, request):
|
|
150
|
+
"""修改文件系统目录
|
|
151
|
+
:param request: Request instance for UpdateDir.
|
|
152
|
+
:type request: :class:`ksyun.client.kpfs.v20240930.models.UpdateDirRequest`
|
|
153
|
+
"""
|
|
154
|
+
try:
|
|
155
|
+
params = request._serialize()
|
|
156
|
+
body = self.call_judge("UpdateDir", 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 CreateDir(self, request):
|
|
173
|
+
"""新建文件系统目录
|
|
174
|
+
:param request: Request instance for CreateDir.
|
|
175
|
+
:type request: :class:`ksyun.client.kpfs.v20240930.models.CreateDirRequest`
|
|
176
|
+
"""
|
|
177
|
+
try:
|
|
178
|
+
params = request._serialize()
|
|
179
|
+
body = self.call_judge("CreateDir", 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 DescribeDirQuota(self, request):
|
|
196
|
+
"""查询指定目录配额
|
|
197
|
+
:param request: Request instance for DescribeDirQuota.
|
|
198
|
+
:type request: :class:`ksyun.client.kpfs.v20240930.models.DescribeDirQuotaRequest`
|
|
199
|
+
"""
|
|
200
|
+
try:
|
|
201
|
+
params = request._serialize()
|
|
202
|
+
body = self.call_judge("DescribeDirQuota", params, "application/x-www-form-urlencoded")
|
|
203
|
+
response = json.loads(body)
|
|
204
|
+
if "Error" not in response:
|
|
205
|
+
return body
|
|
206
|
+
else:
|
|
207
|
+
code = response["Error"]["Code"]
|
|
208
|
+
message = response["Error"]["Message"]
|
|
209
|
+
req_id = response["RequestId"]
|
|
210
|
+
raise KsyunSDKException(code, message, req_id)
|
|
211
|
+
except Exception as e:
|
|
212
|
+
if isinstance(e, KsyunSDKException):
|
|
213
|
+
raise
|
|
214
|
+
else:
|
|
215
|
+
raise KsyunSDKException(message=str(e))
|
|
216
|
+
|
|
217
|
+
|