ucloud-sdk-python3 0.11.81__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.
- ucloud/__init__.py +0 -0
- ucloud/client.py +469 -0
- ucloud/core/__init__.py +0 -0
- ucloud/core/auth/__init__.py +3 -0
- ucloud/core/auth/_cfg.py +72 -0
- ucloud/core/client/__init__.py +8 -0
- ucloud/core/client/_cfg.py +96 -0
- ucloud/core/client/_client.py +176 -0
- ucloud/core/exc/__init__.py +9 -0
- ucloud/core/exc/_exc.py +94 -0
- ucloud/core/transport/__init__.py +4 -0
- ucloud/core/transport/_requests.py +135 -0
- ucloud/core/transport/http.py +120 -0
- ucloud/core/transport/utils.py +40 -0
- ucloud/core/typesystem/__init__.py +0 -0
- ucloud/core/typesystem/abstract.py +60 -0
- ucloud/core/typesystem/encoder.py +33 -0
- ucloud/core/typesystem/fields.py +149 -0
- ucloud/core/typesystem/schema.py +97 -0
- ucloud/core/utils/__init__.py +0 -0
- ucloud/core/utils/compat.py +15 -0
- ucloud/core/utils/deco.py +31 -0
- ucloud/core/utils/log.py +29 -0
- ucloud/core/utils/middleware.py +63 -0
- ucloud/helpers/__init__.py +0 -0
- ucloud/helpers/utils.py +90 -0
- ucloud/helpers/wait.py +108 -0
- ucloud/services/__init__.py +0 -0
- ucloud/services/cube/__init__.py +0 -0
- ucloud/services/cube/client.py +618 -0
- ucloud/services/cube/schemas/__init__.py +0 -0
- ucloud/services/cube/schemas/apis.py +548 -0
- ucloud/services/cube/schemas/models.py +58 -0
- ucloud/services/iam/__init__.py +0 -0
- ucloud/services/iam/client.py +1078 -0
- ucloud/services/iam/schemas/__init__.py +0 -0
- ucloud/services/iam/schemas/apis.py +973 -0
- ucloud/services/iam/schemas/models.py +127 -0
- ucloud/services/ipsecvpn/__init__.py +0 -0
- ucloud/services/ipsecvpn/client.py +522 -0
- ucloud/services/ipsecvpn/schemas/__init__.py +0 -0
- ucloud/services/ipsecvpn/schemas/apis.py +455 -0
- ucloud/services/ipsecvpn/schemas/models.py +134 -0
- ucloud/services/ipv6gw/__init__.py +0 -0
- ucloud/services/ipv6gw/client.py +44 -0
- ucloud/services/ipv6gw/schemas/__init__.py +0 -0
- ucloud/services/ipv6gw/schemas/apis.py +34 -0
- ucloud/services/ipv6gw/schemas/models.py +3 -0
- ucloud/services/isms/__init__.py +0 -0
- ucloud/services/isms/client.py +330 -0
- ucloud/services/isms/schemas/__init__.py +0 -0
- ucloud/services/isms/schemas/apis.py +272 -0
- ucloud/services/isms/schemas/models.py +50 -0
- ucloud/services/pathx/__init__.py +0 -0
- ucloud/services/pathx/client.py +1656 -0
- ucloud/services/pathx/schemas/__init__.py +0 -0
- ucloud/services/pathx/schemas/apis.py +1289 -0
- ucloud/services/pathx/schemas/models.py +420 -0
- ucloud/services/stepflow/__init__.py +0 -0
- ucloud/services/stepflow/client.py +98 -0
- ucloud/services/stepflow/schemas/__init__.py +0 -0
- ucloud/services/stepflow/schemas/apis.py +67 -0
- ucloud/services/stepflow/schemas/models.py +37 -0
- ucloud/services/sts/__init__.py +0 -0
- ucloud/services/sts/client.py +46 -0
- ucloud/services/sts/schemas/__init__.py +0 -0
- ucloud/services/sts/schemas/apis.py +35 -0
- ucloud/services/sts/schemas/models.py +16 -0
- ucloud/services/tidb/__init__.py +0 -0
- ucloud/services/tidb/client.py +120 -0
- ucloud/services/tidb/schemas/__init__.py +0 -0
- ucloud/services/tidb/schemas/apis.py +103 -0
- ucloud/services/tidb/schemas/models.py +11 -0
- ucloud/services/uaaa/__init__.py +0 -0
- ucloud/services/uaaa/client.py +311 -0
- ucloud/services/uaaa/schemas/__init__.py +0 -0
- ucloud/services/uaaa/schemas/apis.py +252 -0
- ucloud/services/uaaa/schemas/models.py +47 -0
- ucloud/services/uaccount/__init__.py +0 -0
- ucloud/services/uaccount/client.py +547 -0
- ucloud/services/uaccount/schemas/__init__.py +0 -0
- ucloud/services/uaccount/schemas/apis.py +442 -0
- ucloud/services/uaccount/schemas/models.py +128 -0
- ucloud/services/uads/__init__.py +0 -0
- ucloud/services/uads/client.py +1148 -0
- ucloud/services/uads/schemas/__init__.py +0 -0
- ucloud/services/uads/schemas/apis.py +983 -0
- ucloud/services/uads/schemas/models.py +199 -0
- ucloud/services/ubill/__init__.py +0 -0
- ucloud/services/ubill/client.py +248 -0
- ucloud/services/ubill/schemas/__init__.py +0 -0
- ucloud/services/ubill/schemas/apis.py +183 -0
- ucloud/services/ubill/schemas/models.py +107 -0
- ucloud/services/ucdn/__init__.py +0 -0
- ucloud/services/ucdn/client.py +1964 -0
- ucloud/services/ucdn/schemas/__init__.py +0 -0
- ucloud/services/ucdn/schemas/apis.py +1395 -0
- ucloud/services/ucdn/schemas/models.py +576 -0
- ucloud/services/ucloudstack/__init__.py +0 -0
- ucloud/services/ucloudstack/client.py +3352 -0
- ucloud/services/ucloudstack/schemas/__init__.py +0 -0
- ucloud/services/ucloudstack/schemas/apis.py +2887 -0
- ucloud/services/ucloudstack/schemas/models.py +560 -0
- ucloud/services/ucompshare/__init__.py +0 -0
- ucloud/services/ucompshare/client.py +820 -0
- ucloud/services/ucompshare/schemas/__init__.py +0 -0
- ucloud/services/ucompshare/schemas/apis.py +623 -0
- ucloud/services/ucompshare/schemas/models.py +241 -0
- ucloud/services/udb/__init__.py +0 -0
- ucloud/services/udb/client.py +2463 -0
- ucloud/services/udb/schemas/__init__.py +0 -0
- ucloud/services/udb/schemas/apis.py +2053 -0
- ucloud/services/udb/schemas/models.py +319 -0
- ucloud/services/udbproxy/__init__.py +0 -0
- ucloud/services/udbproxy/client.py +67 -0
- ucloud/services/udbproxy/schemas/__init__.py +0 -0
- ucloud/services/udbproxy/schemas/apis.py +38 -0
- ucloud/services/udbproxy/schemas/models.py +31 -0
- ucloud/services/uddb/__init__.py +0 -0
- ucloud/services/uddb/client.py +456 -0
- ucloud/services/uddb/schemas/__init__.py +0 -0
- ucloud/services/uddb/schemas/apis.py +520 -0
- ucloud/services/uddb/schemas/models.py +96 -0
- ucloud/services/udi/__init__.py +0 -0
- ucloud/services/udi/client.py +250 -0
- ucloud/services/udi/schemas/__init__.py +0 -0
- ucloud/services/udi/schemas/apis.py +205 -0
- ucloud/services/udi/schemas/models.py +58 -0
- ucloud/services/udisk/__init__.py +0 -0
- ucloud/services/udisk/client.py +832 -0
- ucloud/services/udisk/schemas/__init__.py +0 -0
- ucloud/services/udisk/schemas/apis.py +741 -0
- ucloud/services/udisk/schemas/models.py +100 -0
- ucloud/services/udns/__init__.py +0 -0
- ucloud/services/udns/client.py +380 -0
- ucloud/services/udns/schemas/__init__.py +0 -0
- ucloud/services/udns/schemas/apis.py +293 -0
- ucloud/services/udns/schemas/models.py +58 -0
- ucloud/services/udpn/__init__.py +0 -0
- ucloud/services/udpn/client.py +240 -0
- ucloud/services/udpn/schemas/__init__.py +0 -0
- ucloud/services/udpn/schemas/apis.py +203 -0
- ucloud/services/udpn/schemas/models.py +29 -0
- ucloud/services/udts/__init__.py +0 -0
- ucloud/services/udts/client.py +410 -0
- ucloud/services/udts/schemas/__init__.py +0 -0
- ucloud/services/udts/schemas/apis.py +403 -0
- ucloud/services/udts/schemas/models.py +93 -0
- ucloud/services/uec/__init__.py +0 -0
- ucloud/services/uec/client.py +1510 -0
- ucloud/services/uec/schemas/__init__.py +0 -0
- ucloud/services/uec/schemas/apis.py +1195 -0
- ucloud/services/uec/schemas/models.py +316 -0
- ucloud/services/ufile/__init__.py +0 -0
- ucloud/services/ufile/client.py +698 -0
- ucloud/services/ufile/schemas/__init__.py +0 -0
- ucloud/services/ufile/schemas/apis.py +542 -0
- ucloud/services/ufile/schemas/models.py +139 -0
- ucloud/services/ufs/__init__.py +0 -0
- ucloud/services/ufs/client.py +328 -0
- ucloud/services/ufs/schemas/__init__.py +0 -0
- ucloud/services/ufs/schemas/apis.py +265 -0
- ucloud/services/ufs/schemas/models.py +52 -0
- ucloud/services/ugn/__init__.py +0 -0
- ucloud/services/ugn/client.py +857 -0
- ucloud/services/ugn/schemas/__init__.py +0 -0
- ucloud/services/ugn/schemas/apis.py +678 -0
- ucloud/services/ugn/schemas/models.py +191 -0
- ucloud/services/uhost/__init__.py +0 -0
- ucloud/services/uhost/client.py +1647 -0
- ucloud/services/uhost/schemas/__init__.py +0 -0
- ucloud/services/uhost/schemas/apis.py +1483 -0
- ucloud/services/uhost/schemas/models.py +427 -0
- ucloud/services/uhub/__init__.py +0 -0
- ucloud/services/uhub/client.py +229 -0
- ucloud/services/uhub/schemas/__init__.py +0 -0
- ucloud/services/uhub/schemas/apis.py +194 -0
- ucloud/services/uhub/schemas/models.py +39 -0
- ucloud/services/uk8s/__init__.py +0 -0
- ucloud/services/uk8s/client.py +729 -0
- ucloud/services/uk8s/schemas/__init__.py +0 -0
- ucloud/services/uk8s/schemas/apis.py +639 -0
- ucloud/services/uk8s/schemas/models.py +179 -0
- ucloud/services/ulb/__init__.py +0 -0
- ucloud/services/ulb/client.py +2285 -0
- ucloud/services/ulb/schemas/__init__.py +0 -0
- ucloud/services/ulb/schemas/apis.py +1678 -0
- ucloud/services/ulb/schemas/models.py +591 -0
- ucloud/services/ulighthost/__init__.py +0 -0
- ucloud/services/ulighthost/client.py +576 -0
- ucloud/services/ulighthost/schemas/__init__.py +0 -0
- ucloud/services/ulighthost/schemas/apis.py +445 -0
- ucloud/services/ulighthost/schemas/models.py +133 -0
- ucloud/services/umem/__init__.py +0 -0
- ucloud/services/umem/client.py +1829 -0
- ucloud/services/umem/schemas/__init__.py +0 -0
- ucloud/services/umem/schemas/apis.py +1477 -0
- ucloud/services/umem/schemas/models.py +327 -0
- ucloud/services/umongodb/__init__.py +0 -0
- ucloud/services/umongodb/client.py +752 -0
- ucloud/services/umongodb/schemas/__init__.py +0 -0
- ucloud/services/umongodb/schemas/apis.py +567 -0
- ucloud/services/umongodb/schemas/models.py +220 -0
- ucloud/services/unet/__init__.py +0 -0
- ucloud/services/unet/client.py +1278 -0
- ucloud/services/unet/schemas/__init__.py +0 -0
- ucloud/services/unet/schemas/apis.py +1006 -0
- ucloud/services/unet/schemas/models.py +275 -0
- ucloud/services/unvs/__init__.py +0 -0
- ucloud/services/unvs/client.py +87 -0
- ucloud/services/unvs/schemas/__init__.py +0 -0
- ucloud/services/unvs/schemas/apis.py +66 -0
- ucloud/services/unvs/schemas/models.py +19 -0
- ucloud/services/upfs/__init__.py +0 -0
- ucloud/services/upfs/client.py +252 -0
- ucloud/services/upfs/schemas/__init__.py +0 -0
- ucloud/services/upfs/schemas/apis.py +204 -0
- ucloud/services/upfs/schemas/models.py +36 -0
- ucloud/services/upgsql/__init__.py +0 -0
- ucloud/services/upgsql/client.py +1007 -0
- ucloud/services/upgsql/schemas/__init__.py +0 -0
- ucloud/services/upgsql/schemas/apis.py +827 -0
- ucloud/services/upgsql/schemas/models.py +158 -0
- ucloud/services/uphone/__init__.py +0 -0
- ucloud/services/uphone/client.py +2122 -0
- ucloud/services/uphone/schemas/__init__.py +0 -0
- ucloud/services/uphone/schemas/apis.py +1799 -0
- ucloud/services/uphone/schemas/models.py +357 -0
- ucloud/services/uphost/__init__.py +0 -0
- ucloud/services/uphost/client.py +847 -0
- ucloud/services/uphost/schemas/__init__.py +0 -0
- ucloud/services/uphost/schemas/apis.py +689 -0
- ucloud/services/uphost/schemas/models.py +175 -0
- ucloud/services/urocketmq/__init__.py +0 -0
- ucloud/services/urocketmq/client.py +117 -0
- ucloud/services/urocketmq/schemas/__init__.py +0 -0
- ucloud/services/urocketmq/schemas/apis.py +92 -0
- ucloud/services/urocketmq/schemas/models.py +14 -0
- ucloud/services/uslk/__init__.py +0 -0
- ucloud/services/uslk/client.py +249 -0
- ucloud/services/uslk/schemas/__init__.py +0 -0
- ucloud/services/uslk/schemas/apis.py +191 -0
- ucloud/services/uslk/schemas/models.py +74 -0
- ucloud/services/usms/__init__.py +0 -0
- ucloud/services/usms/client.py +759 -0
- ucloud/services/usms/schemas/__init__.py +0 -0
- ucloud/services/usms/schemas/apis.py +653 -0
- ucloud/services/usms/schemas/models.py +215 -0
- ucloud/services/utsdb/__init__.py +0 -0
- ucloud/services/utsdb/client.py +604 -0
- ucloud/services/utsdb/schemas/__init__.py +0 -0
- ucloud/services/utsdb/schemas/apis.py +515 -0
- ucloud/services/utsdb/schemas/models.py +61 -0
- ucloud/services/uvms/__init__.py +0 -0
- ucloud/services/uvms/client.py +119 -0
- ucloud/services/uvms/schemas/__init__.py +0 -0
- ucloud/services/uvms/schemas/apis.py +88 -0
- ucloud/services/uvms/schemas/models.py +40 -0
- ucloud/services/vpc/__init__.py +0 -0
- ucloud/services/vpc/client.py +3233 -0
- ucloud/services/vpc/schemas/__init__.py +0 -0
- ucloud/services/vpc/schemas/apis.py +2529 -0
- ucloud/services/vpc/schemas/models.py +651 -0
- ucloud/testing/__init__.py +0 -0
- ucloud/testing/driver/__init__.py +5 -0
- ucloud/testing/driver/_scenario.py +93 -0
- ucloud/testing/driver/_specification.py +57 -0
- ucloud/testing/driver/_step.py +166 -0
- ucloud/testing/env.py +28 -0
- ucloud/testing/exc.py +18 -0
- ucloud/testing/funcs.py +68 -0
- ucloud/testing/mock.py +28 -0
- ucloud/testing/op.py +177 -0
- ucloud/testing/utest.py +195 -0
- ucloud/version.py +1 -0
- ucloud_sdk_python3-0.11.81.dist-info/LICENSE +202 -0
- ucloud_sdk_python3-0.11.81.dist-info/METADATA +71 -0
- ucloud_sdk_python3-0.11.81.dist-info/RECORD +280 -0
- ucloud_sdk_python3-0.11.81.dist-info/WHEEL +5 -0
- ucloud_sdk_python3-0.11.81.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1148 @@
|
|
|
1
|
+
""" Code is generated by ucloud-model, DO NOT EDIT IT. """
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
from ucloud.core.client import Client
|
|
7
|
+
from ucloud.services.uads.schemas import apis
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class UADSClient(Client):
|
|
11
|
+
def __init__(
|
|
12
|
+
self, config: dict, transport=None, middleware=None, logger=None
|
|
13
|
+
):
|
|
14
|
+
super(UADSClient, self).__init__(config, transport, middleware, logger)
|
|
15
|
+
|
|
16
|
+
def add_high_protect_game_ip_info(
|
|
17
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
18
|
+
) -> dict:
|
|
19
|
+
"""AddHighProtectGameIPInfo - 添加代理ip
|
|
20
|
+
|
|
21
|
+
**Request**
|
|
22
|
+
|
|
23
|
+
- **LineType** (str) - (Required) 套餐线路类型, 如果是BGP的线路, 则为BGP;如果为双线, 则可选TELECOM, UNICOM;如果为海外, 则为INTERNATIONAL;
|
|
24
|
+
- **ResourceId** (str) - (Required) 资源Id
|
|
25
|
+
- **TypeIP** (str) - (Required) IP类型,取值范围为:TypeFree, TypeCharge
|
|
26
|
+
- **UserIP** (str) - (Required) 用户的源站ip
|
|
27
|
+
- **CouponId** (str) - 代金券ID
|
|
28
|
+
- **Remark** (str) - 备注,默认为空.
|
|
29
|
+
|
|
30
|
+
**Response**
|
|
31
|
+
|
|
32
|
+
- **Cname** (str) - cname记录
|
|
33
|
+
- **DefenceIP** (str) - 防御IP
|
|
34
|
+
- **IPId** (int) - IPId
|
|
35
|
+
- **SrcIP** (str) - 源IP
|
|
36
|
+
|
|
37
|
+
"""
|
|
38
|
+
# build request
|
|
39
|
+
d = {}
|
|
40
|
+
req and d.update(req)
|
|
41
|
+
d = apis.AddHighProtectGameIPInfoRequestSchema().dumps(d)
|
|
42
|
+
|
|
43
|
+
# build options
|
|
44
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
45
|
+
|
|
46
|
+
resp = self.invoke("AddHighProtectGameIPInfo", d, **kwargs)
|
|
47
|
+
return apis.AddHighProtectGameIPInfoResponseSchema().loads(resp)
|
|
48
|
+
|
|
49
|
+
def add_nap_allow_list_domain(
|
|
50
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
51
|
+
) -> dict:
|
|
52
|
+
"""AddNapAllowListDomain - 添加域名允许列表
|
|
53
|
+
|
|
54
|
+
**Request**
|
|
55
|
+
|
|
56
|
+
- **Domain** (list) - (Required) 域名,N从0开始,多个域名:Domain.0、Domain.1、...
|
|
57
|
+
- **ResourceId** (str) - (Required) 资源ID
|
|
58
|
+
|
|
59
|
+
**Response**
|
|
60
|
+
|
|
61
|
+
- **Data** (list) - 见 **DomainConfigResult** 模型定义
|
|
62
|
+
|
|
63
|
+
**Response Model**
|
|
64
|
+
|
|
65
|
+
**DomainConfigResult**
|
|
66
|
+
- **Code** (int) - 错误码
|
|
67
|
+
- **Domain** (str) - 域名
|
|
68
|
+
- **Message** (str) - 提示信息
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
"""
|
|
72
|
+
# build request
|
|
73
|
+
d = {}
|
|
74
|
+
req and d.update(req)
|
|
75
|
+
d = apis.AddNapAllowListDomainRequestSchema().dumps(d)
|
|
76
|
+
|
|
77
|
+
# build options
|
|
78
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
79
|
+
|
|
80
|
+
resp = self.invoke("AddNapAllowListDomain", d, **kwargs)
|
|
81
|
+
return apis.AddNapAllowListDomainResponseSchema().loads(resp)
|
|
82
|
+
|
|
83
|
+
def bind_nap_ip(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
|
|
84
|
+
"""BindNapIP - 直连高防:将尚未使用的高防EIP绑定到指定的资源
|
|
85
|
+
|
|
86
|
+
**Request**
|
|
87
|
+
|
|
88
|
+
- **ProjectId** (str) - (Config) 项目ID。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
89
|
+
- **BindResourceId** (str) - (Required) 绑定的资源ID
|
|
90
|
+
- **EIPId** (str) - (Required) EIP资源ID
|
|
91
|
+
- **NapIp** (str) - (Required) 高防IP
|
|
92
|
+
- **ResourceId** (str) - (Required) 高防资源ID
|
|
93
|
+
- **ResourceType** (str) - (Required) 绑定的资源类型(uhost:云主机,ulb:负载均衡,upm:物理机)
|
|
94
|
+
|
|
95
|
+
**Response**
|
|
96
|
+
|
|
97
|
+
- **Message** (str) - 错误信息
|
|
98
|
+
|
|
99
|
+
"""
|
|
100
|
+
# build request
|
|
101
|
+
d = {
|
|
102
|
+
"ProjectId": self.config.project_id,
|
|
103
|
+
}
|
|
104
|
+
req and d.update(req)
|
|
105
|
+
d = apis.BindNapIPRequestSchema().dumps(d)
|
|
106
|
+
|
|
107
|
+
resp = self.invoke("BindNapIP", d, **kwargs)
|
|
108
|
+
return apis.BindNapIPResponseSchema().loads(resp)
|
|
109
|
+
|
|
110
|
+
def buy_high_protect_game_service(
|
|
111
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
112
|
+
) -> dict:
|
|
113
|
+
"""BuyHighProtectGameService - 购买高防服务
|
|
114
|
+
|
|
115
|
+
**Request**
|
|
116
|
+
|
|
117
|
+
- **ProjectId** (str) - (Config) 项目ID。请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
118
|
+
- **AreaLine** (str) - (Required) 线路区域, 可取范围{"SouthChina", "EastChina"}
|
|
119
|
+
- **ChargeType** (str) - (Required) 计费方式 ,取值范围 {"Month", "Year", "Dynamic", "Day"};其中华东双线周付使用Day,其他支持的周付使用Dynamic;
|
|
120
|
+
- **EngineRoom** (list) - (Required) 购买的套餐所在机房,取值范围{"Hangzhou2", "Hangzhou", "Xiamen"}
|
|
121
|
+
- **LineType** (str) - (Required) 'default': 'DUPLET', 取值范围 {"DUPLET", "BGP"}
|
|
122
|
+
- **Quantity** (int) - (Required) 计费时长
|
|
123
|
+
- **SrcBandwidth** (int) - (Required) 带宽
|
|
124
|
+
- **CouponId** (str) - 代金券ID
|
|
125
|
+
- **DefenceDDosBaseFlowArr** (list) - DDoS基础防护值(当购买套餐为多种线路的时候,顺序为,电信,联通,移动...,当为单线的时候只传DefenceDDosBaseFlowArr.0)
|
|
126
|
+
- **DefenceDDosMaxFlowArr** (list) - DDoS最大防护值(当购买套餐为多种线路的时候,顺序为,电信,联通,移动...;当为单线的时候只传DefenceDDosMaxFlowArr.0)
|
|
127
|
+
- **DefenceType** (str) - 防御类型,默认为TypeFixed; 取值范围{"TypeFixed", "TypeDynamic"}
|
|
128
|
+
- **ForwardType** (str) - 转发类型,默认为:Proxy;Proxy:代理、Passthrough:直连
|
|
129
|
+
- **HighProtectGameServiceName** (str) - 高防服务名称
|
|
130
|
+
- **Vendor** (int) - 供应商编号
|
|
131
|
+
|
|
132
|
+
**Response**
|
|
133
|
+
|
|
134
|
+
- **ResourceInfo** (dict) - 见 **ResourceInfo** 模型定义
|
|
135
|
+
|
|
136
|
+
**Response Model**
|
|
137
|
+
|
|
138
|
+
**ResourceInfo**
|
|
139
|
+
- **ResourceId** (str) - 资源id
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
"""
|
|
143
|
+
# build request
|
|
144
|
+
d = {
|
|
145
|
+
"ProjectId": self.config.project_id,
|
|
146
|
+
}
|
|
147
|
+
req and d.update(req)
|
|
148
|
+
d = apis.BuyHighProtectGameServiceRequestSchema().dumps(d)
|
|
149
|
+
|
|
150
|
+
# build options
|
|
151
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
152
|
+
|
|
153
|
+
resp = self.invoke("BuyHighProtectGameService", d, **kwargs)
|
|
154
|
+
return apis.BuyHighProtectGameServiceResponseSchema().loads(resp)
|
|
155
|
+
|
|
156
|
+
def create_bgp_service_fwd_rule(
|
|
157
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
158
|
+
) -> dict:
|
|
159
|
+
"""CreateBGPServiceFwdRule - 创建BGP高防转发规则
|
|
160
|
+
|
|
161
|
+
**Request**
|
|
162
|
+
|
|
163
|
+
- **BgpIP** (str) - (Required) BGP的IP
|
|
164
|
+
- **ResourceId** (str) - (Required) 资源id
|
|
165
|
+
- **BackupIP** (str) - 备份源站的IP
|
|
166
|
+
- **BackupPort** (int) - 备份源站的端口
|
|
167
|
+
- **BgpIPPort** (int) - 默认为0,为IP协议的转发端口,其余的自定义
|
|
168
|
+
- **FwdType** (str) - 转发协议的类型包括三种:默认为“IP”,还可以选择为“TCP”
|
|
169
|
+
- **LoadBalance** (str) - 转发协议的类型是否为负载均衡的:默认为“No”,还可以选择为“Yes”。负载均衡模式下必须配置BackupIP
|
|
170
|
+
- **Remark** (str) - 备注,默认为空
|
|
171
|
+
- **SourceAddrArr** (list) - 回源地址,可填 IP地址 或 域名
|
|
172
|
+
- **SourceDetect** (int) - 表示对源站进行检测:默认为0表示关闭,还可以选择为1表示开启
|
|
173
|
+
- **SourcePortArr** (list) - 回源端口
|
|
174
|
+
- **SourceToaIDArr** (list) - 回源TOA
|
|
175
|
+
- **SourceType** (str) - 回源类型,分 “IP”、“Domain”
|
|
176
|
+
|
|
177
|
+
**Response**
|
|
178
|
+
|
|
179
|
+
- **RuleIndex** (int) - 转发规则的数据库索引值
|
|
180
|
+
|
|
181
|
+
"""
|
|
182
|
+
# build request
|
|
183
|
+
d = {}
|
|
184
|
+
req and d.update(req)
|
|
185
|
+
d = apis.CreateBGPServiceFwdRuleRequestSchema().dumps(d)
|
|
186
|
+
|
|
187
|
+
# build options
|
|
188
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
189
|
+
|
|
190
|
+
resp = self.invoke("CreateBGPServiceFwdRule", d, **kwargs)
|
|
191
|
+
return apis.CreateBGPServiceFwdRuleResponseSchema().loads(resp)
|
|
192
|
+
|
|
193
|
+
def create_bgp_service_ip(
|
|
194
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
195
|
+
) -> dict:
|
|
196
|
+
"""CreateBGPServiceIP - 分配一个BGP IP
|
|
197
|
+
|
|
198
|
+
**Request**
|
|
199
|
+
|
|
200
|
+
- **ResourceId** (str) - (Required) 资源id,表示归属在哪个高防服务下
|
|
201
|
+
- **EIPRegion** (str) - 高防IP对应机房(直连高防必须携带)
|
|
202
|
+
- **Remark** (str) - 备注,默认为空
|
|
203
|
+
- **TypeIP** (str) - ip的类型, 默认是TypeFree
|
|
204
|
+
|
|
205
|
+
**Response**
|
|
206
|
+
|
|
207
|
+
- **Cname** (str) - cname记录
|
|
208
|
+
- **DefenceIP** (str) - 分配的BGP高防IP的IP地址
|
|
209
|
+
- **EnableSwitch** (int) - 是否热备份开启
|
|
210
|
+
- **IPId** (int) - IPId
|
|
211
|
+
|
|
212
|
+
"""
|
|
213
|
+
# build request
|
|
214
|
+
d = {}
|
|
215
|
+
req and d.update(req)
|
|
216
|
+
d = apis.CreateBGPServiceIPRequestSchema().dumps(d)
|
|
217
|
+
|
|
218
|
+
# build options
|
|
219
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
220
|
+
|
|
221
|
+
resp = self.invoke("CreateBGPServiceIP", d, **kwargs)
|
|
222
|
+
return apis.CreateBGPServiceIPResponseSchema().loads(resp)
|
|
223
|
+
|
|
224
|
+
def delete_bgp_service_fwd_rule(
|
|
225
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
226
|
+
) -> dict:
|
|
227
|
+
"""DeleteBGPServiceFwdRule - 删除转发规则
|
|
228
|
+
|
|
229
|
+
**Request**
|
|
230
|
+
|
|
231
|
+
- **ResourceId** (str) - (Required) 资源id
|
|
232
|
+
- **RuleIndex** (int) - (Required) 需要删除的转发规则ID
|
|
233
|
+
|
|
234
|
+
**Response**
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
"""
|
|
238
|
+
# build request
|
|
239
|
+
d = {}
|
|
240
|
+
req and d.update(req)
|
|
241
|
+
d = apis.DeleteBGPServiceFwdRuleRequestSchema().dumps(d)
|
|
242
|
+
|
|
243
|
+
resp = self.invoke("DeleteBGPServiceFwdRule", d, **kwargs)
|
|
244
|
+
return apis.DeleteBGPServiceFwdRuleResponseSchema().loads(resp)
|
|
245
|
+
|
|
246
|
+
def delete_bgp_service_ip(
|
|
247
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
248
|
+
) -> dict:
|
|
249
|
+
"""DeleteBGPServiceIP - 删除BGP高防IP
|
|
250
|
+
|
|
251
|
+
**Request**
|
|
252
|
+
|
|
253
|
+
- **Region** (str) - (Config) 机房(直接模式高防需要传)
|
|
254
|
+
- **DefenceIp** (str) - (Required) 需要删除的高防IP
|
|
255
|
+
- **ResourceId** (str) - (Required) 资源id
|
|
256
|
+
|
|
257
|
+
**Response**
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
"""
|
|
261
|
+
# build request
|
|
262
|
+
d = {
|
|
263
|
+
"Region": self.config.region,
|
|
264
|
+
}
|
|
265
|
+
req and d.update(req)
|
|
266
|
+
d = apis.DeleteBGPServiceIPRequestSchema().dumps(d)
|
|
267
|
+
|
|
268
|
+
resp = self.invoke("DeleteBGPServiceIP", d, **kwargs)
|
|
269
|
+
return apis.DeleteBGPServiceIPResponseSchema().loads(resp)
|
|
270
|
+
|
|
271
|
+
def delete_high_protect_game_ip_info(
|
|
272
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
273
|
+
) -> dict:
|
|
274
|
+
"""DeleteHighProtectGameIPInfo - 删除高防IP
|
|
275
|
+
|
|
276
|
+
**Request**
|
|
277
|
+
|
|
278
|
+
- **DefenceIp** (str) - (Required) 要删除的高防ip
|
|
279
|
+
- **ResourceId** (str) - (Required) 资源ID
|
|
280
|
+
|
|
281
|
+
**Response**
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
"""
|
|
285
|
+
# build request
|
|
286
|
+
d = {}
|
|
287
|
+
req and d.update(req)
|
|
288
|
+
d = apis.DeleteHighProtectGameIPInfoRequestSchema().dumps(d)
|
|
289
|
+
|
|
290
|
+
resp = self.invoke("DeleteHighProtectGameIPInfo", d, **kwargs)
|
|
291
|
+
return apis.DeleteHighProtectGameIPInfoResponseSchema().loads(resp)
|
|
292
|
+
|
|
293
|
+
def delete_high_protect_game_service(
|
|
294
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
295
|
+
) -> dict:
|
|
296
|
+
"""DeleteHighProtectGameService - 删除高防
|
|
297
|
+
|
|
298
|
+
**Request**
|
|
299
|
+
|
|
300
|
+
- **ResourceId** (str) - (Required) 删除的资源Id
|
|
301
|
+
|
|
302
|
+
**Response**
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
"""
|
|
306
|
+
# build request
|
|
307
|
+
d = {}
|
|
308
|
+
req and d.update(req)
|
|
309
|
+
d = apis.DeleteHighProtectGameServiceRequestSchema().dumps(d)
|
|
310
|
+
|
|
311
|
+
resp = self.invoke("DeleteHighProtectGameService", d, **kwargs)
|
|
312
|
+
return apis.DeleteHighProtectGameServiceResponseSchema().loads(resp)
|
|
313
|
+
|
|
314
|
+
def delete_nap_allow_list_domain(
|
|
315
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
316
|
+
) -> dict:
|
|
317
|
+
"""DeleteNapAllowListDomain - 删除域名允许列表
|
|
318
|
+
|
|
319
|
+
**Request**
|
|
320
|
+
|
|
321
|
+
- **Domain** (list) - (Required) 域名,N从0开始,多个域名:Domain.0、Domain.1、...
|
|
322
|
+
- **ResourceId** (str) - (Required) 资源ID
|
|
323
|
+
|
|
324
|
+
**Response**
|
|
325
|
+
|
|
326
|
+
- **Data** (list) - 见 **DomainConfigResult** 模型定义
|
|
327
|
+
|
|
328
|
+
**Response Model**
|
|
329
|
+
|
|
330
|
+
**DomainConfigResult**
|
|
331
|
+
- **Code** (int) - 错误码
|
|
332
|
+
- **Domain** (str) - 域名
|
|
333
|
+
- **Message** (str) - 提示信息
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
"""
|
|
337
|
+
# build request
|
|
338
|
+
d = {}
|
|
339
|
+
req and d.update(req)
|
|
340
|
+
d = apis.DeleteNapAllowListDomainRequestSchema().dumps(d)
|
|
341
|
+
|
|
342
|
+
resp = self.invoke("DeleteNapAllowListDomain", d, **kwargs)
|
|
343
|
+
return apis.DeleteNapAllowListDomainResponseSchema().loads(resp)
|
|
344
|
+
|
|
345
|
+
def describe_buy_high_protect_game_ip_price(
|
|
346
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
347
|
+
) -> dict:
|
|
348
|
+
"""DescribeBuyHighProtectGameIPPrice - 获取购买IP的价格
|
|
349
|
+
|
|
350
|
+
**Request**
|
|
351
|
+
|
|
352
|
+
- **ChargeType** (str) - (Required) 付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按需付费(需开启权限); Trial
|
|
353
|
+
- **Quantity** (int) - (Required) 购买数量
|
|
354
|
+
- **ResourceId** (str) - (Required) 资源ID
|
|
355
|
+
|
|
356
|
+
**Response**
|
|
357
|
+
|
|
358
|
+
- **PremiumPrice** (float) - 溢价
|
|
359
|
+
- **UnitPrice** (float) - 单位价格
|
|
360
|
+
|
|
361
|
+
"""
|
|
362
|
+
# build request
|
|
363
|
+
d = {}
|
|
364
|
+
req and d.update(req)
|
|
365
|
+
d = apis.DescribeBuyHighProtectGameIPPriceRequestSchema().dumps(d)
|
|
366
|
+
|
|
367
|
+
resp = self.invoke("DescribeBuyHighProtectGameIPPrice", d, **kwargs)
|
|
368
|
+
return apis.DescribeBuyHighProtectGameIPPriceResponseSchema().loads(
|
|
369
|
+
resp
|
|
370
|
+
)
|
|
371
|
+
|
|
372
|
+
def describe_high_protect_game_ip_info(
|
|
373
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
374
|
+
) -> dict:
|
|
375
|
+
"""DescribeHighProtectGameIPInfo - 获取高防IP信息
|
|
376
|
+
|
|
377
|
+
**Request**
|
|
378
|
+
|
|
379
|
+
- **ResourceId** (str) - (Required) 资源短id
|
|
380
|
+
- **Limit** (int) - 返回数据长度,默认为50。
|
|
381
|
+
- **Offset** (int) - 列表起始位置偏移量,默认为0。
|
|
382
|
+
|
|
383
|
+
**Response**
|
|
384
|
+
|
|
385
|
+
- **AvailableIPQuota** (int) - 可用剩余ip配额数
|
|
386
|
+
- **GameIPInfo** (list) - 见 **GameIpInfoTotal** 模型定义
|
|
387
|
+
- **TotalCount** (int) - 已经配置的总数
|
|
388
|
+
|
|
389
|
+
**Response Model**
|
|
390
|
+
|
|
391
|
+
**GameIpInfoTotal**
|
|
392
|
+
- **Cname** (str) - 高防IP Cname
|
|
393
|
+
- **DefenceIP** (str) - 高防IP
|
|
394
|
+
- **LineType** (str) - 线路类型
|
|
395
|
+
- **Remark** (str) - 用户mark
|
|
396
|
+
- **RuleCnt** (int) - 规则的个数
|
|
397
|
+
- **SrcIP** (list) - 回源ip列表
|
|
398
|
+
- **Status** (str) - ip配置状态
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
"""
|
|
402
|
+
# build request
|
|
403
|
+
d = {}
|
|
404
|
+
req and d.update(req)
|
|
405
|
+
d = apis.DescribeHighProtectGameIPInfoRequestSchema().dumps(d)
|
|
406
|
+
|
|
407
|
+
resp = self.invoke("DescribeHighProtectGameIPInfo", d, **kwargs)
|
|
408
|
+
return apis.DescribeHighProtectGameIPInfoResponseSchema().loads(resp)
|
|
409
|
+
|
|
410
|
+
def describe_nap_history_statistic(
|
|
411
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
412
|
+
) -> dict:
|
|
413
|
+
"""DescribeNapHistoryStatistic - 获取高防历史统计
|
|
414
|
+
|
|
415
|
+
**Request**
|
|
416
|
+
|
|
417
|
+
- **BeginTime** (int) - (Required) 开始时间,Unix时间戳
|
|
418
|
+
- **EndTime** (int) - (Required) 结束时间,Unix时间戳
|
|
419
|
+
- **ResourceId** (str) - (Required) 资源ID
|
|
420
|
+
- **Accuracy** (int) - 查询粒度。1.分钟粒度 2.小时粒度 3.天粒度 默认为21.分钟粒度,BeginTime开始时间是7天内,EndTime-BeginTime时间跨度最大是1小时2.小时粒度,BeginTime开始时间是30天内,EndTime-BeginTime时间跨度最大是7天3.天粒度,BeginTime开始时间是180天内,EndTime-BeginTime时间跨度最大是90天
|
|
421
|
+
- **Limit** (int) - 返回数据长度,默认不限制
|
|
422
|
+
- **NapIP** (str) - 高防IP
|
|
423
|
+
- **Offset** (int) - 列表起始位置偏移量,默认为0
|
|
424
|
+
|
|
425
|
+
**Response**
|
|
426
|
+
|
|
427
|
+
- **NetStats** (list) - 见 **NetStats** 模型定义
|
|
428
|
+
|
|
429
|
+
**Response Model**
|
|
430
|
+
|
|
431
|
+
**NetStats**
|
|
432
|
+
- **Drop** (dict) - 见 **NetStatEntry** 模型定义
|
|
433
|
+
- **Egress** (dict) - 见 **NetStatEntry** 模型定义
|
|
434
|
+
- **Ingress** (dict) - 见 **NetStatEntry** 模型定义
|
|
435
|
+
- **Time** (int) - Unix时间戳
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
**NetStatEntry**
|
|
439
|
+
- **Bps** (float) - 流量,单位:Mbits
|
|
440
|
+
- **Pps** (int) - 包量,单位:pps
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
"""
|
|
444
|
+
# build request
|
|
445
|
+
d = {}
|
|
446
|
+
req and d.update(req)
|
|
447
|
+
d = apis.DescribeNapHistoryStatisticRequestSchema().dumps(d)
|
|
448
|
+
|
|
449
|
+
resp = self.invoke("DescribeNapHistoryStatistic", d, **kwargs)
|
|
450
|
+
return apis.DescribeNapHistoryStatisticResponseSchema().loads(resp)
|
|
451
|
+
|
|
452
|
+
def describe_nap_real_time_statistic(
|
|
453
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
454
|
+
) -> dict:
|
|
455
|
+
"""DescribeNapRealTimeStatistic - 获取高防实时统计
|
|
456
|
+
|
|
457
|
+
**Request**
|
|
458
|
+
|
|
459
|
+
- **BeginTime** (int) - (Required) 开始时间,Unix时间戳
|
|
460
|
+
- **EndTime** (int) - (Required) 结束时间,Unix时间戳(时间跨度不超过1小时)
|
|
461
|
+
- **ResourceId** (str) - (Required) 资源ID
|
|
462
|
+
- **Limit** (int) - 返回数据长度,默认不限制
|
|
463
|
+
- **NapIP** (str) - 高防IP
|
|
464
|
+
- **Offset** (int) - 列表起始位置偏移量,默认为0
|
|
465
|
+
|
|
466
|
+
**Response**
|
|
467
|
+
|
|
468
|
+
- **NetStats** (list) - 见 **NetStats** 模型定义
|
|
469
|
+
|
|
470
|
+
**Response Model**
|
|
471
|
+
|
|
472
|
+
**NetStats**
|
|
473
|
+
- **Drop** (dict) - 见 **NetStatEntry** 模型定义
|
|
474
|
+
- **Egress** (dict) - 见 **NetStatEntry** 模型定义
|
|
475
|
+
- **Ingress** (dict) - 见 **NetStatEntry** 模型定义
|
|
476
|
+
- **Time** (int) - Unix时间戳
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
**NetStatEntry**
|
|
480
|
+
- **Bps** (float) - 流量,单位:Mbits
|
|
481
|
+
- **Pps** (int) - 包量,单位:pps
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
"""
|
|
485
|
+
# build request
|
|
486
|
+
d = {}
|
|
487
|
+
req and d.update(req)
|
|
488
|
+
d = apis.DescribeNapRealTimeStatisticRequestSchema().dumps(d)
|
|
489
|
+
|
|
490
|
+
resp = self.invoke("DescribeNapRealTimeStatistic", d, **kwargs)
|
|
491
|
+
return apis.DescribeNapRealTimeStatisticResponseSchema().loads(resp)
|
|
492
|
+
|
|
493
|
+
def describe_nap_service_info(
|
|
494
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
495
|
+
) -> dict:
|
|
496
|
+
"""DescribeNapServiceInfo - 获取高防服务信息
|
|
497
|
+
|
|
498
|
+
**Request**
|
|
499
|
+
|
|
500
|
+
- **ProjectId** (str) - (Config) 项目ID。请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
501
|
+
- **Limit** (int) - 返回数据长度,默认为10
|
|
502
|
+
- **NapType** (int) - 高防类型;0:全部、1:内地高防、2:海外高防
|
|
503
|
+
- **Offset** (int) - 列表起始位置偏移量,默认为0
|
|
504
|
+
- **ResourceId** (str) - 资源ID
|
|
505
|
+
|
|
506
|
+
**Response**
|
|
507
|
+
|
|
508
|
+
- **ServiceInfo** (list) - 见 **ServiceInfo** 模型定义
|
|
509
|
+
- **TotalCount** (int) - 总数
|
|
510
|
+
|
|
511
|
+
**Response Model**
|
|
512
|
+
|
|
513
|
+
**ServiceInfo**
|
|
514
|
+
- **AccessMode** (str) - 接入模式,Domain:网站接入、IP:非网站接入
|
|
515
|
+
- **AreaLine** (str) - 防护机房所在区域
|
|
516
|
+
- **AutoRenew** (str) - 是否开启自动续费
|
|
517
|
+
- **ChargeType** (str) - 付费类型
|
|
518
|
+
- **CreateTime** (int) - 创建时间
|
|
519
|
+
- **DefenceDDosBaseFlowArr** (list) - 套餐基础防护组
|
|
520
|
+
- **DefenceDDosMaxFlowArr** (list) - 套餐最大防护组
|
|
521
|
+
- **DefenceStatus** (str) - 防护状态,Started:正常、Stopped:关闭、Expired:过期
|
|
522
|
+
- **DefenceType** (str) - 防护类型
|
|
523
|
+
- **EngineRoom** (list) - 防护机房名称
|
|
524
|
+
- **ExpiredTime** (int) - 过期时间
|
|
525
|
+
- **ForwardType** (str) - 转发类型,Proxy:代理、Passthrough:直连
|
|
526
|
+
- **GameId** (int) - 套餐ID
|
|
527
|
+
- **LineType** (str) - 线路类型
|
|
528
|
+
- **Name** (str) - 套餐名称
|
|
529
|
+
- **NapType** (int) - 高防类型,1:内地高防、2:海外高防
|
|
530
|
+
- **ProjectId** (str) - 项目ID
|
|
531
|
+
- **RegionId** (int) - region id
|
|
532
|
+
- **ResourceId** (str) - 资源ID
|
|
533
|
+
- **SrcBandwidth** (int) - 业务带宽
|
|
534
|
+
- **Vendor** (int) - 供应商ID
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
"""
|
|
538
|
+
# build request
|
|
539
|
+
d = {
|
|
540
|
+
"ProjectId": self.config.project_id,
|
|
541
|
+
}
|
|
542
|
+
req and d.update(req)
|
|
543
|
+
d = apis.DescribeNapServiceInfoRequestSchema().dumps(d)
|
|
544
|
+
|
|
545
|
+
resp = self.invoke("DescribeNapServiceInfo", d, **kwargs)
|
|
546
|
+
return apis.DescribeNapServiceInfoResponseSchema().loads(resp)
|
|
547
|
+
|
|
548
|
+
def describe_passthrough_nap_ip(
|
|
549
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
550
|
+
) -> dict:
|
|
551
|
+
"""DescribePassthroughNapIP - 获取直连高防IP信息
|
|
552
|
+
|
|
553
|
+
**Request**
|
|
554
|
+
|
|
555
|
+
- **ResourceId** (str) - (Required) 高防资源ID
|
|
556
|
+
- **Limit** (int) - 限制(传EIPs.0时暂时无效)
|
|
557
|
+
- **NapIp** (str) - 高防IP
|
|
558
|
+
- **Offset** (int) - 位偏移(传EIPs.0时暂时无效)
|
|
559
|
+
|
|
560
|
+
**Response**
|
|
561
|
+
|
|
562
|
+
- **AvailableIPQuota** (int) - 合法IP配额
|
|
563
|
+
- **IPInfo** (list) - 见 **IPInfo** 模型定义
|
|
564
|
+
- **Message** (str) - 错误信息
|
|
565
|
+
- **TotalCount** (int) - IP总个数
|
|
566
|
+
|
|
567
|
+
**Response Model**
|
|
568
|
+
|
|
569
|
+
**IPInfo**
|
|
570
|
+
- **CreateTime** (int) - 创建时间
|
|
571
|
+
- **EIPAddr** (list) - 见 **EIPAddrSet** 模型定义
|
|
572
|
+
- **EIPId** (str) - EIP资源ID
|
|
573
|
+
- **EIPRegion** (str) - EIP Region
|
|
574
|
+
- **Resource** (dict) - 见 **Resouce** 模型定义
|
|
575
|
+
- **Status** (str) - 状态
|
|
576
|
+
- **Tag** (str) - 业务组
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
**EIPAddrSet**
|
|
580
|
+
- **EIPType** (str) - IP类型:gaofang
|
|
581
|
+
- **IP** (str) - 弹性IP地址
|
|
582
|
+
- **OperatorName** (str) - 运营商信息, 枚举值为: BGP: BGP; International: 国际.
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
**Resouce**
|
|
586
|
+
- **EIPId** (str) - EIP资源ID
|
|
587
|
+
- **ResourceId** (str) - 资源ID
|
|
588
|
+
- **ResourceName** (str) - 资源名
|
|
589
|
+
- **ResourceType** (str) - 资源类型
|
|
590
|
+
- **Zone** (str) - 地区
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
"""
|
|
594
|
+
# build request
|
|
595
|
+
d = {}
|
|
596
|
+
req and d.update(req)
|
|
597
|
+
d = apis.DescribePassthroughNapIPRequestSchema().dumps(d)
|
|
598
|
+
|
|
599
|
+
resp = self.invoke("DescribePassthroughNapIP", d, **kwargs)
|
|
600
|
+
return apis.DescribePassthroughNapIPResponseSchema().loads(resp)
|
|
601
|
+
|
|
602
|
+
def describe_upgrade_high_protect_game_service_price(
|
|
603
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
604
|
+
) -> dict:
|
|
605
|
+
"""DescribeUpgradeHighProtectGameServicePrice - 获取高防升降级价格
|
|
606
|
+
|
|
607
|
+
**Request**
|
|
608
|
+
|
|
609
|
+
- **ResourceId** (str) - (Required) 资源ID
|
|
610
|
+
- **AreaLine** (str) - 区域,华东和华南,EastChina 和SouthChina
|
|
611
|
+
- **DefenceDDosBaseFlowArr** (list) - DDoS弹性防护值
|
|
612
|
+
- **DefenceDDosMaxFlowArr** (list) - DDoS基础防护值
|
|
613
|
+
- **DefenceType** (str) - 防御类型,默认为TypeFixed
|
|
614
|
+
- **EngineRoom** (list) - 代表机房,例如Dongguan Hangzhou
|
|
615
|
+
- **LineType** (str) - 线路
|
|
616
|
+
- **SrcBandwidth** (int) - 带宽,默认100M
|
|
617
|
+
|
|
618
|
+
**Response**
|
|
619
|
+
|
|
620
|
+
- **ChargeIPQuota** (int) - 收费IP配额
|
|
621
|
+
- **FreeIPQuota** (int) - 免费IP配额
|
|
622
|
+
- **Price** (int) - 价格
|
|
623
|
+
|
|
624
|
+
"""
|
|
625
|
+
# build request
|
|
626
|
+
d = {}
|
|
627
|
+
req and d.update(req)
|
|
628
|
+
d = apis.DescribeUpgradeHighProtectGameServicePriceRequestSchema().dumps(
|
|
629
|
+
d
|
|
630
|
+
)
|
|
631
|
+
|
|
632
|
+
resp = self.invoke(
|
|
633
|
+
"DescribeUpgradeHighProtectGameServicePrice", d, **kwargs
|
|
634
|
+
)
|
|
635
|
+
return apis.DescribeUpgradeHighProtectGameServicePriceResponseSchema().loads(
|
|
636
|
+
resp
|
|
637
|
+
)
|
|
638
|
+
|
|
639
|
+
def get_bgp_service_fwd_rule(
|
|
640
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
641
|
+
) -> dict:
|
|
642
|
+
"""GetBGPServiceFwdRule - 获取转发规则
|
|
643
|
+
|
|
644
|
+
**Request**
|
|
645
|
+
|
|
646
|
+
- **ResourceId** (str) - (Required) 资源id
|
|
647
|
+
- **BgpIP** (str) - 指定需要查询的IP下的规则
|
|
648
|
+
- **Limit** (int) - 分页显示的条目数,默认值为32
|
|
649
|
+
- **Offset** (int) - 分页显示的起始偏移,默认值为0
|
|
650
|
+
- **RuleIndex** (int) - 查询指定的rule_id, 不填写则默认获取所有的转发规则
|
|
651
|
+
|
|
652
|
+
**Response**
|
|
653
|
+
|
|
654
|
+
- **AvailLoad** (int) - 负载模式下可添加的规则数量(根据IP查询才返回此参数)
|
|
655
|
+
- **AvailNonload** (int) - 非负载模式下可添加的规则数量(根据IP查询才返回此参数)
|
|
656
|
+
- **IpRuleExist** (bool) - 当前配置的规则中是否存在IP规则(根据IP查询才返回此参数)
|
|
657
|
+
- **RuleCnt** (int) - 满足要求的数据条目
|
|
658
|
+
- **RuleInfo** (list) - 见 **BGPFwdRule** 模型定义
|
|
659
|
+
|
|
660
|
+
**Response Model**
|
|
661
|
+
|
|
662
|
+
**BGPFwdRule**
|
|
663
|
+
- **BackupIP** (str) - 备份源站的IP
|
|
664
|
+
- **BackupPort** (int) - 备份源站的端口
|
|
665
|
+
- **BgpIP** (str) - 转发规则对应的BGP高防的IP
|
|
666
|
+
- **BgpIPPort** (int) - 默认为0,为IP协议的转发端口,其余的自定义,在0~65535范围内即可,但是同一IP下配置的规则端口不能重复
|
|
667
|
+
- **ClientProxyInfo** (dict) - 见 **FwdClientProxyInfo** 模型定义
|
|
668
|
+
- **CreateTime** (int) - 创建时间,unix格式
|
|
669
|
+
- **FwdType** (str) - 配置的规则的转发类型
|
|
670
|
+
- **LoadBalance** (str) - 转发协议的类型是否为负载均衡的:默认为“No”,还可以选择为“Yes”。负载模式的规则最多添加2条,非负载模式的规则最多添加8条
|
|
671
|
+
- **Remark** (str) - 备注
|
|
672
|
+
- **RuleID** (str) - 转发规则的ID
|
|
673
|
+
- **RuleIndex** (int) - 生成的规则的数据库索引值
|
|
674
|
+
- **SourceDetect** (int) - 表示对源站进行检测:默认为0表示关闭,还可以选择为1表示开启
|
|
675
|
+
- **SourceInfo** (dict) - 见 **FwdSourceInfo** 模型定义
|
|
676
|
+
- **Status** (str) - 规则的状态
|
|
677
|
+
- **UpdateTime** (int) - 更新时间,unix格式
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
**FwdClientProxyInfo**
|
|
681
|
+
- **Count** (int) - 回源IP个数
|
|
682
|
+
- **IPList** (list) - 回源IP列表
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
**FwdSourceInfo**
|
|
686
|
+
- **Conf** (list) - 见 **FwdSourceInfoConf** 模型定义
|
|
687
|
+
- **Type** (str) - 回源类型,分 IP 和 Domain
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
**FwdSourceInfoConf**
|
|
691
|
+
- **IPList** (list) - 源站IP列表
|
|
692
|
+
- **Port** (int) - 源站端口
|
|
693
|
+
- **Source** (str) - 源站,兼容IP和域名
|
|
694
|
+
- **Toa** (int) - 源站Toa
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
"""
|
|
698
|
+
# build request
|
|
699
|
+
d = {}
|
|
700
|
+
req and d.update(req)
|
|
701
|
+
d = apis.GetBGPServiceFwdRuleRequestSchema().dumps(d)
|
|
702
|
+
|
|
703
|
+
resp = self.invoke("GetBGPServiceFwdRule", d, **kwargs)
|
|
704
|
+
return apis.GetBGPServiceFwdRuleResponseSchema().loads(resp)
|
|
705
|
+
|
|
706
|
+
def get_bgp_service_ip(
|
|
707
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
708
|
+
) -> dict:
|
|
709
|
+
"""GetBGPServiceIP - 获取BGP高防IP的信息
|
|
710
|
+
|
|
711
|
+
**Request**
|
|
712
|
+
|
|
713
|
+
- **ResourceId** (str) - (Required) 资源id
|
|
714
|
+
- **BgpIP** (str) - BGP高防IP
|
|
715
|
+
- **Limit** (int) - 分页显示的条目数,默认值为32
|
|
716
|
+
- **Offset** (int) - 分页显示的起始偏移,默认值为0
|
|
717
|
+
|
|
718
|
+
**Response**
|
|
719
|
+
|
|
720
|
+
- **AvailableIPQuota** (int) - 套餐可用的ip配额
|
|
721
|
+
- **GameIPInfo** (list) - 见 **GameIpInfoTotal** 模型定义
|
|
722
|
+
- **TotalCount** (int) - 套餐中已经配置的ip数量
|
|
723
|
+
|
|
724
|
+
**Response Model**
|
|
725
|
+
|
|
726
|
+
**GameIpInfoTotal**
|
|
727
|
+
- **Cname** (str) - 高防IP Cname
|
|
728
|
+
- **DefenceIP** (str) - 高防IP
|
|
729
|
+
- **LineType** (str) - 线路类型
|
|
730
|
+
- **Remark** (str) - 用户mark
|
|
731
|
+
- **RuleCnt** (int) - 规则的个数
|
|
732
|
+
- **SrcIP** (list) - 回源ip列表
|
|
733
|
+
- **Status** (str) - ip配置状态
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
"""
|
|
737
|
+
# build request
|
|
738
|
+
d = {}
|
|
739
|
+
req and d.update(req)
|
|
740
|
+
d = apis.GetBGPServiceIPRequestSchema().dumps(d)
|
|
741
|
+
|
|
742
|
+
resp = self.invoke("GetBGPServiceIP", d, **kwargs)
|
|
743
|
+
return apis.GetBGPServiceIPResponseSchema().loads(resp)
|
|
744
|
+
|
|
745
|
+
def get_buy_nap_service_price(
|
|
746
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
747
|
+
) -> dict:
|
|
748
|
+
"""GetBuyNapServicePrice - 获取高防价格
|
|
749
|
+
|
|
750
|
+
**Request**
|
|
751
|
+
|
|
752
|
+
- **AreaLine** (str) - (Required) 地区线路
|
|
753
|
+
- **ChargeType** (str) - (Required) 计费方式
|
|
754
|
+
- **DefenceDDosBaseFlowArr** (list) - (Required) DDoS基础防护流量
|
|
755
|
+
- **DefenceDDosMaxFlowArr** (list) - (Required) DDoS最大防护流量
|
|
756
|
+
- **EngineRoom** (list) - (Required) 地区
|
|
757
|
+
- **LineType** (str) - (Required) 线路类型
|
|
758
|
+
- **Quantity** (str) - (Required) 计费时长
|
|
759
|
+
- **SrcBandwidth** (str) - (Required) 带宽
|
|
760
|
+
|
|
761
|
+
**Response**
|
|
762
|
+
|
|
763
|
+
- **ChargeIPQuota** (int) - 收费IP配额
|
|
764
|
+
- **FreeIPQuota** (int) - 免费IP配额
|
|
765
|
+
- **Message** (str) - 错误信息
|
|
766
|
+
- **Price** (float) - 价格
|
|
767
|
+
- **UdpFreeIpQuota** (int) - UDP免费IP配额
|
|
768
|
+
|
|
769
|
+
"""
|
|
770
|
+
# build request
|
|
771
|
+
d = {}
|
|
772
|
+
req and d.update(req)
|
|
773
|
+
d = apis.GetBuyNapServicePriceRequestSchema().dumps(d)
|
|
774
|
+
|
|
775
|
+
resp = self.invoke("GetBuyNapServicePrice", d, **kwargs)
|
|
776
|
+
return apis.GetBuyNapServicePriceResponseSchema().loads(resp)
|
|
777
|
+
|
|
778
|
+
def get_nap_allow_list_domain(
|
|
779
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
780
|
+
) -> dict:
|
|
781
|
+
"""GetNapAllowListDomain - 获取域名允许列表
|
|
782
|
+
|
|
783
|
+
**Request**
|
|
784
|
+
|
|
785
|
+
- **ResourceId** (str) - (Required) 资源ID
|
|
786
|
+
- **Domain** (str) - 获取指定域名信息
|
|
787
|
+
- **DomainLike** (str) - 域名模糊查找
|
|
788
|
+
- **Limit** (int) - 返回数据长度,默认为1000
|
|
789
|
+
- **Offset** (int) - 列表起始位置偏移量,默认为0
|
|
790
|
+
|
|
791
|
+
**Response**
|
|
792
|
+
|
|
793
|
+
- **DomainList** (list) - 见 **BlockAllowDomainEntry** 模型定义
|
|
794
|
+
- **TotalCount** (int) - 列表总条目数
|
|
795
|
+
|
|
796
|
+
**Response Model**
|
|
797
|
+
|
|
798
|
+
**BlockAllowDomainEntry**
|
|
799
|
+
- **CreateTime** (int) - 创建时间戳,例如:1581991500
|
|
800
|
+
- **Domain** (str) - 域名
|
|
801
|
+
- **Remark** (str) - 备注
|
|
802
|
+
- **Status** (int) - 状态;1:添加中,2:成功,3:删除中,4:失败,5:已删除
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
"""
|
|
806
|
+
# build request
|
|
807
|
+
d = {}
|
|
808
|
+
req and d.update(req)
|
|
809
|
+
d = apis.GetNapAllowListDomainRequestSchema().dumps(d)
|
|
810
|
+
|
|
811
|
+
resp = self.invoke("GetNapAllowListDomain", d, **kwargs)
|
|
812
|
+
return apis.GetNapAllowListDomainResponseSchema().loads(resp)
|
|
813
|
+
|
|
814
|
+
def get_nap_service_config(
|
|
815
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
816
|
+
) -> dict:
|
|
817
|
+
"""GetNapServiceConfig - 获取高防服务配置
|
|
818
|
+
|
|
819
|
+
**Request**
|
|
820
|
+
|
|
821
|
+
- **AreaLine** (str) - 线路区域
|
|
822
|
+
- **EngineRoom** (str) - 购买的套餐所在机房
|
|
823
|
+
- **LineType** (str) - 线路类型
|
|
824
|
+
- **NapType** (int) - 高防类型;0:全部、1:内地高防、:2:海外高防
|
|
825
|
+
|
|
826
|
+
**Response**
|
|
827
|
+
|
|
828
|
+
- **NapServiceConfig** (list) - 见 **NapServiceConfigEntry** 模型定义
|
|
829
|
+
|
|
830
|
+
**Response Model**
|
|
831
|
+
|
|
832
|
+
**NapServiceConfigEntry**
|
|
833
|
+
- **AreaLine** (str) - 线路区域
|
|
834
|
+
- **DR** (dict) - 灾备配置
|
|
835
|
+
- **DayPay** (dict) - 按天购买配置
|
|
836
|
+
- **Domain** (dict) - 域名配置
|
|
837
|
+
- **DomainSrc** (dict) - 是否可以配置域名回源
|
|
838
|
+
- **DynamicPay** (dict) - 按需购买配置
|
|
839
|
+
- **EngineRoom** (str) - 购买的套餐所在机房
|
|
840
|
+
- **LineType** (str) - 线路类型
|
|
841
|
+
- **MonthPay** (dict) - 按月购买配置
|
|
842
|
+
- **NapType** (int) - 高防类型,1:内地高防、2:海外高防
|
|
843
|
+
- **YearPay** (dict) - 按年购买配置
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
"""
|
|
847
|
+
# build request
|
|
848
|
+
d = {}
|
|
849
|
+
req and d.update(req)
|
|
850
|
+
d = apis.GetNapServiceConfigRequestSchema().dumps(d)
|
|
851
|
+
|
|
852
|
+
resp = self.invoke("GetNapServiceConfig", d, **kwargs)
|
|
853
|
+
return apis.GetNapServiceConfigResponseSchema().loads(resp)
|
|
854
|
+
|
|
855
|
+
def modify_high_protect_game_ip_info(
|
|
856
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
857
|
+
) -> dict:
|
|
858
|
+
"""ModifyHighProtectGameIPInfo - 修改高防IP信息
|
|
859
|
+
|
|
860
|
+
**Request**
|
|
861
|
+
|
|
862
|
+
- **DefenceIp** (str) - (Required) 高防ip
|
|
863
|
+
- **ResourceId** (str) - (Required) 资源Id
|
|
864
|
+
- **UserIP** (str) - (Required) 源站IP
|
|
865
|
+
|
|
866
|
+
**Response**
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
"""
|
|
870
|
+
# build request
|
|
871
|
+
d = {}
|
|
872
|
+
req and d.update(req)
|
|
873
|
+
d = apis.ModifyHighProtectGameIPInfoRequestSchema().dumps(d)
|
|
874
|
+
|
|
875
|
+
resp = self.invoke("ModifyHighProtectGameIPInfo", d, **kwargs)
|
|
876
|
+
return apis.ModifyHighProtectGameIPInfoResponseSchema().loads(resp)
|
|
877
|
+
|
|
878
|
+
def modify_high_protect_game_service(
|
|
879
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
880
|
+
) -> dict:
|
|
881
|
+
"""ModifyHighProtectGameService - 修改高防信息
|
|
882
|
+
|
|
883
|
+
**Request**
|
|
884
|
+
|
|
885
|
+
- **ResourceId** (str) - (Required) 资源Id
|
|
886
|
+
- **HighProtectGameServiceName** (str) - 高防名称
|
|
887
|
+
|
|
888
|
+
**Response**
|
|
889
|
+
|
|
890
|
+
|
|
891
|
+
"""
|
|
892
|
+
# build request
|
|
893
|
+
d = {}
|
|
894
|
+
req and d.update(req)
|
|
895
|
+
d = apis.ModifyHighProtectGameServiceRequestSchema().dumps(d)
|
|
896
|
+
|
|
897
|
+
resp = self.invoke("ModifyHighProtectGameService", d, **kwargs)
|
|
898
|
+
return apis.ModifyHighProtectGameServiceResponseSchema().loads(resp)
|
|
899
|
+
|
|
900
|
+
def modify_nap_service_auto_renew(
|
|
901
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
902
|
+
) -> dict:
|
|
903
|
+
"""ModifyNapServiceAutoRenew - 修改高防服务自动续费开关
|
|
904
|
+
|
|
905
|
+
**Request**
|
|
906
|
+
|
|
907
|
+
- **AutoRenew** (int) - (Required) 自动续费开关, 0:关闭;1:开启
|
|
908
|
+
- **ResourceId** (str) - (Required) 资源Id
|
|
909
|
+
|
|
910
|
+
**Response**
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
"""
|
|
914
|
+
# build request
|
|
915
|
+
d = {}
|
|
916
|
+
req and d.update(req)
|
|
917
|
+
d = apis.ModifyNapServiceAutoRenewRequestSchema().dumps(d)
|
|
918
|
+
|
|
919
|
+
resp = self.invoke("ModifyNapServiceAutoRenew", d, **kwargs)
|
|
920
|
+
return apis.ModifyNapServiceAutoRenewResponseSchema().loads(resp)
|
|
921
|
+
|
|
922
|
+
def renew_high_protect_game_service(
|
|
923
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
924
|
+
) -> dict:
|
|
925
|
+
"""RenewHighProtectGameService - 续费高防服务
|
|
926
|
+
|
|
927
|
+
**Request**
|
|
928
|
+
|
|
929
|
+
- **AreaLine** (str) - (Required) 区域,华东和华南,EastChina 和SouthChina
|
|
930
|
+
- **ChargeType** (str) - (Required) 计费方式
|
|
931
|
+
- **EngineRoom** (list) - (Required) 代表机房,例如Dongguan Hangzhou
|
|
932
|
+
- **LineType** (str) - (Required) 线路
|
|
933
|
+
- **Quantity** (int) - (Required) 购买数量
|
|
934
|
+
- **ResourceId** (str) - (Required) 资源ID
|
|
935
|
+
- **SrcBandwidth** (int) - (Required) 带宽,默认100M
|
|
936
|
+
- **CouponId** (str) - 代金券ID
|
|
937
|
+
- **DefenceDDosBaseFlowArr** (list) - DDoS基础防御值
|
|
938
|
+
- **DefenceDDosMaxFlowArr** (list) - DDoS弹性防御值
|
|
939
|
+
- **DefenceType** (str) - 防御类型,默认为TypeFixed
|
|
940
|
+
|
|
941
|
+
**Response**
|
|
942
|
+
|
|
943
|
+
- **ResourceInfo** (dict) - 见 **ResourceInfo** 模型定义
|
|
944
|
+
|
|
945
|
+
**Response Model**
|
|
946
|
+
|
|
947
|
+
**ResourceInfo**
|
|
948
|
+
- **ResourceId** (str) - 资源id
|
|
949
|
+
|
|
950
|
+
|
|
951
|
+
"""
|
|
952
|
+
# build request
|
|
953
|
+
d = {}
|
|
954
|
+
req and d.update(req)
|
|
955
|
+
d = apis.RenewHighProtectGameServiceRequestSchema().dumps(d)
|
|
956
|
+
|
|
957
|
+
resp = self.invoke("RenewHighProtectGameService", d, **kwargs)
|
|
958
|
+
return apis.RenewHighProtectGameServiceResponseSchema().loads(resp)
|
|
959
|
+
|
|
960
|
+
def set_nap_domain_entry_remark(
|
|
961
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
962
|
+
) -> dict:
|
|
963
|
+
"""SetNapDomainEntryRemark - 设置域名条目备注
|
|
964
|
+
|
|
965
|
+
**Request**
|
|
966
|
+
|
|
967
|
+
- **Domain** (str) - (Required) 域名
|
|
968
|
+
- **ResourceId** (str) - (Required) 资源ID
|
|
969
|
+
- **Remark** (str) - 备注,默认为空
|
|
970
|
+
|
|
971
|
+
**Response**
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
"""
|
|
975
|
+
# build request
|
|
976
|
+
d = {}
|
|
977
|
+
req and d.update(req)
|
|
978
|
+
d = apis.SetNapDomainEntryRemarkRequestSchema().dumps(d)
|
|
979
|
+
|
|
980
|
+
resp = self.invoke("SetNapDomainEntryRemark", d, **kwargs)
|
|
981
|
+
return apis.SetNapDomainEntryRemarkResponseSchema().loads(resp)
|
|
982
|
+
|
|
983
|
+
def set_nap_fwd_rule_remark(
|
|
984
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
985
|
+
) -> dict:
|
|
986
|
+
"""SetNapFwdRuleRemark - 设置高防转发规则备注信息
|
|
987
|
+
|
|
988
|
+
**Request**
|
|
989
|
+
|
|
990
|
+
- **ResourceId** (str) - (Required) 资源ID
|
|
991
|
+
- **RuleIndex** (str) - (Required) 要修改的规则index
|
|
992
|
+
- **Remark** (str) - 备注,默认为空
|
|
993
|
+
|
|
994
|
+
**Response**
|
|
995
|
+
|
|
996
|
+
|
|
997
|
+
"""
|
|
998
|
+
# build request
|
|
999
|
+
d = {}
|
|
1000
|
+
req and d.update(req)
|
|
1001
|
+
d = apis.SetNapFwdRuleRemarkRequestSchema().dumps(d)
|
|
1002
|
+
|
|
1003
|
+
resp = self.invoke("SetNapFwdRuleRemark", d, **kwargs)
|
|
1004
|
+
return apis.SetNapFwdRuleRemarkResponseSchema().loads(resp)
|
|
1005
|
+
|
|
1006
|
+
def set_nap_ip_remark(
|
|
1007
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1008
|
+
) -> dict:
|
|
1009
|
+
"""SetNapIpRemark - 设置高防IP的备注信息
|
|
1010
|
+
|
|
1011
|
+
**Request**
|
|
1012
|
+
|
|
1013
|
+
- **NapIp** (str) - (Required) 高防IP
|
|
1014
|
+
- **ResourceId** (str) - (Required) 资源ID
|
|
1015
|
+
- **Remark** (str) - 备注,默认为空
|
|
1016
|
+
|
|
1017
|
+
**Response**
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
"""
|
|
1021
|
+
# build request
|
|
1022
|
+
d = {}
|
|
1023
|
+
req and d.update(req)
|
|
1024
|
+
d = apis.SetNapIpRemarkRequestSchema().dumps(d)
|
|
1025
|
+
|
|
1026
|
+
resp = self.invoke("SetNapIpRemark", d, **kwargs)
|
|
1027
|
+
return apis.SetNapIpRemarkResponseSchema().loads(resp)
|
|
1028
|
+
|
|
1029
|
+
def un_bind_nap_ip(
|
|
1030
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1031
|
+
) -> dict:
|
|
1032
|
+
"""UnBindNapIP - 直连高防:将高防EIP从资源上解绑
|
|
1033
|
+
|
|
1034
|
+
**Request**
|
|
1035
|
+
|
|
1036
|
+
- **ProjectId** (str) - (Config) 项目ID。请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
1037
|
+
- **BindResourceId** (str) - (Required) 需要解绑的资源ID
|
|
1038
|
+
- **EIPId** (str) - (Required) 高防EIP资源ID
|
|
1039
|
+
- **NapIp** (str) - (Required) 高防Ip
|
|
1040
|
+
- **ResourceId** (str) - (Required) 高防资源ID
|
|
1041
|
+
- **ResourceType** (str) - (Required) 解绑的资源类型(uhost:云主机,ulb:负载均衡,upm:物理机)
|
|
1042
|
+
|
|
1043
|
+
**Response**
|
|
1044
|
+
|
|
1045
|
+
- **Message** (str) - 错误信息
|
|
1046
|
+
|
|
1047
|
+
"""
|
|
1048
|
+
# build request
|
|
1049
|
+
d = {
|
|
1050
|
+
"ProjectId": self.config.project_id,
|
|
1051
|
+
}
|
|
1052
|
+
req and d.update(req)
|
|
1053
|
+
d = apis.UnBindNapIPRequestSchema().dumps(d)
|
|
1054
|
+
|
|
1055
|
+
resp = self.invoke("UnBindNapIP", d, **kwargs)
|
|
1056
|
+
return apis.UnBindNapIPResponseSchema().loads(resp)
|
|
1057
|
+
|
|
1058
|
+
def update_bgp_service_fwd_rule(
|
|
1059
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1060
|
+
) -> dict:
|
|
1061
|
+
"""UpdateBGPServiceFwdRule - 用于修改BGP高防的规则信息
|
|
1062
|
+
|
|
1063
|
+
**Request**
|
|
1064
|
+
|
|
1065
|
+
- **BgpIP** (str) - (Required) BGP的IP
|
|
1066
|
+
- **ResourceId** (str) - (Required) 资源id
|
|
1067
|
+
- **RuleID** (str) - (Required) 规则uuid
|
|
1068
|
+
- **RuleIndex** (int) - (Required) 要修改的规则index
|
|
1069
|
+
- **BackupIP** (str) - 备份源站的IP
|
|
1070
|
+
- **BackupPort** (int) - 备份源站的端口
|
|
1071
|
+
- **BgpIPPort** (int) - 默认为0,为IP协议的转发端口,其余的自定义
|
|
1072
|
+
- **FwdType** (str) - 转发协议的类型包括三种:默认为“IP”,还可以选择为“TCP”或"UDP"
|
|
1073
|
+
- **LoadBalance** (str) - 转发协议的类型是否为负载均衡的:默认为“No”,还可以选择为“Yes”。负载模式的规则最多添加2条,非负载模式的规则最多添加8条
|
|
1074
|
+
- **SourceAddrArr** (list) - 回源地址,可填 IP地址 或 域名
|
|
1075
|
+
- **SourceDetect** (int) - 表示对源站进行检测:默认为0表示关闭,还可以选择为1表示开启
|
|
1076
|
+
- **SourcePortArr** (list) - 回源端口
|
|
1077
|
+
- **SourceToaIDArr** (list) - 回源TOA
|
|
1078
|
+
|
|
1079
|
+
**Response**
|
|
1080
|
+
|
|
1081
|
+
- **RuleIndex** (int) - 转发规则的数据库索引
|
|
1082
|
+
|
|
1083
|
+
"""
|
|
1084
|
+
# build request
|
|
1085
|
+
d = {}
|
|
1086
|
+
req and d.update(req)
|
|
1087
|
+
d = apis.UpdateBGPServiceFwdRuleRequestSchema().dumps(d)
|
|
1088
|
+
|
|
1089
|
+
resp = self.invoke("UpdateBGPServiceFwdRule", d, **kwargs)
|
|
1090
|
+
return apis.UpdateBGPServiceFwdRuleResponseSchema().loads(resp)
|
|
1091
|
+
|
|
1092
|
+
def update_nap_fwd_rule_domain_resolution(
|
|
1093
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1094
|
+
) -> dict:
|
|
1095
|
+
"""UpdateNapFwdRuleDomainResolution - 手动触发域名回源转发规则更新
|
|
1096
|
+
|
|
1097
|
+
**Request**
|
|
1098
|
+
|
|
1099
|
+
- **ResourceId** (str) - (Required) 资源ID
|
|
1100
|
+
- **RuleIndex** (int) - (Required) 要修改的规则index
|
|
1101
|
+
|
|
1102
|
+
**Response**
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
"""
|
|
1106
|
+
# build request
|
|
1107
|
+
d = {}
|
|
1108
|
+
req and d.update(req)
|
|
1109
|
+
d = apis.UpdateNapFwdRuleDomainResolutionRequestSchema().dumps(d)
|
|
1110
|
+
|
|
1111
|
+
resp = self.invoke("UpdateNapFwdRuleDomainResolution", d, **kwargs)
|
|
1112
|
+
return apis.UpdateNapFwdRuleDomainResolutionResponseSchema().loads(resp)
|
|
1113
|
+
|
|
1114
|
+
def upgrade_high_protect_game_service(
|
|
1115
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
1116
|
+
) -> dict:
|
|
1117
|
+
"""UpgradeHighProtectGameService - 升降级高防服务
|
|
1118
|
+
|
|
1119
|
+
**Request**
|
|
1120
|
+
|
|
1121
|
+
- **AreaLine** (str) - (Required) 区域,华东和华南,EastChina 和SouthChina
|
|
1122
|
+
- **EngineRoom** (list) - (Required) 机房
|
|
1123
|
+
- **LineType** (str) - (Required) 线路类型
|
|
1124
|
+
- **ResourceId** (str) - (Required) 资源ID
|
|
1125
|
+
- **SrcBandwidth** (int) - (Required) 业务带宽
|
|
1126
|
+
- **CouponId** (str) - 代金券ID
|
|
1127
|
+
- **DefenceDDosBaseFlowArr** (list) - DDoS基础防御值
|
|
1128
|
+
- **DefenceDDosMaxFlowArr** (list) - DDoS弹性防御值
|
|
1129
|
+
- **DefenceType** (str) - 防御类型,默认为TypeFixed
|
|
1130
|
+
|
|
1131
|
+
**Response**
|
|
1132
|
+
|
|
1133
|
+
- **ResourceInfo** (dict) - 见 **ResourceInfo** 模型定义
|
|
1134
|
+
|
|
1135
|
+
**Response Model**
|
|
1136
|
+
|
|
1137
|
+
**ResourceInfo**
|
|
1138
|
+
- **ResourceId** (str) - 资源id
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
"""
|
|
1142
|
+
# build request
|
|
1143
|
+
d = {}
|
|
1144
|
+
req and d.update(req)
|
|
1145
|
+
d = apis.UpgradeHighProtectGameServiceRequestSchema().dumps(d)
|
|
1146
|
+
|
|
1147
|
+
resp = self.invoke("UpgradeHighProtectGameService", d, **kwargs)
|
|
1148
|
+
return apis.UpgradeHighProtectGameServiceResponseSchema().loads(resp)
|