Debian Codegraph @

ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_ztna_webproxy_apigateway.py

raw symbols SCIP
1 #!/usr/bin/python
2 from __future__ import absolute_import, division, print_function
3 # Copyright 2019-2024 Fortinet, Inc.
4 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5
6 __metaclass__ = type
7
8 ANSIBLE_METADATA = {'status': ['preview'],
9 'supported_by': 'community',
10 'metadata_version': '1.1'}
11
12 DOCUMENTATION = '''
13 ---
14 module: fmgr_ztna_webproxy_apigateway
15 short_description: Set IPv4 API Gateway.
16 version_added: "2.12.0"
17 extends_documentation_fragment:
18 - fortinet.fortimanager.general
19 - fortinet.fortimanager.general.full_crud
20 options:
21 revision_note:
22 description: The change note that can be specified when an object is created or updated.
23 type: str
24 adom:
25 description: The parameter (adom) in requested url.
26 type: str
27 required: true
28 web-proxy:
29 description: Deprecated, please use "web_proxy"
30 type: str
31 web_proxy:
32 description: The parameter (web-proxy) in requested url.
33 type: str
34 ztna_webproxy_apigateway:
35 description: The top level parameters set.
36 required: false
37 type: dict
38 suboptions:
39 h2_support:
40 aliases: ['h2-support']
41 type: str
42 description: HTTP2 support, default=Enable.
43 choices: ['disable', 'enable']
44 h3_support:
45 aliases: ['h3-support']
46 type: str
47 description: HTTP3/QUIC support, default=Disable.
48 choices: ['disable', 'enable']
49 http_cookie_age:
50 aliases: ['http-cookie-age']
51 type: int
52 description: Time in minutes that client web browsers should keep a cookie.
53 http_cookie_domain:
54 aliases: ['http-cookie-domain']
55 type: str
56 description: Domain that HTTP cookie persistence should apply to.
57 http_cookie_domain_from_host:
58 aliases: ['http-cookie-domain-from-host']
59 type: str
60 description: Enable/disable use of HTTP cookie domain from host field in HTTP.
61 choices: ['disable', 'enable']
62 http_cookie_generation:
63 aliases: ['http-cookie-generation']
64 type: int
65 description: Generation of HTTP cookie to be accepted.
66 http_cookie_path:
67 aliases: ['http-cookie-path']
68 type: str
69 description: Limit HTTP cookie persistence to the specified path.
70 http_cookie_share:
71 aliases: ['http-cookie-share']
72 type: str
73 description: Control sharing of cookies across API Gateway.
74 choices: ['disable', 'same-ip']
75 https_cookie_secure:
76 aliases: ['https-cookie-secure']
77 type: str
78 description: Enable/disable verification that inserted HTTPS cookies are secure.
79 choices: ['disable', 'enable']
80 id:
81 type: int
82 description: API Gateway ID.
83 required: true
84 ldb_method:
85 aliases: ['ldb-method']
86 type: str
87 description: Method used to distribute sessions to real servers.
88 choices: ['static', 'round-robin', 'weighted', 'first-alive', 'http-host']
89 persistence:
90 type: str
91 description: Configure how to make sure that clients connect to the same server every time they make a request that is part of the same...
92 choices: ['none', 'http-cookie']
93 quic:
94 type: dict
95 description: Quic.
96 suboptions:
97 ack_delay_exponent:
98 aliases: ['ack-delay-exponent']
99 type: int
100 description: ACK delay exponent
101 active_connection_id_limit:
102 aliases: ['active-connection-id-limit']
103 type: int
104 description: Active connection ID limit
105 active_migration:
106 aliases: ['active-migration']
107 type: str
108 description: Enable/disable active migration
109 choices: ['disable', 'enable']
110 grease_quic_bit:
111 aliases: ['grease-quic-bit']
112 type: str
113 description: Enable/disable grease QUIC bit
114 choices: ['disable', 'enable']
115 max_ack_delay:
116 aliases: ['max-ack-delay']
117 type: int
118 description: Maximum ACK delay in milliseconds
119 max_datagram_frame_size:
120 aliases: ['max-datagram-frame-size']
121 type: int
122 description: Maximum datagram frame size in bytes
123 max_idle_timeout:
124 aliases: ['max-idle-timeout']
125 type: int
126 description: Maximum idle timeout milliseconds
127 max_udp_payload_size:
128 aliases: ['max-udp-payload-size']
129 type: int
130 description: Maximum UDP payload size in bytes
131 realservers:
132 type: list
133 elements: dict
134 description: Realservers.
135 suboptions:
136 addr_type:
137 aliases: ['addr-type']
138 type: str
139 description: Type of address.
140 choices: ['fqdn', 'ip']
141 address:
142 type: list
143 elements: str
144 description: Address or address group of the real server.
145 health_check:
146 aliases: ['health-check']
147 type: str
148 description: Enable to check the responsiveness of the real server before forwarding traffic.
149 choices: ['disable', 'enable']
150 health_check_proto:
151 aliases: ['health-check-proto']
152 type: str
153 description: Protocol of the health check monitor to use when polling to determine servers connectivity status.
154 choices: ['ping', 'http', 'tcp-connect']
155 holddown_interval:
156 aliases: ['holddown-interval']
157 type: str
158 description: Enable/disable holddown timer.
159 choices: ['disable', 'enable']
160 http_host:
161 aliases: ['http-host']
162 type: str
163 description: HTTP server domain name in HTTP header.
164 id:
165 type: int
166 description: Real server ID.
167 ip:
168 type: str
169 description: IP address of the real server.
170 port:
171 type: int
172 description: Port for communicating with the real server.
173 status:
174 type: str
175 description: Set the status of the real server to active so that it can accept traffic, or on standby or disabled so no traffic...
176 choices: ['active', 'standby', 'disable']
177 translate_host:
178 aliases: ['translate-host']
179 type: str
180 description: Enable/disable translation of hostname/IP from virtual server to real server.
181 choices: ['disable', 'enable']
182 verify_cert:
183 aliases: ['verify-cert']
184 type: str
185 description: Enable/disable certificate verification of the real server.
186 choices: ['disable', 'enable']
187 weight:
188 type: int
189 description: Weight of the real server.
190 service:
191 type: str
192 description: Service.
193 choices: ['http', 'https']
194 ssl_algorithm:
195 aliases: ['ssl-algorithm']
196 type: str
197 description: Permitted encryption algorithms for the server side of SSL full mode sessions according to encryption strength.
198 choices: ['high', 'medium', 'low']
199 ssl_cipher_suites:
200 aliases: ['ssl-cipher-suites']
201 type: list
202 elements: dict
203 description: Ssl cipher suites.
204 suboptions:
205 cipher:
206 type: str
207 description: Cipher suite name.
208 choices: ['TLS-RSA-WITH-RC4-128-MD5', 'TLS-RSA-WITH-RC4-128-SHA',
209 'TLS-RSA-WITH-DES-CBC-SHA', 'TLS-RSA-WITH-3DES-EDE-CBC-SHA',
210 'TLS-RSA-WITH-AES-128-CBC-SHA', 'TLS-RSA-WITH-AES-256-CBC-SHA',
211 'TLS-RSA-WITH-AES-128-CBC-SHA256',
212 'TLS-RSA-WITH-AES-256-CBC-SHA256',
213 'TLS-RSA-WITH-CAMELLIA-128-CBC-SHA',
214 'TLS-RSA-WITH-CAMELLIA-256-CBC-SHA',
215 'TLS-RSA-WITH-CAMELLIA-128-CBC-SHA256',
216 'TLS-RSA-WITH-CAMELLIA-256-CBC-SHA256',
217 'TLS-RSA-WITH-SEED-CBC-SHA', 'TLS-RSA-WITH-ARIA-128-CBC-SHA256',
218 'TLS-RSA-WITH-ARIA-256-CBC-SHA384',
219 'TLS-DHE-RSA-WITH-DES-CBC-SHA',
220 'TLS-DHE-RSA-WITH-3DES-EDE-CBC-SHA',
221 'TLS-DHE-RSA-WITH-AES-128-CBC-SHA',
222 'TLS-DHE-RSA-WITH-AES-256-CBC-SHA',
223 'TLS-DHE-RSA-WITH-AES-128-CBC-SHA256',
224 'TLS-DHE-RSA-WITH-AES-256-CBC-SHA256',
225 'TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA',
226 'TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA',
227 'TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA256',
228 'TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA256',
229 'TLS-DHE-RSA-WITH-SEED-CBC-SHA',
230 'TLS-DHE-RSA-WITH-ARIA-128-CBC-SHA256',
231 'TLS-DHE-RSA-WITH-ARIA-256-CBC-SHA384',
232 'TLS-ECDHE-RSA-WITH-RC4-128-SHA',
233 'TLS-ECDHE-RSA-WITH-3DES-EDE-CBC-SHA',
234 'TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA',
235 'TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA',
236 'TLS-ECDHE-RSA-WITH-CHACHA20-POLY1305-SHA256',
237 'TLS-ECDHE-ECDSA-WITH-CHACHA20-POLY1305-SHA256',
238 'TLS-DHE-RSA-WITH-CHACHA20-POLY1305-SHA256',
239 'TLS-DHE-RSA-WITH-AES-128-GCM-SHA256',
240 'TLS-DHE-RSA-WITH-AES-256-GCM-SHA384',
241 'TLS-DHE-DSS-WITH-AES-128-CBC-SHA',
242 'TLS-DHE-DSS-WITH-AES-256-CBC-SHA',
243 'TLS-DHE-DSS-WITH-AES-128-CBC-SHA256',
244 'TLS-DHE-DSS-WITH-AES-128-GCM-SHA256',
245 'TLS-DHE-DSS-WITH-AES-256-CBC-SHA256',
246 'TLS-DHE-DSS-WITH-AES-256-GCM-SHA384',
247 'TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA256',
248 'TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256',
249 'TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384',
250 'TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384',
251 'TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA',
252 'TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA256',
253 'TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256',
254 'TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA384',
255 'TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384',
256 'TLS-RSA-WITH-AES-128-GCM-SHA256',
257 'TLS-RSA-WITH-AES-256-GCM-SHA384',
258 'TLS-DHE-DSS-WITH-CAMELLIA-128-CBC-SHA',
259 'TLS-DHE-DSS-WITH-CAMELLIA-256-CBC-SHA',
260 'TLS-DHE-DSS-WITH-CAMELLIA-128-CBC-SHA256',
261 'TLS-DHE-DSS-WITH-CAMELLIA-256-CBC-SHA256',
262 'TLS-DHE-DSS-WITH-SEED-CBC-SHA',
263 'TLS-DHE-DSS-WITH-ARIA-128-CBC-SHA256',
264 'TLS-DHE-DSS-WITH-ARIA-256-CBC-SHA384',
265 'TLS-ECDHE-RSA-WITH-ARIA-128-CBC-SHA256',
266 'TLS-ECDHE-RSA-WITH-ARIA-256-CBC-SHA384',
267 'TLS-ECDHE-ECDSA-WITH-ARIA-128-CBC-SHA256',
268 'TLS-ECDHE-ECDSA-WITH-ARIA-256-CBC-SHA384',
269 'TLS-DHE-DSS-WITH-3DES-EDE-CBC-SHA',
270 'TLS-DHE-DSS-WITH-DES-CBC-SHA', 'TLS-AES-128-GCM-SHA256',
271 'TLS-AES-256-GCM-SHA384', 'TLS-CHACHA20-POLY1305-SHA256',
272 'TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA']
273 priority:
274 type: int
275 description: SSL/TLS cipher suites priority.
276 versions:
277 type: list
278 elements: str
279 description: SSL/TLS versions that the cipher suite can be used with.
280 choices: ['tls-1.0', 'tls-1.1', 'tls-1.2', 'tls-1.3']
281 ssl_dh_bits:
282 aliases: ['ssl-dh-bits']
283 type: str
284 description: Number of bits to use in the Diffie-Hellman exchange for RSA encryption of SSL sessions.
285 choices: ['768', '1024', '1536', '2048', '3072', '4096']
286 ssl_max_version:
287 aliases: ['ssl-max-version']
288 type: str
289 description: Highest SSL/TLS version acceptable from a server.
290 choices: ['tls-1.0', 'tls-1.1', 'tls-1.2', 'tls-1.3']
291 ssl_min_version:
292 aliases: ['ssl-min-version']
293 type: str
294 description: Lowest SSL/TLS version acceptable from a server.
295 choices: ['tls-1.0', 'tls-1.1', 'tls-1.2', 'tls-1.3']
296 ssl_renegotiation:
297 aliases: ['ssl-renegotiation']
298 type: str
299 description: Enable/disable secure renegotiation to comply with RFC 5746.
300 choices: ['disable', 'enable']
301 url_map:
302 aliases: ['url-map']
303 type: str
304 description: URL pattern to match.
305 url_map_type:
306 aliases: ['url-map-type']
307 type: str
308 description: Type of url-map.
309 choices: ['sub-string', 'wildcard', 'regex']
310 '''
311
312 EXAMPLES = '''
313 - name: Example playbook (generated based on argument schema)
314 hosts: fortimanagers
315 connection: httpapi
316 gather_facts: false
317 tasks:
318 - name: Set IPv4 API Gateway.
319 fortinet.fortimanager.fmgr_ztna_webproxy_apigateway:
320 # workspace_locking_adom: <global or your adom name>
321 adom: <your own value>
322 web_proxy: <your own value>
323 state: present # <value in [present, absent]>
324 ztna_webproxy_apigateway:
325 id: 0 # Required variable, integer
326 # h2_support: <value in [disable, enable]>
327 # h3_support: <value in [disable, enable]>
328 # http_cookie_age: <integer>
329 # http_cookie_domain: <string>
330 # http_cookie_domain_from_host: <value in [disable, enable]>
331 # http_cookie_generation: <integer>
332 # http_cookie_path: <string>
333 # http_cookie_share: <value in [disable, same-ip]>
334 # https_cookie_secure: <value in [disable, enable]>
335 # ldb_method: <value in [static, round-robin, weighted, ...]>
336 # persistence: <value in [none, http-cookie]>
337 # quic:
338 # ack_delay_exponent: <integer>
339 # active_connection_id_limit: <integer>
340 # active_migration: <value in [disable, enable]>
341 # grease_quic_bit: <value in [disable, enable]>
342 # max_ack_delay: <integer>
343 # max_datagram_frame_size: <integer>
344 # max_idle_timeout: <integer>
345 # max_udp_payload_size: <integer>
346 # realservers:
347 # - addr_type: <value in [fqdn, ip]>
348 # address: <list or string>
349 # health_check: <value in [disable, enable]>
350 # health_check_proto: <value in [ping, http, tcp-connect]>
351 # holddown_interval: <value in [disable, enable]>
352 # http_host: <string>
353 # id: <integer>
354 # ip: <string>
355 # port: <integer>
356 # status: <value in [active, standby, disable]>
357 # translate_host: <value in [disable, enable]>
358 # verify_cert: <value in [disable, enable]>
359 # weight: <integer>
360 # service: <value in [http, https]>
361 # ssl_algorithm: <value in [high, medium, low]>
362 # ssl_cipher_suites:
363 # - cipher: <value in [TLS-RSA-WITH-RC4-128-MD5, TLS-RSA-WITH-RC4-128-SHA, TLS-RSA-WITH-DES-CBC-SHA, ...]>
364 # priority: <integer>
365 # versions: ["tls-1.0", "tls-1.1", "tls-1.2", "tls-1.3"]
366 # ssl_dh_bits: <value in [768, 1024, 1536, ...]>
367 # ssl_max_version: <value in [tls-1.0, tls-1.1, tls-1.2, ...]>
368 # ssl_min_version: <value in [tls-1.0, tls-1.1, tls-1.2, ...]>
369 # ssl_renegotiation: <value in [disable, enable]>
370 # url_map: <string>
371 # url_map_type: <value in [sub-string, wildcard, regex]>
372 '''
373
374 RETURN = '''
375 meta:
376 description: The result of the request.
377 type: dict
378 returned: always
379 contains:
380 request_url:
381 description: The full url requested.
382 returned: always
383 type: str
384 sample: /sys/login/user
385 response_code:
386 description: The status of api request.
387 returned: always
388 type: int
389 sample: 0
390 response_data:
391 description: The api response.
392 type: list
393 returned: always
394 response_message:
395 description: The descriptive message of the api response.
396 type: str
397 returned: always
398 sample: OK.
399 system_information:
400 description: The information of the target system.
401 type: dict
402 returned: always
403 rc:
404 description: The status the request.
405 type: int
406 returned: always
407 sample: 0
408 version_check_warning:
409 description: Warning if the parameters used in the playbook are not supported by the current FortiManager version.
410 type: list
411 returned: complex
412 '''
413 from ansible.module_utils.basic import AnsibleModule
414 from ansible.module_utils.connection import Connection
415 from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import NAPIManager, check_galaxy_version, check_parameter_bypass
416 from ansible_collections.fortinet.fortimanager.plugins.module_utils.common import get_module_arg_spec
417
418
419 def main():
420 urls_list = [
421 '/pm/config/adom/{adom}/obj/ztna/web-proxy/{web-proxy}/api-gateway',
422 '/pm/config/global/obj/ztna/web-proxy/{web-proxy}/api-gateway'
423 ]
424 module_arg_spec = {
425 'adom': {'required': True, 'type': 'str'},
426 'web-proxy': {'type': 'str', 'api_name': 'web_proxy'},
427 'web_proxy': {'type': 'str'},
428 'revision_note': {'type': 'str'},
429 'ztna_webproxy_apigateway': {
430 'type': 'dict', 'v_range': [['7.6.4', '']],
431 'options': {
432 'h2-support': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
433 'h3-support': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
434 'http-cookie-age': {'v_range': [['7.6.4', '']], 'type': 'int'},
435 'http-cookie-domain': {'v_range': [['7.6.4', '']], 'type': 'str'},
436 'http-cookie-domain-from-host': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
437 'http-cookie-generation': {'v_range': [['7.6.4', '']], 'type': 'int'},
438 'http-cookie-path': {'v_range': [['7.6.4', '']], 'type': 'str'},
439 'http-cookie-share': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'same-ip'], 'type': 'str'},
440 'https-cookie-secure': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
441 'id': {'v_range': [['7.6.4', '']], 'required': True, 'type': 'int'},
442 'ldb-method': {'v_range': [['7.6.4', '']], 'choices': ['static', 'round-robin', 'weighted', 'first-alive', 'http-host'], 'type': 'str'},
443 'persistence': {'v_range': [['7.6.4', '']], 'choices': ['none', 'http-cookie'], 'type': 'str'},
444 'quic': {
445 'v_range': [['7.6.4', '']],
446 'type': 'dict',
447 'options': {
448 'ack-delay-exponent': {'v_range': [['7.6.4', '']], 'type': 'int'},
449 'active-connection-id-limit': {'v_range': [['7.6.4', '']], 'type': 'int'},
450 'active-migration': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
451 'grease-quic-bit': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
452 'max-ack-delay': {'v_range': [['7.6.4', '']], 'type': 'int'},
453 'max-datagram-frame-size': {'v_range': [['7.6.4', '']], 'type': 'int'},
454 'max-idle-timeout': {'v_range': [['7.6.4', '']], 'type': 'int'},
455 'max-udp-payload-size': {'v_range': [['7.6.4', '']], 'type': 'int'}
456 }
457 },
458 'realservers': {
459 'v_range': [['7.6.4', '']],
460 'type': 'list',
461 'options': {
462 'addr-type': {'v_range': [['7.6.4', '']], 'choices': ['fqdn', 'ip'], 'type': 'str'},
463 'address': {'v_range': [['7.6.4', '']], 'type': 'list', 'elements': 'str'},
464 'health-check': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
465 'health-check-proto': {'v_range': [['7.6.4', '']], 'choices': ['ping', 'http', 'tcp-connect'], 'type': 'str'},
466 'holddown-interval': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
467 'http-host': {'v_range': [['7.6.4', '']], 'type': 'str'},
468 'id': {'v_range': [['7.6.4', '']], 'type': 'int'},
469 'ip': {'v_range': [['7.6.4', '']], 'type': 'str'},
470 'port': {'v_range': [['7.6.4', '']], 'type': 'int'},
471 'status': {'v_range': [['7.6.4', '']], 'choices': ['active', 'standby', 'disable'], 'type': 'str'},
472 'translate-host': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
473 'verify-cert': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
474 'weight': {'v_range': [['7.6.4', '']], 'type': 'int'}
475 },
476 'elements': 'dict'
477 },
478 'service': {'v_range': [['7.6.4', '']], 'choices': ['http', 'https'], 'type': 'str'},
479 'ssl-algorithm': {'v_range': [['7.6.4', '']], 'choices': ['high', 'medium', 'low'], 'type': 'str'},
480 'ssl-cipher-suites': {
481 'v_range': [['7.6.4', '']],
482 'type': 'list',
483 'options': {
484 'cipher': {
485 'v_range': [['7.6.4', '']],
486 'choices': [
487 'TLS-RSA-WITH-RC4-128-MD5', 'TLS-RSA-WITH-RC4-128-SHA', 'TLS-RSA-WITH-DES-CBC-SHA', 'TLS-RSA-WITH-3DES-EDE-CBC-SHA',
488 'TLS-RSA-WITH-AES-128-CBC-SHA', 'TLS-RSA-WITH-AES-256-CBC-SHA', 'TLS-RSA-WITH-AES-128-CBC-SHA256',
489 'TLS-RSA-WITH-AES-256-CBC-SHA256', 'TLS-RSA-WITH-CAMELLIA-128-CBC-SHA', 'TLS-RSA-WITH-CAMELLIA-256-CBC-SHA',
490 'TLS-RSA-WITH-CAMELLIA-128-CBC-SHA256', 'TLS-RSA-WITH-CAMELLIA-256-CBC-SHA256', 'TLS-RSA-WITH-SEED-CBC-SHA',
491 'TLS-RSA-WITH-ARIA-128-CBC-SHA256', 'TLS-RSA-WITH-ARIA-256-CBC-SHA384', 'TLS-DHE-RSA-WITH-DES-CBC-SHA',
492 'TLS-DHE-RSA-WITH-3DES-EDE-CBC-SHA', 'TLS-DHE-RSA-WITH-AES-128-CBC-SHA', 'TLS-DHE-RSA-WITH-AES-256-CBC-SHA',
493 'TLS-DHE-RSA-WITH-AES-128-CBC-SHA256', 'TLS-DHE-RSA-WITH-AES-256-CBC-SHA256', 'TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA',
494 'TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA', 'TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA256',
495 'TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA256', 'TLS-DHE-RSA-WITH-SEED-CBC-SHA', 'TLS-DHE-RSA-WITH-ARIA-128-CBC-SHA256',
496 'TLS-DHE-RSA-WITH-ARIA-256-CBC-SHA384', 'TLS-ECDHE-RSA-WITH-RC4-128-SHA', 'TLS-ECDHE-RSA-WITH-3DES-EDE-CBC-SHA',
497 'TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA', 'TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA',
498 'TLS-ECDHE-RSA-WITH-CHACHA20-POLY1305-SHA256', 'TLS-ECDHE-ECDSA-WITH-CHACHA20-POLY1305-SHA256',
499 'TLS-DHE-RSA-WITH-CHACHA20-POLY1305-SHA256', 'TLS-DHE-RSA-WITH-AES-128-GCM-SHA256',
500 'TLS-DHE-RSA-WITH-AES-256-GCM-SHA384', 'TLS-DHE-DSS-WITH-AES-128-CBC-SHA', 'TLS-DHE-DSS-WITH-AES-256-CBC-SHA',
501 'TLS-DHE-DSS-WITH-AES-128-CBC-SHA256', 'TLS-DHE-DSS-WITH-AES-128-GCM-SHA256', 'TLS-DHE-DSS-WITH-AES-256-CBC-SHA256',
502 'TLS-DHE-DSS-WITH-AES-256-GCM-SHA384', 'TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA256', 'TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256',
503 'TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384', 'TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384', 'TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA',
504 'TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA256', 'TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256',
505 'TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA384', 'TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384', 'TLS-RSA-WITH-AES-128-GCM-SHA256',
506 'TLS-RSA-WITH-AES-256-GCM-SHA384', 'TLS-DHE-DSS-WITH-CAMELLIA-128-CBC-SHA', 'TLS-DHE-DSS-WITH-CAMELLIA-256-CBC-SHA',
507 'TLS-DHE-DSS-WITH-CAMELLIA-128-CBC-SHA256', 'TLS-DHE-DSS-WITH-CAMELLIA-256-CBC-SHA256', 'TLS-DHE-DSS-WITH-SEED-CBC-SHA',
508 'TLS-DHE-DSS-WITH-ARIA-128-CBC-SHA256', 'TLS-DHE-DSS-WITH-ARIA-256-CBC-SHA384', 'TLS-ECDHE-RSA-WITH-ARIA-128-CBC-SHA256',
509 'TLS-ECDHE-RSA-WITH-ARIA-256-CBC-SHA384', 'TLS-ECDHE-ECDSA-WITH-ARIA-128-CBC-SHA256',
510 'TLS-ECDHE-ECDSA-WITH-ARIA-256-CBC-SHA384', 'TLS-DHE-DSS-WITH-3DES-EDE-CBC-SHA', 'TLS-DHE-DSS-WITH-DES-CBC-SHA',
511 'TLS-AES-128-GCM-SHA256', 'TLS-AES-256-GCM-SHA384', 'TLS-CHACHA20-POLY1305-SHA256',
512 'TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA'
513 ],
514 'type': 'str'
515 },
516 'priority': {'v_range': [['7.6.4', '']], 'type': 'int'},
517 'versions': {
518 'v_range': [['7.6.4', '']],
519 'type': 'list',
520 'choices': ['tls-1.0', 'tls-1.1', 'tls-1.2', 'tls-1.3'],
521 'elements': 'str'
522 }
523 },
524 'elements': 'dict'
525 },
526 'ssl-dh-bits': {'v_range': [['7.6.4', '']], 'choices': ['768', '1024', '1536', '2048', '3072', '4096'], 'type': 'str'},
527 'ssl-max-version': {'v_range': [['7.6.4', '']], 'choices': ['tls-1.0', 'tls-1.1', 'tls-1.2', 'tls-1.3'], 'type': 'str'},
528 'ssl-min-version': {'v_range': [['7.6.4', '']], 'choices': ['tls-1.0', 'tls-1.1', 'tls-1.2', 'tls-1.3'], 'type': 'str'},
529 'ssl-renegotiation': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
530 'url-map': {'v_range': [['7.6.4', '']], 'type': 'str'},
531 'url-map-type': {'v_range': [['7.6.4', '']], 'choices': ['sub-string', 'wildcard', 'regex'], 'type': 'str'}
532 }
533 }
534 }
535
536 module_option_spec = get_module_arg_spec('full crud')
537 module_arg_spec.update(module_option_spec)
538 check_galaxy_version(module_arg_spec)
539 module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'ztna_webproxy_apigateway'),
540 supports_check_mode=True)
541 if not module._socket_path:
542 module.fail_json(msg='MUST RUN IN HTTPAPI MODE')
543 connection = Connection(module._socket_path)
544 fmgr = NAPIManager('full crud', module_arg_spec, urls_list,
545 'id', 'data', module, connection)
546 fmgr.process_crud()
547 module.exit_json(meta=module.params)
548
549
550 if __name__ == '__main__':
551 main()