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.
Files changed (280) hide show
  1. ucloud/__init__.py +0 -0
  2. ucloud/client.py +469 -0
  3. ucloud/core/__init__.py +0 -0
  4. ucloud/core/auth/__init__.py +3 -0
  5. ucloud/core/auth/_cfg.py +72 -0
  6. ucloud/core/client/__init__.py +8 -0
  7. ucloud/core/client/_cfg.py +96 -0
  8. ucloud/core/client/_client.py +176 -0
  9. ucloud/core/exc/__init__.py +9 -0
  10. ucloud/core/exc/_exc.py +94 -0
  11. ucloud/core/transport/__init__.py +4 -0
  12. ucloud/core/transport/_requests.py +135 -0
  13. ucloud/core/transport/http.py +120 -0
  14. ucloud/core/transport/utils.py +40 -0
  15. ucloud/core/typesystem/__init__.py +0 -0
  16. ucloud/core/typesystem/abstract.py +60 -0
  17. ucloud/core/typesystem/encoder.py +33 -0
  18. ucloud/core/typesystem/fields.py +149 -0
  19. ucloud/core/typesystem/schema.py +97 -0
  20. ucloud/core/utils/__init__.py +0 -0
  21. ucloud/core/utils/compat.py +15 -0
  22. ucloud/core/utils/deco.py +31 -0
  23. ucloud/core/utils/log.py +29 -0
  24. ucloud/core/utils/middleware.py +63 -0
  25. ucloud/helpers/__init__.py +0 -0
  26. ucloud/helpers/utils.py +90 -0
  27. ucloud/helpers/wait.py +108 -0
  28. ucloud/services/__init__.py +0 -0
  29. ucloud/services/cube/__init__.py +0 -0
  30. ucloud/services/cube/client.py +618 -0
  31. ucloud/services/cube/schemas/__init__.py +0 -0
  32. ucloud/services/cube/schemas/apis.py +548 -0
  33. ucloud/services/cube/schemas/models.py +58 -0
  34. ucloud/services/iam/__init__.py +0 -0
  35. ucloud/services/iam/client.py +1078 -0
  36. ucloud/services/iam/schemas/__init__.py +0 -0
  37. ucloud/services/iam/schemas/apis.py +973 -0
  38. ucloud/services/iam/schemas/models.py +127 -0
  39. ucloud/services/ipsecvpn/__init__.py +0 -0
  40. ucloud/services/ipsecvpn/client.py +522 -0
  41. ucloud/services/ipsecvpn/schemas/__init__.py +0 -0
  42. ucloud/services/ipsecvpn/schemas/apis.py +455 -0
  43. ucloud/services/ipsecvpn/schemas/models.py +134 -0
  44. ucloud/services/ipv6gw/__init__.py +0 -0
  45. ucloud/services/ipv6gw/client.py +44 -0
  46. ucloud/services/ipv6gw/schemas/__init__.py +0 -0
  47. ucloud/services/ipv6gw/schemas/apis.py +34 -0
  48. ucloud/services/ipv6gw/schemas/models.py +3 -0
  49. ucloud/services/isms/__init__.py +0 -0
  50. ucloud/services/isms/client.py +330 -0
  51. ucloud/services/isms/schemas/__init__.py +0 -0
  52. ucloud/services/isms/schemas/apis.py +272 -0
  53. ucloud/services/isms/schemas/models.py +50 -0
  54. ucloud/services/pathx/__init__.py +0 -0
  55. ucloud/services/pathx/client.py +1656 -0
  56. ucloud/services/pathx/schemas/__init__.py +0 -0
  57. ucloud/services/pathx/schemas/apis.py +1289 -0
  58. ucloud/services/pathx/schemas/models.py +420 -0
  59. ucloud/services/stepflow/__init__.py +0 -0
  60. ucloud/services/stepflow/client.py +98 -0
  61. ucloud/services/stepflow/schemas/__init__.py +0 -0
  62. ucloud/services/stepflow/schemas/apis.py +67 -0
  63. ucloud/services/stepflow/schemas/models.py +37 -0
  64. ucloud/services/sts/__init__.py +0 -0
  65. ucloud/services/sts/client.py +46 -0
  66. ucloud/services/sts/schemas/__init__.py +0 -0
  67. ucloud/services/sts/schemas/apis.py +35 -0
  68. ucloud/services/sts/schemas/models.py +16 -0
  69. ucloud/services/tidb/__init__.py +0 -0
  70. ucloud/services/tidb/client.py +120 -0
  71. ucloud/services/tidb/schemas/__init__.py +0 -0
  72. ucloud/services/tidb/schemas/apis.py +103 -0
  73. ucloud/services/tidb/schemas/models.py +11 -0
  74. ucloud/services/uaaa/__init__.py +0 -0
  75. ucloud/services/uaaa/client.py +311 -0
  76. ucloud/services/uaaa/schemas/__init__.py +0 -0
  77. ucloud/services/uaaa/schemas/apis.py +252 -0
  78. ucloud/services/uaaa/schemas/models.py +47 -0
  79. ucloud/services/uaccount/__init__.py +0 -0
  80. ucloud/services/uaccount/client.py +547 -0
  81. ucloud/services/uaccount/schemas/__init__.py +0 -0
  82. ucloud/services/uaccount/schemas/apis.py +442 -0
  83. ucloud/services/uaccount/schemas/models.py +128 -0
  84. ucloud/services/uads/__init__.py +0 -0
  85. ucloud/services/uads/client.py +1148 -0
  86. ucloud/services/uads/schemas/__init__.py +0 -0
  87. ucloud/services/uads/schemas/apis.py +983 -0
  88. ucloud/services/uads/schemas/models.py +199 -0
  89. ucloud/services/ubill/__init__.py +0 -0
  90. ucloud/services/ubill/client.py +248 -0
  91. ucloud/services/ubill/schemas/__init__.py +0 -0
  92. ucloud/services/ubill/schemas/apis.py +183 -0
  93. ucloud/services/ubill/schemas/models.py +107 -0
  94. ucloud/services/ucdn/__init__.py +0 -0
  95. ucloud/services/ucdn/client.py +1964 -0
  96. ucloud/services/ucdn/schemas/__init__.py +0 -0
  97. ucloud/services/ucdn/schemas/apis.py +1395 -0
  98. ucloud/services/ucdn/schemas/models.py +576 -0
  99. ucloud/services/ucloudstack/__init__.py +0 -0
  100. ucloud/services/ucloudstack/client.py +3352 -0
  101. ucloud/services/ucloudstack/schemas/__init__.py +0 -0
  102. ucloud/services/ucloudstack/schemas/apis.py +2887 -0
  103. ucloud/services/ucloudstack/schemas/models.py +560 -0
  104. ucloud/services/ucompshare/__init__.py +0 -0
  105. ucloud/services/ucompshare/client.py +820 -0
  106. ucloud/services/ucompshare/schemas/__init__.py +0 -0
  107. ucloud/services/ucompshare/schemas/apis.py +623 -0
  108. ucloud/services/ucompshare/schemas/models.py +241 -0
  109. ucloud/services/udb/__init__.py +0 -0
  110. ucloud/services/udb/client.py +2463 -0
  111. ucloud/services/udb/schemas/__init__.py +0 -0
  112. ucloud/services/udb/schemas/apis.py +2053 -0
  113. ucloud/services/udb/schemas/models.py +319 -0
  114. ucloud/services/udbproxy/__init__.py +0 -0
  115. ucloud/services/udbproxy/client.py +67 -0
  116. ucloud/services/udbproxy/schemas/__init__.py +0 -0
  117. ucloud/services/udbproxy/schemas/apis.py +38 -0
  118. ucloud/services/udbproxy/schemas/models.py +31 -0
  119. ucloud/services/uddb/__init__.py +0 -0
  120. ucloud/services/uddb/client.py +456 -0
  121. ucloud/services/uddb/schemas/__init__.py +0 -0
  122. ucloud/services/uddb/schemas/apis.py +520 -0
  123. ucloud/services/uddb/schemas/models.py +96 -0
  124. ucloud/services/udi/__init__.py +0 -0
  125. ucloud/services/udi/client.py +250 -0
  126. ucloud/services/udi/schemas/__init__.py +0 -0
  127. ucloud/services/udi/schemas/apis.py +205 -0
  128. ucloud/services/udi/schemas/models.py +58 -0
  129. ucloud/services/udisk/__init__.py +0 -0
  130. ucloud/services/udisk/client.py +832 -0
  131. ucloud/services/udisk/schemas/__init__.py +0 -0
  132. ucloud/services/udisk/schemas/apis.py +741 -0
  133. ucloud/services/udisk/schemas/models.py +100 -0
  134. ucloud/services/udns/__init__.py +0 -0
  135. ucloud/services/udns/client.py +380 -0
  136. ucloud/services/udns/schemas/__init__.py +0 -0
  137. ucloud/services/udns/schemas/apis.py +293 -0
  138. ucloud/services/udns/schemas/models.py +58 -0
  139. ucloud/services/udpn/__init__.py +0 -0
  140. ucloud/services/udpn/client.py +240 -0
  141. ucloud/services/udpn/schemas/__init__.py +0 -0
  142. ucloud/services/udpn/schemas/apis.py +203 -0
  143. ucloud/services/udpn/schemas/models.py +29 -0
  144. ucloud/services/udts/__init__.py +0 -0
  145. ucloud/services/udts/client.py +410 -0
  146. ucloud/services/udts/schemas/__init__.py +0 -0
  147. ucloud/services/udts/schemas/apis.py +403 -0
  148. ucloud/services/udts/schemas/models.py +93 -0
  149. ucloud/services/uec/__init__.py +0 -0
  150. ucloud/services/uec/client.py +1510 -0
  151. ucloud/services/uec/schemas/__init__.py +0 -0
  152. ucloud/services/uec/schemas/apis.py +1195 -0
  153. ucloud/services/uec/schemas/models.py +316 -0
  154. ucloud/services/ufile/__init__.py +0 -0
  155. ucloud/services/ufile/client.py +698 -0
  156. ucloud/services/ufile/schemas/__init__.py +0 -0
  157. ucloud/services/ufile/schemas/apis.py +542 -0
  158. ucloud/services/ufile/schemas/models.py +139 -0
  159. ucloud/services/ufs/__init__.py +0 -0
  160. ucloud/services/ufs/client.py +328 -0
  161. ucloud/services/ufs/schemas/__init__.py +0 -0
  162. ucloud/services/ufs/schemas/apis.py +265 -0
  163. ucloud/services/ufs/schemas/models.py +52 -0
  164. ucloud/services/ugn/__init__.py +0 -0
  165. ucloud/services/ugn/client.py +857 -0
  166. ucloud/services/ugn/schemas/__init__.py +0 -0
  167. ucloud/services/ugn/schemas/apis.py +678 -0
  168. ucloud/services/ugn/schemas/models.py +191 -0
  169. ucloud/services/uhost/__init__.py +0 -0
  170. ucloud/services/uhost/client.py +1647 -0
  171. ucloud/services/uhost/schemas/__init__.py +0 -0
  172. ucloud/services/uhost/schemas/apis.py +1483 -0
  173. ucloud/services/uhost/schemas/models.py +427 -0
  174. ucloud/services/uhub/__init__.py +0 -0
  175. ucloud/services/uhub/client.py +229 -0
  176. ucloud/services/uhub/schemas/__init__.py +0 -0
  177. ucloud/services/uhub/schemas/apis.py +194 -0
  178. ucloud/services/uhub/schemas/models.py +39 -0
  179. ucloud/services/uk8s/__init__.py +0 -0
  180. ucloud/services/uk8s/client.py +729 -0
  181. ucloud/services/uk8s/schemas/__init__.py +0 -0
  182. ucloud/services/uk8s/schemas/apis.py +639 -0
  183. ucloud/services/uk8s/schemas/models.py +179 -0
  184. ucloud/services/ulb/__init__.py +0 -0
  185. ucloud/services/ulb/client.py +2285 -0
  186. ucloud/services/ulb/schemas/__init__.py +0 -0
  187. ucloud/services/ulb/schemas/apis.py +1678 -0
  188. ucloud/services/ulb/schemas/models.py +591 -0
  189. ucloud/services/ulighthost/__init__.py +0 -0
  190. ucloud/services/ulighthost/client.py +576 -0
  191. ucloud/services/ulighthost/schemas/__init__.py +0 -0
  192. ucloud/services/ulighthost/schemas/apis.py +445 -0
  193. ucloud/services/ulighthost/schemas/models.py +133 -0
  194. ucloud/services/umem/__init__.py +0 -0
  195. ucloud/services/umem/client.py +1829 -0
  196. ucloud/services/umem/schemas/__init__.py +0 -0
  197. ucloud/services/umem/schemas/apis.py +1477 -0
  198. ucloud/services/umem/schemas/models.py +327 -0
  199. ucloud/services/umongodb/__init__.py +0 -0
  200. ucloud/services/umongodb/client.py +752 -0
  201. ucloud/services/umongodb/schemas/__init__.py +0 -0
  202. ucloud/services/umongodb/schemas/apis.py +567 -0
  203. ucloud/services/umongodb/schemas/models.py +220 -0
  204. ucloud/services/unet/__init__.py +0 -0
  205. ucloud/services/unet/client.py +1278 -0
  206. ucloud/services/unet/schemas/__init__.py +0 -0
  207. ucloud/services/unet/schemas/apis.py +1006 -0
  208. ucloud/services/unet/schemas/models.py +275 -0
  209. ucloud/services/unvs/__init__.py +0 -0
  210. ucloud/services/unvs/client.py +87 -0
  211. ucloud/services/unvs/schemas/__init__.py +0 -0
  212. ucloud/services/unvs/schemas/apis.py +66 -0
  213. ucloud/services/unvs/schemas/models.py +19 -0
  214. ucloud/services/upfs/__init__.py +0 -0
  215. ucloud/services/upfs/client.py +252 -0
  216. ucloud/services/upfs/schemas/__init__.py +0 -0
  217. ucloud/services/upfs/schemas/apis.py +204 -0
  218. ucloud/services/upfs/schemas/models.py +36 -0
  219. ucloud/services/upgsql/__init__.py +0 -0
  220. ucloud/services/upgsql/client.py +1007 -0
  221. ucloud/services/upgsql/schemas/__init__.py +0 -0
  222. ucloud/services/upgsql/schemas/apis.py +827 -0
  223. ucloud/services/upgsql/schemas/models.py +158 -0
  224. ucloud/services/uphone/__init__.py +0 -0
  225. ucloud/services/uphone/client.py +2122 -0
  226. ucloud/services/uphone/schemas/__init__.py +0 -0
  227. ucloud/services/uphone/schemas/apis.py +1799 -0
  228. ucloud/services/uphone/schemas/models.py +357 -0
  229. ucloud/services/uphost/__init__.py +0 -0
  230. ucloud/services/uphost/client.py +847 -0
  231. ucloud/services/uphost/schemas/__init__.py +0 -0
  232. ucloud/services/uphost/schemas/apis.py +689 -0
  233. ucloud/services/uphost/schemas/models.py +175 -0
  234. ucloud/services/urocketmq/__init__.py +0 -0
  235. ucloud/services/urocketmq/client.py +117 -0
  236. ucloud/services/urocketmq/schemas/__init__.py +0 -0
  237. ucloud/services/urocketmq/schemas/apis.py +92 -0
  238. ucloud/services/urocketmq/schemas/models.py +14 -0
  239. ucloud/services/uslk/__init__.py +0 -0
  240. ucloud/services/uslk/client.py +249 -0
  241. ucloud/services/uslk/schemas/__init__.py +0 -0
  242. ucloud/services/uslk/schemas/apis.py +191 -0
  243. ucloud/services/uslk/schemas/models.py +74 -0
  244. ucloud/services/usms/__init__.py +0 -0
  245. ucloud/services/usms/client.py +759 -0
  246. ucloud/services/usms/schemas/__init__.py +0 -0
  247. ucloud/services/usms/schemas/apis.py +653 -0
  248. ucloud/services/usms/schemas/models.py +215 -0
  249. ucloud/services/utsdb/__init__.py +0 -0
  250. ucloud/services/utsdb/client.py +604 -0
  251. ucloud/services/utsdb/schemas/__init__.py +0 -0
  252. ucloud/services/utsdb/schemas/apis.py +515 -0
  253. ucloud/services/utsdb/schemas/models.py +61 -0
  254. ucloud/services/uvms/__init__.py +0 -0
  255. ucloud/services/uvms/client.py +119 -0
  256. ucloud/services/uvms/schemas/__init__.py +0 -0
  257. ucloud/services/uvms/schemas/apis.py +88 -0
  258. ucloud/services/uvms/schemas/models.py +40 -0
  259. ucloud/services/vpc/__init__.py +0 -0
  260. ucloud/services/vpc/client.py +3233 -0
  261. ucloud/services/vpc/schemas/__init__.py +0 -0
  262. ucloud/services/vpc/schemas/apis.py +2529 -0
  263. ucloud/services/vpc/schemas/models.py +651 -0
  264. ucloud/testing/__init__.py +0 -0
  265. ucloud/testing/driver/__init__.py +5 -0
  266. ucloud/testing/driver/_scenario.py +93 -0
  267. ucloud/testing/driver/_specification.py +57 -0
  268. ucloud/testing/driver/_step.py +166 -0
  269. ucloud/testing/env.py +28 -0
  270. ucloud/testing/exc.py +18 -0
  271. ucloud/testing/funcs.py +68 -0
  272. ucloud/testing/mock.py +28 -0
  273. ucloud/testing/op.py +177 -0
  274. ucloud/testing/utest.py +195 -0
  275. ucloud/version.py +1 -0
  276. ucloud_sdk_python3-0.11.81.dist-info/LICENSE +202 -0
  277. ucloud_sdk_python3-0.11.81.dist-info/METADATA +71 -0
  278. ucloud_sdk_python3-0.11.81.dist-info/RECORD +280 -0
  279. ucloud_sdk_python3-0.11.81.dist-info/WHEEL +5 -0
  280. ucloud_sdk_python3-0.11.81.dist-info/top_level.txt +1 -0
@@ -0,0 +1,3233 @@
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.vpc.schemas import apis
8
+
9
+
10
+ class VPCClient(Client):
11
+ def __init__(
12
+ self, config: dict, transport=None, middleware=None, logger=None
13
+ ):
14
+ super(VPCClient, self).__init__(config, transport, middleware, logger)
15
+
16
+ def add_snat_rule(
17
+ self, req: typing.Optional[dict] = None, **kwargs
18
+ ) -> dict:
19
+ """AddSnatRule - 对于绑定了多个EIP的NAT网关,您可以将一个子网下的某台云主机映射到某个特定的EIP上,规则生效后,则该云主机通过该特定的EIP访问互联网。
20
+
21
+ **Request**
22
+
23
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
24
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
25
+ - **NATGWId** (str) - (Required) NAT网关的ID
26
+ - **SnatIp** (str) - (Required) EIP的ip地址,例如106.75.xx.xx
27
+ - **SourceIp** (str) - (Required) 需要出外网的私网IP地址,例如10.9.7.xx
28
+ - **Name** (str) - snat规则名称,默认为“出口规则”
29
+
30
+ **Response**
31
+
32
+
33
+ """
34
+ # build request
35
+ d = {
36
+ "ProjectId": self.config.project_id,
37
+ "Region": self.config.region,
38
+ }
39
+ req and d.update(req)
40
+ d = apis.AddSnatRuleRequestSchema().dumps(d)
41
+
42
+ # build options
43
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
44
+
45
+ resp = self.invoke("AddSnatRule", d, **kwargs)
46
+ return apis.AddSnatRuleResponseSchema().loads(resp)
47
+
48
+ def add_vpc_network(
49
+ self, req: typing.Optional[dict] = None, **kwargs
50
+ ) -> dict:
51
+ """AddVPCNetwork - 添加VPC网段
52
+
53
+ **Request**
54
+
55
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
56
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
57
+ - **Network** (list) - (Required) 增加网段
58
+ - **VPCId** (str) - (Required) 源VPC短ID
59
+
60
+ **Response**
61
+
62
+
63
+ """
64
+ # build request
65
+ d = {
66
+ "ProjectId": self.config.project_id,
67
+ "Region": self.config.region,
68
+ }
69
+ req and d.update(req)
70
+ d = apis.AddVPCNetworkRequestSchema().dumps(d)
71
+
72
+ # build options
73
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
74
+
75
+ resp = self.invoke("AddVPCNetwork", d, **kwargs)
76
+ return apis.AddVPCNetworkResponseSchema().loads(resp)
77
+
78
+ def add_white_list_resource(
79
+ self, req: typing.Optional[dict] = None, **kwargs
80
+ ) -> dict:
81
+ """AddWhiteListResource - 添加NAT网关白名单
82
+
83
+ **Request**
84
+
85
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
86
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
87
+ - **NATGWId** (str) - (Required) NAT网关Id
88
+ - **ResourceIds** (list) - (Required) 可添加白名单的资源Id
89
+
90
+ **Response**
91
+
92
+
93
+ """
94
+ # build request
95
+ d = {
96
+ "ProjectId": self.config.project_id,
97
+ "Region": self.config.region,
98
+ }
99
+ req and d.update(req)
100
+ d = apis.AddWhiteListResourceRequestSchema().dumps(d)
101
+
102
+ # build options
103
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
104
+
105
+ resp = self.invoke("AddWhiteListResource", d, **kwargs)
106
+ return apis.AddWhiteListResourceResponseSchema().loads(resp)
107
+
108
+ def allocate_batch_secondary_ip(
109
+ self, req: typing.Optional[dict] = None, **kwargs
110
+ ) -> dict:
111
+ """AllocateBatchSecondaryIp - 批量申请虚拟网卡辅助IP
112
+
113
+ **Request**
114
+
115
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
116
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
117
+ - **Mac** (str) - (Required) 节点mac
118
+ - **ObjectId** (str) - (Required) 资源Id
119
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
120
+ - **Count** (int) - 申请的内网IP数量
121
+ - **Ip** (list) - 【arry】支持按如下方式申请:①按网段:如192.168.1.32/27,掩码数字最小为27   ②指定IP地址,如192.168.1.3
122
+ - **SubnetId** (str) - 子网Id(若未指定,则根据zone获取默认子网进行创建)
123
+ - **VPCId** (str) - vpcId
124
+
125
+ **Response**
126
+
127
+ - **IpsInfo** (list) - 见 **IpsInfo** 模型定义
128
+
129
+ **Response Model**
130
+
131
+ **IpsInfo**
132
+ - **Gateway** (str) - 网关
133
+ - **Ip** (str) - 内网IP地址
134
+ - **Mac** (str) - MAC地址
135
+ - **Mask** (str) - 掩码
136
+ - **Status** (dict) - 见 **StatusInfo** 模型定义
137
+ - **SubnetId** (str) - 子网资源ID
138
+ - **VPCId** (str) - VPC资源ID
139
+
140
+
141
+ **StatusInfo**
142
+ - **Message** (str) - IP分配失败原因
143
+ - **StatusCode** (str) - 枚举值:Succeeded,Failed
144
+
145
+
146
+ """
147
+ # build request
148
+ d = {
149
+ "ProjectId": self.config.project_id,
150
+ "Region": self.config.region,
151
+ }
152
+ req and d.update(req)
153
+ d = apis.AllocateBatchSecondaryIpRequestSchema().dumps(d)
154
+
155
+ # build options
156
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
157
+
158
+ resp = self.invoke("AllocateBatchSecondaryIp", d, **kwargs)
159
+ return apis.AllocateBatchSecondaryIpResponseSchema().loads(resp)
160
+
161
+ def allocate_secondary_ip(
162
+ self, req: typing.Optional[dict] = None, **kwargs
163
+ ) -> dict:
164
+ """AllocateSecondaryIp - 分配ip(用于uk8s使用)
165
+
166
+ **Request**
167
+
168
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
169
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
170
+ - **Mac** (str) - (Required) 节点mac
171
+ - **ObjectId** (str) - (Required) 资源Id
172
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
173
+ - **Ip** (str) - 指定Ip分配
174
+ - **SubnetId** (str) - 子网Id(若未指定,则根据zone获取默认子网进行创建)
175
+ - **VPCId** (str) - vpcId
176
+
177
+ **Response**
178
+
179
+ - **IpInfo** (dict) - 见 **IpInfo** 模型定义
180
+
181
+ **Response Model**
182
+
183
+ **IpInfo**
184
+ - **Gateway** (str) -
185
+ - **Ip** (str) -
186
+ - **Mac** (str) -
187
+ - **Mask** (str) -
188
+ - **SubnetId** (str) -
189
+ - **VPCId** (str) -
190
+
191
+
192
+ """
193
+ # build request
194
+ d = {
195
+ "ProjectId": self.config.project_id,
196
+ "Region": self.config.region,
197
+ }
198
+ req and d.update(req)
199
+ d = apis.AllocateSecondaryIpRequestSchema().dumps(d)
200
+
201
+ # build options
202
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
203
+
204
+ resp = self.invoke("AllocateSecondaryIp", d, **kwargs)
205
+ return apis.AllocateSecondaryIpResponseSchema().loads(resp)
206
+
207
+ def allocate_vip(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
208
+ """AllocateVIP - 根据提供信息,申请内网VIP(Virtual IP),多用于高可用程序作为漂移IP。
209
+
210
+ **Request**
211
+
212
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
213
+ - **Region** (str) - (Config) 地域
214
+ - **SubnetId** (str) - (Required) 子网id
215
+ - **VPCId** (str) - (Required) 指定vip所属的VPC
216
+ - **BusinessId** (str) - 业务组
217
+ - **Count** (int) - 申请数量,默认: 1
218
+ - **Ip** (str) - 指定ip
219
+ - **Name** (str) - vip名,默认:VIP
220
+ - **Remark** (str) - 备注
221
+ - **Tag** (str) - 业务组名称,默认为Default
222
+ - **Zone** (str) - 可用区
223
+
224
+ **Response**
225
+
226
+ - **DataSet** (list) - 申请到的VIP地址
227
+ - **VIPSet** (list) - 见 **VIPSet** 模型定义
228
+
229
+ **Response Model**
230
+
231
+ **VIPSet**
232
+ - **VIP** (str) - 虚拟ip
233
+ - **VIPId** (str) - 虚拟ip id
234
+ - **VPCId** (str) - VPC id
235
+
236
+
237
+ """
238
+ # build request
239
+ d = {
240
+ "ProjectId": self.config.project_id,
241
+ "Region": self.config.region,
242
+ }
243
+ req and d.update(req)
244
+ d = apis.AllocateVIPRequestSchema().dumps(d)
245
+
246
+ # build options
247
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
248
+
249
+ resp = self.invoke("AllocateVIP", d, **kwargs)
250
+ return apis.AllocateVIPResponseSchema().loads(resp)
251
+
252
+ def associate_route_table(
253
+ self, req: typing.Optional[dict] = None, **kwargs
254
+ ) -> dict:
255
+ """AssociateRouteTable - 绑定子网的路由表
256
+
257
+ **Request**
258
+
259
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
260
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
261
+ - **RouteTableId** (str) - (Required) 路由表资源ID
262
+ - **SubnetId** (str) - (Required) 子网ID
263
+
264
+ **Response**
265
+
266
+
267
+ """
268
+ # build request
269
+ d = {
270
+ "ProjectId": self.config.project_id,
271
+ "Region": self.config.region,
272
+ }
273
+ req and d.update(req)
274
+ d = apis.AssociateRouteTableRequestSchema().dumps(d)
275
+
276
+ resp = self.invoke("AssociateRouteTable", d, **kwargs)
277
+ return apis.AssociateRouteTableResponseSchema().loads(resp)
278
+
279
+ def associate_sec_group(
280
+ self, req: typing.Optional[dict] = None, **kwargs
281
+ ) -> dict:
282
+ """AssociateSecGroup - 绑定资源到安全组
283
+
284
+ **Request**
285
+
286
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
287
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
288
+ - **ResourceId** (list) - (Required) 资源短 ID,安全组参赛和该字段只支持一个批量。支持 string 数组。
289
+ - **PrioritySecGroup** (list) - 见 **AssociateSecGroupParamPrioritySecGroup** 模型定义
290
+
291
+ **Response**
292
+
293
+
294
+ **Request Model**
295
+
296
+ **AssociateSecGroupParamPrioritySecGroup**
297
+ - **Priority** (int) - 绑定优先级。该字段和资源 ID 只支持一个批量。支持 PrioritySecGroup 的 JSON 格式数组。
298
+ - **SecGroupId** (str) - 安全组 ID。该字段和资源 ID 只支持一个批量。支持 PrioritySecGroup 的 JSON 格式数组。
299
+
300
+
301
+ """
302
+ # build request
303
+ d = {
304
+ "ProjectId": self.config.project_id,
305
+ "Region": self.config.region,
306
+ }
307
+ req and d.update(req)
308
+ d = apis.AssociateSecGroupRequestSchema().dumps(d)
309
+
310
+ resp = self.invoke("AssociateSecGroup", d, **kwargs)
311
+ return apis.AssociateSecGroupResponseSchema().loads(resp)
312
+
313
+ def associate_sec_group_dynamic(
314
+ self, req: typing.Optional[dict] = None, **kwargs
315
+ ) -> dict:
316
+ """AssociateSecGroupDynamic - 绑定安全组,动态调整绑定优先级
317
+
318
+ **Request**
319
+
320
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
321
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
322
+ - **ResourceId** (list) - (Required) 资源短 ID 数组。支持数组模式。Type 为 string 数组。
323
+ - **SecGroupId** (str) - (Required) 安全组ID
324
+
325
+ **Response**
326
+
327
+
328
+ """
329
+ # build request
330
+ d = {
331
+ "ProjectId": self.config.project_id,
332
+ "Region": self.config.region,
333
+ }
334
+ req and d.update(req)
335
+ d = apis.AssociateSecGroupDynamicRequestSchema().dumps(d)
336
+
337
+ resp = self.invoke("AssociateSecGroupDynamic", d, **kwargs)
338
+ return apis.AssociateSecGroupDynamicResponseSchema().loads(resp)
339
+
340
+ def attach_network_interface(
341
+ self, req: typing.Optional[dict] = None, **kwargs
342
+ ) -> dict:
343
+ """AttachNetworkInterface - 绑定网卡到云主机
344
+
345
+ **Request**
346
+
347
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
348
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
349
+ - **InstanceId** (str) - (Required) 云主机ID(仅支持绑定开启网卡功能,且未开启网络增强的云主机)
350
+ - **InterfaceId** (str) - (Required) 虚拟网卡ID
351
+
352
+ **Response**
353
+
354
+
355
+ """
356
+ # build request
357
+ d = {
358
+ "ProjectId": self.config.project_id,
359
+ "Region": self.config.region,
360
+ }
361
+ req and d.update(req)
362
+ d = apis.AttachNetworkInterfaceRequestSchema().dumps(d)
363
+
364
+ resp = self.invoke("AttachNetworkInterface", d, **kwargs)
365
+ return apis.AttachNetworkInterfaceResponseSchema().loads(resp)
366
+
367
+ def clone_route_table(
368
+ self, req: typing.Optional[dict] = None, **kwargs
369
+ ) -> dict:
370
+ """CloneRouteTable - 将现有的路由表复制为一张新的路由表
371
+
372
+ **Request**
373
+
374
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
375
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
376
+ - **RouteTableId** (str) - (Required) 被克隆的路由表ID
377
+
378
+ **Response**
379
+
380
+ - **RouteTableId** (str) - 复制后新的路由表资源ID
381
+
382
+ """
383
+ # build request
384
+ d = {
385
+ "ProjectId": self.config.project_id,
386
+ "Region": self.config.region,
387
+ }
388
+ req and d.update(req)
389
+ d = apis.CloneRouteTableRequestSchema().dumps(d)
390
+
391
+ resp = self.invoke("CloneRouteTable", d, **kwargs)
392
+ return apis.CloneRouteTableResponseSchema().loads(resp)
393
+
394
+ def create_natgw(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
395
+ """CreateNATGW - 创建NAT网关
396
+
397
+ **Request**
398
+
399
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
400
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
401
+ - **EIPIds** (list) - (Required) NAT网关绑定的EIPId
402
+ - **FirewallId** (str) - (Required) NAT网关绑定的防火墙Id
403
+ - **NATGWName** (str) - (Required) NAT网关名称
404
+ - **IfOpen** (int) - 白名单开关标记。0表示关闭,1表示开启。默认为0
405
+ - **Remark** (str) - 备注。默认为空
406
+ - **SubnetworkIds** (list) - NAT网关绑定的子网Id,默认为空。
407
+ - **Tag** (str) - 业务组。默认为空
408
+ - **VPCId** (str) - NAT网关所属的VPC Id。默认为Default VPC Id
409
+
410
+ **Response**
411
+
412
+ - **NATGWId** (str) - 申请到的NATGateWay Id
413
+
414
+ """
415
+ # build request
416
+ d = {
417
+ "ProjectId": self.config.project_id,
418
+ "Region": self.config.region,
419
+ }
420
+ req and d.update(req)
421
+ d = apis.CreateNATGWRequestSchema().dumps(d)
422
+
423
+ # build options
424
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
425
+
426
+ resp = self.invoke("CreateNATGW", d, **kwargs)
427
+ return apis.CreateNATGWResponseSchema().loads(resp)
428
+
429
+ def create_natgw_policy(
430
+ self, req: typing.Optional[dict] = None, **kwargs
431
+ ) -> dict:
432
+ """CreateNATGWPolicy - 添加NAT网关端口转发规则
433
+
434
+ **Request**
435
+
436
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
437
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
438
+ - **DstIP** (str) - (Required) 目标IP。填写对应的目标IP地址
439
+ - **DstPort** (str) - (Required) 目标端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535
440
+ - **NATGWId** (str) - (Required) NAT网关Id
441
+ - **Protocol** (str) - (Required) 协议类型。枚举值为:TCP、UDP
442
+ - **SrcEIPId** (str) - (Required) 源IP。填写对应的EIP Id
443
+ - **SrcPort** (str) - (Required) 源端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535
444
+ - **PolicyName** (str) - 转发策略名称。默认为空
445
+
446
+ **Response**
447
+
448
+ - **PolicyId** (str) - 创建时分配的策略Id
449
+
450
+ """
451
+ # build request
452
+ d = {
453
+ "ProjectId": self.config.project_id,
454
+ "Region": self.config.region,
455
+ }
456
+ req and d.update(req)
457
+ d = apis.CreateNATGWPolicyRequestSchema().dumps(d)
458
+
459
+ # build options
460
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
461
+
462
+ resp = self.invoke("CreateNATGWPolicy", d, **kwargs)
463
+ return apis.CreateNATGWPolicyResponseSchema().loads(resp)
464
+
465
+ def create_network_acl(
466
+ self, req: typing.Optional[dict] = None, **kwargs
467
+ ) -> dict:
468
+ """CreateNetworkAcl - 创建网络ACL
469
+
470
+ **Request**
471
+
472
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
473
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
474
+ - **AclName** (str) - (Required) ACL的名称
475
+ - **VpcId** (str) - (Required) 将要创建的ACL所属VPC的ID
476
+ - **Description** (str) - ACL的描述
477
+
478
+ **Response**
479
+
480
+ - **AclId** (str) - 创建的ACL的ID
481
+
482
+ """
483
+ # build request
484
+ d = {
485
+ "ProjectId": self.config.project_id,
486
+ "Region": self.config.region,
487
+ }
488
+ req and d.update(req)
489
+ d = apis.CreateNetworkAclRequestSchema().dumps(d)
490
+
491
+ # build options
492
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
493
+
494
+ resp = self.invoke("CreateNetworkAcl", d, **kwargs)
495
+ return apis.CreateNetworkAclResponseSchema().loads(resp)
496
+
497
+ def create_network_acl_association(
498
+ self, req: typing.Optional[dict] = None, **kwargs
499
+ ) -> dict:
500
+ """CreateNetworkAclAssociation - 创建ACL的绑定关系
501
+
502
+ **Request**
503
+
504
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
505
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
506
+ - **AclId** (str) - (Required) ACL的ID
507
+ - **SubnetworkId** (str) - (Required) 需要绑定的子网ID
508
+
509
+ **Response**
510
+
511
+ - **AssociationId** (str) - 创建的绑定关系的ID
512
+ - **PrevAssociation** (dict) - 见 **AssociationInfo** 模型定义
513
+
514
+ **Response Model**
515
+
516
+ **AssociationInfo**
517
+ - **AclId** (str) - ACL的ID
518
+ - **AssociationId** (str) - 绑定ID
519
+ - **CreateTime** (int) - 创建的Unix时间戳
520
+ - **SubnetworkId** (str) - 绑定的子网ID
521
+
522
+
523
+ """
524
+ # build request
525
+ d = {
526
+ "ProjectId": self.config.project_id,
527
+ "Region": self.config.region,
528
+ }
529
+ req and d.update(req)
530
+ d = apis.CreateNetworkAclAssociationRequestSchema().dumps(d)
531
+
532
+ # build options
533
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
534
+
535
+ resp = self.invoke("CreateNetworkAclAssociation", d, **kwargs)
536
+ return apis.CreateNetworkAclAssociationResponseSchema().loads(resp)
537
+
538
+ def create_network_acl_entry(
539
+ self, req: typing.Optional[dict] = None, **kwargs
540
+ ) -> dict:
541
+ """CreateNetworkAclEntry - 创建ACL的规则
542
+
543
+ **Request**
544
+
545
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
546
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
547
+ - **AclId** (str) - (Required) ACL的ID
548
+ - **CidrBlock** (str) - (Required) IPv4段的CIDR表示
549
+ - **Direction** (str) - (Required) 出向或者入向(“Ingress”, "Egress")
550
+ - **EntryAction** (str) - (Required) 规则的行为("Accept", "Reject")
551
+ - **IpProtocol** (str) - (Required) 协议规则描述
552
+ - **PortRange** (str) - (Required) 针对的端口范围
553
+ - **Priority** (int) - (Required) Entry的优先级,对于同样的Direction来说,不能重复
554
+ - **Description** (str) - 描述。长度限制为不超过32字节。
555
+ - **TargetResourceIds** (list) - 应用目标资源列表。默认为全部资源生效。TargetType为0时不用填写该值。
556
+ - **TargetType** (int) - 应用目标类型。0代表“子网内全部资源”,1代表“子网内指定资源”,默认为0
557
+
558
+ **Response**
559
+
560
+ - **EntryId** (str) - 创建的Entry的ID
561
+
562
+ """
563
+ # build request
564
+ d = {
565
+ "ProjectId": self.config.project_id,
566
+ "Region": self.config.region,
567
+ }
568
+ req and d.update(req)
569
+ d = apis.CreateNetworkAclEntryRequestSchema().dumps(d)
570
+
571
+ # build options
572
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
573
+
574
+ resp = self.invoke("CreateNetworkAclEntry", d, **kwargs)
575
+ return apis.CreateNetworkAclEntryResponseSchema().loads(resp)
576
+
577
+ def create_network_interface(
578
+ self, req: typing.Optional[dict] = None, **kwargs
579
+ ) -> dict:
580
+ """CreateNetworkInterface - 创建虚拟网卡
581
+
582
+ **Request**
583
+
584
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
585
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
586
+ - **SubnetId** (str) - (Required) 所属子网ID
587
+ - **VPCId** (str) - (Required) 所属VPCID
588
+ - **EipDirectMode** (bool) - 是否开启EIP直通,默认false
589
+ - **Name** (str) - 虚拟网卡名称,默认为 NetworkInterface
590
+ - **PrioritySecGroup** (list) - 见 **CreateNetworkInterfaceParamPrioritySecGroup** 模型定义
591
+ - **PrivateIp** (list) - 指定内网IP。当前一个网卡仅支持绑定一个内网IP
592
+ - **Remark** (str) - 备注
593
+ - **SecurityGroupId** (str) - 防火墙GroupId,默认:Web推荐防火墙 可由DescribeSecurityGroupResponse中的GroupId取得
594
+ - **SecurityMode** (int) - 指定使用 安全组还是防火墙。为 0 时绑定防火墙,为1时绑定安全组
595
+ - **Tag** (str) - 业务组
596
+
597
+ **Response**
598
+
599
+ - **NetworkInterface** (dict) - 见 **NetworkInterfaceInfo** 模型定义
600
+
601
+ **Request Model**
602
+
603
+ **CreateNetworkInterfaceParamPrioritySecGroup**
604
+ - **Priority** (int) - 安全组优先级
605
+ - **SecGroupId** (str) - 安全组 ID
606
+
607
+
608
+ **Response Model**
609
+
610
+ **NetworkInterfaceInfo**
611
+ - **AttachInstanceId** (str) - 绑定实例资源ID
612
+ - **CreateTime** (int) - 创建时间
613
+ - **Default** (bool) - 是否是绑定实例的默认网卡 false:不是 true:是
614
+ - **Gateway** (str) - 默认网关
615
+ - **InterfaceId** (str) - 虚拟网卡资源ID
616
+ - **MacAddress** (str) - 关联Mac
617
+ - **Name** (str) - 虚拟网卡名称
618
+ - **Netmask** (str) - 内网IP掩码
619
+ - **PrivateIpSet** (list) - 关联内网IP。当前一个网卡仅支持绑定一个内网IP
620
+ - **Remark** (str) - 备注
621
+ - **Status** (int) - 绑定状态
622
+ - **SubnetId** (str) - 所属子网
623
+ - **Tag** (str) - 业务组
624
+ - **VPCId** (str) - 所属VPC
625
+
626
+
627
+ """
628
+ # build request
629
+ d = {
630
+ "ProjectId": self.config.project_id,
631
+ "Region": self.config.region,
632
+ }
633
+ req and d.update(req)
634
+ d = apis.CreateNetworkInterfaceRequestSchema().dumps(d)
635
+
636
+ # build options
637
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
638
+
639
+ resp = self.invoke("CreateNetworkInterface", d, **kwargs)
640
+ return apis.CreateNetworkInterfaceResponseSchema().loads(resp)
641
+
642
+ def create_route_table(
643
+ self, req: typing.Optional[dict] = None, **kwargs
644
+ ) -> dict:
645
+ """CreateRouteTable - 创建路由表
646
+
647
+ **Request**
648
+
649
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
650
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
651
+ - **VPCId** (str) - (Required) 所属的VPC资源ID
652
+ - **Name** (str) - 路由表名称。默认为RouteTable
653
+ - **Remark** (str) - 备注
654
+ - **Tag** (str) - 路由表所属业务组
655
+
656
+ **Response**
657
+
658
+ - **RouteTableId** (str) - 路由表ID
659
+
660
+ """
661
+ # build request
662
+ d = {
663
+ "ProjectId": self.config.project_id,
664
+ "Region": self.config.region,
665
+ }
666
+ req and d.update(req)
667
+ d = apis.CreateRouteTableRequestSchema().dumps(d)
668
+
669
+ # build options
670
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
671
+
672
+ resp = self.invoke("CreateRouteTable", d, **kwargs)
673
+ return apis.CreateRouteTableResponseSchema().loads(resp)
674
+
675
+ def create_sec_group(
676
+ self, req: typing.Optional[dict] = None, **kwargs
677
+ ) -> dict:
678
+ """CreateSecGroup - 创建安全组
679
+
680
+ **Request**
681
+
682
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
683
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
684
+ - **Name** (str) - (Required) 安全组名称,最长64个字符。
685
+ - **VPCID** (str) - (Required) 资源ID所属的VPC
686
+
687
+ **Response**
688
+
689
+ - **SecGroupId** (str) - 安全组ID
690
+
691
+ """
692
+ # build request
693
+ d = {
694
+ "ProjectId": self.config.project_id,
695
+ "Region": self.config.region,
696
+ }
697
+ req and d.update(req)
698
+ d = apis.CreateSecGroupRequestSchema().dumps(d)
699
+
700
+ # build options
701
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
702
+
703
+ resp = self.invoke("CreateSecGroup", d, **kwargs)
704
+ return apis.CreateSecGroupResponseSchema().loads(resp)
705
+
706
+ def create_sec_group_rule(
707
+ self, req: typing.Optional[dict] = None, **kwargs
708
+ ) -> dict:
709
+ """CreateSecGroupRule -
710
+
711
+ **Request**
712
+
713
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
714
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
715
+ - **SecGroupId** (str) - (Required) 需要添加规则的安全组资源ID。
716
+ - **Rule** (list) - 见 **CreateSecGroupRuleParamRule** 模型定义
717
+
718
+ **Response**
719
+
720
+ - **RuleId** (list) - 规则 ID
721
+
722
+ **Request Model**
723
+
724
+ **CreateSecGroupRuleParamRule**
725
+ - **Direction** (str) - "Ingress/Egress",入站规则/出站规则
726
+ - **DstPort** (str) - 目的端口。逗号分隔,如 "80,443"、"443,2000-10000"
727
+ - **IPRange** (str) - IP 地址信息,逗号分隔。
728
+ - **IPVersion** (str) - IP 版本,如 “IPv4”。支持 IPv6 后废弃
729
+ - **Priority** (int) - 规则优先级。范围为 1~200
730
+ - **ProtocolType** (str) - 协议类型。"TCP","UDP","ICMP","ICMPv6","ALL"
731
+ - **Remark** (str) - 规则备注
732
+ - **RuleAction** (str) - 规则行为。"Accept" 或 "Drop"
733
+
734
+
735
+ """
736
+ # build request
737
+ d = {
738
+ "ProjectId": self.config.project_id,
739
+ "Region": self.config.region,
740
+ }
741
+ req and d.update(req)
742
+ d = apis.CreateSecGroupRuleRequestSchema().dumps(d)
743
+
744
+ # build options
745
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
746
+
747
+ resp = self.invoke("CreateSecGroupRule", d, **kwargs)
748
+ return apis.CreateSecGroupRuleResponseSchema().loads(resp)
749
+
750
+ def create_snat_dnat_rule(
751
+ self, req: typing.Optional[dict] = None, **kwargs
752
+ ) -> dict:
753
+ """CreateSnatDnatRule - 调用接口后会自动创建内外网IP之间的SNAT和DNAT规则,支持TCP、UDP协议全端口
754
+
755
+ **Request**
756
+
757
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
758
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
759
+ - **EIP** (list) - (Required) EIP的IP地址。按入参顺序,PrivateIp与EIP一一对应建立映射关系。
760
+ - **NATGWId** (str) - (Required) 映射所使用的NAT网关资源ID
761
+ - **PrivateIp** (list) - (Required) 内网P地址
762
+
763
+ **Response**
764
+
765
+
766
+ """
767
+ # build request
768
+ d = {
769
+ "ProjectId": self.config.project_id,
770
+ "Region": self.config.region,
771
+ }
772
+ req and d.update(req)
773
+ d = apis.CreateSnatDnatRuleRequestSchema().dumps(d)
774
+
775
+ # build options
776
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
777
+
778
+ resp = self.invoke("CreateSnatDnatRule", d, **kwargs)
779
+ return apis.CreateSnatDnatRuleResponseSchema().loads(resp)
780
+
781
+ def create_subnet(
782
+ self, req: typing.Optional[dict] = None, **kwargs
783
+ ) -> dict:
784
+ """CreateSubnet - 创建子网
785
+
786
+ **Request**
787
+
788
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
789
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
790
+ - **Subnet** (str) - (Required) 子网网络地址,例如192.168.0.0
791
+ - **VPCId** (str) - (Required) VPC资源ID
792
+ - **Netmask** (int) - 子网网络号位数,默认为24
793
+ - **Remark** (str) - 备注
794
+ - **SubnetName** (str) - 子网名称,默认为Subnet
795
+ - **Tag** (str) - 业务组名称,默认为Default
796
+
797
+ **Response**
798
+
799
+ - **SubnetId** (str) - 子网ID
800
+
801
+ """
802
+ # build request
803
+ d = {
804
+ "ProjectId": self.config.project_id,
805
+ "Region": self.config.region,
806
+ }
807
+ req and d.update(req)
808
+ d = apis.CreateSubnetRequestSchema().dumps(d)
809
+
810
+ # build options
811
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
812
+
813
+ resp = self.invoke("CreateSubnet", d, **kwargs)
814
+ return apis.CreateSubnetResponseSchema().loads(resp)
815
+
816
+ def create_vpc(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
817
+ """CreateVPC - 创建VPC
818
+
819
+ **Request**
820
+
821
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
822
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
823
+ - **Name** (str) - (Required) VPC名称
824
+ - **Network** (list) - (Required) VPC网段
825
+ - **Remark** (str) - 备注
826
+ - **Tag** (str) - 业务组名称
827
+
828
+ **Response**
829
+
830
+ - **VPCId** (str) - VPC资源Id
831
+
832
+ """
833
+ # build request
834
+ d = {
835
+ "ProjectId": self.config.project_id,
836
+ "Region": self.config.region,
837
+ }
838
+ req and d.update(req)
839
+ d = apis.CreateVPCRequestSchema().dumps(d)
840
+
841
+ # build options
842
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
843
+
844
+ resp = self.invoke("CreateVPC", d, **kwargs)
845
+ return apis.CreateVPCResponseSchema().loads(resp)
846
+
847
+ def create_vpc_intercom(
848
+ self, req: typing.Optional[dict] = None, **kwargs
849
+ ) -> dict:
850
+ """CreateVPCIntercom - 新建VPC互通关系
851
+
852
+ **Request**
853
+
854
+ - **ProjectId** (str) - (Config) 源VPC所在项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
855
+ - **Region** (str) - (Config) 源VPC所在地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
856
+ - **DstVPCId** (str) - (Required) 目的VPC短ID
857
+ - **VPCId** (str) - (Required) 源VPC短ID
858
+ - **DstProjectId** (str) - 目的VPC项目ID。默认与源VPC同项目。
859
+ - **DstRegion** (str) - 目的VPC所在地域,默认与源VPC同地域。
860
+
861
+ **Response**
862
+
863
+
864
+ """
865
+ # build request
866
+ d = {
867
+ "ProjectId": self.config.project_id,
868
+ "Region": self.config.region,
869
+ }
870
+ req and d.update(req)
871
+ d = apis.CreateVPCIntercomRequestSchema().dumps(d)
872
+
873
+ # build options
874
+ kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
875
+
876
+ resp = self.invoke("CreateVPCIntercom", d, **kwargs)
877
+ return apis.CreateVPCIntercomResponseSchema().loads(resp)
878
+
879
+ def delete_natgw(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
880
+ """DeleteNATGW - 删除NAT网关
881
+
882
+ **Request**
883
+
884
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
885
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
886
+ - **NATGWId** (str) - (Required) NAT网关Id
887
+ - **ReleaseEip** (bool) - 是否释放绑定的EIP。true:解绑并释放;false:只解绑不释放。默认为false
888
+
889
+ **Response**
890
+
891
+
892
+ """
893
+ # build request
894
+ d = {
895
+ "ProjectId": self.config.project_id,
896
+ "Region": self.config.region,
897
+ }
898
+ req and d.update(req)
899
+ d = apis.DeleteNATGWRequestSchema().dumps(d)
900
+
901
+ resp = self.invoke("DeleteNATGW", d, **kwargs)
902
+ return apis.DeleteNATGWResponseSchema().loads(resp)
903
+
904
+ def delete_natgw_policy(
905
+ self, req: typing.Optional[dict] = None, **kwargs
906
+ ) -> dict:
907
+ """DeleteNATGWPolicy - 删除NAT网关端口转发规则
908
+
909
+ **Request**
910
+
911
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
912
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
913
+ - **NATGWId** (str) - (Required) NAT网关Id
914
+ - **PolicyId** (str) - (Required) 端口转发规则Id
915
+
916
+ **Response**
917
+
918
+
919
+ """
920
+ # build request
921
+ d = {
922
+ "ProjectId": self.config.project_id,
923
+ "Region": self.config.region,
924
+ }
925
+ req and d.update(req)
926
+ d = apis.DeleteNATGWPolicyRequestSchema().dumps(d)
927
+
928
+ resp = self.invoke("DeleteNATGWPolicy", d, **kwargs)
929
+ return apis.DeleteNATGWPolicyResponseSchema().loads(resp)
930
+
931
+ def delete_network_acl(
932
+ self, req: typing.Optional[dict] = None, **kwargs
933
+ ) -> dict:
934
+ """DeleteNetworkAcl - 删除网络ACL
935
+
936
+ **Request**
937
+
938
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
939
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
940
+ - **AclId** (str) - (Required) 需要删除的AclId
941
+
942
+ **Response**
943
+
944
+
945
+ """
946
+ # build request
947
+ d = {
948
+ "ProjectId": self.config.project_id,
949
+ "Region": self.config.region,
950
+ }
951
+ req and d.update(req)
952
+ d = apis.DeleteNetworkAclRequestSchema().dumps(d)
953
+
954
+ resp = self.invoke("DeleteNetworkAcl", d, **kwargs)
955
+ return apis.DeleteNetworkAclResponseSchema().loads(resp)
956
+
957
+ def delete_network_acl_association(
958
+ self, req: typing.Optional[dict] = None, **kwargs
959
+ ) -> dict:
960
+ """DeleteNetworkAclAssociation - 删除网络ACL绑定关系
961
+
962
+ **Request**
963
+
964
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
965
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
966
+ - **AclId** (str) - (Required) 需要删除的AclId
967
+ - **SubnetworkId** (str) - (Required) 绑定的子网ID
968
+
969
+ **Response**
970
+
971
+
972
+ """
973
+ # build request
974
+ d = {
975
+ "ProjectId": self.config.project_id,
976
+ "Region": self.config.region,
977
+ }
978
+ req and d.update(req)
979
+ d = apis.DeleteNetworkAclAssociationRequestSchema().dumps(d)
980
+
981
+ resp = self.invoke("DeleteNetworkAclAssociation", d, **kwargs)
982
+ return apis.DeleteNetworkAclAssociationResponseSchema().loads(resp)
983
+
984
+ def delete_network_acl_entry(
985
+ self, req: typing.Optional[dict] = None, **kwargs
986
+ ) -> dict:
987
+ """DeleteNetworkAclEntry - 删除ACL的规则
988
+
989
+ **Request**
990
+
991
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
992
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
993
+ - **AclId** (str) - (Required) Acl的ID
994
+ - **EntryId** (str) - (Required) 需要删除的EntryId
995
+
996
+ **Response**
997
+
998
+
999
+ """
1000
+ # build request
1001
+ d = {
1002
+ "ProjectId": self.config.project_id,
1003
+ "Region": self.config.region,
1004
+ }
1005
+ req and d.update(req)
1006
+ d = apis.DeleteNetworkAclEntryRequestSchema().dumps(d)
1007
+
1008
+ resp = self.invoke("DeleteNetworkAclEntry", d, **kwargs)
1009
+ return apis.DeleteNetworkAclEntryResponseSchema().loads(resp)
1010
+
1011
+ def delete_network_interface(
1012
+ self, req: typing.Optional[dict] = None, **kwargs
1013
+ ) -> dict:
1014
+ """DeleteNetworkInterface - 删除网卡
1015
+
1016
+ **Request**
1017
+
1018
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1019
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1020
+ - **InterfaceId** (str) - (Required) 虚拟网卡ID
1021
+
1022
+ **Response**
1023
+
1024
+
1025
+ """
1026
+ # build request
1027
+ d = {
1028
+ "ProjectId": self.config.project_id,
1029
+ "Region": self.config.region,
1030
+ }
1031
+ req and d.update(req)
1032
+ d = apis.DeleteNetworkInterfaceRequestSchema().dumps(d)
1033
+
1034
+ resp = self.invoke("DeleteNetworkInterface", d, **kwargs)
1035
+ return apis.DeleteNetworkInterfaceResponseSchema().loads(resp)
1036
+
1037
+ def delete_route_table(
1038
+ self, req: typing.Optional[dict] = None, **kwargs
1039
+ ) -> dict:
1040
+ """DeleteRouteTable - 删除自定义路由表
1041
+
1042
+ **Request**
1043
+
1044
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1045
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1046
+ - **RouteTableId** (str) - (Required) 路由表资源ID
1047
+
1048
+ **Response**
1049
+
1050
+
1051
+ """
1052
+ # build request
1053
+ d = {
1054
+ "ProjectId": self.config.project_id,
1055
+ "Region": self.config.region,
1056
+ }
1057
+ req and d.update(req)
1058
+ d = apis.DeleteRouteTableRequestSchema().dumps(d)
1059
+
1060
+ resp = self.invoke("DeleteRouteTable", d, **kwargs)
1061
+ return apis.DeleteRouteTableResponseSchema().loads(resp)
1062
+
1063
+ def delete_sec_group(
1064
+ self, req: typing.Optional[dict] = None, **kwargs
1065
+ ) -> dict:
1066
+ """DeleteSecGroup - 删除安全组
1067
+
1068
+ **Request**
1069
+
1070
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1071
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1072
+ - **SecGroupId** (list) - (Required) 安全组资源 Id。支持 string 数组格式。
1073
+
1074
+ **Response**
1075
+
1076
+
1077
+ """
1078
+ # build request
1079
+ d = {
1080
+ "ProjectId": self.config.project_id,
1081
+ "Region": self.config.region,
1082
+ }
1083
+ req and d.update(req)
1084
+ d = apis.DeleteSecGroupRequestSchema().dumps(d)
1085
+
1086
+ resp = self.invoke("DeleteSecGroup", d, **kwargs)
1087
+ return apis.DeleteSecGroupResponseSchema().loads(resp)
1088
+
1089
+ def delete_sec_group_rule(
1090
+ self, req: typing.Optional[dict] = None, **kwargs
1091
+ ) -> dict:
1092
+ """DeleteSecGroupRule -
1093
+
1094
+ **Request**
1095
+
1096
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1097
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1098
+ - **RuleId** (list) - (Required) 安全组规则 ID。支持 string 数组格式。
1099
+ - **SecGroupId** (str) - (Required) 所属安全组 ID。
1100
+
1101
+ **Response**
1102
+
1103
+
1104
+ """
1105
+ # build request
1106
+ d = {
1107
+ "ProjectId": self.config.project_id,
1108
+ "Region": self.config.region,
1109
+ }
1110
+ req and d.update(req)
1111
+ d = apis.DeleteSecGroupRuleRequestSchema().dumps(d)
1112
+
1113
+ resp = self.invoke("DeleteSecGroupRule", d, **kwargs)
1114
+ return apis.DeleteSecGroupRuleResponseSchema().loads(resp)
1115
+
1116
+ def delete_secondary_ip(
1117
+ self, req: typing.Optional[dict] = None, **kwargs
1118
+ ) -> dict:
1119
+ """DeleteSecondaryIp - 删除ip(用于uk8s使用)
1120
+
1121
+ **Request**
1122
+
1123
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1124
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1125
+ - **Ip** (str) - (Required) ip
1126
+ - **Mac** (str) - (Required) mac
1127
+ - **SubnetId** (str) - (Required) 子网Id
1128
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1129
+ - **ObjectId** (str) - 资源Id
1130
+ - **VPCId** (str) - VPCId
1131
+
1132
+ **Response**
1133
+
1134
+
1135
+ """
1136
+ # build request
1137
+ d = {
1138
+ "ProjectId": self.config.project_id,
1139
+ "Region": self.config.region,
1140
+ }
1141
+ req and d.update(req)
1142
+ d = apis.DeleteSecondaryIpRequestSchema().dumps(d)
1143
+
1144
+ resp = self.invoke("DeleteSecondaryIp", d, **kwargs)
1145
+ return apis.DeleteSecondaryIpResponseSchema().loads(resp)
1146
+
1147
+ def delete_snat_dnat_rule(
1148
+ self, req: typing.Optional[dict] = None, **kwargs
1149
+ ) -> dict:
1150
+ """DeleteSnatDnatRule - 删除NAT创建内外网IP映射规则
1151
+
1152
+ **Request**
1153
+
1154
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1155
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1156
+ - **EIP** (list) - (Required) EIP的IP地址,PrivateIp与EIP需一一对应
1157
+ - **NATGWId** (str) - (Required) 映射所使用的NAT网关资源ID
1158
+ - **PrivateIp** (list) - (Required) 内网P地址
1159
+
1160
+ **Response**
1161
+
1162
+
1163
+ """
1164
+ # build request
1165
+ d = {
1166
+ "ProjectId": self.config.project_id,
1167
+ "Region": self.config.region,
1168
+ }
1169
+ req and d.update(req)
1170
+ d = apis.DeleteSnatDnatRuleRequestSchema().dumps(d)
1171
+
1172
+ resp = self.invoke("DeleteSnatDnatRule", d, **kwargs)
1173
+ return apis.DeleteSnatDnatRuleResponseSchema().loads(resp)
1174
+
1175
+ def delete_snat_rule(
1176
+ self, req: typing.Optional[dict] = None, **kwargs
1177
+ ) -> dict:
1178
+ """DeleteSnatRule - 删除指定的出口规则(SNAT规则)
1179
+
1180
+ **Request**
1181
+
1182
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1183
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1184
+ - **NATGWId** (str) - (Required) NAT网关的ID
1185
+ - **SourceIp** (str) - (Required) 需要出外网的私网IP地址,例如10.9.7.xx
1186
+
1187
+ **Response**
1188
+
1189
+
1190
+ """
1191
+ # build request
1192
+ d = {
1193
+ "ProjectId": self.config.project_id,
1194
+ "Region": self.config.region,
1195
+ }
1196
+ req and d.update(req)
1197
+ d = apis.DeleteSnatRuleRequestSchema().dumps(d)
1198
+
1199
+ resp = self.invoke("DeleteSnatRule", d, **kwargs)
1200
+ return apis.DeleteSnatRuleResponseSchema().loads(resp)
1201
+
1202
+ def delete_subnet(
1203
+ self, req: typing.Optional[dict] = None, **kwargs
1204
+ ) -> dict:
1205
+ """DeleteSubnet - 删除子网
1206
+
1207
+ **Request**
1208
+
1209
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1210
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1211
+ - **SubnetId** (str) - (Required) 子网ID
1212
+
1213
+ **Response**
1214
+
1215
+
1216
+ """
1217
+ # build request
1218
+ d = {
1219
+ "ProjectId": self.config.project_id,
1220
+ "Region": self.config.region,
1221
+ }
1222
+ req and d.update(req)
1223
+ d = apis.DeleteSubnetRequestSchema().dumps(d)
1224
+
1225
+ resp = self.invoke("DeleteSubnet", d, **kwargs)
1226
+ return apis.DeleteSubnetResponseSchema().loads(resp)
1227
+
1228
+ def delete_vpc(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
1229
+ """DeleteVPC - 删除VPC
1230
+
1231
+ **Request**
1232
+
1233
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1234
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1235
+ - **VPCId** (str) - (Required) VPC资源Id
1236
+
1237
+ **Response**
1238
+
1239
+
1240
+ """
1241
+ # build request
1242
+ d = {
1243
+ "ProjectId": self.config.project_id,
1244
+ "Region": self.config.region,
1245
+ }
1246
+ req and d.update(req)
1247
+ d = apis.DeleteVPCRequestSchema().dumps(d)
1248
+
1249
+ resp = self.invoke("DeleteVPC", d, **kwargs)
1250
+ return apis.DeleteVPCResponseSchema().loads(resp)
1251
+
1252
+ def delete_vpc_intercom(
1253
+ self, req: typing.Optional[dict] = None, **kwargs
1254
+ ) -> dict:
1255
+ """DeleteVPCIntercom - 删除VPC互通关系
1256
+
1257
+ **Request**
1258
+
1259
+ - **ProjectId** (str) - (Config) 源VPC所在项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1260
+ - **Region** (str) - (Config) 源VPC所在地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1261
+ - **DstVPCId** (str) - (Required) 目的VPC短ID
1262
+ - **VPCId** (str) - (Required) 源VPC短ID
1263
+ - **DstProjectId** (str) - 目的VPC所在项目ID,默认为源VPC所在项目ID
1264
+ - **DstRegion** (str) - 目的VPC所在地域,默认为源VPC所在地域
1265
+
1266
+ **Response**
1267
+
1268
+
1269
+ """
1270
+ # build request
1271
+ d = {
1272
+ "ProjectId": self.config.project_id,
1273
+ "Region": self.config.region,
1274
+ }
1275
+ req and d.update(req)
1276
+ d = apis.DeleteVPCIntercomRequestSchema().dumps(d)
1277
+
1278
+ resp = self.invoke("DeleteVPCIntercom", d, **kwargs)
1279
+ return apis.DeleteVPCIntercomResponseSchema().loads(resp)
1280
+
1281
+ def delete_white_list_resource(
1282
+ self, req: typing.Optional[dict] = None, **kwargs
1283
+ ) -> dict:
1284
+ """DeleteWhiteListResource - 删除NAT网关白名单列表
1285
+
1286
+ **Request**
1287
+
1288
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1289
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1290
+ - **NATGWId** (str) - (Required) NAT网关Id
1291
+ - **ResourceIds** (list) - (Required) 删除白名单的资源Id
1292
+
1293
+ **Response**
1294
+
1295
+
1296
+ """
1297
+ # build request
1298
+ d = {
1299
+ "ProjectId": self.config.project_id,
1300
+ "Region": self.config.region,
1301
+ }
1302
+ req and d.update(req)
1303
+ d = apis.DeleteWhiteListResourceRequestSchema().dumps(d)
1304
+
1305
+ resp = self.invoke("DeleteWhiteListResource", d, **kwargs)
1306
+ return apis.DeleteWhiteListResourceResponseSchema().loads(resp)
1307
+
1308
+ def describe_instance_network_interface(
1309
+ self, req: typing.Optional[dict] = None, **kwargs
1310
+ ) -> dict:
1311
+ """DescribeInstanceNetworkInterface - 展示云主机绑定的网卡信息
1312
+
1313
+ **Request**
1314
+
1315
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1316
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1317
+ - **InstanceId** (str) - (Required) 云主机ID
1318
+ - **Limit** (int) - 默认为20
1319
+ - **Offset** (int) - 默认为0
1320
+
1321
+ **Response**
1322
+
1323
+ - **NetworkInterfaceSet** (list) - 见 **InstanceNetworkInterface** 模型定义
1324
+
1325
+ **Response Model**
1326
+
1327
+ **InstanceNetworkInterface**
1328
+ - **AttachInstanceId** (str) - 绑定实例资源ID
1329
+ - **CreateTime** (int) - 创建时间
1330
+ - **Default** (bool) - 是否是绑定实例的默认网卡 false:不是 true:是
1331
+ - **EIPIdSet** (list) - 虚拟网卡绑定的EIP ID信息
1332
+ - **FirewallIdSet** (list) - 虚拟网卡绑定的防火墙ID信息
1333
+ - **Gateway** (str) - 默认网关
1334
+ - **InterfaceId** (str) - 虚拟网卡资源ID
1335
+ - **MacAddress** (str) - 关联Mac
1336
+ - **Name** (str) - 虚拟网卡名称
1337
+ - **Netmask** (str) - 内网IP掩码
1338
+ - **PrivateIpSet** (list) - 关联内网IP。当前一个网卡仅支持绑定一个内网IP
1339
+ - **Remark** (str) - 备注
1340
+ - **Status** (int) - 绑定状态
1341
+ - **SubnetId** (str) - 所属子网
1342
+ - **Tag** (str) - 业务组
1343
+ - **VPCId** (str) - 所属VPC
1344
+
1345
+
1346
+ """
1347
+ # build request
1348
+ d = {
1349
+ "ProjectId": self.config.project_id,
1350
+ "Region": self.config.region,
1351
+ }
1352
+ req and d.update(req)
1353
+ d = apis.DescribeInstanceNetworkInterfaceRequestSchema().dumps(d)
1354
+
1355
+ resp = self.invoke("DescribeInstanceNetworkInterface", d, **kwargs)
1356
+ return apis.DescribeInstanceNetworkInterfaceResponseSchema().loads(resp)
1357
+
1358
+ def describe_natgw(
1359
+ self, req: typing.Optional[dict] = None, **kwargs
1360
+ ) -> dict:
1361
+ """DescribeNATGW - 获取NAT网关信息
1362
+
1363
+ **Request**
1364
+
1365
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1366
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1367
+ - **Limit** (int) - 数据分页值。默认为20
1368
+ - **NATGWIds** (list) - NAT网关Id。默认为该项目下所有NAT网关
1369
+ - **Offset** (int) - 数据偏移量。默认为0
1370
+
1371
+ **Response**
1372
+
1373
+ - **DataSet** (list) - 见 **NatGatewayDataSet** 模型定义
1374
+ - **TotalCount** (int) - 满足条件的实例的总数
1375
+
1376
+ **Response Model**
1377
+
1378
+ **NatGatewayDataSet**
1379
+ - **CreateTime** (int) - natgw创建时间
1380
+ - **FirewallId** (str) - 绑定的防火墙Id
1381
+ - **IPSet** (list) - 见 **NatGatewayIPSet** 模型定义
1382
+ - **IsSnatpoolEnabled** (str) - 枚举值,“enable”,默认出口规则使用了负载均衡;“disable”,默认出口规则未使用负载均衡。
1383
+ - **NATGWId** (str) - natgw id
1384
+ - **NATGWName** (str) - natgw名称
1385
+ - **PolicyId** (list) - 转发策略Id
1386
+ - **Remark** (str) - 备注
1387
+ - **SubnetSet** (list) - 见 **NatGatewaySubnetSet** 模型定义
1388
+ - **Tag** (str) - 业务组
1389
+ - **VPCId** (str) - 所属VPC Id
1390
+ - **VPCName** (str) - VPC名称
1391
+
1392
+
1393
+ **NatGatewayIPSet**
1394
+ - **Bandwidth** (int) - 带宽
1395
+ - **BandwidthType** (str) - EIP带宽类型
1396
+ - **EIPId** (str) - 外网IP的 EIPId
1397
+ - **IPResInfo** (list) - 见 **NatGWIPResInfo** 模型定义
1398
+ - **Weight** (int) - 权重为100的为出口
1399
+
1400
+
1401
+ **NatGWIPResInfo**
1402
+ - **EIP** (str) - 外网IP
1403
+ - **OperatorName** (str) - IP的运营商信息
1404
+
1405
+
1406
+ **NatGatewaySubnetSet**
1407
+ - **Subnet** (str) - 子网网段
1408
+ - **SubnetName** (str) - 子网名字
1409
+ - **SubnetworkId** (str) - 子网id
1410
+
1411
+
1412
+ """
1413
+ # build request
1414
+ d = {
1415
+ "ProjectId": self.config.project_id,
1416
+ "Region": self.config.region,
1417
+ }
1418
+ req and d.update(req)
1419
+ d = apis.DescribeNATGWRequestSchema().dumps(d)
1420
+
1421
+ resp = self.invoke("DescribeNATGW", d, **kwargs)
1422
+ return apis.DescribeNATGWResponseSchema().loads(resp)
1423
+
1424
+ def describe_natgw_policy(
1425
+ self, req: typing.Optional[dict] = None, **kwargs
1426
+ ) -> dict:
1427
+ """DescribeNATGWPolicy - 展示NAT网关端口转发规则
1428
+
1429
+ **Request**
1430
+
1431
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1432
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1433
+ - **NATGWId** (str) - (Required) NAT网关Id
1434
+ - **Limit** (int) - 返回数据长度,默认为10000
1435
+ - **Offset** (int) - 列表起始位置偏移量,默认为0
1436
+
1437
+ **Response**
1438
+
1439
+ - **DataSet** (list) - 见 **NATGWPolicyDataSet** 模型定义
1440
+ - **TotalCount** (int) - 满足条件的转发策略总数
1441
+
1442
+ **Response Model**
1443
+
1444
+ **NATGWPolicyDataSet**
1445
+ - **DstIP** (str) - 目的地址
1446
+ - **DstPort** (str) - 目的端口
1447
+ - **NATGWId** (str) - NAT网关Id
1448
+ - **PolicyId** (str) - 转发策略Id
1449
+ - **PolicyName** (str) - 转发策略名称
1450
+ - **Protocol** (str) - 协议类型
1451
+ - **SrcEIP** (str) - 端口转发前端EIP
1452
+ - **SrcEIPId** (str) - 端口转发前端EIP Id
1453
+ - **SrcPort** (str) - 源端口
1454
+
1455
+
1456
+ """
1457
+ # build request
1458
+ d = {
1459
+ "ProjectId": self.config.project_id,
1460
+ "Region": self.config.region,
1461
+ }
1462
+ req and d.update(req)
1463
+ d = apis.DescribeNATGWPolicyRequestSchema().dumps(d)
1464
+
1465
+ resp = self.invoke("DescribeNATGWPolicy", d, **kwargs)
1466
+ return apis.DescribeNATGWPolicyResponseSchema().loads(resp)
1467
+
1468
+ def describe_network_acl(
1469
+ self, req: typing.Optional[dict] = None, **kwargs
1470
+ ) -> dict:
1471
+ """DescribeNetworkAcl - 获取网络ACL
1472
+
1473
+ **Request**
1474
+
1475
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1476
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1477
+ - **Limit** (str) - 列表获取的个数限制
1478
+ - **Offset** (int) - 列表偏移量
1479
+ - **VpcId** (str) - 需要获取的ACL所属的VPC的ID
1480
+
1481
+ **Response**
1482
+
1483
+ - **AclList** (list) - 见 **AclInfo** 模型定义
1484
+
1485
+ **Response Model**
1486
+
1487
+ **AclInfo**
1488
+ - **AclId** (str) - ACL的ID
1489
+ - **AclName** (str) - 名称
1490
+ - **Associations** (list) - 见 **AssociationInfo** 模型定义
1491
+ - **CreateTime** (int) - 创建的Unix时间戳
1492
+ - **Description** (str) - 描述
1493
+ - **Entries** (list) - 见 **AclEntryInfo** 模型定义
1494
+ - **UpdateTime** (int) - 更改的Unix时间戳
1495
+ - **VpcId** (str) - ACL所属的VPC ID
1496
+
1497
+
1498
+ **AssociationInfo**
1499
+ - **AclId** (str) - ACL的ID
1500
+ - **AssociationId** (str) - 绑定ID
1501
+ - **CreateTime** (int) - 创建的Unix时间戳
1502
+ - **SubnetworkId** (str) - 绑定的子网ID
1503
+
1504
+
1505
+ **AclEntryInfo**
1506
+ - **CidrBlock** (str) - IP段的CIDR信息
1507
+ - **CreateTime** (int) - 创建的Unix时间戳
1508
+ - **Direction** (str) - 出向或者入向
1509
+ - **EntryAction** (str) - 匹配规则的动作
1510
+ - **EntryId** (str) - Entry的ID
1511
+ - **IpProtocol** (str) - 针对的IP协议
1512
+ - **PortRange** (str) - Port的段信息
1513
+ - **Priority** (str) - 优先级
1514
+ - **TargetResourceCount** (int) - 应用目标资源数量。TargetType为0时不返回该值。
1515
+ - **TargetResourceList** (list) - 见 **TargetResourceInfo** 模型定义
1516
+ - **TargetType** (int) - 应用目标类型。 0代表“子网内全部资源” ,1代表“子网内指定资源” 。
1517
+ - **UpdateTime** (int) - 更改的Unix时间戳
1518
+
1519
+
1520
+ **TargetResourceInfo**
1521
+ - **PrivateIp** (str) - 资源内网IP
1522
+ - **ResourceId** (str) - 资源ID
1523
+ - **ResourceName** (str) - 资源名称
1524
+ - **ResourceType** (int) - 资源类型
1525
+ - **SubResourceId** (str) - 资源绑定的虚拟网卡的ID
1526
+ - **SubResourceName** (str) - 资源绑定的虚拟网卡的名称
1527
+ - **SubResourceType** (int) - 资源绑定虚拟网卡的类型
1528
+ - **SubnetworkId** (str) - 子网ID
1529
+
1530
+
1531
+ """
1532
+ # build request
1533
+ d = {
1534
+ "ProjectId": self.config.project_id,
1535
+ "Region": self.config.region,
1536
+ }
1537
+ req and d.update(req)
1538
+ d = apis.DescribeNetworkAclRequestSchema().dumps(d)
1539
+
1540
+ resp = self.invoke("DescribeNetworkAcl", d, **kwargs)
1541
+ return apis.DescribeNetworkAclResponseSchema().loads(resp)
1542
+
1543
+ def describe_network_acl_association(
1544
+ self, req: typing.Optional[dict] = None, **kwargs
1545
+ ) -> dict:
1546
+ """DescribeNetworkAclAssociation - 获取网络ACL的绑定关系列表
1547
+
1548
+ **Request**
1549
+
1550
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1551
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1552
+ - **AclId** (str) - (Required) Acl的ID
1553
+ - **Limit** (str) - 列表获取的个数限制
1554
+ - **Offset** (int) - 列表偏移量
1555
+
1556
+ **Response**
1557
+
1558
+ - **AssociationList** (list) - 见 **AssociationInfo** 模型定义
1559
+
1560
+ **Response Model**
1561
+
1562
+ **AssociationInfo**
1563
+ - **AclId** (str) - ACL的ID
1564
+ - **AssociationId** (str) - 绑定ID
1565
+ - **CreateTime** (int) - 创建的Unix时间戳
1566
+ - **SubnetworkId** (str) - 绑定的子网ID
1567
+
1568
+
1569
+ """
1570
+ # build request
1571
+ d = {
1572
+ "ProjectId": self.config.project_id,
1573
+ "Region": self.config.region,
1574
+ }
1575
+ req and d.update(req)
1576
+ d = apis.DescribeNetworkAclAssociationRequestSchema().dumps(d)
1577
+
1578
+ resp = self.invoke("DescribeNetworkAclAssociation", d, **kwargs)
1579
+ return apis.DescribeNetworkAclAssociationResponseSchema().loads(resp)
1580
+
1581
+ def describe_network_acl_association_by_subnet(
1582
+ self, req: typing.Optional[dict] = None, **kwargs
1583
+ ) -> dict:
1584
+ """DescribeNetworkAclAssociationBySubnet - 获取子网的ACL绑定信息
1585
+
1586
+ **Request**
1587
+
1588
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
1589
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
1590
+ - **SubnetworkId** (str) - (Required) 子网的ID
1591
+
1592
+ **Response**
1593
+
1594
+ - **Association** (dict) - 见 **AssociationInfo** 模型定义
1595
+
1596
+ **Response Model**
1597
+
1598
+ **AssociationInfo**
1599
+ - **AclId** (str) - ACL的ID
1600
+ - **AssociationId** (str) - 绑定ID
1601
+ - **CreateTime** (int) - 创建的Unix时间戳
1602
+ - **SubnetworkId** (str) - 绑定的子网ID
1603
+
1604
+
1605
+ """
1606
+ # build request
1607
+ d = {
1608
+ "ProjectId": self.config.project_id,
1609
+ "Region": self.config.region,
1610
+ }
1611
+ req and d.update(req)
1612
+ d = apis.DescribeNetworkAclAssociationBySubnetRequestSchema().dumps(d)
1613
+
1614
+ resp = self.invoke("DescribeNetworkAclAssociationBySubnet", d, **kwargs)
1615
+ return apis.DescribeNetworkAclAssociationBySubnetResponseSchema().loads(
1616
+ resp
1617
+ )
1618
+
1619
+ def describe_network_acl_entry(
1620
+ self, req: typing.Optional[dict] = None, **kwargs
1621
+ ) -> dict:
1622
+ """DescribeNetworkAclEntry - 获取ACL的规则信息
1623
+
1624
+ **Request**
1625
+
1626
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1627
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1628
+ - **AclId** (str) - (Required) ACL的ID
1629
+
1630
+ **Response**
1631
+
1632
+ - **EntryList** (list) - 见 **AclEntryInfo** 模型定义
1633
+
1634
+ **Response Model**
1635
+
1636
+ **AclEntryInfo**
1637
+ - **CidrBlock** (str) - IP段的CIDR信息
1638
+ - **CreateTime** (int) - 创建的Unix时间戳
1639
+ - **Direction** (str) - 出向或者入向
1640
+ - **EntryAction** (str) - 匹配规则的动作
1641
+ - **EntryId** (str) - Entry的ID
1642
+ - **IpProtocol** (str) - 针对的IP协议
1643
+ - **PortRange** (str) - Port的段信息
1644
+ - **Priority** (str) - 优先级
1645
+ - **TargetResourceCount** (int) - 应用目标资源数量。TargetType为0时不返回该值。
1646
+ - **TargetResourceList** (list) - 见 **TargetResourceInfo** 模型定义
1647
+ - **TargetType** (int) - 应用目标类型。 0代表“子网内全部资源” ,1代表“子网内指定资源” 。
1648
+ - **UpdateTime** (int) - 更改的Unix时间戳
1649
+
1650
+
1651
+ **TargetResourceInfo**
1652
+ - **PrivateIp** (str) - 资源内网IP
1653
+ - **ResourceId** (str) - 资源ID
1654
+ - **ResourceName** (str) - 资源名称
1655
+ - **ResourceType** (int) - 资源类型
1656
+ - **SubResourceId** (str) - 资源绑定的虚拟网卡的ID
1657
+ - **SubResourceName** (str) - 资源绑定的虚拟网卡的名称
1658
+ - **SubResourceType** (int) - 资源绑定虚拟网卡的类型
1659
+ - **SubnetworkId** (str) - 子网ID
1660
+
1661
+
1662
+ """
1663
+ # build request
1664
+ d = {
1665
+ "ProjectId": self.config.project_id,
1666
+ "Region": self.config.region,
1667
+ }
1668
+ req and d.update(req)
1669
+ d = apis.DescribeNetworkAclEntryRequestSchema().dumps(d)
1670
+
1671
+ resp = self.invoke("DescribeNetworkAclEntry", d, **kwargs)
1672
+ return apis.DescribeNetworkAclEntryResponseSchema().loads(resp)
1673
+
1674
+ def describe_network_interface(
1675
+ self, req: typing.Optional[dict] = None, **kwargs
1676
+ ) -> dict:
1677
+ """DescribeNetworkInterface - 展示虚拟网卡信息
1678
+
1679
+ **Request**
1680
+
1681
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1682
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1683
+ - **InterfaceId** (list) - 虚拟网卡ID,可指定 0~n
1684
+ - **Limit** (int) - 默认为20
1685
+ - **NoRecycled** (bool) - 若为true 过滤绑定在回收站主机中的网卡。默认为false。
1686
+ - **Offset** (int) - 默认为0
1687
+ - **OnlyDefault** (bool) - 若为true 只返回默认网卡默认为false
1688
+ - **SubnetId** (str) - 所属子网
1689
+ - **Tag** (str) - 业务组
1690
+ - **VPCId** (str) - 所属VPC
1691
+
1692
+ **Response**
1693
+
1694
+ - **NetworkInterfaceSet** (list) - 见 **NetworkInterface** 模型定义
1695
+ - **TotalCount** (int) - 虚拟网卡总数
1696
+
1697
+ **Response Model**
1698
+
1699
+ **NetworkInterface**
1700
+ - **AttachInstanceId** (str) - 绑定实例资源ID
1701
+ - **CreateTime** (int) - 创建时间
1702
+ - **Default** (bool) - 是否是绑定实例的默认网卡 false:不是 true:是
1703
+ - **EIPIdSet** (list) - 虚拟网卡绑定的EIP ID信息
1704
+ - **FirewallIdSet** (list) - 虚拟网卡绑定的防火墙ID信息
1705
+ - **Gateway** (str) - 默认网关
1706
+ - **InterfaceId** (str) - 虚拟网卡资源ID
1707
+ - **MacAddress** (str) - 关联Mac
1708
+ - **Name** (str) - 虚拟网卡名称
1709
+ - **Netmask** (str) - 内网IP掩码
1710
+ - **PrivateIp** (list) - 见 **UNIIpInfo** 模型定义
1711
+ - **PrivateIpLimit** (dict) - 见 **UNIQuotaInfo** 模型定义
1712
+ - **PrivateIpSet** (list) - 关联内网IP。当前一个网卡仅支持绑定一个内网IP
1713
+ - **Remark** (str) - 备注
1714
+ - **Status** (int) - 绑定状态
1715
+ - **SubnetId** (str) - 所属子网
1716
+ - **Tag** (str) - 业务组
1717
+ - **VPCId** (str) - 所属VPC
1718
+
1719
+
1720
+ **UNIIpInfo**
1721
+ - **IpAddr** (list) - ip 地址
1722
+ - **IpType** (str) - ip类型 SecondaryIp/PrimaryIp
1723
+
1724
+
1725
+ **UNIQuotaInfo**
1726
+ - **PrivateIpCount** (int) - 网卡拥有的内网IP数量
1727
+ - **PrivateIpQuota** (int) - 网卡内网IP配额
1728
+
1729
+
1730
+ """
1731
+ # build request
1732
+ d = {
1733
+ "ProjectId": self.config.project_id,
1734
+ "Region": self.config.region,
1735
+ }
1736
+ req and d.update(req)
1737
+ d = apis.DescribeNetworkInterfaceRequestSchema().dumps(d)
1738
+
1739
+ resp = self.invoke("DescribeNetworkInterface", d, **kwargs)
1740
+ return apis.DescribeNetworkInterfaceResponseSchema().loads(resp)
1741
+
1742
+ def describe_resource_sec_group(
1743
+ self, req: typing.Optional[dict] = None, **kwargs
1744
+ ) -> dict:
1745
+ """DescribeResourceSecGroup - 查询资源绑定的安全组信息
1746
+
1747
+ **Request**
1748
+
1749
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1750
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1751
+ - **Limit** (int) - 分页查询时的最大返回资源数量。
1752
+ - **Offset** (int) - 分页查询时的偏移量。传入了 ResourceId 则不分页。
1753
+ - **ResourceId** (list) - 资源 ID 数组,如果指定则不分页;否则分页获取该账号下的指定类型的资源。支持 string 数组格式。
1754
+ - **ResourceType** (str) - 资源类型,如 uhost, uni
1755
+ - **VPCId** (str) - VPC ID。非必须,分页使用(分页时,也可不传);ResourceId 非空时,忽略
1756
+
1757
+ **Response**
1758
+
1759
+ - **DataSet** (list) - 见 **ResourceSecgroupInfoEx** 模型定义
1760
+ - **TotalCount** (int) - 资源总数量。传入 ResourceId 时,为传入资源中的有效资源数量。
1761
+
1762
+ **Response Model**
1763
+
1764
+ **ResourceSecgroupInfoEx**
1765
+ - **Count** (int) - 该资源绑定的安全组数量
1766
+ - **ExInfo** (dict) - 见 **ResourceExInfo** 模型定义
1767
+ - **PermitAssociate** (bool) - 表示是否允许绑定安全组
1768
+ - **ResourceId** (str) - 资源 ID
1769
+ - **ResourceName** (str) - 资源名称
1770
+ - **SecGroupInfo** (list) - 见 **BindingSecGroupInfo** 模型定义
1771
+
1772
+
1773
+ **ResourceExInfo**
1774
+ - **EIP** (list) - 主机外网IP
1775
+ - **IP** (list) - 主机内网IP
1776
+ - **ResourceName** (str) - 资源名称
1777
+ - **SuperResourceId** (str) - 父级资源ID
1778
+ - **SuperResourceName** (str) - 父级资源名称
1779
+ - **Uni** (list) - 见 **ResourceSecgroupInfo** 模型定义
1780
+
1781
+
1782
+ **ResourceSecgroupInfo**
1783
+ - **Count** (int) - 资源绑定安全组数量
1784
+ - **ResourceId** (str) - 资源ID
1785
+ - **SecGroupInfo** (list) - 见 **SecGroupSimpleInfo** 模型定义
1786
+
1787
+
1788
+ **SecGroupSimpleInfo**
1789
+ - **Name** (str) - 安全组名称
1790
+ - **SecGroupId** (str) - 安全组资源ID
1791
+
1792
+
1793
+ **BindingSecGroupInfo**
1794
+ - **Name** (str) - 安全组名称
1795
+ - **Priority** (int) - 该资源与该安全组绑定的优先级
1796
+ - **SecGroupId** (str) - 安全组 ID
1797
+ - **VPCId** (str) - 安全组所属 VPC
1798
+
1799
+
1800
+ """
1801
+ # build request
1802
+ d = {
1803
+ "ProjectId": self.config.project_id,
1804
+ "Region": self.config.region,
1805
+ }
1806
+ req and d.update(req)
1807
+ d = apis.DescribeResourceSecGroupRequestSchema().dumps(d)
1808
+
1809
+ resp = self.invoke("DescribeResourceSecGroup", d, **kwargs)
1810
+ return apis.DescribeResourceSecGroupResponseSchema().loads(resp)
1811
+
1812
+ def describe_route_table(
1813
+ self, req: typing.Optional[dict] = None, **kwargs
1814
+ ) -> dict:
1815
+ """DescribeRouteTable - 获取路由表详细信息(包括路由策略)
1816
+
1817
+ **Request**
1818
+
1819
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1820
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1821
+ - **Brief** (bool) - 默认为 false, 返回详细路由规则信息
1822
+ - **BusinessId** (str) - 业务组ID
1823
+ - **Limit** (int) - 数据分页值。默认为20
1824
+ - **LongId** (str) - 默认为 false, 表示路由表是短 ID
1825
+ - **OffSet** (int) - 数据偏移量。默认为0
1826
+ - **RouteTableId** (str) - 路由表资源ID
1827
+ - **VPCId** (str) - 所属VPC的资源ID
1828
+
1829
+ **Response**
1830
+
1831
+ - **RouteTables** (list) - 见 **RouteTableInfo** 模型定义
1832
+ - **TotalCount** (int) - RouteTables字段的数量
1833
+
1834
+ **Response Model**
1835
+
1836
+ **RouteTableInfo**
1837
+ - **CreateTime** (int) - 创建时间戳
1838
+ - **Remark** (str) - 路由表备注
1839
+ - **RouteRules** (list) - 见 **RouteRuleInfo** 模型定义
1840
+ - **RouteTableId** (str) - 路由表资源ID
1841
+ - **RouteTableType** (int) - 路由表类型。1为默认路由表,0为自定义路由表
1842
+ - **SubnetCount** (int) - 绑定该路由表的子网数量
1843
+ - **SubnetIds** (list) - 绑定该路由表的子网
1844
+ - **Tag** (str) - 路由表所属业务组
1845
+ - **VPCId** (str) - 路由表所属的VPC资源ID
1846
+ - **VPCName** (str) - 路由表所属的VPC资源名称
1847
+
1848
+
1849
+ **RouteRuleInfo**
1850
+ - **AccountId** (int) - 项目ID信息
1851
+ - **DstAddr** (str) - 目的地址
1852
+ - **DstPort** (int) - 保留字段,暂未使用
1853
+ - **InstanceType** (str) - 实例类型,枚举值:UHOST,云主机;UNI,虚拟网卡;PHOST,物理云主机
1854
+ - **NexthopId** (str) - 路由下一跳资源ID
1855
+ - **NexthopType** (str) - 路由表下一跳类型。LOCAL,本VPC内部通信路由;PUBLIC,公共服务路由;CNAT,外网路由;UDPN,跨域高速通道路由;HYBRIDGW,混合云路由;INSTANCE,实例路由;VNET,VPC联通路由;IPSEC VPN,指向VPN网关的路由。
1856
+ - **OriginAddr** (str) - 保留字段,暂未使用
1857
+ - **Priority** (int) - 保留字段,暂未使用
1858
+ - **Remark** (str) - 路由规则备注
1859
+ - **RouteRuleId** (str) - 规则ID
1860
+ - **RouteTableId** (str) - 路由表资源ID
1861
+ - **RuleType** (int) - 路由规则类型。0,系统路由规则;1,自定义路由规则
1862
+ - **SrcAddr** (str) - 保留字段,暂未使用
1863
+ - **SrcPort** (int) - 保留字段,暂未使用
1864
+ - **VNetId** (str) - 所属的VPC
1865
+
1866
+
1867
+ """
1868
+ # build request
1869
+ d = {
1870
+ "ProjectId": self.config.project_id,
1871
+ "Region": self.config.region,
1872
+ }
1873
+ req and d.update(req)
1874
+ d = apis.DescribeRouteTableRequestSchema().dumps(d)
1875
+
1876
+ resp = self.invoke("DescribeRouteTable", d, **kwargs)
1877
+ return apis.DescribeRouteTableResponseSchema().loads(resp)
1878
+
1879
+ def describe_sec_group(
1880
+ self, req: typing.Optional[dict] = None, **kwargs
1881
+ ) -> dict:
1882
+ """DescribeSecGroup -
1883
+
1884
+ **Request**
1885
+
1886
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1887
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1888
+ - **Limit** (int) - 分页查询数据长度。默认为20
1889
+ - **Offset** (int) - 分页查询起始位置偏移量。默认为0
1890
+ - **SecGroupId** (list) - 安全组资源 ID 数组,传入则 Offset/Limit/BusinessId 失效。支持数组格式。Type 为 string 数组。
1891
+ - **VPCId** (str) - 资源ID所属的 VPC ID
1892
+
1893
+ **Response**
1894
+
1895
+ - **DataSet** (list) - 见 **SecGroupInfo** 模型定义
1896
+
1897
+ **Response Model**
1898
+
1899
+ **SecGroupInfo**
1900
+ - **Account** (int) - 用户 ID
1901
+ - **CreateTime** (int) - 创建的时间,格式为Unix Timestamp,如 1747030299
1902
+ - **Name** (str) - 安全组名称
1903
+ - **Remark** (str) - 备注
1904
+ - **Rule** (list) - 见 **SecGroupRuleInfo** 模型定义
1905
+ - **SecGroupId** (str) - 安全组资源ID
1906
+ - **Tag** (str) - 业务组
1907
+ - **Type** (str) - 安全组类型,枚举值为: "user defined", 自定义创建安全组; "recommend web", 使用Web模板创建的安全组; "recommend non web", 使用非Web模板创建的安全组
1908
+ - **VPCId** (str) - VPC资源ID
1909
+
1910
+
1911
+ **SecGroupRuleInfo**
1912
+ - **Direction** (str) - "Ingress/Egress",入站规则/出站规则
1913
+ - **DstPort** (str) - 目标端口
1914
+ - **IPRange** (str) - 地址
1915
+ - **IPVersion** (str) - IP 版本,如 "IPv4"。支持 IPv6 后废弃
1916
+ - **Priority** (int) - 优先级
1917
+ - **ProtocolType** (str) - 协议类型
1918
+ - **Remark** (str) - 安全组规则备注
1919
+ - **RuleAction** (str) - 匹配策略
1920
+ - **RuleId** (str) - 规则ID
1921
+
1922
+
1923
+ """
1924
+ # build request
1925
+ d = {
1926
+ "ProjectId": self.config.project_id,
1927
+ "Region": self.config.region,
1928
+ }
1929
+ req and d.update(req)
1930
+ d = apis.DescribeSecGroupRequestSchema().dumps(d)
1931
+
1932
+ resp = self.invoke("DescribeSecGroup", d, **kwargs)
1933
+ return apis.DescribeSecGroupResponseSchema().loads(resp)
1934
+
1935
+ def describe_sec_group_resource(
1936
+ self, req: typing.Optional[dict] = None, **kwargs
1937
+ ) -> dict:
1938
+ """DescribeSecGroupResource - 获取安全组绑资源信息
1939
+
1940
+ **Request**
1941
+
1942
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1943
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1944
+ - **Limit** (int) - 分页查询长度。默认为20
1945
+ - **Offset** (int) - 分页查询起始位置偏移量。默认为0
1946
+ - **SecGroupId** (str) - 安全组资源ID。
1947
+
1948
+ **Response**
1949
+
1950
+ - **DataSet** (list) - 见 **SecGroupResourceInfo** 模型定义
1951
+ - **TotalCount** (int) - 安全组绑定的资源总数
1952
+
1953
+ **Response Model**
1954
+
1955
+ **SecGroupResourceInfo**
1956
+ - **Name** (str) - 名称
1957
+ - **PrivateIp** (str) - 内网IP
1958
+ - **ResourceId** (str) - 资源ID
1959
+ - **ResourceType** (str) - 资源类型。"unatgw",NAT网关; "uhost",云主机; "upm",物理云主机; "hadoophost",hadoop节点; "fortresshost",堡垒机; "udhost",私有专区主机;"udockhost",容器;"dbaudit",数据库审计,“uni”,虚拟网卡。
1960
+ - **SubResourceId** (str) - 资源绑定的虚拟网卡的ID
1961
+ - **SubResourceName** (str) - 绑定的虚拟网卡的名称
1962
+ - **SubResourceType** (str) - 绑定的虚拟网卡的类型,“uni”,虚拟网卡
1963
+ - **Tag** (str) - 业务组
1964
+ - **Zone** (int) - 可用区
1965
+
1966
+
1967
+ """
1968
+ # build request
1969
+ d = {
1970
+ "ProjectId": self.config.project_id,
1971
+ "Region": self.config.region,
1972
+ }
1973
+ req and d.update(req)
1974
+ d = apis.DescribeSecGroupResourceRequestSchema().dumps(d)
1975
+
1976
+ resp = self.invoke("DescribeSecGroupResource", d, **kwargs)
1977
+ return apis.DescribeSecGroupResourceResponseSchema().loads(resp)
1978
+
1979
+ def describe_secondary_ip(
1980
+ self, req: typing.Optional[dict] = None, **kwargs
1981
+ ) -> dict:
1982
+ """DescribeSecondaryIp - 查询SecondaryIp(uk8s使用)
1983
+
1984
+ **Request**
1985
+
1986
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1987
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1988
+ - **SubnetId** (str) - (Required) 子网Id
1989
+ - **VPCId** (str) - (Required) VPCId
1990
+ - **Zone** (str) - (Required)
1991
+ - **Ip** (str) - Ip
1992
+ - **Mac** (str) - Mac
1993
+
1994
+ **Response**
1995
+
1996
+ - **DataSet** (list) - 见 **IpInfo** 模型定义
1997
+
1998
+ **Response Model**
1999
+
2000
+ **IpInfo**
2001
+ - **Gateway** (str) -
2002
+ - **Ip** (str) -
2003
+ - **Mac** (str) -
2004
+ - **Mask** (str) -
2005
+ - **SubnetId** (str) -
2006
+ - **VPCId** (str) -
2007
+
2008
+
2009
+ """
2010
+ # build request
2011
+ d = {
2012
+ "ProjectId": self.config.project_id,
2013
+ "Region": self.config.region,
2014
+ }
2015
+ req and d.update(req)
2016
+ d = apis.DescribeSecondaryIpRequestSchema().dumps(d)
2017
+
2018
+ resp = self.invoke("DescribeSecondaryIp", d, **kwargs)
2019
+ return apis.DescribeSecondaryIpResponseSchema().loads(resp)
2020
+
2021
+ def describe_snat_dnat_rule(
2022
+ self, req: typing.Optional[dict] = None, **kwargs
2023
+ ) -> dict:
2024
+ """DescribeSnatDnatRule - 获取基于NAT创建的内外网IP映射规则信息
2025
+
2026
+ **Request**
2027
+
2028
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2029
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2030
+ - **EIP** (list) - 获取EIP对应的SnatDnatRule信息
2031
+ - **NATGWId** (list) - 获取NAT上添加的所有SnatDnatRule信息
2032
+
2033
+ **Response**
2034
+
2035
+ - **DataSet** (list) - 见 **SnatDnatRuleInfo** 模型定义
2036
+
2037
+ **Response Model**
2038
+
2039
+ **SnatDnatRuleInfo**
2040
+ - **EIP** (str) - EIP的IP地址
2041
+ - **NATGWId** (str) - 映射所使用的NAT网关资源ID
2042
+ - **PrivateIp** (str) - 内网IP地址
2043
+
2044
+
2045
+ """
2046
+ # build request
2047
+ d = {
2048
+ "ProjectId": self.config.project_id,
2049
+ "Region": self.config.region,
2050
+ }
2051
+ req and d.update(req)
2052
+ d = apis.DescribeSnatDnatRuleRequestSchema().dumps(d)
2053
+
2054
+ resp = self.invoke("DescribeSnatDnatRule", d, **kwargs)
2055
+ return apis.DescribeSnatDnatRuleResponseSchema().loads(resp)
2056
+
2057
+ def describe_snat_rule(
2058
+ self, req: typing.Optional[dict] = None, **kwargs
2059
+ ) -> dict:
2060
+ """DescribeSnatRule - 获取Nat网关的出口规则(SNAT规则)
2061
+
2062
+ **Request**
2063
+
2064
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2065
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2066
+ - **NATGWId** (str) - (Required) NAT网关的ID
2067
+ - **Limit** (str) - 分页,默认为20
2068
+ - **Offset** (str) - 偏移,默认为0
2069
+ - **SnatIp** (str) - EIP的ip地址,例如106.75.xx.xx
2070
+ - **SourceIp** (str) - 需要出外网的私网IP地址,例如10.9.7.xx
2071
+
2072
+ **Response**
2073
+
2074
+ - **DataSet** (list) - 见 **NATGWSnatRule** 模型定义
2075
+ - **TotalCount** (int) - 规则数量
2076
+
2077
+ **Response Model**
2078
+
2079
+ **NATGWSnatRule**
2080
+ - **Name** (str) - snat规则名称
2081
+ - **SnatIp** (str) - EIP地址,如106.76.xx.xx
2082
+ - **SourceIp** (str) - 资源的内网IP地址
2083
+ - **SubnetworkId** (str) - SourceIp所属的子网id
2084
+
2085
+
2086
+ """
2087
+ # build request
2088
+ d = {
2089
+ "ProjectId": self.config.project_id,
2090
+ "Region": self.config.region,
2091
+ }
2092
+ req and d.update(req)
2093
+ d = apis.DescribeSnatRuleRequestSchema().dumps(d)
2094
+
2095
+ resp = self.invoke("DescribeSnatRule", d, **kwargs)
2096
+ return apis.DescribeSnatRuleResponseSchema().loads(resp)
2097
+
2098
+ def describe_subnet(
2099
+ self, req: typing.Optional[dict] = None, **kwargs
2100
+ ) -> dict:
2101
+ """DescribeSubnet - 获取子网信息
2102
+
2103
+ **Request**
2104
+
2105
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
2106
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
2107
+ - **Limit** (int) - 列表长度,默认为20
2108
+ - **Offset** (int) - 偏移量,默认为0
2109
+ - **RouteTableId** (str) - 路由表Id
2110
+ - **ShowAvailableIPs** (bool) - 是否返回子网的可用IP数,true为是,false为否,默认不返回
2111
+ - **SubnetId** (str) - 子网id,适用于一次查询一个子网信息
2112
+ - **SubnetIds** (list) - 子网id数组,适用于一次查询多个子网信息
2113
+ - **Tag** (str) - 业务组名称,默认为Default
2114
+ - **VPCId** (str) - VPC资源id
2115
+
2116
+ **Response**
2117
+
2118
+ - **DataSet** (list) - 见 **SubnetInfo** 模型定义
2119
+ - **TotalCount** (int) - 子网总数量
2120
+
2121
+ **Response Model**
2122
+
2123
+ **SubnetInfo**
2124
+ - **AvailableIPs** (int) - 可用IP数量
2125
+ - **CreateTime** (int) - 创建时间
2126
+ - **Gateway** (str) - 子网网关
2127
+ - **HasNATGW** (bool) - 是否有natgw
2128
+ - **IPv6Network** (str) - 子网关联的IPv6网段
2129
+ - **Netmask** (str) - 子网掩码
2130
+ - **Remark** (str) - 备注
2131
+ - **RouteTableId** (str) - 路由表Id
2132
+ - **Subnet** (str) - 子网网段
2133
+ - **SubnetId** (str) - 子网Id
2134
+ - **SubnetName** (str) - 子网名称
2135
+ - **SubnetType** (int) - 子网类型
2136
+ - **Tag** (str) - 业务组
2137
+ - **VPCId** (str) - VPCId
2138
+ - **VPCName** (str) - VPC名称
2139
+ - **Zone** (str) - 可用区名称
2140
+
2141
+
2142
+ """
2143
+ # build request
2144
+ d = {
2145
+ "ProjectId": self.config.project_id,
2146
+ "Region": self.config.region,
2147
+ }
2148
+ req and d.update(req)
2149
+ d = apis.DescribeSubnetRequestSchema().dumps(d)
2150
+
2151
+ resp = self.invoke("DescribeSubnet", d, **kwargs)
2152
+ return apis.DescribeSubnetResponseSchema().loads(resp)
2153
+
2154
+ def describe_subnet_resource(
2155
+ self, req: typing.Optional[dict] = None, **kwargs
2156
+ ) -> dict:
2157
+ """DescribeSubnetResource - 展示子网资源
2158
+
2159
+ **Request**
2160
+
2161
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
2162
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
2163
+ - **SubnetId** (str) - (Required) 子网id
2164
+ - **Limit** (int) - 单页返回数据长度,默认为20
2165
+ - **Offset** (int) - 列表起始位置偏移量,默认为0
2166
+ - **ResourceType** (str) - 资源类型,默认为全部资源类型。枚举值为:UHOST,云主机;PHOST,物理云主机;ULB,负载均衡;UHADOOP_HOST,hadoop节点;UFORTRESS_HOST,堡垒机;UNATGW,NAT网关;UKAFKA,Kafka消息队列;UMEM,内存存储;DOCKER,容器集群;UDB,数据库;UDW,数据仓库;VIP,内网VIP.
2167
+
2168
+ **Response**
2169
+
2170
+ - **DataSet** (list) - 见 **SubnetResource** 模型定义
2171
+ - **TotalCount** (int) - 总数
2172
+
2173
+ **Response Model**
2174
+
2175
+ **SubnetResource**
2176
+ - **IP** (str) - 资源ip
2177
+ - **Name** (str) - 名称
2178
+ - **ResourceId** (str) - 资源Id
2179
+ - **ResourceType** (str) - 资源类型。对应的资源类型:UHOST,云主机;PHOST,物理云主机;ULB,负载均衡;UHADOOP_HOST,hadoop节点;UFORTRESS_HOST,堡垒机;UNATGW,NAT网关;UKAFKA,分布式消息系统;UMEM,内存存储;DOCKER,容器集群;UDB,数据库;UDW,数据仓库;VIP,内网VIP.
2180
+
2181
+
2182
+ """
2183
+ # build request
2184
+ d = {
2185
+ "ProjectId": self.config.project_id,
2186
+ "Region": self.config.region,
2187
+ }
2188
+ req and d.update(req)
2189
+ d = apis.DescribeSubnetResourceRequestSchema().dumps(d)
2190
+
2191
+ resp = self.invoke("DescribeSubnetResource", d, **kwargs)
2192
+ return apis.DescribeSubnetResourceResponseSchema().loads(resp)
2193
+
2194
+ def describe_vip(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
2195
+ """DescribeVIP - 获取内网VIP详细信息
2196
+
2197
+ **Request**
2198
+
2199
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
2200
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
2201
+ - **BusinessId** (str) - 业务组
2202
+ - **SubnetId** (str) - 子网id,不指定则获取VPCId下的所有vip
2203
+ - **Tag** (str) - 业务组名称, 默认为 Default
2204
+ - **VIPId** (str) - VIP ID
2205
+ - **VPCId** (str) - vpc的id,指定SubnetId时必填
2206
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
2207
+
2208
+ **Response**
2209
+
2210
+ - **DataSet** (list) - 内网VIP地址列表
2211
+ - **TotalCount** (int) - vip数量
2212
+ - **VIPSet** (list) - 见 **VIPDetailSet** 模型定义
2213
+
2214
+ **Response Model**
2215
+
2216
+ **VIPDetailSet**
2217
+ - **CreateTime** (int) - 创建时间
2218
+ - **Name** (str) - VIP名称
2219
+ - **RealIp** (str) - 真实主机ip
2220
+ - **Remark** (str) - VIP备注
2221
+ - **SubnetId** (str) - 子网id
2222
+ - **Tag** (str) - VIP所属业务组
2223
+ - **VIP** (str) - 虚拟ip
2224
+ - **VIPId** (str) - 虚拟ip id
2225
+ - **VPCId** (str) - VPC id
2226
+ - **Zone** (str) - 地域
2227
+
2228
+
2229
+ """
2230
+ # build request
2231
+ d = {
2232
+ "ProjectId": self.config.project_id,
2233
+ "Region": self.config.region,
2234
+ }
2235
+ req and d.update(req)
2236
+ d = apis.DescribeVIPRequestSchema().dumps(d)
2237
+
2238
+ resp = self.invoke("DescribeVIP", d, **kwargs)
2239
+ return apis.DescribeVIPResponseSchema().loads(resp)
2240
+
2241
+ def describe_vpc(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
2242
+ """DescribeVPC - 获取VPC信息
2243
+
2244
+ **Request**
2245
+
2246
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2247
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2248
+ - **Limit** (int) - 数据分页值
2249
+ - **Offset** (int) - 数据偏移量,默认为0
2250
+ - **Tag** (str) - 业务组名称
2251
+ - **VPCIds** (list) - VPCId
2252
+
2253
+ **Response**
2254
+
2255
+ - **DataSet** (list) - 见 **VPCInfo** 模型定义
2256
+ - **TotalCount** (int) -
2257
+
2258
+ **Response Model**
2259
+
2260
+ **VPCInfo**
2261
+ - **CreateTime** (int) - 创建时间
2262
+ - **IPv6Network** (str) - VPC关联的IPv6网段
2263
+ - **Name** (str) - VPC名称
2264
+ - **Network** (list) - VPC网段
2265
+ - **NetworkInfo** (list) - 见 **VPCNetworkInfo** 模型定义
2266
+ - **OperatorName** (str) - VPC关联的IPv6网段所属运营商
2267
+ - **SubnetCount** (int) - 子网数
2268
+ - **Tag** (str) - 业务组
2269
+ - **UpdateTime** (int) - 更新时间
2270
+ - **VPCId** (str) - VPC资源ID
2271
+ - **VPCType** (str) - DefaultVPC 默认VPC,DefinedVPC,自定义VPC
2272
+
2273
+
2274
+ **VPCNetworkInfo**
2275
+ - **Network** (str) - vpc地址空间
2276
+ - **SubnetCount** (int) - 地址空间中子网数量
2277
+
2278
+
2279
+ """
2280
+ # build request
2281
+ d = {
2282
+ "ProjectId": self.config.project_id,
2283
+ "Region": self.config.region,
2284
+ }
2285
+ req and d.update(req)
2286
+ d = apis.DescribeVPCRequestSchema().dumps(d)
2287
+
2288
+ resp = self.invoke("DescribeVPC", d, **kwargs)
2289
+ return apis.DescribeVPCResponseSchema().loads(resp)
2290
+
2291
+ def describe_vpc_intercom(
2292
+ self, req: typing.Optional[dict] = None, **kwargs
2293
+ ) -> dict:
2294
+ """DescribeVPCIntercom - 获取VPC互通信息
2295
+
2296
+ **Request**
2297
+
2298
+ - **ProjectId** (str) - (Config) 源VPC所在项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2299
+ - **Region** (str) - (Config) 源VPC所在地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2300
+ - **VPCId** (str) - (Required) VPC短ID
2301
+ - **DstProjectId** (str) - 目的项目ID,默认为全部项目
2302
+ - **DstRegion** (str) - 目的VPC所在地域,默认为全部地域
2303
+
2304
+ **Response**
2305
+
2306
+ - **DataSet** (list) - 见 **VPCIntercomInfo** 模型定义
2307
+
2308
+ **Response Model**
2309
+
2310
+ **VPCIntercomInfo**
2311
+ - **AccountId** (int) - 项目Id(数字)
2312
+ - **DstRegion** (str) - 所属地域
2313
+ - **Name** (str) - VPC名字
2314
+ - **Network** (list) - VPC的地址空间
2315
+ - **ProjectId** (str) - 项目Id
2316
+ - **Tag** (str) - 业务组(未分组显示为 Default)
2317
+ - **VPCId** (str) - VPCId
2318
+ - **VPCType** (int) - vpc类型(1表示托管VPC,0表示公有云VPC)
2319
+
2320
+
2321
+ """
2322
+ # build request
2323
+ d = {
2324
+ "ProjectId": self.config.project_id,
2325
+ "Region": self.config.region,
2326
+ }
2327
+ req and d.update(req)
2328
+ d = apis.DescribeVPCIntercomRequestSchema().dumps(d)
2329
+
2330
+ resp = self.invoke("DescribeVPCIntercom", d, **kwargs)
2331
+ return apis.DescribeVPCIntercomResponseSchema().loads(resp)
2332
+
2333
+ def describe_white_list_resource(
2334
+ self, req: typing.Optional[dict] = None, **kwargs
2335
+ ) -> dict:
2336
+ """DescribeWhiteListResource - 展示NAT网关白名单资源列表
2337
+
2338
+ **Request**
2339
+
2340
+ - **ProjectId** (str) - (Config) 项目id
2341
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2342
+ - **NATGWIds** (list) - (Required) NAT网关的Id
2343
+ - **Limit** (int) - 数据分页值, 默认为20
2344
+ - **Offset** (int) - 数据偏移量, 默认为0
2345
+
2346
+ **Response**
2347
+
2348
+ - **DataSet** (list) - 见 **NatGWWhitelistDataSet** 模型定义
2349
+ - **TotalCount** (int) - 上述DataSet总数量
2350
+
2351
+ **Response Model**
2352
+
2353
+ **NatGWWhitelistDataSet**
2354
+ - **IfOpen** (int) - 白名单开关标记
2355
+ - **NATGWId** (str) - NATGateWay Id
2356
+ - **ObjectIPInfo** (list) - 见 **DescribeWhiteListResourceObjectIPInfo** 模型定义
2357
+
2358
+
2359
+ **DescribeWhiteListResourceObjectIPInfo**
2360
+ - **GwType** (str) - natgw字符串
2361
+ - **PrivateIP** (str) - 白名单资源的内网IP
2362
+ - **ResourceId** (str) - 白名单资源Id信息
2363
+ - **ResourceName** (str) - 白名单资源名称
2364
+ - **ResourceType** (str) - 白名单资源类型
2365
+ - **SubResourceId** (str) - 资源绑定的虚拟网卡的实例ID
2366
+ - **SubResourceName** (str) - 资源绑定的虚拟网卡的实例名称
2367
+ - **SubResourceType** (str) - 资源绑定的虚拟网卡的类型
2368
+ - **VPCId** (str) - 白名单资源所属VPCId
2369
+
2370
+
2371
+ """
2372
+ # build request
2373
+ d = {
2374
+ "ProjectId": self.config.project_id,
2375
+ "Region": self.config.region,
2376
+ }
2377
+ req and d.update(req)
2378
+ d = apis.DescribeWhiteListResourceRequestSchema().dumps(d)
2379
+
2380
+ resp = self.invoke("DescribeWhiteListResource", d, **kwargs)
2381
+ return apis.DescribeWhiteListResourceResponseSchema().loads(resp)
2382
+
2383
+ def detach_network_interface(
2384
+ self, req: typing.Optional[dict] = None, **kwargs
2385
+ ) -> dict:
2386
+ """DetachNetworkInterface - 解绑云主机关联网卡
2387
+
2388
+ **Request**
2389
+
2390
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2391
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2392
+ - **InstanceId** (str) - (Required) 云主机ID
2393
+ - **InterfaceId** (str) - (Required) 虚拟网卡ID
2394
+
2395
+ **Response**
2396
+
2397
+
2398
+ """
2399
+ # build request
2400
+ d = {
2401
+ "ProjectId": self.config.project_id,
2402
+ "Region": self.config.region,
2403
+ }
2404
+ req and d.update(req)
2405
+ d = apis.DetachNetworkInterfaceRequestSchema().dumps(d)
2406
+
2407
+ resp = self.invoke("DetachNetworkInterface", d, **kwargs)
2408
+ return apis.DetachNetworkInterfaceResponseSchema().loads(resp)
2409
+
2410
+ def disable_uni_eip_direct_mode(
2411
+ self, req: typing.Optional[dict] = None, **kwargs
2412
+ ) -> dict:
2413
+ """DisableUniEipDirectMode - 关闭虚拟网卡EIP直通功能
2414
+
2415
+ **Request**
2416
+
2417
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2418
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2419
+ - **InterfaceId** (str) - (Required) 虚拟网卡ID
2420
+ - **VPCId** (str) - (Required) VPC ID
2421
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2422
+
2423
+ **Response**
2424
+
2425
+ - **Message** (str) - 返回信息
2426
+
2427
+ """
2428
+ # build request
2429
+ d = {
2430
+ "ProjectId": self.config.project_id,
2431
+ "Region": self.config.region,
2432
+ }
2433
+ req and d.update(req)
2434
+ d = apis.DisableUniEipDirectModeRequestSchema().dumps(d)
2435
+
2436
+ resp = self.invoke("DisableUniEipDirectMode", d, **kwargs)
2437
+ return apis.DisableUniEipDirectModeResponseSchema().loads(resp)
2438
+
2439
+ def disassociate_sec_group(
2440
+ self, req: typing.Optional[dict] = None, **kwargs
2441
+ ) -> dict:
2442
+ """DisassociateSecGroup - 解绑安全组和资源绑定关系
2443
+
2444
+ **Request**
2445
+
2446
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2447
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2448
+ - **Force** (bool) - 是否强制解绑。默认为 false。为 true 表示强制解绑,用于删除资源前的解绑,因为开启安全组特性的资源至少绑定一个安全组,正常情况下是不允许解绑所有安全组。
2449
+ - **ResourceId** (list) - 资源ID,不传表示解绑资源上所有安全组,安全组ID和资源ID至少传一个,且只能有一个批量。支持 string 数组格式。
2450
+ - **SecGroupId** (list) - 安全组ID,不传表示解绑安全组绑定的所以资源,安全组ID和资源ID至少传一个,且只能有一个批量。支持 string 数组格式。
2451
+
2452
+ **Response**
2453
+
2454
+
2455
+ """
2456
+ # build request
2457
+ d = {
2458
+ "ProjectId": self.config.project_id,
2459
+ "Region": self.config.region,
2460
+ }
2461
+ req and d.update(req)
2462
+ d = apis.DisassociateSecGroupRequestSchema().dumps(d)
2463
+
2464
+ resp = self.invoke("DisassociateSecGroup", d, **kwargs)
2465
+ return apis.DisassociateSecGroupResponseSchema().loads(resp)
2466
+
2467
+ def enable_uni_eip_direct_mode(
2468
+ self, req: typing.Optional[dict] = None, **kwargs
2469
+ ) -> dict:
2470
+ """EnableUniEipDirectMode - 开启虚拟网卡EIP直通功能
2471
+
2472
+ **Request**
2473
+
2474
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2475
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2476
+ - **InterfaceId** (str) - (Required) 虚拟网卡ID
2477
+ - **VPCId** (str) - (Required) VPC ID
2478
+ - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2479
+
2480
+ **Response**
2481
+
2482
+ - **Message** (str) - 返回信息
2483
+
2484
+ """
2485
+ # build request
2486
+ d = {
2487
+ "ProjectId": self.config.project_id,
2488
+ "Region": self.config.region,
2489
+ }
2490
+ req and d.update(req)
2491
+ d = apis.EnableUniEipDirectModeRequestSchema().dumps(d)
2492
+
2493
+ resp = self.invoke("EnableUniEipDirectMode", d, **kwargs)
2494
+ return apis.EnableUniEipDirectModeResponseSchema().loads(resp)
2495
+
2496
+ def enable_white_list(
2497
+ self, req: typing.Optional[dict] = None, **kwargs
2498
+ ) -> dict:
2499
+ """EnableWhiteList - 修改NAT网关白名单开关
2500
+
2501
+ **Request**
2502
+
2503
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
2504
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
2505
+ - **IfOpen** (int) - (Required) 白名单开关标记。0:关闭;1:开启。默认为0
2506
+ - **NATGWId** (str) - (Required) NAT网关Id
2507
+
2508
+ **Response**
2509
+
2510
+
2511
+ """
2512
+ # build request
2513
+ d = {
2514
+ "ProjectId": self.config.project_id,
2515
+ "Region": self.config.region,
2516
+ }
2517
+ req and d.update(req)
2518
+ d = apis.EnableWhiteListRequestSchema().dumps(d)
2519
+
2520
+ resp = self.invoke("EnableWhiteList", d, **kwargs)
2521
+ return apis.EnableWhiteListResponseSchema().loads(resp)
2522
+
2523
+ def get_available_resource_for_policy(
2524
+ self, req: typing.Optional[dict] = None, **kwargs
2525
+ ) -> dict:
2526
+ """GetAvailableResourceForPolicy - 获取NAT网关可配置端口转发规则的资源信息
2527
+
2528
+ **Request**
2529
+
2530
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2531
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2532
+ - **NATGWId** (str) - (Required) NAT网关Id
2533
+ - **Limit** (int) - 返回数据长度,默认为20
2534
+ - **Offset** (int) - 列表起始位置偏移量,默认为0
2535
+
2536
+ **Response**
2537
+
2538
+ - **DataSet** (list) - 见 **GetAvailableResourceForPolicyDataSet** 模型定义
2539
+
2540
+ **Response Model**
2541
+
2542
+ **GetAvailableResourceForPolicyDataSet**
2543
+ - **PrivateIP** (str) - 资源对应的内网Ip
2544
+ - **ResourceId** (str) - 资源的Id
2545
+ - **ResourceType** (str) - 资源类型。"uhost":云主机; "upm",物理云主机; "hadoophost":hadoop节点; "fortresshost":堡垒机: "udockhost",容器
2546
+
2547
+
2548
+ """
2549
+ # build request
2550
+ d = {
2551
+ "ProjectId": self.config.project_id,
2552
+ "Region": self.config.region,
2553
+ }
2554
+ req and d.update(req)
2555
+ d = apis.GetAvailableResourceForPolicyRequestSchema().dumps(d)
2556
+
2557
+ resp = self.invoke("GetAvailableResourceForPolicy", d, **kwargs)
2558
+ return apis.GetAvailableResourceForPolicyResponseSchema().loads(resp)
2559
+
2560
+ def get_available_resource_for_snat_rule(
2561
+ self, req: typing.Optional[dict] = None, **kwargs
2562
+ ) -> dict:
2563
+ """GetAvailableResourceForSnatRule - 获取可用于添加snat规则(出口规则)的资源列表
2564
+
2565
+ **Request**
2566
+
2567
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2568
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2569
+ - **NATGWId** (str) - (Required) NAT网关Id
2570
+ - **Limit** (int) - 数据分页值, 默认为20
2571
+ - **Offset** (int) - 数据偏移量, 默认为0
2572
+
2573
+ **Response**
2574
+
2575
+ - **Action** (str) - 操作名称
2576
+ - **DataSet** (list) - 见 **GetAvailableResourceForSnatRuleDataSet** 模型定义
2577
+ - **RetCode** (str) - 返回值
2578
+ - **TotalCount** (int) - 总数
2579
+
2580
+ **Response Model**
2581
+
2582
+ **GetAvailableResourceForSnatRuleDataSet**
2583
+ - **PrivateIP** (str) - 资源内网IP
2584
+ - **ResourceId** (str) - 资源ID
2585
+ - **ResourceName** (str) - 资源名称
2586
+ - **ResourceType** (str) - 资源类型
2587
+ - **SubnetworkId** (str) - 资源所属VPC的ID
2588
+ - **VPCId** (str) - 资源所属子网的ID
2589
+
2590
+
2591
+ """
2592
+ # build request
2593
+ d = {
2594
+ "ProjectId": self.config.project_id,
2595
+ "Region": self.config.region,
2596
+ }
2597
+ req and d.update(req)
2598
+ d = apis.GetAvailableResourceForSnatRuleRequestSchema().dumps(d)
2599
+
2600
+ resp = self.invoke("GetAvailableResourceForSnatRule", d, **kwargs)
2601
+ return apis.GetAvailableResourceForSnatRuleResponseSchema().loads(resp)
2602
+
2603
+ def get_available_resource_for_white_list(
2604
+ self, req: typing.Optional[dict] = None, **kwargs
2605
+ ) -> dict:
2606
+ """GetAvailableResourceForWhiteList - 获取NAT网关可添加白名单的资源
2607
+
2608
+ **Request**
2609
+
2610
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2611
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2612
+ - **NATGWId** (str) - (Required) NAT网关Id
2613
+ - **Limit** (int) - 数据分页值, 默认为20
2614
+ - **Offset** (int) - 数据偏移量, 默认为0
2615
+
2616
+ **Response**
2617
+
2618
+ - **DataSet** (list) - 见 **GetAvailableResourceForWhiteListDataSet** 模型定义
2619
+ - **TotalCount** (int) - 白名单资源列表的总的个数
2620
+
2621
+ **Response Model**
2622
+
2623
+ **GetAvailableResourceForWhiteListDataSet**
2624
+ - **PrivateIP** (str) - 资源的内网Ip
2625
+ - **ResourceId** (str) - 资源类型Id
2626
+ - **ResourceName** (str) - 资源名称
2627
+ - **ResourceType** (str) - 资源类型。"uhost":云主机; "upm",物理云主机; "hadoophost":hadoop节点; "fortresshost":堡垒机: "udockhost",容器
2628
+ - **SubResourceId** (str) - 资源绑定的虚拟网卡的实例ID
2629
+ - **SubResourceName** (str) - 资源绑定的虚拟网卡的实例名称
2630
+ - **SubResourceType** (str) - 资源绑定的虚拟网卡的实例类型
2631
+ - **SubnetworkId** (str) - 资源所属子网Id
2632
+ - **VPCId** (str) - 资源所属VPCId
2633
+
2634
+
2635
+ """
2636
+ # build request
2637
+ d = {
2638
+ "ProjectId": self.config.project_id,
2639
+ "Region": self.config.region,
2640
+ }
2641
+ req and d.update(req)
2642
+ d = apis.GetAvailableResourceForWhiteListRequestSchema().dumps(d)
2643
+
2644
+ resp = self.invoke("GetAvailableResourceForWhiteList", d, **kwargs)
2645
+ return apis.GetAvailableResourceForWhiteListResponseSchema().loads(resp)
2646
+
2647
+ def get_network_acl_target_resource(
2648
+ self, req: typing.Optional[dict] = None, **kwargs
2649
+ ) -> dict:
2650
+ """GetNetworkAclTargetResource - 获取ACL规则应用目标列表
2651
+
2652
+ **Request**
2653
+
2654
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2655
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2656
+ - **SubnetworkId** (list) - (Required) 子网ID。
2657
+
2658
+ **Response**
2659
+
2660
+ - **TargetResourceList** (list) - 见 **TargetResourceInfo** 模型定义
2661
+ - **TotalCount** (int) - ACL规则应用目标资源总数
2662
+
2663
+ **Response Model**
2664
+
2665
+ **TargetResourceInfo**
2666
+ - **PrivateIp** (str) - 资源内网IP
2667
+ - **ResourceId** (str) - 资源ID
2668
+ - **ResourceName** (str) - 资源名称
2669
+ - **ResourceType** (int) - 资源类型
2670
+ - **SubResourceId** (str) - 资源绑定的虚拟网卡的ID
2671
+ - **SubResourceName** (str) - 资源绑定的虚拟网卡的名称
2672
+ - **SubResourceType** (int) - 资源绑定虚拟网卡的类型
2673
+ - **SubnetworkId** (str) - 子网ID
2674
+
2675
+
2676
+ """
2677
+ # build request
2678
+ d = {
2679
+ "ProjectId": self.config.project_id,
2680
+ "Region": self.config.region,
2681
+ }
2682
+ req and d.update(req)
2683
+ d = apis.GetNetworkAclTargetResourceRequestSchema().dumps(d)
2684
+
2685
+ resp = self.invoke("GetNetworkAclTargetResource", d, **kwargs)
2686
+ return apis.GetNetworkAclTargetResourceResponseSchema().loads(resp)
2687
+
2688
+ def list_subnet_for_natgw(
2689
+ self, req: typing.Optional[dict] = None, **kwargs
2690
+ ) -> dict:
2691
+ """ListSubnetForNATGW - 展示NAT网关可绑定的子网列表
2692
+
2693
+ **Request**
2694
+
2695
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
2696
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
2697
+ - **VPCId** (str) - NAT网关所属VPC Id。默认值为Default VPC Id
2698
+
2699
+ **Response**
2700
+
2701
+ - **DataSet** (list) - 见 **NatgwSubnetDataSet** 模型定义
2702
+
2703
+ **Response Model**
2704
+
2705
+ **NatgwSubnetDataSet**
2706
+ - **HasNATGW** (bool) - 是否绑定NATGW
2707
+ - **Netmask** (str) - 掩码
2708
+ - **Subnet** (str) - 子网网段
2709
+ - **SubnetId** (str) - 子网id
2710
+ - **SubnetName** (str) - 子网名字
2711
+
2712
+
2713
+ """
2714
+ # build request
2715
+ d = {
2716
+ "ProjectId": self.config.project_id,
2717
+ "Region": self.config.region,
2718
+ }
2719
+ req and d.update(req)
2720
+ d = apis.ListSubnetForNATGWRequestSchema().dumps(d)
2721
+
2722
+ resp = self.invoke("ListSubnetForNATGW", d, **kwargs)
2723
+ return apis.ListSubnetForNATGWResponseSchema().loads(resp)
2724
+
2725
+ def modify_route_rule(
2726
+ self, req: typing.Optional[dict] = None, **kwargs
2727
+ ) -> dict:
2728
+ """ModifyRouteRule - 路由策略增、删、改
2729
+
2730
+ **Request**
2731
+
2732
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
2733
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
2734
+ - **RouteRule** (list) - (Required) 格式: RouteRuleId | 目的网段 | 下一跳类型(支持INSTANCE、VIP) | 下一跳 |优先级(保留字段,填写0即可)| 备注 | 增、删、改标志(add/delete/update) 。"添加"示例: test_id | 10.8.0.0/16 | instance | uhost-xd8ja | 0 | Default Route Rule| add (添加的RouteRuleId填任意非空字符串) 。"删除"示例: routerule-xk3jxa | 10.8.0.0/16 | instance | uhost-xd8ja | 0 | Default Route Rule| delete (RouteRuleId来自DescribeRouteTable中) 。“修改”示例: routerule-xk3jxa | 10.8.0.0/16 | instance | uhost-cjksa2 | 0 | Default Route Rule| update (RouteRuleId来自DescribeRouteTable中)
2735
+ - **RouteTableId** (str) - (Required) 通过DescribeRouteTable拿到
2736
+
2737
+ **Response**
2738
+
2739
+
2740
+ """
2741
+ # build request
2742
+ d = {
2743
+ "ProjectId": self.config.project_id,
2744
+ "Region": self.config.region,
2745
+ }
2746
+ req and d.update(req)
2747
+ d = apis.ModifyRouteRuleRequestSchema().dumps(d)
2748
+
2749
+ resp = self.invoke("ModifyRouteRule", d, **kwargs)
2750
+ return apis.ModifyRouteRuleResponseSchema().loads(resp)
2751
+
2752
+ def move_secondary_ip_mac(
2753
+ self, req: typing.Optional[dict] = None, **kwargs
2754
+ ) -> dict:
2755
+ """MoveSecondaryIPMac - 把 Secondary IP 从旧 MAC 迁移到新 MAC
2756
+
2757
+ **Request**
2758
+
2759
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2760
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2761
+ - **Ip** (str) - (Required) Secondary IP
2762
+ - **NewMac** (str) - (Required) 新 Mac。Secondary IP 迁移的目的 Mac
2763
+ - **OldMac** (str) - (Required) 旧 Mac。Secondary IP 当前所绑定的 Mac
2764
+ - **SubnetId** (str) - (Required) 子网 ID。IP/OldMac/NewMac 三者必须在同一子网
2765
+
2766
+ **Response**
2767
+
2768
+
2769
+ """
2770
+ # build request
2771
+ d = {
2772
+ "ProjectId": self.config.project_id,
2773
+ "Region": self.config.region,
2774
+ }
2775
+ req and d.update(req)
2776
+ d = apis.MoveSecondaryIPMacRequestSchema().dumps(d)
2777
+
2778
+ resp = self.invoke("MoveSecondaryIPMac", d, **kwargs)
2779
+ return apis.MoveSecondaryIPMacResponseSchema().loads(resp)
2780
+
2781
+ def release_vip(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
2782
+ """ReleaseVIP - 释放VIP资源
2783
+
2784
+ **Request**
2785
+
2786
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写
2787
+ - **Region** (str) - (Config) 地域
2788
+ - **VIPId** (str) - (Required) 内网VIP的id
2789
+ - **Zone** (str) - 可用区
2790
+
2791
+ **Response**
2792
+
2793
+
2794
+ """
2795
+ # build request
2796
+ d = {
2797
+ "ProjectId": self.config.project_id,
2798
+ "Region": self.config.region,
2799
+ }
2800
+ req and d.update(req)
2801
+ d = apis.ReleaseVIPRequestSchema().dumps(d)
2802
+
2803
+ resp = self.invoke("ReleaseVIP", d, **kwargs)
2804
+ return apis.ReleaseVIPResponseSchema().loads(resp)
2805
+
2806
+ def set_gw_default_export(
2807
+ self, req: typing.Optional[dict] = None, **kwargs
2808
+ ) -> dict:
2809
+ """SetGwDefaultExport - 设置NAT网关的默认出口
2810
+
2811
+ **Request**
2812
+
2813
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
2814
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
2815
+ - **NATGWId** (str) - (Required) NAT网关Id
2816
+ - **ExportEipId** (str) - NAT网关绑定的EIP Id。ExportIp和ExportEipId必填一个
2817
+ - **ExportIp** (str) - NAT网关绑定的EIP。ExportIp和ExportEipId必填一个
2818
+
2819
+ **Response**
2820
+
2821
+
2822
+ """
2823
+ # build request
2824
+ d = {
2825
+ "ProjectId": self.config.project_id,
2826
+ "Region": self.config.region,
2827
+ }
2828
+ req and d.update(req)
2829
+ d = apis.SetGwDefaultExportRequestSchema().dumps(d)
2830
+
2831
+ resp = self.invoke("SetGwDefaultExport", d, **kwargs)
2832
+ return apis.SetGwDefaultExportResponseSchema().loads(resp)
2833
+
2834
+ def update_natgw_policy(
2835
+ self, req: typing.Optional[dict] = None, **kwargs
2836
+ ) -> dict:
2837
+ """UpdateNATGWPolicy - 更新NAT网关端口转发规则
2838
+
2839
+ **Request**
2840
+
2841
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2842
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2843
+ - **DstIP** (str) - (Required) 目标IP。填写对应的目标IP地址
2844
+ - **DstPort** (str) - (Required) 目标端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535
2845
+ - **NATGWId** (str) - (Required) NAT网关Id
2846
+ - **PolicyId** (str) - (Required) 转发策略Id
2847
+ - **Protocol** (str) - (Required) 协议类型。枚举值为:TCP 、 UDP
2848
+ - **SrcEIPId** (str) - (Required) 源IP。填写对应的EIP Id
2849
+ - **SrcPort** (str) - (Required) 源端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-6553
2850
+ - **PolicyName** (str) - 转发策略名称。默认为空
2851
+
2852
+ **Response**
2853
+
2854
+
2855
+ """
2856
+ # build request
2857
+ d = {
2858
+ "ProjectId": self.config.project_id,
2859
+ "Region": self.config.region,
2860
+ }
2861
+ req and d.update(req)
2862
+ d = apis.UpdateNATGWPolicyRequestSchema().dumps(d)
2863
+
2864
+ resp = self.invoke("UpdateNATGWPolicy", d, **kwargs)
2865
+ return apis.UpdateNATGWPolicyResponseSchema().loads(resp)
2866
+
2867
+ def update_natgw_subnet(
2868
+ self, req: typing.Optional[dict] = None, **kwargs
2869
+ ) -> dict:
2870
+ """UpdateNATGWSubnet - 更新NAT网关绑定的子网
2871
+
2872
+ **Request**
2873
+
2874
+ - **ProjectId** (str) - (Config) 项目Id。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2875
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2876
+ - **NATGWId** (str) - (Required) NAT网关Id
2877
+ - **SubnetworkIds** (list) - NAT网关绑定的子网Id
2878
+
2879
+ **Response**
2880
+
2881
+
2882
+ """
2883
+ # build request
2884
+ d = {
2885
+ "ProjectId": self.config.project_id,
2886
+ "Region": self.config.region,
2887
+ }
2888
+ req and d.update(req)
2889
+ d = apis.UpdateNATGWSubnetRequestSchema().dumps(d)
2890
+
2891
+ resp = self.invoke("UpdateNATGWSubnet", d, **kwargs)
2892
+ return apis.UpdateNATGWSubnetResponseSchema().loads(resp)
2893
+
2894
+ def update_network_acl(
2895
+ self, req: typing.Optional[dict] = None, **kwargs
2896
+ ) -> dict:
2897
+ """UpdateNetworkAcl - 更改ACL
2898
+
2899
+ **Request**
2900
+
2901
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
2902
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
2903
+ - **AclId** (str) - (Required) 需要更改的ACL ID
2904
+ - **AclName** (str) - (Required) Acl的名称
2905
+ - **Description** (str) - (Required) 描述
2906
+
2907
+ **Response**
2908
+
2909
+
2910
+ """
2911
+ # build request
2912
+ d = {
2913
+ "ProjectId": self.config.project_id,
2914
+ "Region": self.config.region,
2915
+ }
2916
+ req and d.update(req)
2917
+ d = apis.UpdateNetworkAclRequestSchema().dumps(d)
2918
+
2919
+ resp = self.invoke("UpdateNetworkAcl", d, **kwargs)
2920
+ return apis.UpdateNetworkAclResponseSchema().loads(resp)
2921
+
2922
+ def update_network_acl_entry(
2923
+ self, req: typing.Optional[dict] = None, **kwargs
2924
+ ) -> dict:
2925
+ """UpdateNetworkAclEntry - 更新ACL的规则
2926
+
2927
+ **Request**
2928
+
2929
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
2930
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
2931
+ - **AclId** (str) - (Required) ACL的ID
2932
+ - **CidrBlock** (str) - (Required) IPv4段的CIDR表示
2933
+ - **Direction** (str) - (Required) 出向或者入向(“Ingress”, "Egress")
2934
+ - **EntryAction** (str) - (Required) 规则的行为("Accept", "Reject")
2935
+ - **EntryId** (str) - (Required) 需要更新的Entry Id
2936
+ - **IpProtocol** (str) - (Required) 针对的协议规则
2937
+ - **PortRange** (str) - (Required) 针对的端口范围
2938
+ - **Priority** (int) - (Required) Entry的优先级,对于同样的Direction来说,不能重复
2939
+ - **Description** (str) - 描述
2940
+ - **TargetResourceIds** (list) - 应用目标资源列表。默认为全部资源生效。TargetType为0时不用填写该值
2941
+ - **TargetType** (int) - 应用目标类型。0代表“子网内全部资源”, 1代表“子网内指定资源”。默认为0
2942
+
2943
+ **Response**
2944
+
2945
+
2946
+ """
2947
+ # build request
2948
+ d = {
2949
+ "ProjectId": self.config.project_id,
2950
+ "Region": self.config.region,
2951
+ }
2952
+ req and d.update(req)
2953
+ d = apis.UpdateNetworkAclEntryRequestSchema().dumps(d)
2954
+
2955
+ resp = self.invoke("UpdateNetworkAclEntry", d, **kwargs)
2956
+ return apis.UpdateNetworkAclEntryResponseSchema().loads(resp)
2957
+
2958
+ def update_network_interface_default_output(
2959
+ self, req: typing.Optional[dict] = None, **kwargs
2960
+ ) -> dict:
2961
+ """UpdateNetworkInterfaceDefaultOutput - 更新虚拟网卡默认出口(仅用于开启EIP网卡可见模式的虚拟网卡)
2962
+
2963
+ **Request**
2964
+
2965
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
2966
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2967
+ - **InterfaceId** (str) - (Required) 虚拟网卡Id
2968
+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
2969
+ - **Output** (str) - 出口IP
2970
+
2971
+ **Response**
2972
+
2973
+ - **Message** (str) - 返回信息
2974
+
2975
+ """
2976
+ # build request
2977
+ d = {
2978
+ "ProjectId": self.config.project_id,
2979
+ "Region": self.config.region,
2980
+ }
2981
+ req and d.update(req)
2982
+ d = apis.UpdateNetworkInterfaceDefaultOutputRequestSchema().dumps(d)
2983
+
2984
+ resp = self.invoke("UpdateNetworkInterfaceDefaultOutput", d, **kwargs)
2985
+ return apis.UpdateNetworkInterfaceDefaultOutputResponseSchema().loads(
2986
+ resp
2987
+ )
2988
+
2989
+ def update_route_table_attribute(
2990
+ self, req: typing.Optional[dict] = None, **kwargs
2991
+ ) -> dict:
2992
+ """UpdateRouteTableAttribute - 更新路由表基本信息
2993
+
2994
+ **Request**
2995
+
2996
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
2997
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
2998
+ - **RouteTableId** (str) - (Required) 路由表ID
2999
+ - **Name** (str) - 名称
3000
+ - **Remark** (str) - 备注
3001
+ - **Tag** (str) - 业务组名称
3002
+
3003
+ **Response**
3004
+
3005
+
3006
+ """
3007
+ # build request
3008
+ d = {
3009
+ "ProjectId": self.config.project_id,
3010
+ "Region": self.config.region,
3011
+ }
3012
+ req and d.update(req)
3013
+ d = apis.UpdateRouteTableAttributeRequestSchema().dumps(d)
3014
+
3015
+ resp = self.invoke("UpdateRouteTableAttribute", d, **kwargs)
3016
+ return apis.UpdateRouteTableAttributeResponseSchema().loads(resp)
3017
+
3018
+ def update_sec_group(
3019
+ self, req: typing.Optional[dict] = None, **kwargs
3020
+ ) -> dict:
3021
+ """UpdateSecGroup - 更新安全组基本信息
3022
+
3023
+ **Request**
3024
+
3025
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
3026
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
3027
+ - **SecGroupId** (str) - (Required) 安全组资源ID数组。不支持 .n 格式。Type 为 string 数组。
3028
+ - **Name** (str) - 安全组名称,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上
3029
+ - **Remark** (str) - 安全组备注,默认为空,为空则不做修改。Name,Tag,Remark必须填写1个及以上
3030
+
3031
+ **Response**
3032
+
3033
+
3034
+ """
3035
+ # build request
3036
+ d = {
3037
+ "ProjectId": self.config.project_id,
3038
+ "Region": self.config.region,
3039
+ }
3040
+ req and d.update(req)
3041
+ d = apis.UpdateSecGroupRequestSchema().dumps(d)
3042
+
3043
+ resp = self.invoke("UpdateSecGroup", d, **kwargs)
3044
+ return apis.UpdateSecGroupResponseSchema().loads(resp)
3045
+
3046
+ def update_sec_group_association(
3047
+ self, req: typing.Optional[dict] = None, **kwargs
3048
+ ) -> dict:
3049
+ """UpdateSecGroupAssociation - 仅对操作的安全组ID生效,其他已有的绑定关系不受影响。
3050
+
3051
+ **Request**
3052
+
3053
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
3054
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
3055
+ - **OldSecGroupId** (list) - (Required) 被替换的安全组ID。支持数组格式,即为 string 数组。
3056
+ - **ResourceId** (str) - (Required) 资源ID
3057
+ - **NewPrioritySecGroup** (list) - 见 **UpdateSecGroupAssociationParamNewPrioritySecGroup** 模型定义
3058
+
3059
+ **Response**
3060
+
3061
+
3062
+ **Request Model**
3063
+
3064
+ **UpdateSecGroupAssociationParamNewPrioritySecGroup**
3065
+ - **Priority** (int) - 新绑定安全组的绑定优先级。支持 NewPrioritySecGroup 为数组格式,即传对应数据的 JSON 格式数组。
3066
+ - **SecGroupId** (str) - 需新绑定的安全组ID
3067
+
3068
+
3069
+ """
3070
+ # build request
3071
+ d = {
3072
+ "ProjectId": self.config.project_id,
3073
+ "Region": self.config.region,
3074
+ }
3075
+ req and d.update(req)
3076
+ d = apis.UpdateSecGroupAssociationRequestSchema().dumps(d)
3077
+
3078
+ resp = self.invoke("UpdateSecGroupAssociation", d, **kwargs)
3079
+ return apis.UpdateSecGroupAssociationResponseSchema().loads(resp)
3080
+
3081
+ def update_sec_group_rule(
3082
+ self, req: typing.Optional[dict] = None, **kwargs
3083
+ ) -> dict:
3084
+ """UpdateSecGroupRule -
3085
+
3086
+ **Request**
3087
+
3088
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
3089
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
3090
+ - **SecGroupId** (str) - (Required) 规则所属得安全组 ID。
3091
+ - **Rule** (list) - 见 **UpdateSecGroupRuleParamRule** 模型定义
3092
+
3093
+ **Response**
3094
+
3095
+
3096
+ **Request Model**
3097
+
3098
+ **UpdateSecGroupRuleParamRule**
3099
+ - **Direction** (str) - "Ingress/Egress",入站规则/出站规则
3100
+ - **DstPort** (str) - 目的端口。逗号分隔,如 "80,443"、"443,2000-10000"
3101
+ - **IPRange** (str) - IP 地址信息,逗号分隔。
3102
+ - **IPVersion** (str) - IP 版本,如 “IPv4”。支持 IPv6 后废弃
3103
+ - **Priority** (int) - 规则优先级。范围为 1~200
3104
+ - **ProtocolType** (str) - 协议类型。"TCP","UDP","ICMP","ICMPv6","ALL"
3105
+ - **Remark** (str) - 规则备注
3106
+ - **RuleAction** (str) - 规则行为。"Accept" 或 "Drop"
3107
+ - **RuleId** (str) - 规则 ID
3108
+
3109
+
3110
+ """
3111
+ # build request
3112
+ d = {
3113
+ "ProjectId": self.config.project_id,
3114
+ "Region": self.config.region,
3115
+ }
3116
+ req and d.update(req)
3117
+ d = apis.UpdateSecGroupRuleRequestSchema().dumps(d)
3118
+
3119
+ resp = self.invoke("UpdateSecGroupRule", d, **kwargs)
3120
+ return apis.UpdateSecGroupRuleResponseSchema().loads(resp)
3121
+
3122
+ def update_snat_rule(
3123
+ self, req: typing.Optional[dict] = None, **kwargs
3124
+ ) -> dict:
3125
+ """UpdateSnatRule - 更新指定的出口规则(SNAT规则)
3126
+
3127
+ **Request**
3128
+
3129
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
3130
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
3131
+ - **NATGWId** (str) - (Required) NAT网关的ID,
3132
+ - **SnatIp** (str) - (Required) EIP的ip地址,例如106.75.xx.xx
3133
+ - **SourceIp** (str) - (Required) 需要出外网的私网IP地址,例如10.9.7.xx
3134
+ - **Name** (str) - snat名称,即出口规则名称
3135
+
3136
+ **Response**
3137
+
3138
+
3139
+ """
3140
+ # build request
3141
+ d = {
3142
+ "ProjectId": self.config.project_id,
3143
+ "Region": self.config.region,
3144
+ }
3145
+ req and d.update(req)
3146
+ d = apis.UpdateSnatRuleRequestSchema().dumps(d)
3147
+
3148
+ resp = self.invoke("UpdateSnatRule", d, **kwargs)
3149
+ return apis.UpdateSnatRuleResponseSchema().loads(resp)
3150
+
3151
+ def update_subnet_attribute(
3152
+ self, req: typing.Optional[dict] = None, **kwargs
3153
+ ) -> dict:
3154
+ """UpdateSubnetAttribute - 更新子网信息
3155
+
3156
+ **Request**
3157
+
3158
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
3159
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
3160
+ - **SubnetId** (str) - (Required) 子网ID
3161
+ - **Name** (str) - 子网名称(如果Name不填写,Tag必须填写)
3162
+ - **Tag** (str) - 业务组名称(如果Tag不填写,Name必须填写)
3163
+
3164
+ **Response**
3165
+
3166
+
3167
+ """
3168
+ # build request
3169
+ d = {
3170
+ "ProjectId": self.config.project_id,
3171
+ "Region": self.config.region,
3172
+ }
3173
+ req and d.update(req)
3174
+ d = apis.UpdateSubnetAttributeRequestSchema().dumps(d)
3175
+
3176
+ resp = self.invoke("UpdateSubnetAttribute", d, **kwargs)
3177
+ return apis.UpdateSubnetAttributeResponseSchema().loads(resp)
3178
+
3179
+ def update_vip_attribute(
3180
+ self, req: typing.Optional[dict] = None, **kwargs
3181
+ ) -> dict:
3182
+ """UpdateVIPAttribute - 更新VIP信息
3183
+
3184
+ **Request**
3185
+
3186
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
3187
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
3188
+ - **VIPId** (str) - (Required) 内网VIP的资源Id
3189
+ - **Name** (str) - 内网VIP的名称
3190
+ - **Remark** (str) - 内网VIP的备注
3191
+ - **Tag** (str) - 内网VIP所属的业务组
3192
+
3193
+ **Response**
3194
+
3195
+
3196
+ """
3197
+ # build request
3198
+ d = {
3199
+ "ProjectId": self.config.project_id,
3200
+ "Region": self.config.region,
3201
+ }
3202
+ req and d.update(req)
3203
+ d = apis.UpdateVIPAttributeRequestSchema().dumps(d)
3204
+
3205
+ resp = self.invoke("UpdateVIPAttribute", d, **kwargs)
3206
+ return apis.UpdateVIPAttributeResponseSchema().loads(resp)
3207
+
3208
+ def update_vpc_network(
3209
+ self, req: typing.Optional[dict] = None, **kwargs
3210
+ ) -> dict:
3211
+ """UpdateVPCNetwork - 更新VPC网段
3212
+
3213
+ **Request**
3214
+
3215
+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
3216
+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist.html>`_
3217
+ - **Network** (list) - (Required) 需要保留的VPC网段。当前仅支持删除VPC网段,添加网段请参考 `AddVPCNetwork <https://docs.ucloud.cn/api/vpc2.0-api/add_vpc_network>`_
3218
+ - **VPCId** (str) - (Required) VPC的ID
3219
+
3220
+ **Response**
3221
+
3222
+
3223
+ """
3224
+ # build request
3225
+ d = {
3226
+ "ProjectId": self.config.project_id,
3227
+ "Region": self.config.region,
3228
+ }
3229
+ req and d.update(req)
3230
+ d = apis.UpdateVPCNetworkRequestSchema().dumps(d)
3231
+
3232
+ resp = self.invoke("UpdateVPCNetwork", d, **kwargs)
3233
+ return apis.UpdateVPCNetworkResponseSchema().loads(resp)