csn_api.py 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. # !/usr/bin/env python
  2. # coding=UTF-8
  3. #
  4. # Copyright 2023 Baidu, Inc.
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
  7. # the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
  12. # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  13. # specific language governing permissions and limitations under the License.
  14. """
  15. This module provides a api config list for csn.
  16. """
  17. from baidubce.http import http_methods
  18. csn_apis = {
  19. "attach_instance": {
  20. "method": http_methods.PUT,
  21. "path": "/v1/csn/[csnId]",
  22. "queries": {
  23. },
  24. "headers": {
  25. }
  26. },
  27. "bind_csn_bp": {
  28. "method": http_methods.PUT,
  29. "path": "/v1/csn/bp/[csnBpId]",
  30. "queries": {
  31. },
  32. "headers": {
  33. }
  34. },
  35. "create_association": {
  36. "method": http_methods.POST,
  37. "path": "/v1/csn/routeTable/[csnRtId]/association",
  38. "queries": {
  39. },
  40. "headers": {
  41. }
  42. },
  43. "create_csn": {
  44. "method": http_methods.POST,
  45. "path": "/v1/csn",
  46. "queries": {
  47. "client_token": None
  48. },
  49. "headers": {
  50. }
  51. },
  52. "create_csn_bp": {
  53. "method": http_methods.POST,
  54. "path": "/v1/csn/bp",
  55. "queries": {
  56. "client_token": None
  57. },
  58. "headers": {
  59. }
  60. },
  61. "create_csn_bp_limit": {
  62. "method": http_methods.POST,
  63. "path": "/v1/csn/bp/[csnBpId]/limit",
  64. "queries": {
  65. },
  66. "headers": {
  67. }
  68. },
  69. "create_propagation": {
  70. "method": http_methods.POST,
  71. "path": "/v1/csn/routeTable/[csnRtId]/propagation",
  72. "queries": {
  73. "client_token": None
  74. },
  75. "headers": {
  76. }
  77. },
  78. "create_route_rule": {
  79. "method": http_methods.POST,
  80. "path": "/v1/csn/routeTable/[csnRtId]/rule",
  81. "queries": {
  82. "client_token": None
  83. },
  84. "headers": {
  85. }
  86. },
  87. "delete_association": {
  88. "method": http_methods.DELETE,
  89. "path": "/v1/csn/routeTable/[csnRtId]/association/[attachId]",
  90. "queries": {
  91. "client_token": None
  92. },
  93. "headers": {
  94. }
  95. },
  96. "delete_csn": {
  97. "method": http_methods.DELETE,
  98. "path": "/v1/csn/[csnId]",
  99. "queries": {
  100. "client_token": None
  101. },
  102. "headers": {
  103. }
  104. },
  105. "delete_csn_bp": {
  106. "method": http_methods.DELETE,
  107. "path": "/v1/csn/bp/[csnBpId]",
  108. "queries": {
  109. "client_token": None
  110. },
  111. "headers": {
  112. }
  113. },
  114. "delete_csn_bp_limit": {
  115. "method": http_methods.POST,
  116. "path": "/v1/csn/bp/[csnBpId]/limit/delete",
  117. "queries": {
  118. "client_token": None
  119. },
  120. "headers": {
  121. }
  122. },
  123. "delete_propagation": {
  124. "method": http_methods.DELETE,
  125. "path": "/v1/csn/routeTable/[csnRtId]/propagation/[attachId]",
  126. "queries": {
  127. "client_token": None
  128. },
  129. "headers": {
  130. }
  131. },
  132. "delete_route_rule": {
  133. "method": http_methods.DELETE,
  134. "path": "/v1/csn/routeTable/[csnRtId]/rule/[csnRtRuleId]",
  135. "queries": {
  136. "client_token": None
  137. },
  138. "headers": {
  139. }
  140. },
  141. "detach_instance": {
  142. "method": http_methods.PUT,
  143. "path": "/v1/csn/[csnId]",
  144. "queries": {
  145. },
  146. "headers": {
  147. }
  148. },
  149. "get_csn": {
  150. "method": http_methods.GET,
  151. "path": "/v1/csn/[csnId]",
  152. "queries": {
  153. },
  154. "headers": {
  155. }
  156. },
  157. "get_csn_bp": {
  158. "method": http_methods.GET,
  159. "path": "/v1/csn/bp/[csnBpId]",
  160. "queries": {
  161. },
  162. "headers": {
  163. }
  164. },
  165. "get_csn_bp_price": {
  166. "method": http_methods.POST,
  167. "path": "/v1/csn/bp/price",
  168. "queries":{
  169. },
  170. "headers":{
  171. }
  172. },
  173. "list_association": {
  174. "method": http_methods.GET,
  175. "path": "/v1/csn/routeTable/[csnRtId]/association",
  176. "queries": {
  177. },
  178. "headers": {
  179. }
  180. },
  181. "list_csn": {
  182. "method": http_methods.GET,
  183. "path": "/v1/csn",
  184. "queries": {
  185. "marker": None,
  186. "max_keys": None
  187. },
  188. "headers": {
  189. }
  190. },
  191. "list_csn_bp": {
  192. "method": http_methods.GET,
  193. "path": "/v1/csn/bp",
  194. "queries": {
  195. "marker": None,
  196. "max_keys": None
  197. },
  198. "headers": {
  199. }
  200. },
  201. "list_csn_bp_limit": {
  202. "method": http_methods.GET,
  203. "path": "/v1/csn/bp/[csnBpId]/limit",
  204. "queries": {
  205. },
  206. "headers": {
  207. }
  208. },
  209. "list_csn_bp_limit_by_csn_id": {
  210. "method": http_methods.GET,
  211. "path": "/v1/csn/[csnId]/bp/limit",
  212. "queries": {
  213. },
  214. "headers": {
  215. }
  216. },
  217. "list_instance": {
  218. "method": http_methods.GET,
  219. "path": "/v1/csn/[csnId]/instance",
  220. "queries": {
  221. "marker": None,
  222. "max_keys": None
  223. },
  224. "headers": {
  225. }
  226. },
  227. "list_propagation": {
  228. "method": http_methods.GET,
  229. "path": "/v1/csn/routeTable/[csnRtId]/propagation",
  230. "queries": {
  231. },
  232. "headers": {
  233. }
  234. },
  235. "list_route_rule": {
  236. "method": http_methods.GET,
  237. "path": "/v1/csn/routeTable/[csnRtId]/rule",
  238. "queries": {
  239. "marker": None,
  240. "max_keys": None
  241. },
  242. "headers": {
  243. }
  244. },
  245. "list_route_table": {
  246. "method": http_methods.GET,
  247. "path": "/v1/csn/[csnId]/routeTable",
  248. "queries": {
  249. "marker": None,
  250. "max_keys": None
  251. },
  252. "headers": {
  253. }
  254. },
  255. "list_tgw": {
  256. "method": http_methods.GET,
  257. "path": "/v1/csn/[csnId]/tgw",
  258. "queries": {
  259. "marker": None,
  260. "max_keys": None
  261. },
  262. "headers": {
  263. }
  264. },
  265. "list_tgw_rule": {
  266. "method": http_methods.GET,
  267. "path": "/v1/csn/[csnId]/tgw/[tgwId]/rule",
  268. "queries": {
  269. "marker": None,
  270. "max_keys": None
  271. },
  272. "headers": {
  273. }
  274. },
  275. "resize_csn_bp": {
  276. "method": http_methods.PUT,
  277. "path": "/v1/csn/bp/[csnBpId]",
  278. "queries": {
  279. "client_token": None
  280. },
  281. "headers": {
  282. }
  283. },
  284. "unbind_csn_bp": {
  285. "method": http_methods.PUT,
  286. "path": "/v1/csn/bp/[csnBpId]",
  287. "queries": {
  288. "client_token": None
  289. },
  290. "headers": {
  291. }
  292. },
  293. "update_csn": {
  294. "method": http_methods.PUT,
  295. "path": "/v1/csn/[csnId]",
  296. "queries": {
  297. "client_token": None
  298. },
  299. "headers": {
  300. }
  301. },
  302. "update_csn_bp": {
  303. "method": http_methods.PUT,
  304. "path": "/v1/csn/bp/[csnBpId]",
  305. "queries": {
  306. "client_token": None
  307. },
  308. "headers": {
  309. }
  310. },
  311. "update_csn_bp_limit": {
  312. "method": http_methods.PUT,
  313. "path": "/v1/csn/bp/[csnBpId]/limit",
  314. "queries": {
  315. "client_token": None
  316. },
  317. "headers": {
  318. }
  319. },
  320. "update_tgw": {
  321. "method": http_methods.PUT,
  322. "path": "/v1/csn/[csnId]/tgw/[tgwId]",
  323. "queries": {
  324. },
  325. "headers": {
  326. }
  327. }
  328. }