catocli 2.0.3__py3-none-any.whl → 2.0.5__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.

Potentially problematic release.


This version of catocli might be problematic. Click here for more details.

Files changed (291) hide show
  1. build/lib/catocli/Utils/clidriver.py +268 -0
  2. build/lib/catocli/Utils/profile_manager.py +188 -0
  3. build/lib/catocli/Utils/version_checker.py +192 -0
  4. build/lib/catocli/__init__.py +2 -0
  5. build/lib/catocli/__main__.py +12 -0
  6. build/lib/catocli/parsers/configure/__init__.py +115 -0
  7. build/lib/catocli/parsers/configure/configure.py +307 -0
  8. build/lib/catocli/parsers/custom/__init__.py +57 -0
  9. build/lib/catocli/parsers/custom/customLib.py +561 -0
  10. build/lib/catocli/parsers/custom/export_rules/__init__.py +42 -0
  11. build/lib/catocli/parsers/custom/export_rules/export_rules.py +234 -0
  12. build/lib/catocli/parsers/custom/export_sites/__init__.py +21 -0
  13. build/lib/catocli/parsers/custom/export_sites/export_sites.py +372 -0
  14. build/lib/catocli/parsers/custom/import_rules_to_tf/__init__.py +58 -0
  15. build/lib/catocli/parsers/custom/import_rules_to_tf/import_rules_to_tf.py +451 -0
  16. build/lib/catocli/parsers/custom/import_sites_to_tf/__init__.py +45 -0
  17. build/lib/catocli/parsers/custom/import_sites_to_tf/import_sites_to_tf.py +891 -0
  18. build/lib/catocli/parsers/mutation_accountManagement/__init__.py +48 -0
  19. build/lib/catocli/parsers/mutation_admin/__init__.py +48 -0
  20. build/lib/catocli/parsers/mutation_container/__init__.py +138 -0
  21. build/lib/catocli/parsers/mutation_hardware/__init__.py +22 -0
  22. build/lib/catocli/parsers/mutation_policy/__init__.py +1305 -0
  23. build/lib/catocli/parsers/mutation_sandbox/__init__.py +35 -0
  24. build/lib/catocli/parsers/mutation_site/__init__.py +373 -0
  25. build/lib/catocli/parsers/mutation_sites/__init__.py +373 -0
  26. build/lib/catocli/parsers/mutation_xdr/__init__.py +48 -0
  27. build/lib/catocli/parsers/parserApiClient.py +513 -0
  28. build/lib/catocli/parsers/query_accountBySubdomain/__init__.py +16 -0
  29. build/lib/catocli/parsers/query_accountManagement/__init__.py +16 -0
  30. build/lib/catocli/parsers/query_accountMetrics/__init__.py +16 -0
  31. build/lib/catocli/parsers/query_accountRoles/__init__.py +16 -0
  32. build/lib/catocli/parsers/query_accountSnapshot/__init__.py +16 -0
  33. build/lib/catocli/parsers/query_admin/__init__.py +16 -0
  34. build/lib/catocli/parsers/query_admins/__init__.py +16 -0
  35. build/lib/catocli/parsers/query_appStats/__init__.py +16 -0
  36. build/lib/catocli/parsers/query_appStatsTimeSeries/__init__.py +16 -0
  37. build/lib/catocli/parsers/query_auditFeed/__init__.py +16 -0
  38. build/lib/catocli/parsers/query_catalogs/__init__.py +16 -0
  39. build/lib/catocli/parsers/query_container/__init__.py +16 -0
  40. build/lib/catocli/parsers/query_devices/__init__.py +16 -0
  41. build/lib/catocli/parsers/query_entityLookup/__init__.py +16 -0
  42. build/lib/catocli/parsers/query_events/__init__.py +16 -0
  43. build/lib/catocli/parsers/query_eventsFeed/__init__.py +16 -0
  44. build/lib/catocli/parsers/query_eventsTimeSeries/__init__.py +16 -0
  45. build/lib/catocli/parsers/query_hardware/__init__.py +16 -0
  46. build/lib/catocli/parsers/query_hardwareManagement/__init__.py +16 -0
  47. build/lib/catocli/parsers/query_licensing/__init__.py +16 -0
  48. build/lib/catocli/parsers/query_policy/__init__.py +161 -0
  49. build/lib/catocli/parsers/query_sandbox/__init__.py +16 -0
  50. build/lib/catocli/parsers/query_site/__init__.py +100 -0
  51. build/lib/catocli/parsers/query_siteLocation/__init__.py +13 -0
  52. build/lib/catocli/parsers/query_subDomains/__init__.py +16 -0
  53. build/lib/catocli/parsers/query_xdr/__init__.py +35 -0
  54. build/lib/catocli/parsers/raw/__init__.py +12 -0
  55. build/lib/graphql_client/__init__.py +11 -0
  56. build/lib/graphql_client/api/__init__.py +3 -0
  57. build/lib/graphql_client/api/call_api.py +84 -0
  58. build/lib/graphql_client/api_client.py +192 -0
  59. build/lib/graphql_client/api_client_types.py +409 -0
  60. build/lib/graphql_client/configuration.py +232 -0
  61. build/lib/graphql_client/models/__init__.py +13 -0
  62. build/lib/graphql_client/models/no_schema.py +71 -0
  63. build/lib/schema/catolib.py +1141 -0
  64. build/lib/schema/importSchema.py +60 -0
  65. build/lib/schema/remove_policyid.py +89 -0
  66. build/lib/schema/remove_policyid_mutations.py +89 -0
  67. build/lib/scripts/catolib.py +62 -0
  68. build/lib/scripts/export_if_rules_to_json.py +188 -0
  69. build/lib/scripts/export_wf_rules_to_json.py +111 -0
  70. build/lib/scripts/import_wf_rules_to_tfstate.py +331 -0
  71. build/lib/vendor/certifi/__init__.py +4 -0
  72. build/lib/vendor/certifi/__main__.py +12 -0
  73. build/lib/vendor/certifi/core.py +114 -0
  74. build/lib/vendor/certifi/py.typed +0 -0
  75. build/lib/vendor/six.py +998 -0
  76. build/lib/vendor/urllib3/__init__.py +211 -0
  77. build/lib/vendor/urllib3/_base_connection.py +172 -0
  78. build/lib/vendor/urllib3/_collections.py +483 -0
  79. build/lib/vendor/urllib3/_request_methods.py +278 -0
  80. build/lib/vendor/urllib3/_version.py +16 -0
  81. build/lib/vendor/urllib3/connection.py +1033 -0
  82. build/lib/vendor/urllib3/connectionpool.py +1182 -0
  83. build/lib/vendor/urllib3/contrib/__init__.py +0 -0
  84. build/lib/vendor/urllib3/contrib/emscripten/__init__.py +18 -0
  85. build/lib/vendor/urllib3/contrib/emscripten/connection.py +254 -0
  86. build/lib/vendor/urllib3/contrib/emscripten/fetch.py +418 -0
  87. build/lib/vendor/urllib3/contrib/emscripten/request.py +22 -0
  88. build/lib/vendor/urllib3/contrib/emscripten/response.py +285 -0
  89. build/lib/vendor/urllib3/contrib/pyopenssl.py +552 -0
  90. build/lib/vendor/urllib3/contrib/socks.py +228 -0
  91. build/lib/vendor/urllib3/exceptions.py +321 -0
  92. build/lib/vendor/urllib3/fields.py +341 -0
  93. build/lib/vendor/urllib3/filepost.py +89 -0
  94. build/lib/vendor/urllib3/http2/__init__.py +53 -0
  95. build/lib/vendor/urllib3/http2/connection.py +356 -0
  96. build/lib/vendor/urllib3/http2/probe.py +87 -0
  97. build/lib/vendor/urllib3/poolmanager.py +637 -0
  98. build/lib/vendor/urllib3/py.typed +2 -0
  99. build/lib/vendor/urllib3/response.py +1265 -0
  100. build/lib/vendor/urllib3/util/__init__.py +42 -0
  101. build/lib/vendor/urllib3/util/connection.py +137 -0
  102. build/lib/vendor/urllib3/util/proxy.py +43 -0
  103. build/lib/vendor/urllib3/util/request.py +256 -0
  104. build/lib/vendor/urllib3/util/response.py +101 -0
  105. build/lib/vendor/urllib3/util/retry.py +533 -0
  106. build/lib/vendor/urllib3/util/ssl_.py +513 -0
  107. build/lib/vendor/urllib3/util/ssl_match_hostname.py +159 -0
  108. build/lib/vendor/urllib3/util/ssltransport.py +276 -0
  109. build/lib/vendor/urllib3/util/timeout.py +275 -0
  110. build/lib/vendor/urllib3/util/url.py +471 -0
  111. build/lib/vendor/urllib3/util/util.py +42 -0
  112. build/lib/vendor/urllib3/util/wait.py +124 -0
  113. catocli/Utils/clidriver.py +1 -4
  114. catocli/__init__.py +1 -1
  115. catocli/parsers/custom/export_rules/__init__.py +2 -0
  116. catocli/parsers/custom/export_rules/export_rules.py +29 -5
  117. catocli/parsers/custom/export_sites/__init__.py +1 -0
  118. catocli/parsers/custom/export_sites/export_sites.py +10 -3
  119. catocli/parsers/mutation_container/__init__.py +116 -0
  120. catocli/parsers/mutation_container_fqdn/README.md +7 -0
  121. catocli/parsers/mutation_container_fqdn_addValues/README.md +17 -0
  122. catocli/parsers/mutation_container_fqdn_createFromFile/README.md +17 -0
  123. catocli/parsers/mutation_container_fqdn_removeValues/README.md +17 -0
  124. catocli/parsers/mutation_container_fqdn_updateFromFile/README.md +17 -0
  125. catocli/parsers/mutation_container_ipAddressRange/README.md +7 -0
  126. catocli/parsers/mutation_container_ipAddressRange_addValues/README.md +17 -0
  127. catocli/parsers/mutation_container_ipAddressRange_createFromFile/README.md +17 -0
  128. catocli/parsers/mutation_container_ipAddressRange_removeValues/README.md +17 -0
  129. catocli/parsers/mutation_container_ipAddressRange_updateFromFile/README.md +17 -0
  130. catocli/parsers/mutation_policy_internetFirewall_addRule/README.md +1 -1
  131. catocli/parsers/mutation_policy_internetFirewall_updateRule/README.md +1 -1
  132. catocli/parsers/mutation_policy_wanFirewall_addRule/README.md +1 -1
  133. catocli/parsers/mutation_policy_wanFirewall_updateRule/README.md +1 -1
  134. catocli/parsers/parserApiClient.py +183 -7
  135. catocli/parsers/query_policy/README.md +0 -17
  136. catocli/parsers/query_policy/__init__.py +153 -8
  137. catocli/parsers/query_policy_appTenantRestriction/README.md +7 -0
  138. catocli/parsers/query_policy_appTenantRestriction_policy/README.md +17 -0
  139. catocli/parsers/query_policy_dynamicIpAllocation/README.md +7 -0
  140. catocli/parsers/query_policy_dynamicIpAllocation_policy/README.md +17 -0
  141. catocli/parsers/query_policy_internetFirewall/README.md +7 -0
  142. catocli/parsers/query_policy_internetFirewall_policy/README.md +17 -0
  143. catocli/parsers/query_policy_remotePortFwd/README.md +7 -0
  144. catocli/parsers/query_policy_remotePortFwd_policy/README.md +17 -0
  145. catocli/parsers/query_policy_socketLan/README.md +7 -0
  146. catocli/parsers/query_policy_socketLan_policy/README.md +17 -0
  147. catocli/parsers/query_policy_terminalServer/README.md +7 -0
  148. catocli/parsers/query_policy_terminalServer_policy/README.md +17 -0
  149. catocli/parsers/query_policy_wanFirewall/README.md +7 -0
  150. catocli/parsers/query_policy_wanFirewall_policy/README.md +17 -0
  151. catocli/parsers/query_policy_wanNetwork/README.md +7 -0
  152. catocli/parsers/query_policy_wanNetwork_policy/README.md +17 -0
  153. catocli/parsers/query_site/README.md +0 -16
  154. catocli/parsers/query_site/__init__.py +92 -8
  155. catocli/parsers/query_site_availableVersionList/README.md +17 -0
  156. catocli/parsers/query_site_bgpPeer/README.md +17 -0
  157. catocli/parsers/query_site_bgpPeerList/README.md +17 -0
  158. catocli/parsers/query_site_cloudInterconnectConnectionConnectivity/README.md +17 -0
  159. catocli/parsers/query_site_cloudInterconnectPhysicalConnection/README.md +17 -0
  160. catocli/parsers/query_site_cloudInterconnectPhysicalConnectionId/README.md +17 -0
  161. catocli/parsers/query_site_siteBgpStatus/README.md +17 -0
  162. {catocli-2.0.3.dist-info → catocli-2.0.5.dist-info}/METADATA +1 -1
  163. {catocli-2.0.3.dist-info → catocli-2.0.5.dist-info}/RECORD +291 -121
  164. {catocli-2.0.3.dist-info → catocli-2.0.5.dist-info}/top_level.txt +1 -0
  165. graphql_client/api/call_api.py +4 -3
  166. models/mutation.container.fqdn.addValues.json +866 -0
  167. models/mutation.container.fqdn.createFromFile.json +819 -0
  168. models/mutation.container.fqdn.removeValues.json +866 -0
  169. models/mutation.container.fqdn.updateFromFile.json +1045 -0
  170. models/mutation.container.ipAddressRange.addValues.json +1020 -0
  171. models/mutation.container.ipAddressRange.createFromFile.json +819 -0
  172. models/mutation.container.ipAddressRange.removeValues.json +1020 -0
  173. models/mutation.container.ipAddressRange.updateFromFile.json +1045 -0
  174. models/mutation.policy.appTenantRestriction.addRule.json +8 -8
  175. models/mutation.policy.appTenantRestriction.addSection.json +1 -1
  176. models/mutation.policy.appTenantRestriction.createPolicyRevision.json +2 -2
  177. models/mutation.policy.appTenantRestriction.discardPolicyRevision.json +2 -2
  178. models/mutation.policy.appTenantRestriction.moveRule.json +2 -2
  179. models/mutation.policy.appTenantRestriction.moveSection.json +1 -1
  180. models/mutation.policy.appTenantRestriction.publishPolicyRevision.json +2 -2
  181. models/mutation.policy.appTenantRestriction.removeRule.json +2 -2
  182. models/mutation.policy.appTenantRestriction.removeSection.json +1 -1
  183. models/mutation.policy.appTenantRestriction.updatePolicy.json +2 -2
  184. models/mutation.policy.appTenantRestriction.updateRule.json +8 -8
  185. models/mutation.policy.appTenantRestriction.updateSection.json +1 -1
  186. models/mutation.policy.dynamicIpAllocation.addRule.json +1 -1
  187. models/mutation.policy.dynamicIpAllocation.addSection.json +1 -1
  188. models/mutation.policy.dynamicIpAllocation.createPolicyRevision.json +1 -1
  189. models/mutation.policy.dynamicIpAllocation.discardPolicyRevision.json +1 -1
  190. models/mutation.policy.dynamicIpAllocation.moveRule.json +1 -1
  191. models/mutation.policy.dynamicIpAllocation.moveSection.json +1 -1
  192. models/mutation.policy.dynamicIpAllocation.publishPolicyRevision.json +1 -1
  193. models/mutation.policy.dynamicIpAllocation.removeRule.json +1 -1
  194. models/mutation.policy.dynamicIpAllocation.removeSection.json +1 -1
  195. models/mutation.policy.dynamicIpAllocation.updatePolicy.json +1 -1
  196. models/mutation.policy.dynamicIpAllocation.updateRule.json +1 -1
  197. models/mutation.policy.dynamicIpAllocation.updateSection.json +1 -1
  198. models/mutation.policy.internetFirewall.addRule.json +502 -55
  199. models/mutation.policy.internetFirewall.addSection.json +1 -1
  200. models/mutation.policy.internetFirewall.createPolicyRevision.json +127 -10
  201. models/mutation.policy.internetFirewall.discardPolicyRevision.json +127 -10
  202. models/mutation.policy.internetFirewall.moveRule.json +127 -10
  203. models/mutation.policy.internetFirewall.moveSection.json +1 -1
  204. models/mutation.policy.internetFirewall.publishPolicyRevision.json +127 -10
  205. models/mutation.policy.internetFirewall.removeRule.json +127 -10
  206. models/mutation.policy.internetFirewall.removeSection.json +1 -1
  207. models/mutation.policy.internetFirewall.updatePolicy.json +127 -10
  208. models/mutation.policy.internetFirewall.updateRule.json +493 -55
  209. models/mutation.policy.internetFirewall.updateSection.json +1 -1
  210. models/mutation.policy.remotePortFwd.addRule.json +5 -5
  211. models/mutation.policy.remotePortFwd.addSection.json +1 -1
  212. models/mutation.policy.remotePortFwd.createPolicyRevision.json +2 -2
  213. models/mutation.policy.remotePortFwd.discardPolicyRevision.json +2 -2
  214. models/mutation.policy.remotePortFwd.moveRule.json +2 -2
  215. models/mutation.policy.remotePortFwd.moveSection.json +1 -1
  216. models/mutation.policy.remotePortFwd.publishPolicyRevision.json +2 -2
  217. models/mutation.policy.remotePortFwd.removeRule.json +2 -2
  218. models/mutation.policy.remotePortFwd.removeSection.json +1 -1
  219. models/mutation.policy.remotePortFwd.updatePolicy.json +2 -2
  220. models/mutation.policy.remotePortFwd.updateRule.json +5 -5
  221. models/mutation.policy.remotePortFwd.updateSection.json +1 -1
  222. models/mutation.policy.socketLan.addRule.json +16 -16
  223. models/mutation.policy.socketLan.addSection.json +1 -1
  224. models/mutation.policy.socketLan.createPolicyRevision.json +4 -4
  225. models/mutation.policy.socketLan.discardPolicyRevision.json +4 -4
  226. models/mutation.policy.socketLan.moveRule.json +4 -4
  227. models/mutation.policy.socketLan.moveSection.json +1 -1
  228. models/mutation.policy.socketLan.publishPolicyRevision.json +4 -4
  229. models/mutation.policy.socketLan.removeRule.json +4 -4
  230. models/mutation.policy.socketLan.removeSection.json +1 -1
  231. models/mutation.policy.socketLan.updatePolicy.json +4 -4
  232. models/mutation.policy.socketLan.updateRule.json +16 -16
  233. models/mutation.policy.socketLan.updateSection.json +1 -1
  234. models/mutation.policy.terminalServer.addRule.json +1 -1
  235. models/mutation.policy.terminalServer.addSection.json +1 -1
  236. models/mutation.policy.terminalServer.createPolicyRevision.json +1 -1
  237. models/mutation.policy.terminalServer.discardPolicyRevision.json +1 -1
  238. models/mutation.policy.terminalServer.moveRule.json +1 -1
  239. models/mutation.policy.terminalServer.moveSection.json +1 -1
  240. models/mutation.policy.terminalServer.publishPolicyRevision.json +1 -1
  241. models/mutation.policy.terminalServer.removeRule.json +1 -1
  242. models/mutation.policy.terminalServer.removeSection.json +1 -1
  243. models/mutation.policy.terminalServer.updatePolicy.json +1 -1
  244. models/mutation.policy.terminalServer.updateRule.json +1 -1
  245. models/mutation.policy.terminalServer.updateSection.json +1 -1
  246. models/mutation.policy.wanFirewall.addRule.json +500 -53
  247. models/mutation.policy.wanFirewall.addSection.json +1 -1
  248. models/mutation.policy.wanFirewall.createPolicyRevision.json +128 -11
  249. models/mutation.policy.wanFirewall.discardPolicyRevision.json +128 -11
  250. models/mutation.policy.wanFirewall.moveRule.json +128 -11
  251. models/mutation.policy.wanFirewall.moveSection.json +1 -1
  252. models/mutation.policy.wanFirewall.publishPolicyRevision.json +128 -11
  253. models/mutation.policy.wanFirewall.removeRule.json +128 -11
  254. models/mutation.policy.wanFirewall.removeSection.json +1 -1
  255. models/mutation.policy.wanFirewall.updatePolicy.json +128 -11
  256. models/mutation.policy.wanFirewall.updateRule.json +491 -53
  257. models/mutation.policy.wanFirewall.updateSection.json +1 -1
  258. models/mutation.policy.wanNetwork.addRule.json +13 -13
  259. models/mutation.policy.wanNetwork.addSection.json +1 -1
  260. models/mutation.policy.wanNetwork.createPolicyRevision.json +1 -1
  261. models/mutation.policy.wanNetwork.discardPolicyRevision.json +1 -1
  262. models/mutation.policy.wanNetwork.moveRule.json +1 -1
  263. models/mutation.policy.wanNetwork.moveSection.json +1 -1
  264. models/mutation.policy.wanNetwork.publishPolicyRevision.json +1 -1
  265. models/mutation.policy.wanNetwork.removeRule.json +1 -1
  266. models/mutation.policy.wanNetwork.removeSection.json +1 -1
  267. models/mutation.policy.wanNetwork.updatePolicy.json +1 -1
  268. models/mutation.policy.wanNetwork.updateRule.json +13 -13
  269. models/mutation.policy.wanNetwork.updateSection.json +1 -1
  270. models/query.policy.appTenantRestriction.policy.json +3086 -0
  271. models/query.policy.dynamicIpAllocation.policy.json +1934 -0
  272. models/query.policy.internetFirewall.policy.json +7833 -0
  273. models/query.policy.json +233 -0
  274. models/query.policy.remotePortFwd.policy.json +2387 -0
  275. models/query.policy.socketLan.policy.json +7140 -0
  276. models/query.policy.terminalServer.policy.json +1632 -0
  277. models/query.policy.wanFirewall.policy.json +9212 -0
  278. models/query.policy.wanNetwork.policy.json +8010 -0
  279. models/query.site.availableVersionList.json +365 -0
  280. models/query.site.bgpPeer.json +1917 -0
  281. models/query.site.bgpPeerList.json +2076 -0
  282. models/query.site.cloudInterconnectConnectionConnectivity.json +298 -0
  283. models/query.site.cloudInterconnectPhysicalConnection.json +728 -0
  284. models/query.site.cloudInterconnectPhysicalConnectionId.json +660 -0
  285. models/query.site.siteBgpStatus.json +869 -0
  286. schema/catolib.py +13 -6
  287. schema/remove_policyid.py +89 -0
  288. schema/remove_policyid_mutations.py +89 -0
  289. {catocli-2.0.3.dist-info → catocli-2.0.5.dist-info}/LICENSE +0 -0
  290. {catocli-2.0.3.dist-info → catocli-2.0.5.dist-info}/WHEEL +0 -0
  291. {catocli-2.0.3.dist-info → catocli-2.0.5.dist-info}/entry_points.txt +0 -0
@@ -10,7 +10,7 @@
10
10
 
11
11
  `catocli mutation policy wanFirewall addRule "$(cat < addRule.json)"`
12
12
 
13
- `catocli mutation policy wanFirewall addRule '{"wanFirewallAddRuleInput": {"policyRulePositionInput": {"position": {"position": "enum(PolicyRulePositionEnum)"}, "ref": {"ref": "ID"}}, "wanFirewallAddRuleDataInput": {"action": {"action": "enum(WanFirewallActionEnum)"}, "application": {"appCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "application": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customApp": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "domain": {"domain": ["Domain"]}, "fqdn": {"fqdn": ["Fqdn"]}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "sanctionedAppsCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}}, "connectionOrigin": {"connectionOrigin": "enum(ConnectionOriginEnum)"}, "country": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "description": {"description": "String"}, "destination": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "device": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "deviceAttributes": {"category": {"category": ["String"]}, "manufacturer": {"manufacturer": ["String"]}, "model": {"model": ["String"]}, "os": {"os": ["String"]}, "osVersion": {"osVersion": ["String"]}, "type": {"type": ["String"]}}, "deviceOS": {"deviceOS": "enum(OperatingSystem)"}, "direction": {"direction": "enum(WanFirewallDirectionEnum)"}, "enabled": {"enabled": "Boolean"}, "exceptions": {"application": {"appCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "application": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customApp": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "domain": {"domain": ["Domain"]}, "fqdn": {"fqdn": ["Fqdn"]}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "sanctionedAppsCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}}, "connectionOrigin": {"connectionOrigin": "enum(ConnectionOriginEnum)"}, "country": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "destination": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "device": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "deviceAttributes": {"category": {"category": ["String"]}, "manufacturer": {"manufacturer": ["String"]}, "model": {"model": ["String"]}, "os": {"os": ["String"]}, "osVersion": {"osVersion": ["String"]}, "type": {"type": ["String"]}}, "deviceOS": {"deviceOS": "enum(OperatingSystem)"}, "direction": {"direction": "enum(WanFirewallDirectionEnum)"}, "name": {"name": "String"}, "service": {"custom": {"port": {"port": ["Port"]}, "portRange": {"from": {"from": "Port"}, "to": {"to": "Port"}}, "protocol": {"protocol": "enum(IpProtocol)"}}, "standard": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "source": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}}, "name": {"name": "String"}, "schedule": {"activeOn": {"activeOn": "enum(PolicyActiveOnEnum)"}, "customRecurring": {"days": {"days": "enum(DayOfWeek)"}, "from": {"from": "Time"}, "to": {"to": "Time"}}, "customTimeframe": {"from": {"from": "DateTime"}, "to": {"to": "DateTime"}}}, "service": {"custom": {"port": {"port": ["Port"]}, "portRange": {"from": {"from": "Port"}, "to": {"to": "Port"}}, "protocol": {"protocol": "enum(IpProtocol)"}}, "standard": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "source": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "tracking": {"alert": {"enabled": {"enabled": "Boolean"}, "frequency": {"frequency": "enum(PolicyRuleTrackingFrequencyEnum)"}, "mailingList": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subscriptionGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "webhook": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "event": {"enabled": {"enabled": "Boolean"}}}}}, "wanFirewallPolicyMutationInput": {"policyMutationRevisionInput": {"id": {"id": "ID"}}}}'`
13
+ `catocli mutation policy wanFirewall addRule '{"wanFirewallAddRuleInput": {"policyRulePositionInput": {"position": {"position": "enum(PolicyRulePositionEnum)"}, "ref": {"ref": "ID"}}, "wanFirewallAddRuleDataInput": {"action": {"action": "enum(WanFirewallActionEnum)"}, "activePeriod": {"effectiveFrom": {"effectiveFrom": "DateTime"}, "expiresAt": {"expiresAt": "DateTime"}, "useEffectiveFrom": {"useEffectiveFrom": "Boolean"}, "useExpiresAt": {"useExpiresAt": "Boolean"}}, "application": {"appCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "application": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customApp": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "domain": {"domain": ["Domain"]}, "fqdn": {"fqdn": ["Fqdn"]}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "sanctionedAppsCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}}, "connectionOrigin": {"connectionOrigin": "enum(ConnectionOriginEnum)"}, "country": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "description": {"description": "String"}, "destination": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "device": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "deviceAttributes": {"category": {"category": ["String"]}, "manufacturer": {"manufacturer": ["String"]}, "model": {"model": ["String"]}, "os": {"os": ["String"]}, "osVersion": {"osVersion": ["String"]}, "type": {"type": ["String"]}}, "deviceOS": {"deviceOS": "enum(OperatingSystem)"}, "direction": {"direction": "enum(WanFirewallDirectionEnum)"}, "enabled": {"enabled": "Boolean"}, "exceptions": {"application": {"appCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "application": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customApp": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "domain": {"domain": ["Domain"]}, "fqdn": {"fqdn": ["Fqdn"]}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "sanctionedAppsCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}}, "connectionOrigin": {"connectionOrigin": "enum(ConnectionOriginEnum)"}, "country": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "destination": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "device": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "deviceAttributes": {"category": {"category": ["String"]}, "manufacturer": {"manufacturer": ["String"]}, "model": {"model": ["String"]}, "os": {"os": ["String"]}, "osVersion": {"osVersion": ["String"]}, "type": {"type": ["String"]}}, "deviceOS": {"deviceOS": "enum(OperatingSystem)"}, "direction": {"direction": "enum(WanFirewallDirectionEnum)"}, "name": {"name": "String"}, "service": {"custom": {"port": {"port": ["Port"]}, "portRange": {"from": {"from": "Port"}, "to": {"to": "Port"}}, "protocol": {"protocol": "enum(IpProtocol)"}}, "standard": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "source": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}}, "name": {"name": "String"}, "schedule": {"activeOn": {"activeOn": "enum(PolicyActiveOnEnum)"}, "customRecurring": {"days": {"days": "enum(DayOfWeek)"}, "from": {"from": "Time"}, "to": {"to": "Time"}}, "customTimeframe": {"from": {"from": "DateTime"}, "to": {"to": "DateTime"}}}, "service": {"custom": {"port": {"port": ["Port"]}, "portRange": {"from": {"from": "Port"}, "to": {"to": "Port"}}, "protocol": {"protocol": "enum(IpProtocol)"}}, "standard": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "source": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "tracking": {"alert": {"enabled": {"enabled": "Boolean"}, "frequency": {"frequency": "enum(PolicyRuleTrackingFrequencyEnum)"}, "mailingList": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subscriptionGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "webhook": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "event": {"enabled": {"enabled": "Boolean"}}}}}, "wanFirewallPolicyMutationInput": {"policyMutationRevisionInput": {"id": {"id": "ID"}}}}'`
14
14
 
15
15
  #### Operation Arguments for mutation.policy.wanFirewall.addRule ####
16
16
  `accountId` [ID] - (required) N/A
@@ -10,7 +10,7 @@
10
10
 
11
11
  `catocli mutation policy wanFirewall updateRule "$(cat < updateRule.json)"`
12
12
 
13
- `catocli mutation policy wanFirewall updateRule '{"wanFirewallPolicyMutationInput": {"policyMutationRevisionInput": {"id": {"id": "ID"}}}, "wanFirewallUpdateRuleInput": {"id": {"id": "ID"}, "wanFirewallUpdateRuleDataInput": {"action": {"action": "enum(WanFirewallActionEnum)"}, "application": {"appCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "application": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customApp": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "domain": {"domain": ["Domain"]}, "fqdn": {"fqdn": ["Fqdn"]}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "sanctionedAppsCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}}, "connectionOrigin": {"connectionOrigin": "enum(ConnectionOriginEnum)"}, "country": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "description": {"description": "String"}, "destination": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "device": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "deviceAttributes": {"category": {"category": ["String"]}, "manufacturer": {"manufacturer": ["String"]}, "model": {"model": ["String"]}, "os": {"os": ["String"]}, "osVersion": {"osVersion": ["String"]}, "type": {"type": ["String"]}}, "deviceOS": {"deviceOS": "enum(OperatingSystem)"}, "direction": {"direction": "enum(WanFirewallDirectionEnum)"}, "enabled": {"enabled": "Boolean"}, "exceptions": {"application": {"appCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "application": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customApp": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "domain": {"domain": ["Domain"]}, "fqdn": {"fqdn": ["Fqdn"]}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "sanctionedAppsCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}}, "connectionOrigin": {"connectionOrigin": "enum(ConnectionOriginEnum)"}, "country": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "destination": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "device": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "deviceAttributes": {"category": {"category": ["String"]}, "manufacturer": {"manufacturer": ["String"]}, "model": {"model": ["String"]}, "os": {"os": ["String"]}, "osVersion": {"osVersion": ["String"]}, "type": {"type": ["String"]}}, "deviceOS": {"deviceOS": "enum(OperatingSystem)"}, "direction": {"direction": "enum(WanFirewallDirectionEnum)"}, "name": {"name": "String"}, "service": {"custom": {"port": {"port": ["Port"]}, "portRange": {"from": {"from": "Port"}, "to": {"to": "Port"}}, "protocol": {"protocol": "enum(IpProtocol)"}}, "standard": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "source": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}}, "name": {"name": "String"}, "schedule": {"activeOn": {"activeOn": "enum(PolicyActiveOnEnum)"}, "customRecurring": {"days": {"days": "enum(DayOfWeek)"}, "from": {"from": "Time"}, "to": {"to": "Time"}}, "customTimeframe": {"from": {"from": "DateTime"}, "to": {"to": "DateTime"}}}, "service": {"custom": {"port": {"port": ["Port"]}, "portRange": {"from": {"from": "Port"}, "to": {"to": "Port"}}, "protocol": {"protocol": "enum(IpProtocol)"}}, "standard": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "source": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "tracking": {"alert": {"enabled": {"enabled": "Boolean"}, "frequency": {"frequency": "enum(PolicyRuleTrackingFrequencyEnum)"}, "mailingList": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subscriptionGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "webhook": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "event": {"enabled": {"enabled": "Boolean"}}}}}}'`
13
+ `catocli mutation policy wanFirewall updateRule '{"wanFirewallPolicyMutationInput": {"policyMutationRevisionInput": {"id": {"id": "ID"}}}, "wanFirewallUpdateRuleInput": {"id": {"id": "ID"}, "wanFirewallUpdateRuleDataInput": {"action": {"action": "enum(WanFirewallActionEnum)"}, "activePeriod": {"effectiveFrom": {"effectiveFrom": "DateTime"}, "expiresAt": {"expiresAt": "DateTime"}, "useEffectiveFrom": {"useEffectiveFrom": "Boolean"}, "useExpiresAt": {"useExpiresAt": "Boolean"}}, "application": {"appCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "application": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customApp": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "domain": {"domain": ["Domain"]}, "fqdn": {"fqdn": ["Fqdn"]}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "sanctionedAppsCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}}, "connectionOrigin": {"connectionOrigin": "enum(ConnectionOriginEnum)"}, "country": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "description": {"description": "String"}, "destination": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "device": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "deviceAttributes": {"category": {"category": ["String"]}, "manufacturer": {"manufacturer": ["String"]}, "model": {"model": ["String"]}, "os": {"os": ["String"]}, "osVersion": {"osVersion": ["String"]}, "type": {"type": ["String"]}}, "deviceOS": {"deviceOS": "enum(OperatingSystem)"}, "direction": {"direction": "enum(WanFirewallDirectionEnum)"}, "enabled": {"enabled": "Boolean"}, "exceptions": {"application": {"appCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "application": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customApp": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "customCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "domain": {"domain": ["Domain"]}, "fqdn": {"fqdn": ["Fqdn"]}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "sanctionedAppsCategory": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}}, "connectionOrigin": {"connectionOrigin": "enum(ConnectionOriginEnum)"}, "country": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "destination": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "device": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "deviceAttributes": {"category": {"category": ["String"]}, "manufacturer": {"manufacturer": ["String"]}, "model": {"model": ["String"]}, "os": {"os": ["String"]}, "osVersion": {"osVersion": ["String"]}, "type": {"type": ["String"]}}, "deviceOS": {"deviceOS": "enum(OperatingSystem)"}, "direction": {"direction": "enum(WanFirewallDirectionEnum)"}, "name": {"name": "String"}, "service": {"custom": {"port": {"port": ["Port"]}, "portRange": {"from": {"from": "Port"}, "to": {"to": "Port"}}, "protocol": {"protocol": "enum(IpProtocol)"}}, "standard": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "source": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}}, "name": {"name": "String"}, "schedule": {"activeOn": {"activeOn": "enum(PolicyActiveOnEnum)"}, "customRecurring": {"days": {"days": "enum(DayOfWeek)"}, "from": {"from": "Time"}, "to": {"to": "Time"}}, "customTimeframe": {"from": {"from": "DateTime"}, "to": {"to": "DateTime"}}}, "service": {"custom": {"port": {"port": ["Port"]}, "portRange": {"from": {"from": "Port"}, "to": {"to": "Port"}}, "protocol": {"protocol": "enum(IpProtocol)"}}, "standard": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "source": {"floatingSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "globalIpRange": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "group": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "host": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "ip": {"ip": ["IPAddress"]}, "ipRange": {"from": {"from": "IPAddress"}, "to": {"to": "IPAddress"}}, "networkInterface": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "site": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "siteNetworkSubnet": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subnet": {"subnet": ["NetworkSubnet"]}, "systemGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "user": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "usersGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "tracking": {"alert": {"enabled": {"enabled": "Boolean"}, "frequency": {"frequency": "enum(PolicyRuleTrackingFrequencyEnum)"}, "mailingList": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "subscriptionGroup": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}, "webhook": {"by": {"by": "enum(ObjectRefBy)"}, "input": {"input": "String"}}}, "event": {"enabled": {"enabled": "Boolean"}}}}}}'`
14
14
 
15
15
  #### Operation Arguments for mutation.policy.wanFirewall.updateRule ####
16
16
  `accountId` [ID] - (required) N/A
@@ -6,6 +6,8 @@ from graphql_client import ApiClient, CallApi
6
6
  from graphql_client.api_client import ApiException
7
7
  import logging
8
8
  import pprint
9
+ import uuid
10
+ from urllib3.filepost import encode_multipart_formdata
9
11
 
10
12
  def createRequest(args, configuration):
11
13
  params = vars(args)
@@ -134,6 +136,11 @@ def createRawRequest(args, configuration):
134
136
  # Handle endpoint override
135
137
  if hasattr(args, 'endpoint') and args.endpoint:
136
138
  configuration.host = args.endpoint
139
+
140
+ # Check if binary/multipart mode is enabled
141
+ if hasattr(args, 'binary') and args.binary:
142
+ return createRawBinaryRequest(args, configuration)
143
+
137
144
  instance = CallApi(ApiClient(configuration))
138
145
  isOk = False
139
146
  try:
@@ -255,10 +262,15 @@ def renderArgsAndFields(responseArgStr, variablesObj, curOperation, definition,
255
262
  for fieldName in definition['fields']:
256
263
  field = definition['fields'][fieldName]
257
264
  field_name = field['alias'] if 'alias' in field else field['name']
258
- responseArgStr += indent + field_name
265
+
266
+ # Check if field has arguments and whether they are present in variables
267
+ should_include_field = True
268
+ argsPresent = False
269
+ argStr = ""
270
+
259
271
  if field.get("args") and not isinstance(field['args'], list):
260
272
  if (len(list(field['args'].keys()))>0):
261
- argsPresent = False
273
+ # Field has arguments - only include if arguments are present in variables
262
274
  argStr = " ( "
263
275
  for argName in field['args']:
264
276
  arg = field['args'][argName]
@@ -266,9 +278,16 @@ def renderArgsAndFields(responseArgStr, variablesObj, curOperation, definition,
266
278
  argStr += arg['responseStr'] + " "
267
279
  argsPresent = True
268
280
  argStr += ") "
269
- if argsPresent==True:
270
- responseArgStr += argStr
271
- if field.get("type") and field['type'].get('definition') and field['type']['definition']['fields'] is not None:
281
+ # Only include fields with arguments if the arguments are present
282
+ should_include_field = argsPresent
283
+
284
+ # Only process field if we should include it
285
+ if should_include_field:
286
+ responseArgStr += indent + field_name
287
+ if argsPresent:
288
+ responseArgStr += argStr
289
+
290
+ if should_include_field and field.get("type") and field['type'].get('definition') and field['type']['definition']['fields'] is not None:
272
291
  responseArgStr += " {\n"
273
292
  for subfieldIndex in field['type']['definition']['fields']:
274
293
  subfield = field['type']['definition']['fields'][subfieldIndex]
@@ -315,7 +334,7 @@ def renderArgsAndFields(responseArgStr, variablesObj, curOperation, definition,
315
334
  responseArgStr = renderArgsAndFields(responseArgStr, variablesObj, curOperation, possibleType, indent + " ")
316
335
  responseArgStr += indent + " }\n"
317
336
  responseArgStr += indent + "}\n"
318
- if field.get('type') and field['type'].get('definition') and field['type']['definition'].get('inputFields'):
337
+ if should_include_field and field.get('type') and field['type'].get('definition') and field['type']['definition'].get('inputFields'):
319
338
  responseArgStr += " {\n"
320
339
  for subfieldName in field['type']['definition'].get('inputFields'):
321
340
  subfield = field['type']['definition']['inputFields'][subfieldName]
@@ -333,5 +352,162 @@ def renderArgsAndFields(responseArgStr, variablesObj, curOperation, definition,
333
352
  responseArgStr = renderArgsAndFields(responseArgStr, variablesObj, curOperation, possibleType, indent + " ")
334
353
  responseArgStr += indent + " }\n"
335
354
  responseArgStr += indent + "}\n"
336
- responseArgStr += "\n"
355
+ if should_include_field:
356
+ responseArgStr += "\n"
337
357
  return responseArgStr
358
+
359
+ def createRawBinaryRequest(args, configuration):
360
+ """Handle multipart/form-data requests for file uploads and binary content"""
361
+ params = vars(args)
362
+
363
+
364
+ # Parse the JSON body
365
+ try:
366
+ body = json.loads(params["json"])
367
+ except ValueError as e:
368
+ print("ERROR: JSON argument must be valid json. ", e)
369
+ return
370
+ except Exception as e:
371
+ print("ERROR: ", e)
372
+ return
373
+
374
+ # Build form data
375
+ form_fields = {}
376
+ files = []
377
+
378
+ # Add the operations field containing the GraphQL payload
379
+ form_fields['operations'] = json.dumps(body)
380
+
381
+ # Handle file mappings if files are specified
382
+ if hasattr(args, 'files') and args.files:
383
+ # Build the map object for file uploads
384
+ file_map = {}
385
+ for i, (field_name, file_path) in enumerate(args.files):
386
+ file_index = str(i + 1)
387
+ file_map[file_index] = [field_name]
388
+
389
+ # Read file content
390
+ try:
391
+ with open(file_path, 'rb') as f:
392
+ file_content = f.read()
393
+ files.append((file_index, (os.path.basename(file_path), file_content, 'application/octet-stream')))
394
+ except IOError as e:
395
+ print(f"ERROR: Could not read file {file_path}: {e}")
396
+ return
397
+
398
+ # Add the map field
399
+ form_fields['map'] = json.dumps(file_map)
400
+
401
+ # Test mode - just print the request structure
402
+ if params.get("t") == True:
403
+ print("Multipart form data request:")
404
+ if params.get("p") == True:
405
+ print(f"Operations: {json.dumps(json.loads(form_fields.get('operations')), indent=2)}")
406
+ else:
407
+ print(f"Operations: {form_fields.get('operations')}")
408
+ if 'map' in form_fields:
409
+ print(f"Map: {form_fields.get('map')}")
410
+ if files:
411
+ print(f"Files: {[f[0] + ': ' + f[1][0] for f in files]}")
412
+ return None
413
+
414
+ # Perform the multipart request
415
+ try:
416
+ return sendMultipartRequest(configuration, form_fields, files, params)
417
+ except Exception as e:
418
+ # Safely handle exception string conversion
419
+ try:
420
+ error_str = str(e)
421
+ except Exception:
422
+ error_str = f"Exception of type {type(e).__name__}"
423
+
424
+ if params.get("v") == True:
425
+ import traceback
426
+ print(f"ERROR: Failed to send multipart request: {error_str}")
427
+ traceback.print_exc()
428
+ else:
429
+ print(f"ERROR: Failed to send multipart request: {error_str}")
430
+ return None
431
+
432
+ def sendMultipartRequest(configuration, form_fields, files, params):
433
+ """Send a multipart/form-data request directly using urllib3"""
434
+ import urllib3
435
+
436
+ # Create pool manager
437
+ pool_manager = urllib3.PoolManager(
438
+ cert_reqs='CERT_NONE' if not getattr(configuration, 'verify_ssl', False) else 'CERT_REQUIRED'
439
+ )
440
+
441
+ # Prepare form data
442
+ fields = []
443
+ for key, value in form_fields.items():
444
+ fields.append((key, value))
445
+
446
+ for file_key, (filename, content, content_type) in files:
447
+ fields.append((file_key, (filename, content, content_type)))
448
+
449
+ # Encode multipart data
450
+ body_data, content_type = encode_multipart_formdata(fields)
451
+
452
+ # Prepare headers
453
+ headers = {
454
+ 'Content-Type': content_type,
455
+ 'User-Agent': f"Cato-CLI-v{getattr(configuration, 'version', 'unknown')}"
456
+ }
457
+
458
+ # Add API key if not using headers file or custom headers
459
+ using_custom_headers = hasattr(configuration, 'custom_headers') and configuration.custom_headers
460
+ if not using_custom_headers and hasattr(configuration, 'api_key') and hasattr(configuration, 'api_key') and configuration.api_key and 'x-api-key' in configuration.api_key:
461
+ headers['x-api-key'] = configuration.api_key['x-api-key']
462
+
463
+ # Add custom headers
464
+ if using_custom_headers:
465
+ headers.update(configuration.custom_headers)
466
+
467
+ # Verbose output
468
+ if params.get("v") == True:
469
+ print(f"Host: {getattr(configuration, 'host', 'unknown')}")
470
+ masked_headers = headers.copy()
471
+ if 'x-api-key' in masked_headers:
472
+ masked_headers['x-api-key'] = '***MASKED***'
473
+ print(f"Request Headers: {json.dumps(masked_headers, indent=4, sort_keys=True)}")
474
+ print(f"Content-Type: {content_type}")
475
+ print(f"Form fields: {list(form_fields.keys())}")
476
+ print(f"Files: {[f[0] for f in files]}\n")
477
+
478
+ try:
479
+ # Make the request
480
+ resp = pool_manager.request(
481
+ 'POST',
482
+ getattr(configuration, 'host', 'https://api.catonetworks.com/api/v1/graphql'),
483
+ body=body_data,
484
+ headers=headers
485
+ )
486
+
487
+ # Parse response
488
+ if resp.status < 200 or resp.status >= 300:
489
+ reason = resp.reason if resp.reason is not None else "Unknown Error"
490
+ error_msg = f"HTTP {resp.status}: {reason}"
491
+ if resp.data:
492
+ try:
493
+ error_msg += f"\n{resp.data.decode('utf-8')}"
494
+ except Exception:
495
+ error_msg += f"\n{resp.data}"
496
+ print(f"ERROR: {error_msg}")
497
+ return None
498
+
499
+ try:
500
+ response_data = json.loads(resp.data.decode('utf-8'))
501
+ except json.JSONDecodeError:
502
+ response_data = resp.data.decode('utf-8')
503
+
504
+ return [response_data]
505
+
506
+ except Exception as e:
507
+ # Safely handle exception string conversion
508
+ try:
509
+ error_str = str(e)
510
+ except Exception:
511
+ error_str = f"Exception of type {type(e).__name__}"
512
+ print(f"ERROR: Network/request error: {error_str}")
513
+ return None
@@ -5,20 +5,3 @@
5
5
  ### Usage for query.policy:
6
6
 
7
7
  `catocli query policy -h`
8
-
9
- `catocli query policy <json>`
10
-
11
- `catocli query policy "$(cat < policy.json)"`
12
-
13
- `catocli query policy '{"appTenantRestrictionPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "dynamicIpAllocationPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "internetFirewallPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "remotePortFwdPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "socketLanPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "terminalServerPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "wanFirewallPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}, "wanNetworkPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}}'`
14
-
15
- #### Operation Arguments for query.policy ####
16
- `accountId` [ID] - (required) N/A
17
- `appTenantRestrictionPolicyInput` [AppTenantRestrictionPolicyInput] - (optional) N/A
18
- `dynamicIpAllocationPolicyInput` [DynamicIpAllocationPolicyInput] - (optional) N/A
19
- `internetFirewallPolicyInput` [InternetFirewallPolicyInput] - (optional) N/A
20
- `remotePortFwdPolicyInput` [RemotePortFwdPolicyInput] - (optional) N/A
21
- `socketLanPolicyInput` [SocketLanPolicyInput] - (optional) N/A
22
- `terminalServerPolicyInput` [TerminalServerPolicyInput] - (optional) N/A
23
- `wanFirewallPolicyInput` [WanFirewallPolicyInput] - (optional) N/A
24
- `wanNetworkPolicyInput` [WanNetworkPolicyInput] - (optional) N/A
@@ -6,11 +6,156 @@ def query_policy_parse(query_subparsers):
6
6
  help='policy() query operation',
7
7
  usage=get_help("query_policy"))
8
8
 
9
- query_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
10
- query_policy_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
11
- query_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
12
- query_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
13
- query_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
14
- query_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
15
- query_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
16
- query_policy_parser.set_defaults(func=createRequest,operation_name='query.policy')
9
+ query_policy_subparsers = query_policy_parser.add_subparsers()
10
+
11
+ query_policy_appTenantRestriction_parser = query_policy_subparsers.add_parser('appTenantRestriction',
12
+ help='appTenantRestriction() policy operation',
13
+ usage=get_help("query_policy_appTenantRestriction"))
14
+
15
+ query_policy_appTenantRestriction_subparsers = query_policy_appTenantRestriction_parser.add_subparsers()
16
+
17
+ query_policy_appTenantRestriction_policy_parser = query_policy_appTenantRestriction_subparsers.add_parser('policy',
18
+ help='policy() appTenantRestriction operation',
19
+ usage=get_help("query_policy_appTenantRestriction_policy"))
20
+
21
+ query_policy_appTenantRestriction_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
22
+ query_policy_appTenantRestriction_policy_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
23
+ query_policy_appTenantRestriction_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
24
+ query_policy_appTenantRestriction_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
25
+ query_policy_appTenantRestriction_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
26
+ query_policy_appTenantRestriction_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
27
+ query_policy_appTenantRestriction_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
28
+ query_policy_appTenantRestriction_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.appTenantRestriction.policy')
29
+
30
+ query_policy_dynamicIpAllocation_parser = query_policy_subparsers.add_parser('dynamicIpAllocation',
31
+ help='dynamicIpAllocation() policy operation',
32
+ usage=get_help("query_policy_dynamicIpAllocation"))
33
+
34
+ query_policy_dynamicIpAllocation_subparsers = query_policy_dynamicIpAllocation_parser.add_subparsers()
35
+
36
+ query_policy_dynamicIpAllocation_policy_parser = query_policy_dynamicIpAllocation_subparsers.add_parser('policy',
37
+ help='policy() dynamicIpAllocation operation',
38
+ usage=get_help("query_policy_dynamicIpAllocation_policy"))
39
+
40
+ query_policy_dynamicIpAllocation_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
41
+ query_policy_dynamicIpAllocation_policy_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
42
+ query_policy_dynamicIpAllocation_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
43
+ query_policy_dynamicIpAllocation_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
44
+ query_policy_dynamicIpAllocation_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
45
+ query_policy_dynamicIpAllocation_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
46
+ query_policy_dynamicIpAllocation_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
47
+ query_policy_dynamicIpAllocation_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.dynamicIpAllocation.policy')
48
+
49
+ query_policy_internetFirewall_parser = query_policy_subparsers.add_parser('internetFirewall',
50
+ help='internetFirewall() policy operation',
51
+ usage=get_help("query_policy_internetFirewall"))
52
+
53
+ query_policy_internetFirewall_subparsers = query_policy_internetFirewall_parser.add_subparsers()
54
+
55
+ query_policy_internetFirewall_policy_parser = query_policy_internetFirewall_subparsers.add_parser('policy',
56
+ help='policy() internetFirewall operation',
57
+ usage=get_help("query_policy_internetFirewall_policy"))
58
+
59
+ query_policy_internetFirewall_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
60
+ query_policy_internetFirewall_policy_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
61
+ query_policy_internetFirewall_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
62
+ query_policy_internetFirewall_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
63
+ query_policy_internetFirewall_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
64
+ query_policy_internetFirewall_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
65
+ query_policy_internetFirewall_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
66
+ query_policy_internetFirewall_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.internetFirewall.policy')
67
+
68
+ query_policy_remotePortFwd_parser = query_policy_subparsers.add_parser('remotePortFwd',
69
+ help='remotePortFwd() policy operation',
70
+ usage=get_help("query_policy_remotePortFwd"))
71
+
72
+ query_policy_remotePortFwd_subparsers = query_policy_remotePortFwd_parser.add_subparsers()
73
+
74
+ query_policy_remotePortFwd_policy_parser = query_policy_remotePortFwd_subparsers.add_parser('policy',
75
+ help='policy() remotePortFwd operation',
76
+ usage=get_help("query_policy_remotePortFwd_policy"))
77
+
78
+ query_policy_remotePortFwd_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
79
+ query_policy_remotePortFwd_policy_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
80
+ query_policy_remotePortFwd_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
81
+ query_policy_remotePortFwd_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
82
+ query_policy_remotePortFwd_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
83
+ query_policy_remotePortFwd_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
84
+ query_policy_remotePortFwd_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
85
+ query_policy_remotePortFwd_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.remotePortFwd.policy')
86
+
87
+ query_policy_socketLan_parser = query_policy_subparsers.add_parser('socketLan',
88
+ help='socketLan() policy operation',
89
+ usage=get_help("query_policy_socketLan"))
90
+
91
+ query_policy_socketLan_subparsers = query_policy_socketLan_parser.add_subparsers()
92
+
93
+ query_policy_socketLan_policy_parser = query_policy_socketLan_subparsers.add_parser('policy',
94
+ help='policy() socketLan operation',
95
+ usage=get_help("query_policy_socketLan_policy"))
96
+
97
+ query_policy_socketLan_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
98
+ query_policy_socketLan_policy_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
99
+ query_policy_socketLan_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
100
+ query_policy_socketLan_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
101
+ query_policy_socketLan_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
102
+ query_policy_socketLan_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
103
+ query_policy_socketLan_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
104
+ query_policy_socketLan_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.socketLan.policy')
105
+
106
+ query_policy_terminalServer_parser = query_policy_subparsers.add_parser('terminalServer',
107
+ help='terminalServer() policy operation',
108
+ usage=get_help("query_policy_terminalServer"))
109
+
110
+ query_policy_terminalServer_subparsers = query_policy_terminalServer_parser.add_subparsers()
111
+
112
+ query_policy_terminalServer_policy_parser = query_policy_terminalServer_subparsers.add_parser('policy',
113
+ help='policy() terminalServer operation',
114
+ usage=get_help("query_policy_terminalServer_policy"))
115
+
116
+ query_policy_terminalServer_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
117
+ query_policy_terminalServer_policy_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
118
+ query_policy_terminalServer_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
119
+ query_policy_terminalServer_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
120
+ query_policy_terminalServer_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
121
+ query_policy_terminalServer_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
122
+ query_policy_terminalServer_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
123
+ query_policy_terminalServer_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.terminalServer.policy')
124
+
125
+ query_policy_wanFirewall_parser = query_policy_subparsers.add_parser('wanFirewall',
126
+ help='wanFirewall() policy operation',
127
+ usage=get_help("query_policy_wanFirewall"))
128
+
129
+ query_policy_wanFirewall_subparsers = query_policy_wanFirewall_parser.add_subparsers()
130
+
131
+ query_policy_wanFirewall_policy_parser = query_policy_wanFirewall_subparsers.add_parser('policy',
132
+ help='policy() wanFirewall operation',
133
+ usage=get_help("query_policy_wanFirewall_policy"))
134
+
135
+ query_policy_wanFirewall_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
136
+ query_policy_wanFirewall_policy_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
137
+ query_policy_wanFirewall_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
138
+ query_policy_wanFirewall_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
139
+ query_policy_wanFirewall_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
140
+ query_policy_wanFirewall_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
141
+ query_policy_wanFirewall_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
142
+ query_policy_wanFirewall_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.wanFirewall.policy')
143
+
144
+ query_policy_wanNetwork_parser = query_policy_subparsers.add_parser('wanNetwork',
145
+ help='wanNetwork() policy operation',
146
+ usage=get_help("query_policy_wanNetwork"))
147
+
148
+ query_policy_wanNetwork_subparsers = query_policy_wanNetwork_parser.add_subparsers()
149
+
150
+ query_policy_wanNetwork_policy_parser = query_policy_wanNetwork_subparsers.add_parser('policy',
151
+ help='policy() wanNetwork operation',
152
+ usage=get_help("query_policy_wanNetwork_policy"))
153
+
154
+ query_policy_wanNetwork_policy_parser.add_argument('json', nargs='?', default='{}', help='Variables in JSON format (defaults to empty object if not provided).')
155
+ query_policy_wanNetwork_policy_parser.add_argument('-accountID', help='Override the CATO_ACCOUNT_ID environment variable with this value.')
156
+ query_policy_wanNetwork_policy_parser.add_argument('-t', const=True, default=False, nargs='?', help='Print GraphQL query without sending API call')
157
+ query_policy_wanNetwork_policy_parser.add_argument('-v', const=True, default=False, nargs='?', help='Verbose output')
158
+ query_policy_wanNetwork_policy_parser.add_argument('-p', const=True, default=False, nargs='?', help='Pretty print')
159
+ query_policy_wanNetwork_policy_parser.add_argument('-H', '--header', action='append', dest='headers', help='Add custom headers in "Key: Value" format. Can be used multiple times.')
160
+ query_policy_wanNetwork_policy_parser.add_argument('--headers-file', dest='headers_file', help='Load headers from a file. Each line should contain a header in "Key: Value" format.')
161
+ query_policy_wanNetwork_policy_parser.set_defaults(func=createRequest,operation_name='query.policy.wanNetwork.policy')
@@ -0,0 +1,7 @@
1
+
2
+ ## CATO-CLI - query.policy.appTenantRestriction:
3
+ [Click here](https://api.catonetworks.com/documentation/#query-appTenantRestriction) for documentation on this operation.
4
+
5
+ ### Usage for query.policy.appTenantRestriction:
6
+
7
+ `catocli query policy appTenantRestriction -h`
@@ -0,0 +1,17 @@
1
+
2
+ ## CATO-CLI - query.policy.appTenantRestriction.policy:
3
+ [Click here](https://api.catonetworks.com/documentation/#query-policy) for documentation on this operation.
4
+
5
+ ### Usage for query.policy.appTenantRestriction.policy:
6
+
7
+ `catocli query policy appTenantRestriction policy -h`
8
+
9
+ `catocli query policy appTenantRestriction policy <json>`
10
+
11
+ `catocli query policy appTenantRestriction policy "$(cat < policy.json)"`
12
+
13
+ `catocli query policy appTenantRestriction policy '{"appTenantRestrictionPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}}'`
14
+
15
+ #### Operation Arguments for query.policy.appTenantRestriction.policy ####
16
+ `accountId` [ID] - (required) N/A
17
+ `appTenantRestrictionPolicyInput` [AppTenantRestrictionPolicyInput] - (optional) N/A
@@ -0,0 +1,7 @@
1
+
2
+ ## CATO-CLI - query.policy.dynamicIpAllocation:
3
+ [Click here](https://api.catonetworks.com/documentation/#query-dynamicIpAllocation) for documentation on this operation.
4
+
5
+ ### Usage for query.policy.dynamicIpAllocation:
6
+
7
+ `catocli query policy dynamicIpAllocation -h`
@@ -0,0 +1,17 @@
1
+
2
+ ## CATO-CLI - query.policy.dynamicIpAllocation.policy:
3
+ [Click here](https://api.catonetworks.com/documentation/#query-policy) for documentation on this operation.
4
+
5
+ ### Usage for query.policy.dynamicIpAllocation.policy:
6
+
7
+ `catocli query policy dynamicIpAllocation policy -h`
8
+
9
+ `catocli query policy dynamicIpAllocation policy <json>`
10
+
11
+ `catocli query policy dynamicIpAllocation policy "$(cat < policy.json)"`
12
+
13
+ `catocli query policy dynamicIpAllocation policy '{"dynamicIpAllocationPolicyInput": {"policyRevisionInput": {"id": {"id": "ID"}, "type": {"type": "enum(PolicyRevisionType)"}}}}'`
14
+
15
+ #### Operation Arguments for query.policy.dynamicIpAllocation.policy ####
16
+ `accountId` [ID] - (required) N/A
17
+ `dynamicIpAllocationPolicyInput` [DynamicIpAllocationPolicyInput] - (optional) N/A