gcore 0.12.0__py3-none-any.whl → 0.14.0__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 gcore might be problematic. Click here for more details.

Files changed (340) hide show
  1. gcore/__init__.py +3 -1
  2. gcore/_base_client.py +9 -9
  3. gcore/_client.py +25 -10
  4. gcore/_models.py +10 -4
  5. gcore/_qs.py +7 -7
  6. gcore/_types.py +18 -11
  7. gcore/_utils/_transform.py +2 -2
  8. gcore/_utils/_utils.py +4 -4
  9. gcore/_version.py +1 -1
  10. gcore/pagination.py +137 -0
  11. gcore/resources/__init__.py +14 -0
  12. gcore/resources/cdn/__init__.py +201 -0
  13. gcore/resources/cdn/audit_log.py +406 -0
  14. gcore/resources/cdn/cdn.py +957 -0
  15. gcore/resources/cdn/certificates.py +1062 -0
  16. gcore/resources/cdn/ip_ranges.py +224 -0
  17. gcore/resources/cdn/logs/__init__.py +33 -0
  18. gcore/resources/cdn/logs/logs.py +1424 -0
  19. gcore/resources/cdn/logs/settings.py +1081 -0
  20. gcore/resources/cdn/logs_uploader/__init__.py +61 -0
  21. gcore/resources/cdn/logs_uploader/configs.py +868 -0
  22. gcore/resources/cdn/logs_uploader/logs_uploader.py +166 -0
  23. gcore/resources/cdn/logs_uploader/policies.py +1060 -0
  24. gcore/resources/cdn/logs_uploader/targets.py +811 -0
  25. gcore/resources/cdn/metrics.py +419 -0
  26. gcore/resources/cdn/network_capacity.py +139 -0
  27. gcore/resources/cdn/origin_groups.py +1496 -0
  28. gcore/resources/cdn/resources/__init__.py +47 -0
  29. gcore/resources/cdn/resources/resources.py +2060 -0
  30. gcore/resources/cdn/resources/rules.py +1027 -0
  31. gcore/resources/cdn/resources/shield.py +259 -0
  32. gcore/resources/cdn/rule_templates.py +883 -0
  33. gcore/resources/cdn/shields.py +139 -0
  34. gcore/resources/cdn/statistics.py +1408 -0
  35. gcore/resources/cdn/trusted_ca_certificates.py +592 -0
  36. gcore/resources/cloud/audit_logs.py +33 -29
  37. gcore/resources/cloud/baremetal/flavors.py +21 -17
  38. gcore/resources/cloud/baremetal/images.py +19 -15
  39. gcore/resources/cloud/baremetal/servers.py +141 -119
  40. gcore/resources/cloud/billing_reservations.py +41 -33
  41. gcore/resources/cloud/cloud.py +24 -0
  42. gcore/resources/cloud/cost_reports.py +149 -119
  43. gcore/resources/cloud/file_shares/access_rules.py +25 -13
  44. gcore/resources/cloud/file_shares/file_shares.py +107 -71
  45. gcore/resources/cloud/floating_ips.py +270 -52
  46. gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +13 -9
  47. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +275 -65
  48. gcore/resources/cloud/gpu_baremetal_clusters/images.py +69 -53
  49. gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +9 -5
  50. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +151 -127
  51. gcore/resources/cloud/inference/api_keys.py +51 -31
  52. gcore/resources/cloud/inference/applications/deployments.py +49 -31
  53. gcore/resources/cloud/inference/applications/templates.py +17 -9
  54. gcore/resources/cloud/inference/deployments/deployments.py +171 -139
  55. gcore/resources/cloud/inference/deployments/logs.py +17 -13
  56. gcore/resources/cloud/inference/flavors.py +21 -13
  57. gcore/resources/cloud/inference/inference.py +9 -5
  58. gcore/resources/cloud/inference/registry_credentials.py +45 -25
  59. gcore/resources/cloud/inference/secrets.py +45 -25
  60. gcore/resources/cloud/instances/flavors.py +17 -13
  61. gcore/resources/cloud/instances/images.py +153 -129
  62. gcore/resources/cloud/instances/instances.py +287 -213
  63. gcore/resources/cloud/instances/interfaces.py +165 -161
  64. gcore/resources/cloud/instances/metrics.py +9 -5
  65. gcore/resources/cloud/ip_ranges.py +25 -15
  66. gcore/resources/cloud/k8s/clusters/clusters.py +151 -87
  67. gcore/resources/cloud/k8s/clusters/nodes.py +19 -11
  68. gcore/resources/cloud/k8s/clusters/pools/nodes.py +19 -11
  69. gcore/resources/cloud/k8s/clusters/pools/pools.py +83 -59
  70. gcore/resources/cloud/k8s/flavors.py +13 -9
  71. gcore/resources/cloud/k8s/k8s.py +9 -5
  72. gcore/resources/cloud/load_balancers/flavors.py +11 -7
  73. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +103 -83
  74. gcore/resources/cloud/load_balancers/l7_policies/rules.py +77 -57
  75. gcore/resources/cloud/load_balancers/listeners.py +125 -105
  76. gcore/resources/cloud/load_balancers/load_balancers.py +155 -123
  77. gcore/resources/cloud/load_balancers/metrics.py +9 -5
  78. gcore/resources/cloud/load_balancers/pools/health_monitors.py +25 -17
  79. gcore/resources/cloud/load_balancers/pools/members.py +31 -23
  80. gcore/resources/cloud/load_balancers/pools/pools.py +155 -129
  81. gcore/resources/cloud/load_balancers/statuses.py +17 -9
  82. gcore/resources/cloud/networks/networks.py +79 -55
  83. gcore/resources/cloud/networks/routers.py +75 -47
  84. gcore/resources/cloud/networks/subnets.py +105 -81
  85. gcore/resources/cloud/placement_groups.py +33 -17
  86. gcore/resources/cloud/projects.py +53 -41
  87. gcore/resources/cloud/quotas/quotas.py +25 -13
  88. gcore/resources/cloud/quotas/requests.py +41 -25
  89. gcore/resources/cloud/regions.py +25 -23
  90. gcore/resources/cloud/registries/artifacts.py +17 -9
  91. gcore/resources/cloud/registries/registries.py +55 -29
  92. gcore/resources/cloud/registries/repositories.py +17 -9
  93. gcore/resources/cloud/registries/tags.py +9 -5
  94. gcore/resources/cloud/registries/users.py +65 -35
  95. gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +123 -107
  96. gcore/resources/cloud/reserved_fixed_ips/vip.py +45 -25
  97. gcore/resources/cloud/secrets.py +43 -27
  98. gcore/resources/cloud/security_groups/rules.py +55 -43
  99. gcore/resources/cloud/security_groups/security_groups.py +79 -47
  100. gcore/resources/cloud/ssh_keys.py +51 -31
  101. gcore/resources/cloud/tasks.py +57 -45
  102. gcore/resources/cloud/usage_reports.py +27 -23
  103. gcore/resources/cloud/users/role_assignments.py +49 -33
  104. gcore/resources/cloud/volumes.py +237 -201
  105. gcore/resources/dns/dns.py +17 -13
  106. gcore/resources/dns/locations.py +29 -17
  107. gcore/resources/dns/metrics.py +13 -9
  108. gcore/resources/dns/pickers/pickers.py +5 -5
  109. gcore/resources/dns/pickers/presets.py +9 -5
  110. gcore/resources/dns/zones/dnssec.py +19 -11
  111. gcore/resources/dns/zones/rrsets.py +149 -91
  112. gcore/resources/dns/zones/zones.py +247 -189
  113. gcore/resources/fastedge/apps/apps.py +105 -89
  114. gcore/resources/fastedge/apps/logs.py +25 -21
  115. gcore/resources/fastedge/binaries.py +33 -17
  116. gcore/resources/fastedge/fastedge.py +5 -5
  117. gcore/resources/fastedge/kv_stores.py +43 -31
  118. gcore/resources/fastedge/secrets.py +69 -45
  119. gcore/resources/fastedge/statistics.py +25 -17
  120. gcore/resources/fastedge/templates.py +59 -39
  121. gcore/resources/iam/api_tokens.py +43 -27
  122. gcore/resources/iam/iam.py +5 -5
  123. gcore/resources/iam/users.py +97 -65
  124. gcore/resources/security/bgp_announces.py +27 -19
  125. gcore/resources/security/events.py +23 -19
  126. gcore/resources/security/profile_templates.py +9 -5
  127. gcore/resources/security/profiles.py +69 -45
  128. gcore/resources/storage/buckets/buckets.py +37 -25
  129. gcore/resources/storage/buckets/cors.py +19 -11
  130. gcore/resources/storage/buckets/lifecycle.py +19 -11
  131. gcore/resources/storage/buckets/policy.py +25 -13
  132. gcore/resources/storage/credentials.py +19 -15
  133. gcore/resources/storage/locations.py +13 -9
  134. gcore/resources/storage/statistics.py +39 -31
  135. gcore/resources/storage/storage.py +105 -69
  136. gcore/resources/streaming/ai_tasks.py +307 -197
  137. gcore/resources/streaming/broadcasts.py +63 -35
  138. gcore/resources/streaming/directories.py +65 -39
  139. gcore/resources/streaming/players.py +47 -31
  140. gcore/resources/streaming/playlists.py +189 -123
  141. gcore/resources/streaming/quality_sets.py +69 -39
  142. gcore/resources/streaming/restreams.py +47 -27
  143. gcore/resources/streaming/statistics.py +613 -407
  144. gcore/resources/streaming/streams/overlays.py +107 -67
  145. gcore/resources/streaming/streams/streams.py +403 -263
  146. gcore/resources/streaming/videos/subtitles.py +131 -75
  147. gcore/resources/streaming/videos/videos.py +429 -279
  148. gcore/resources/waap/advanced_rules.py +9 -5
  149. gcore/resources/waap/custom_page_sets.py +99 -75
  150. gcore/resources/waap/domains/advanced_rules.py +157 -99
  151. gcore/resources/waap/domains/api_discovery.py +71 -47
  152. gcore/resources/waap/domains/api_path_groups.py +9 -5
  153. gcore/resources/waap/domains/api_paths.py +79 -83
  154. gcore/resources/waap/domains/custom_rules.py +89 -59
  155. gcore/resources/waap/domains/domains.py +59 -41
  156. gcore/resources/waap/domains/firewall_rules.py +83 -55
  157. gcore/resources/waap/domains/insight_silences.py +59 -39
  158. gcore/resources/waap/domains/insights.py +39 -27
  159. gcore/resources/waap/domains/settings.py +21 -13
  160. gcore/resources/waap/domains/statistics.py +99 -75
  161. gcore/resources/waap/insights.py +23 -21
  162. gcore/resources/waap/ip_info/ip_info.py +70 -38
  163. gcore/resources/waap/ip_info/metrics.py +11 -7
  164. gcore/resources/waap/organizations.py +17 -13
  165. gcore/resources/waap/statistics.py +9 -5
  166. gcore/resources/waap/tags.py +17 -17
  167. gcore/resources/waap/waap.py +5 -5
  168. gcore/types/cdn/__init__.py +80 -0
  169. gcore/types/cdn/audit_log_list_params.py +73 -0
  170. gcore/types/cdn/ca_certificate.py +53 -0
  171. gcore/types/cdn/ca_certificate_list.py +10 -0
  172. gcore/types/cdn/cdn_account.py +86 -0
  173. gcore/types/cdn/cdn_account_limits.py +27 -0
  174. gcore/types/cdn/cdn_audit_log_entry.py +66 -0
  175. gcore/types/cdn/cdn_available_features.py +46 -0
  176. gcore/types/cdn/cdn_list_purge_statuses_params.py +67 -0
  177. gcore/types/cdn/cdn_log_entry.py +70 -0
  178. gcore/types/cdn/cdn_metrics.py +22 -0
  179. gcore/types/cdn/cdn_metrics_groups.py +13 -0
  180. gcore/types/cdn/cdn_metrics_values.py +19 -0
  181. gcore/types/cdn/cdn_resource.py +1977 -0
  182. gcore/types/cdn/cdn_resource_list.py +10 -0
  183. gcore/types/cdn/cdn_update_account_params.py +15 -0
  184. gcore/types/cdn/certificate_create_params.py +51 -0
  185. gcore/types/cdn/certificate_get_status_params.py +14 -0
  186. gcore/types/cdn/certificate_list_params.py +29 -0
  187. gcore/types/cdn/certificate_replace_params.py +39 -0
  188. gcore/types/cdn/log_download_params.py +279 -0
  189. gcore/types/cdn/log_list_params.py +273 -0
  190. gcore/types/cdn/logs/__init__.py +7 -0
  191. gcore/types/cdn/logs/log_settings.py +172 -0
  192. gcore/types/cdn/logs/setting_create_params.py +200 -0
  193. gcore/types/cdn/logs/setting_update_params.py +200 -0
  194. gcore/types/cdn/logs_aggregated_stats.py +23 -0
  195. gcore/types/cdn/logs_uploader/__init__.py +23 -0
  196. gcore/types/cdn/logs_uploader/config_create_params.py +32 -0
  197. gcore/types/cdn/logs_uploader/config_list_params.py +16 -0
  198. gcore/types/cdn/logs_uploader/config_replace_params.py +32 -0
  199. gcore/types/cdn/logs_uploader/config_update_params.py +32 -0
  200. gcore/types/cdn/logs_uploader/logs_uploader_config.py +51 -0
  201. gcore/types/cdn/logs_uploader/logs_uploader_config_list.py +10 -0
  202. gcore/types/cdn/logs_uploader/logs_uploader_policy.py +73 -0
  203. gcore/types/cdn/logs_uploader/logs_uploader_policy_list.py +10 -0
  204. gcore/types/cdn/logs_uploader/logs_uploader_target.py +236 -0
  205. gcore/types/cdn/logs_uploader/logs_uploader_target_list.py +10 -0
  206. gcore/types/cdn/logs_uploader/policy_create_params.py +61 -0
  207. gcore/types/cdn/logs_uploader/policy_list_fields_response.py +8 -0
  208. gcore/types/cdn/logs_uploader/policy_list_params.py +16 -0
  209. gcore/types/cdn/logs_uploader/policy_replace_params.py +61 -0
  210. gcore/types/cdn/logs_uploader/policy_update_params.py +61 -0
  211. gcore/types/cdn/logs_uploader/target_create_params.py +249 -0
  212. gcore/types/cdn/logs_uploader/target_list_params.py +16 -0
  213. gcore/types/cdn/logs_uploader/target_replace_params.py +249 -0
  214. gcore/types/cdn/logs_uploader/target_update_params.py +249 -0
  215. gcore/types/cdn/logs_uploader_validation.py +23 -0
  216. gcore/types/cdn/metric_list_params.py +168 -0
  217. gcore/types/cdn/network_capacity.py +22 -0
  218. gcore/types/cdn/origin_group_create_params.py +184 -0
  219. gcore/types/cdn/origin_group_list_params.py +24 -0
  220. gcore/types/cdn/origin_group_replace_params.py +190 -0
  221. gcore/types/cdn/origin_group_update_params.py +190 -0
  222. gcore/types/cdn/origin_groups.py +212 -0
  223. gcore/types/cdn/origin_groups_list.py +10 -0
  224. gcore/types/cdn/public_ip_list.py +15 -0
  225. gcore/types/cdn/public_network_list.py +15 -0
  226. gcore/types/cdn/purge_status.py +55 -0
  227. gcore/types/cdn/resource_aggregated_stats.py +80 -0
  228. gcore/types/cdn/resource_create_params.py +1825 -0
  229. gcore/types/cdn/resource_list_params.py +107 -0
  230. gcore/types/cdn/resource_prefetch_params.py +17 -0
  231. gcore/types/cdn/resource_purge_params.py +71 -0
  232. gcore/types/cdn/resource_replace_params.py +1803 -0
  233. gcore/types/cdn/resource_update_params.py +1794 -0
  234. gcore/types/cdn/resource_usage_stats.py +111 -0
  235. gcore/types/cdn/resources/__init__.py +11 -0
  236. gcore/types/cdn/resources/cdn_resource_rule.py +1695 -0
  237. gcore/types/cdn/resources/origin_shielding.py +15 -0
  238. gcore/types/cdn/resources/rule_create_params.py +1652 -0
  239. gcore/types/cdn/resources/rule_list_response.py +10 -0
  240. gcore/types/cdn/resources/rule_replace_params.py +1654 -0
  241. gcore/types/cdn/resources/rule_update_params.py +1654 -0
  242. gcore/types/cdn/resources/shield_replace_params.py +16 -0
  243. gcore/types/cdn/rule_template.py +1666 -0
  244. gcore/types/cdn/rule_template_create_params.py +1636 -0
  245. gcore/types/cdn/rule_template_list.py +10 -0
  246. gcore/types/cdn/rule_template_replace_params.py +1636 -0
  247. gcore/types/cdn/rule_template_update_params.py +1636 -0
  248. gcore/types/cdn/shield_aggregated_stats.py +23 -0
  249. gcore/types/cdn/shield_list_response.py +25 -0
  250. gcore/types/cdn/ssl_detail.py +62 -0
  251. gcore/types/cdn/ssl_detail_list.py +10 -0
  252. gcore/types/cdn/ssl_request_status.py +135 -0
  253. gcore/types/cdn/statistic_get_logs_usage_aggregated_params.py +42 -0
  254. gcore/types/cdn/statistic_get_logs_usage_series_params.py +35 -0
  255. gcore/types/cdn/statistic_get_resource_usage_aggregated_params.py +151 -0
  256. gcore/types/cdn/statistic_get_resource_usage_series_params.py +131 -0
  257. gcore/types/cdn/statistic_get_shield_usage_aggregated_params.py +42 -0
  258. gcore/types/cdn/statistic_get_shield_usage_series_params.py +25 -0
  259. gcore/types/cdn/trusted_ca_certificate_create_params.py +23 -0
  260. gcore/types/cdn/trusted_ca_certificate_list_params.py +29 -0
  261. gcore/types/cdn/trusted_ca_certificate_replace_params.py +15 -0
  262. gcore/types/cdn/usage_series_stats.py +31 -0
  263. gcore/types/cloud/__init__.py +2 -0
  264. gcore/types/cloud/file_share.py +4 -0
  265. gcore/types/cloud/file_share_create_params.py +20 -0
  266. gcore/types/cloud/file_share_update_params.py +40 -3
  267. gcore/types/cloud/floating_ip.py +1 -1
  268. gcore/types/cloud/floating_ip_detailed.py +1 -1
  269. gcore/types/cloud/floating_ip_update_params.py +43 -0
  270. gcore/types/cloud/gpu_baremetal_cluster_action_params.py +46 -0
  271. gcore/types/cloud/inference/inference_deployment.py +3 -1
  272. gcore/types/cloud/instance_create_params.py +3 -1
  273. gcore/types/cloud/k8s/cluster_create_params.py +46 -4
  274. gcore/types/cloud/k8s/cluster_update_params.py +60 -6
  275. gcore/types/cloud/k8s/clusters/pool_update_params.py +1 -1
  276. gcore/types/cloud/k8s/k8s_cluster.py +40 -3
  277. gcore/types/cloud/load_balancer_update_params.py +3 -1
  278. gcore/types/cloud/network_update_params.py +3 -1
  279. gcore/types/cloud/networks/subnet_update_params.py +3 -1
  280. gcore/types/cloud/registries/user_create_multiple_params.py +5 -3
  281. gcore/types/cloud/registries/user_create_params.py +5 -3
  282. gcore/types/cloud/registry_create_params.py +5 -3
  283. gcore/types/cloud/security_group_update_params.py +3 -1
  284. gcore/types/cloud/ssh_key_created.py +6 -3
  285. gcore/types/cloud/volume_update_params.py +3 -1
  286. gcore/types/dns/zone_get_statistics_params.py +12 -9
  287. gcore/types/dns/zone_get_statistics_response.py +3 -1
  288. gcore/types/dns/zone_import_params.py +21 -15
  289. gcore/types/dns/zones/dns_output_rrset.py +7 -3
  290. gcore/types/iam/account_overview.py +7 -2
  291. gcore/types/iam/user.py +7 -2
  292. gcore/types/iam/user_detailed.py +7 -2
  293. gcore/types/iam/user_invite_params.py +4 -1
  294. gcore/types/iam/user_update.py +7 -2
  295. gcore/types/iam/user_update_params.py +7 -2
  296. gcore/types/streaming/ai_contentmoderation_hardnudity.py +6 -4
  297. gcore/types/streaming/ai_contentmoderation_nsfw.py +6 -4
  298. gcore/types/streaming/ai_contentmoderation_softnudity.py +6 -4
  299. gcore/types/streaming/ai_contentmoderation_sport.py +6 -4
  300. gcore/types/streaming/ai_task.py +20 -11
  301. gcore/types/streaming/ai_task_create_params.py +20 -11
  302. gcore/types/streaming/ai_task_get_response.py +5 -4
  303. gcore/types/streaming/ai_task_list_params.py +11 -5
  304. gcore/types/streaming/clip.py +33 -22
  305. gcore/types/streaming/create_video_param.py +75 -43
  306. gcore/types/streaming/playlist.py +7 -5
  307. gcore/types/streaming/playlist_create_params.py +7 -5
  308. gcore/types/streaming/playlist_update_params.py +7 -5
  309. gcore/types/streaming/playlist_video.py +75 -43
  310. gcore/types/streaming/statistic_get_unique_viewers_cdn_params.py +7 -4
  311. gcore/types/streaming/stream.py +207 -136
  312. gcore/types/streaming/stream_create_clip_params.py +33 -22
  313. gcore/types/streaming/stream_create_params.py +41 -24
  314. gcore/types/streaming/stream_update_params.py +41 -24
  315. gcore/types/streaming/video.py +138 -76
  316. gcore/types/streaming/video_list_params.py +4 -2
  317. gcore/types/streaming/video_update_params.py +75 -43
  318. gcore/types/waap/__init__.py +2 -1
  319. gcore/types/waap/domain_update_params.py +2 -2
  320. gcore/types/waap/domains/advanced_rule_create_params.py +26 -18
  321. gcore/types/waap/domains/advanced_rule_list_params.py +10 -7
  322. gcore/types/waap/domains/advanced_rule_update_params.py +22 -17
  323. gcore/types/waap/domains/api_path_create_params.py +0 -3
  324. gcore/types/waap/domains/api_path_update_params.py +1 -3
  325. gcore/types/waap/domains/custom_rule_create_params.py +36 -35
  326. gcore/types/waap/domains/custom_rule_update_params.py +31 -33
  327. gcore/types/waap/domains/firewall_rule_create_params.py +6 -6
  328. gcore/types/waap/domains/firewall_rule_update_params.py +5 -5
  329. gcore/types/waap/domains/waap_advanced_rule.py +17 -9
  330. gcore/types/waap/domains/waap_custom_rule.py +5 -2
  331. gcore/types/waap/domains/waap_firewall_rule.py +1 -1
  332. gcore/types/waap/domains/waap_insight.py +1 -1
  333. gcore/types/waap/insight_list_types_params.py +1 -1
  334. gcore/types/waap/ip_info_get_top_urls_response.py +3 -12
  335. gcore/types/waap/{ip_info_get_ip_info_response.py → waap_ip_info.py} +2 -2
  336. gcore/types/waap/waap_top_url.py +13 -0
  337. {gcore-0.12.0.dist-info → gcore-0.14.0.dist-info}/METADATA +1 -1
  338. {gcore-0.12.0.dist-info → gcore-0.14.0.dist-info}/RECORD +340 -218
  339. {gcore-0.12.0.dist-info → gcore-0.14.0.dist-info}/WHEEL +0 -0
  340. {gcore-0.12.0.dist-info → gcore-0.14.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,1666 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, List, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from pydantic import Field as FieldInfo
7
+
8
+ from ..._models import BaseModel
9
+
10
+ __all__ = [
11
+ "RuleTemplate",
12
+ "Options",
13
+ "OptionsAllowedHTTPMethods",
14
+ "OptionsBotProtection",
15
+ "OptionsBotProtectionBotChallenge",
16
+ "OptionsBrotliCompression",
17
+ "OptionsBrowserCacheSettings",
18
+ "OptionsCacheHTTPHeaders",
19
+ "OptionsCors",
20
+ "OptionsCountryACL",
21
+ "OptionsDisableCache",
22
+ "OptionsDisableProxyForceRanges",
23
+ "OptionsEdgeCacheSettings",
24
+ "OptionsFastedge",
25
+ "OptionsFastedgeOnRequestBody",
26
+ "OptionsFastedgeOnRequestHeaders",
27
+ "OptionsFastedgeOnResponseBody",
28
+ "OptionsFastedgeOnResponseHeaders",
29
+ "OptionsFetchCompressed",
30
+ "OptionsFollowOriginRedirect",
31
+ "OptionsForceReturn",
32
+ "OptionsForceReturnTimeInterval",
33
+ "OptionsForwardHostHeader",
34
+ "OptionsGzipOn",
35
+ "OptionsHostHeader",
36
+ "OptionsIgnoreCookie",
37
+ "OptionsIgnoreQueryString",
38
+ "OptionsImageStack",
39
+ "OptionsIPAddressACL",
40
+ "OptionsLimitBandwidth",
41
+ "OptionsProxyCacheKey",
42
+ "OptionsProxyCacheMethodsSet",
43
+ "OptionsProxyConnectTimeout",
44
+ "OptionsProxyReadTimeout",
45
+ "OptionsQueryParamsBlacklist",
46
+ "OptionsQueryParamsWhitelist",
47
+ "OptionsQueryStringForwarding",
48
+ "OptionsRedirectHTTPToHTTPS",
49
+ "OptionsRedirectHTTPSToHTTP",
50
+ "OptionsReferrerACL",
51
+ "OptionsRequestLimiter",
52
+ "OptionsResponseHeadersHidingPolicy",
53
+ "OptionsRewrite",
54
+ "OptionsSecureKey",
55
+ "OptionsSlice",
56
+ "OptionsSni",
57
+ "OptionsStale",
58
+ "OptionsStaticResponseHeaders",
59
+ "OptionsStaticResponseHeadersValue",
60
+ "OptionsStaticHeaders",
61
+ "OptionsStaticRequestHeaders",
62
+ "OptionsUserAgentACL",
63
+ "OptionsWaap",
64
+ "OptionsWebsockets",
65
+ ]
66
+
67
+
68
+ class OptionsAllowedHTTPMethods(BaseModel):
69
+ enabled: bool
70
+ """Controls the option state.
71
+
72
+ Possible values:
73
+
74
+ - **true** - Option is enabled.
75
+ - **false** - Option is disabled.
76
+ """
77
+
78
+ value: List[Literal["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]]
79
+
80
+
81
+ class OptionsBotProtectionBotChallenge(BaseModel):
82
+ enabled: Optional[bool] = None
83
+ """Possible values:
84
+
85
+ - **true** - Bot challenge is enabled.
86
+ - **false** - Bot challenge is disabled.
87
+ """
88
+
89
+
90
+ class OptionsBotProtection(BaseModel):
91
+ bot_challenge: OptionsBotProtectionBotChallenge
92
+ """Controls the bot challenge module state."""
93
+
94
+ enabled: bool
95
+ """Controls the option state.
96
+
97
+ Possible values:
98
+
99
+ - **true** - Option is enabled.
100
+ - **false** - Option is disabled.
101
+ """
102
+
103
+
104
+ class OptionsBrotliCompression(BaseModel):
105
+ enabled: bool
106
+ """Controls the option state.
107
+
108
+ Possible values:
109
+
110
+ - **true** - Option is enabled.
111
+ - **false** - Option is disabled.
112
+ """
113
+
114
+ value: List[
115
+ Literal[
116
+ "application/javascript",
117
+ "application/json",
118
+ "application/vnd.ms-fontobject",
119
+ "application/wasm",
120
+ "application/x-font-ttf",
121
+ "application/x-javascript",
122
+ "application/xml",
123
+ "application/xml+rss",
124
+ "image/svg+xml",
125
+ "image/x-icon",
126
+ "text/css",
127
+ "text/html",
128
+ "text/javascript",
129
+ "text/plain",
130
+ "text/xml",
131
+ ]
132
+ ]
133
+ """Allows to select the content types you want to compress.
134
+
135
+ `text/html` is a mandatory content type.
136
+ """
137
+
138
+
139
+ class OptionsBrowserCacheSettings(BaseModel):
140
+ enabled: bool
141
+ """Controls the option state.
142
+
143
+ Possible values:
144
+
145
+ - **true** - Option is enabled.
146
+ - **false** - Option is disabled.
147
+ """
148
+
149
+ value: str
150
+ """Set the cache expiration time to '0s' to disable caching.
151
+
152
+ The maximum duration is any equivalent to `1y`.
153
+ """
154
+
155
+
156
+ class OptionsCacheHTTPHeaders(BaseModel):
157
+ enabled: bool
158
+ """Controls the option state.
159
+
160
+ Possible values:
161
+
162
+ - **true** - Option is enabled.
163
+ - **false** - Option is disabled.
164
+ """
165
+
166
+ value: List[str]
167
+
168
+
169
+ class OptionsCors(BaseModel):
170
+ enabled: bool
171
+ """Controls the option state.
172
+
173
+ Possible values:
174
+
175
+ - **true** - Option is enabled.
176
+ - **false** - Option is disabled.
177
+ """
178
+
179
+ value: List[str]
180
+ """Value of the Access-Control-Allow-Origin header.
181
+
182
+ Possible values:
183
+
184
+ - **Adds \\** as the Access-Control-Allow-Origin header value** - Content will be
185
+ uploaded for requests from any domain. `"value": ["\\**"]`
186
+ - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value if the
187
+ origin matches one of the listed domains** - Content will be uploaded only for
188
+ requests from the domains specified in the field.
189
+ `"value": ["domain.com", "second.dom.com"]`
190
+ - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value** -
191
+ Content will be uploaded for requests from any domain, and the domain from
192
+ which the request was sent will be added to the "Access-Control-Allow-Origin"
193
+ header in the response. `"value": ["$`http_origin`"]`
194
+ """
195
+
196
+ always: Optional[bool] = None
197
+ """
198
+ Defines whether the Access-Control-Allow-Origin header should be added to a
199
+ response from CDN regardless of response code.
200
+
201
+ Possible values:
202
+
203
+ - **true** - Header will be added to a response regardless of response code.
204
+ - **false** - Header will only be added to responses with codes: 200, 201, 204,
205
+ 206, 301, 302, 303, 304, 307, 308.
206
+ """
207
+
208
+
209
+ class OptionsCountryACL(BaseModel):
210
+ enabled: bool
211
+ """Controls the option state.
212
+
213
+ Possible values:
214
+
215
+ - **true** - Option is enabled.
216
+ - **false** - Option is disabled.
217
+ """
218
+
219
+ excepted_values: List[str]
220
+ """List of countries according to ISO-3166-1.
221
+
222
+ The meaning of the parameter depends on `policy_type` value:
223
+
224
+ - **allow** - List of countries for which access is prohibited.
225
+ - **deny** - List of countries for which access is allowed.
226
+ """
227
+
228
+ policy_type: Literal["allow", "deny"]
229
+ """Defines the type of CDN resource access policy.
230
+
231
+ Possible values:
232
+
233
+ - **allow** - Access is allowed for all the countries except for those specified
234
+ in `excepted_values` field.
235
+ - **deny** - Access is denied for all the countries except for those specified
236
+ in `excepted_values` field.
237
+ """
238
+
239
+
240
+ class OptionsDisableCache(BaseModel):
241
+ enabled: bool
242
+ """Controls the option state.
243
+
244
+ Possible values:
245
+
246
+ - **true** - Option is enabled.
247
+ - **false** - Option is disabled.
248
+ """
249
+
250
+ value: bool
251
+ """Possible values:
252
+
253
+ - **true** - content caching is disabled.
254
+ - **false** - content caching is enabled.
255
+ """
256
+
257
+
258
+ class OptionsDisableProxyForceRanges(BaseModel):
259
+ enabled: bool
260
+ """Controls the option state.
261
+
262
+ Possible values:
263
+
264
+ - **true** - Option is enabled.
265
+ - **false** - Option is disabled.
266
+ """
267
+
268
+ value: bool
269
+ """Possible values:
270
+
271
+ - **true** - Option is enabled.
272
+ - **false** - Option is disabled.
273
+ """
274
+
275
+
276
+ class OptionsEdgeCacheSettings(BaseModel):
277
+ enabled: bool
278
+ """Controls the option state.
279
+
280
+ Possible values:
281
+
282
+ - **true** - Option is enabled.
283
+ - **false** - Option is disabled.
284
+ """
285
+
286
+ custom_values: Optional[Dict[str, str]] = None
287
+ """
288
+ A MAP object representing the caching time in seconds for a response with a
289
+ specific response code.
290
+
291
+ These settings have a higher priority than the `value` field.
292
+
293
+ - Use `any` key to specify caching time for all response codes.
294
+ - Use `0s` value to disable caching for a specific response code.
295
+ """
296
+
297
+ default: Optional[str] = None
298
+ """Enables content caching according to the origin cache settings.
299
+
300
+ The value is applied to the following response codes 200, 201, 204, 206, 301,
301
+ 302, 303, 304, 307, 308, if an origin server does not have caching HTTP headers.
302
+
303
+ Responses with other codes will not be cached.
304
+
305
+ The maximum duration is any equivalent to `1y`.
306
+ """
307
+
308
+ value: Optional[str] = None
309
+ """Caching time.
310
+
311
+ The value is applied to the following response codes: 200, 206, 301, 302.
312
+ Responses with codes 4xx, 5xx will not be cached.
313
+
314
+ Use `0s` to disable caching.
315
+
316
+ The maximum duration is any equivalent to `1y`.
317
+ """
318
+
319
+
320
+ class OptionsFastedgeOnRequestBody(BaseModel):
321
+ app_id: str
322
+ """The ID of the application in FastEdge."""
323
+
324
+ enabled: Optional[bool] = None
325
+ """
326
+ Determines if the FastEdge application should be called whenever HTTP request
327
+ headers are received.
328
+ """
329
+
330
+ execute_on_edge: Optional[bool] = None
331
+ """Determines if the request should be executed at the edge nodes."""
332
+
333
+ execute_on_shield: Optional[bool] = None
334
+ """Determines if the request should be executed at the shield nodes."""
335
+
336
+ interrupt_on_error: Optional[bool] = None
337
+ """Determines if the request execution should be interrupted when an error occurs."""
338
+
339
+
340
+ class OptionsFastedgeOnRequestHeaders(BaseModel):
341
+ app_id: str
342
+ """The ID of the application in FastEdge."""
343
+
344
+ enabled: Optional[bool] = None
345
+ """
346
+ Determines if the FastEdge application should be called whenever HTTP request
347
+ headers are received.
348
+ """
349
+
350
+ execute_on_edge: Optional[bool] = None
351
+ """Determines if the request should be executed at the edge nodes."""
352
+
353
+ execute_on_shield: Optional[bool] = None
354
+ """Determines if the request should be executed at the shield nodes."""
355
+
356
+ interrupt_on_error: Optional[bool] = None
357
+ """Determines if the request execution should be interrupted when an error occurs."""
358
+
359
+
360
+ class OptionsFastedgeOnResponseBody(BaseModel):
361
+ app_id: str
362
+ """The ID of the application in FastEdge."""
363
+
364
+ enabled: Optional[bool] = None
365
+ """
366
+ Determines if the FastEdge application should be called whenever HTTP request
367
+ headers are received.
368
+ """
369
+
370
+ execute_on_edge: Optional[bool] = None
371
+ """Determines if the request should be executed at the edge nodes."""
372
+
373
+ execute_on_shield: Optional[bool] = None
374
+ """Determines if the request should be executed at the shield nodes."""
375
+
376
+ interrupt_on_error: Optional[bool] = None
377
+ """Determines if the request execution should be interrupted when an error occurs."""
378
+
379
+
380
+ class OptionsFastedgeOnResponseHeaders(BaseModel):
381
+ app_id: str
382
+ """The ID of the application in FastEdge."""
383
+
384
+ enabled: Optional[bool] = None
385
+ """
386
+ Determines if the FastEdge application should be called whenever HTTP request
387
+ headers are received.
388
+ """
389
+
390
+ execute_on_edge: Optional[bool] = None
391
+ """Determines if the request should be executed at the edge nodes."""
392
+
393
+ execute_on_shield: Optional[bool] = None
394
+ """Determines if the request should be executed at the shield nodes."""
395
+
396
+ interrupt_on_error: Optional[bool] = None
397
+ """Determines if the request execution should be interrupted when an error occurs."""
398
+
399
+
400
+ class OptionsFastedge(BaseModel):
401
+ enabled: bool
402
+ """Controls the option state.
403
+
404
+ Possible values:
405
+
406
+ - **true** - Option is enabled.
407
+ - **false** - Option is disabled.
408
+ """
409
+
410
+ on_request_body: Optional[OptionsFastedgeOnRequestBody] = None
411
+ """
412
+ Allows to configure FastEdge application that will be called to handle request
413
+ body as soon as CDN receives incoming HTTP request.
414
+ """
415
+
416
+ on_request_headers: Optional[OptionsFastedgeOnRequestHeaders] = None
417
+ """
418
+ Allows to configure FastEdge application that will be called to handle request
419
+ headers as soon as CDN receives incoming HTTP request.
420
+ """
421
+
422
+ on_response_body: Optional[OptionsFastedgeOnResponseBody] = None
423
+ """
424
+ Allows to configure FastEdge application that will be called to handle response
425
+ body before CDN sends the HTTP response.
426
+ """
427
+
428
+ on_response_headers: Optional[OptionsFastedgeOnResponseHeaders] = None
429
+ """
430
+ Allows to configure FastEdge application that will be called to handle response
431
+ headers before CDN sends the HTTP response.
432
+ """
433
+
434
+
435
+ class OptionsFetchCompressed(BaseModel):
436
+ enabled: bool
437
+ """Controls the option state.
438
+
439
+ Possible values:
440
+
441
+ - **true** - Option is enabled.
442
+ - **false** - Option is disabled.
443
+ """
444
+
445
+ value: bool
446
+ """Possible values:
447
+
448
+ - **true** - Option is enabled.
449
+ - **false** - Option is disabled.
450
+ """
451
+
452
+
453
+ class OptionsFollowOriginRedirect(BaseModel):
454
+ codes: List[Literal[301, 302, 303, 307, 308]]
455
+ """Redirect status code that the origin server returns.
456
+
457
+ To serve up to date content to end users, you will need to purge the cache after
458
+ managing the option.
459
+ """
460
+
461
+ enabled: bool
462
+ """Controls the option state.
463
+
464
+ Possible values:
465
+
466
+ - **true** - Option is enabled.
467
+ - **false** - Option is disabled.
468
+ """
469
+
470
+
471
+ class OptionsForceReturnTimeInterval(BaseModel):
472
+ end_time: str
473
+ """Time until which a custom HTTP response code should be applied.
474
+
475
+ Indicated in 24-hour format.
476
+ """
477
+
478
+ start_time: str
479
+ """Time from which a custom HTTP response code should be applied.
480
+
481
+ Indicated in 24-hour format.
482
+ """
483
+
484
+ time_zone: Optional[str] = None
485
+ """Time zone used to calculate time."""
486
+
487
+
488
+ class OptionsForceReturn(BaseModel):
489
+ body: str
490
+ """URL for redirection or text."""
491
+
492
+ code: int
493
+ """Status code value."""
494
+
495
+ enabled: bool
496
+ """Controls the option state.
497
+
498
+ Possible values:
499
+
500
+ - **true** - Option is enabled.
501
+ - **false** - Option is disabled.
502
+ """
503
+
504
+ time_interval: Optional[OptionsForceReturnTimeInterval] = None
505
+ """Controls the time at which a custom HTTP response code should be applied.
506
+
507
+ By default, a custom HTTP response code is applied at any time.
508
+ """
509
+
510
+
511
+ class OptionsForwardHostHeader(BaseModel):
512
+ enabled: bool
513
+ """Controls the option state.
514
+
515
+ Possible values:
516
+
517
+ - **true** - Option is enabled.
518
+ - **false** - Option is disabled.
519
+ """
520
+
521
+ value: bool
522
+ """Possible values:
523
+
524
+ - **true** - Option is enabled.
525
+ - **false** - Option is disabled.
526
+ """
527
+
528
+
529
+ class OptionsGzipOn(BaseModel):
530
+ enabled: bool
531
+ """Controls the option state.
532
+
533
+ Possible values:
534
+
535
+ - **true** - Option is enabled.
536
+ - **false** - Option is disabled.
537
+ """
538
+
539
+ value: bool
540
+ """Possible values:
541
+
542
+ - **true** - Option is enabled.
543
+ - **false** - Option is disabled.
544
+ """
545
+
546
+
547
+ class OptionsHostHeader(BaseModel):
548
+ enabled: bool
549
+ """Controls the option state.
550
+
551
+ Possible values:
552
+
553
+ - **true** - Option is enabled.
554
+ - **false** - Option is disabled.
555
+ """
556
+
557
+ value: str
558
+ """Host Header value."""
559
+
560
+
561
+ class OptionsIgnoreCookie(BaseModel):
562
+ enabled: bool
563
+ """Controls the option state.
564
+
565
+ Possible values:
566
+
567
+ - **true** - Option is enabled.
568
+ - **false** - Option is disabled.
569
+ """
570
+
571
+ value: bool
572
+ """Possible values:
573
+
574
+ - **true** - Option is enabled, files with cookies are cached as one file.
575
+ - **false** - Option is disabled, files with cookies are cached as different
576
+ files.
577
+ """
578
+
579
+
580
+ class OptionsIgnoreQueryString(BaseModel):
581
+ enabled: bool
582
+ """Controls the option state.
583
+
584
+ Possible values:
585
+
586
+ - **true** - Option is enabled.
587
+ - **false** - Option is disabled.
588
+ """
589
+
590
+ value: bool
591
+ """Possible values:
592
+
593
+ - **true** - Option is enabled.
594
+ - **false** - Option is disabled.
595
+ """
596
+
597
+
598
+ class OptionsImageStack(BaseModel):
599
+ enabled: bool
600
+ """Controls the option state.
601
+
602
+ Possible values:
603
+
604
+ - **true** - Option is enabled.
605
+ - **false** - Option is disabled.
606
+ """
607
+
608
+ avif_enabled: Optional[bool] = None
609
+ """Enables or disables automatic conversion of JPEG and PNG images to AVI format."""
610
+
611
+ png_lossless: Optional[bool] = None
612
+ """Enables or disables compression without quality loss for PNG format."""
613
+
614
+ quality: Optional[int] = None
615
+ """Defines quality settings for JPG and PNG images.
616
+
617
+ The higher the value, the better the image quality, and the larger the file size
618
+ after conversion.
619
+ """
620
+
621
+ webp_enabled: Optional[bool] = None
622
+ """Enables or disables automatic conversion of JPEG and PNG images to WebP format."""
623
+
624
+
625
+ class OptionsIPAddressACL(BaseModel):
626
+ enabled: bool
627
+ """Controls the option state.
628
+
629
+ Possible values:
630
+
631
+ - **true** - Option is enabled.
632
+ - **false** - Option is disabled.
633
+ """
634
+
635
+ excepted_values: List[str]
636
+ """List of IP addresses with a subnet mask.
637
+
638
+ The meaning of the parameter depends on `policy_type` value:
639
+
640
+ - **allow** - List of IP addresses for which access is prohibited.
641
+ - **deny** - List of IP addresses for which access is allowed.
642
+
643
+ Examples:
644
+
645
+ - `192.168.3.2/32`
646
+ - `2a03:d000:2980:7::8/128`
647
+ """
648
+
649
+ policy_type: Literal["allow", "deny"]
650
+ """IP access policy type.
651
+
652
+ Possible values:
653
+
654
+ - **allow** - Allow access to all IPs except IPs specified in
655
+ "`excepted_values`" field.
656
+ - **deny** - Deny access to all IPs except IPs specified in "`excepted_values`"
657
+ field.
658
+ """
659
+
660
+
661
+ class OptionsLimitBandwidth(BaseModel):
662
+ enabled: bool
663
+ """Controls the option state.
664
+
665
+ Possible values:
666
+
667
+ - **true** - Option is enabled.
668
+ - **false** - Option is disabled.
669
+ """
670
+
671
+ limit_type: Literal["static", "dynamic"]
672
+ """Method of controlling the download speed per connection.
673
+
674
+ Possible values:
675
+
676
+ - **static** - Use speed and buffer fields to set the download speed limit.
677
+ - **dynamic** - Use query strings **speed** and **buffer** to set the download
678
+ speed limit.
679
+
680
+ For example, when requesting content at the link
681
+
682
+ ```
683
+ http://cdn.example.com/video.mp4?speed=50k&buffer=500k
684
+ ```
685
+
686
+ the download speed will be limited to 50kB/s after 500 kB.
687
+ """
688
+
689
+ buffer: Optional[int] = None
690
+ """Amount of downloaded data after which the user will be rate limited."""
691
+
692
+ speed: Optional[int] = None
693
+ """Maximum download speed per connection."""
694
+
695
+
696
+ class OptionsProxyCacheKey(BaseModel):
697
+ enabled: bool
698
+ """Controls the option state.
699
+
700
+ Possible values:
701
+
702
+ - **true** - Option is enabled.
703
+ - **false** - Option is disabled.
704
+ """
705
+
706
+ value: str
707
+ """Key for caching."""
708
+
709
+
710
+ class OptionsProxyCacheMethodsSet(BaseModel):
711
+ enabled: bool
712
+ """Controls the option state.
713
+
714
+ Possible values:
715
+
716
+ - **true** - Option is enabled.
717
+ - **false** - Option is disabled.
718
+ """
719
+
720
+ value: bool
721
+ """Possible values:
722
+
723
+ - **true** - Option is enabled.
724
+ - **false** - Option is disabled.
725
+ """
726
+
727
+
728
+ class OptionsProxyConnectTimeout(BaseModel):
729
+ enabled: bool
730
+ """Controls the option state.
731
+
732
+ Possible values:
733
+
734
+ - **true** - Option is enabled.
735
+ - **false** - Option is disabled.
736
+ """
737
+
738
+ value: str
739
+ """Timeout value in seconds."""
740
+
741
+
742
+ class OptionsProxyReadTimeout(BaseModel):
743
+ enabled: bool
744
+ """Controls the option state.
745
+
746
+ Possible values:
747
+
748
+ - **true** - Option is enabled.
749
+ - **false** - Option is disabled.
750
+ """
751
+
752
+ value: str
753
+ """Timeout value in seconds."""
754
+
755
+
756
+ class OptionsQueryParamsBlacklist(BaseModel):
757
+ enabled: bool
758
+ """Controls the option state.
759
+
760
+ Possible values:
761
+
762
+ - **true** - Option is enabled.
763
+ - **false** - Option is disabled.
764
+ """
765
+
766
+ value: List[str]
767
+ """List of query parameters."""
768
+
769
+
770
+ class OptionsQueryParamsWhitelist(BaseModel):
771
+ enabled: bool
772
+ """Controls the option state.
773
+
774
+ Possible values:
775
+
776
+ - **true** - Option is enabled.
777
+ - **false** - Option is disabled.
778
+ """
779
+
780
+ value: List[str]
781
+ """List of query parameters."""
782
+
783
+
784
+ class OptionsQueryStringForwarding(BaseModel):
785
+ enabled: bool
786
+ """Controls the option state.
787
+
788
+ Possible values:
789
+
790
+ - **true** - Option is enabled.
791
+ - **false** - Option is disabled.
792
+ """
793
+
794
+ forward_from_file_types: List[str]
795
+ """
796
+ The `forward_from_files_types` field specifies the types of playlist files from
797
+ which parameters will be extracted and forwarded. This typically includes
798
+ formats that list multiple media chunk references, such as HLS and DASH
799
+ playlists. Parameters associated with these playlist files (like query strings
800
+ or headers) will be propagated to the chunks they reference.
801
+ """
802
+
803
+ forward_to_file_types: List[str]
804
+ """
805
+ The field specifies the types of media chunk files to which parameters,
806
+ extracted from playlist files, will be forwarded. These refer to the actual
807
+ segments of media content that are delivered to viewers. Ensuring the correct
808
+ parameters are forwarded to these files is crucial for maintaining the integrity
809
+ of the streaming session.
810
+ """
811
+
812
+
813
+ class OptionsRedirectHTTPToHTTPS(BaseModel):
814
+ enabled: bool
815
+ """Controls the option state.
816
+
817
+ Possible values:
818
+
819
+ - **true** - Option is enabled.
820
+ - **false** - Option is disabled.
821
+ """
822
+
823
+ value: bool
824
+ """Possible values:
825
+
826
+ - **true** - Option is enabled.
827
+ - **false** - Option is disabled.
828
+ """
829
+
830
+
831
+ class OptionsRedirectHTTPSToHTTP(BaseModel):
832
+ enabled: bool
833
+ """Controls the option state.
834
+
835
+ Possible values:
836
+
837
+ - **true** - Option is enabled.
838
+ - **false** - Option is disabled.
839
+ """
840
+
841
+ value: bool
842
+ """Possible values:
843
+
844
+ - **true** - Option is enabled.
845
+ - **false** - Option is disabled.
846
+ """
847
+
848
+
849
+ class OptionsReferrerACL(BaseModel):
850
+ enabled: bool
851
+ """Controls the option state.
852
+
853
+ Possible values:
854
+
855
+ - **true** - Option is enabled.
856
+ - **false** - Option is disabled.
857
+ """
858
+
859
+ excepted_values: List[str]
860
+ """
861
+ List of domain names or wildcard domains (without protocol: `http://` or
862
+ `https://`.)
863
+
864
+ The meaning of the parameter depends on `policy_type` value:
865
+
866
+ - **allow** - List of domain names for which access is prohibited.
867
+ - **deny** - List of IP domain names for which access is allowed.
868
+
869
+ Examples:
870
+
871
+ - `example.com`
872
+ - `\\**.example.com`
873
+ """
874
+
875
+ policy_type: Literal["allow", "deny"]
876
+ """Policy type.
877
+
878
+ Possible values:
879
+
880
+ - **allow** - Allow access to all domain names except the domain names specified
881
+ in `excepted_values` field.
882
+ - **deny** - Deny access to all domain names except the domain names specified
883
+ in `excepted_values` field.
884
+ """
885
+
886
+
887
+ class OptionsRequestLimiter(BaseModel):
888
+ enabled: bool
889
+ """Controls the option state.
890
+
891
+ Possible values:
892
+
893
+ - **true** - Option is enabled.
894
+ - **false** - Option is disabled.
895
+ """
896
+
897
+ rate: int
898
+ """Maximum request rate."""
899
+
900
+ burst: Optional[int] = None
901
+
902
+ delay: Optional[int] = None
903
+
904
+ rate_unit: Optional[Literal["r/s", "r/m"]] = None
905
+ """Units of measurement for the `rate` field.
906
+
907
+ Possible values:
908
+
909
+ - **r/s** - Requests per second.
910
+ - **r/m** - Requests per minute.
911
+
912
+ If the rate is less than one request per second, it is specified in request per
913
+ minute (r/m.)
914
+ """
915
+
916
+
917
+ class OptionsResponseHeadersHidingPolicy(BaseModel):
918
+ enabled: bool
919
+ """Controls the option state.
920
+
921
+ Possible values:
922
+
923
+ - **true** - Option is enabled.
924
+ - **false** - Option is disabled.
925
+ """
926
+
927
+ excepted: List[str]
928
+ """List of HTTP headers.
929
+
930
+ Parameter meaning depends on the value of the `mode` field:
931
+
932
+ - **show** - List of HTTP headers to hide from response.
933
+ - **hide** - List of HTTP headers to include in response. Other HTTP headers
934
+ will be hidden.
935
+
936
+ The following headers are required and cannot be hidden from response:
937
+
938
+ - `Connection`
939
+ - `Content-Length`
940
+ - `Content-Type`
941
+ - `Date`
942
+ - `Server`
943
+ """
944
+
945
+ mode: Literal["hide", "show"]
946
+ """How HTTP headers are hidden from the response.
947
+
948
+ Possible values:
949
+
950
+ - **show** - Hide only HTTP headers listed in the `excepted` field.
951
+ - **hide** - Hide all HTTP headers except headers listed in the "excepted"
952
+ field.
953
+ """
954
+
955
+
956
+ class OptionsRewrite(BaseModel):
957
+ body: str
958
+ """Path for the Rewrite option.
959
+
960
+ Example:
961
+
962
+ - `/(.\\**) /media/$1`
963
+ """
964
+
965
+ enabled: bool
966
+ """Controls the option state.
967
+
968
+ Possible values:
969
+
970
+ - **true** - Option is enabled.
971
+ - **false** - Option is disabled.
972
+ """
973
+
974
+ flag: Optional[Literal["break", "last", "redirect", "permanent"]] = None
975
+ """Flag for the Rewrite option.
976
+
977
+ Possible values:
978
+
979
+ - **last** - Stop processing the current set of `ngx_http_rewrite_module`
980
+ directives and start a search for a new location matching changed URI.
981
+ - **break** - Stop processing the current set of the Rewrite option.
982
+ - **redirect** - Return a temporary redirect with the 302 code; used when a
983
+ replacement string does not start with `http://`, `https://`, or `$scheme`.
984
+ - **permanent** - Return a permanent redirect with the 301 code.
985
+ """
986
+
987
+
988
+ class OptionsSecureKey(BaseModel):
989
+ enabled: bool
990
+ """Controls the option state.
991
+
992
+ Possible values:
993
+
994
+ - **true** - Option is enabled.
995
+ - **false** - Option is disabled.
996
+ """
997
+
998
+ key: Optional[str] = None
999
+ """Key generated on your side that will be used for URL signing."""
1000
+
1001
+ type: Optional[Literal[0, 2]] = None
1002
+ """Type of URL signing.
1003
+
1004
+ Possible types:
1005
+
1006
+ - **Type 0** - Includes end user IP to secure token generation.
1007
+ - **Type 2** - Excludes end user IP from secure token generation.
1008
+ """
1009
+
1010
+
1011
+ class OptionsSlice(BaseModel):
1012
+ enabled: bool
1013
+ """Controls the option state.
1014
+
1015
+ Possible values:
1016
+
1017
+ - **true** - Option is enabled.
1018
+ - **false** - Option is disabled.
1019
+ """
1020
+
1021
+ value: bool
1022
+ """Possible values:
1023
+
1024
+ - **true** - Option is enabled.
1025
+ - **false** - Option is disabled.
1026
+ """
1027
+
1028
+
1029
+ class OptionsSni(BaseModel):
1030
+ custom_hostname: str
1031
+ """Custom SNI hostname.
1032
+
1033
+ It is required if `sni_type` is set to custom.
1034
+ """
1035
+
1036
+ enabled: bool
1037
+ """Controls the option state.
1038
+
1039
+ Possible values:
1040
+
1041
+ - **true** - Option is enabled.
1042
+ - **false** - Option is disabled.
1043
+ """
1044
+
1045
+ sni_type: Optional[Literal["dynamic", "custom"]] = None
1046
+ """SNI (Server Name Indication) type.
1047
+
1048
+ Possible values:
1049
+
1050
+ - **dynamic** - SNI hostname depends on `hostHeader` and `forward_host_header`
1051
+ options. It has several possible combinations:
1052
+ - If the `hostHeader` option is enabled and specified, SNI hostname matches the
1053
+ Host header.
1054
+ - If the `forward_host_header` option is enabled and has true value, SNI
1055
+ hostname matches the Host header used in the request made to a CDN.
1056
+ - If the `hostHeader` and `forward_host_header` options are disabled, SNI
1057
+ hostname matches the primary CNAME.
1058
+ - **custom** - custom SNI hostname is in use.
1059
+ """
1060
+
1061
+
1062
+ class OptionsStale(BaseModel):
1063
+ enabled: bool
1064
+ """Controls the option state.
1065
+
1066
+ Possible values:
1067
+
1068
+ - **true** - Option is enabled.
1069
+ - **false** - Option is disabled.
1070
+ """
1071
+
1072
+ value: List[
1073
+ Literal[
1074
+ "error",
1075
+ "http_403",
1076
+ "http_404",
1077
+ "http_429",
1078
+ "http_500",
1079
+ "http_502",
1080
+ "http_503",
1081
+ "http_504",
1082
+ "invalid_header",
1083
+ "timeout",
1084
+ "updating",
1085
+ ]
1086
+ ]
1087
+ """Defines list of errors for which "Always online" option is applied."""
1088
+
1089
+
1090
+ class OptionsStaticResponseHeadersValue(BaseModel):
1091
+ name: str
1092
+ """HTTP Header name.
1093
+
1094
+ Restrictions:
1095
+
1096
+ - Maximum 128 symbols.
1097
+ - Latin letters (A-Z, a-z,) numbers (0-9,) dashes, and underscores only.
1098
+ """
1099
+
1100
+ value: List[str]
1101
+ """Header value.
1102
+
1103
+ Restrictions:
1104
+
1105
+ - Maximum 512 symbols.
1106
+ - Letters (a-z), numbers (0-9), spaces, and symbols (`~!@#%%^&\\**()-\\__=+
1107
+ /|\";:?.,><{}[]).
1108
+ - Must start with a letter, number, asterisk or {.
1109
+ - Multiple values can be added.
1110
+ """
1111
+
1112
+ always: Optional[bool] = None
1113
+ """
1114
+ Defines whether the header will be added to a response from CDN regardless of
1115
+ response code.
1116
+
1117
+ Possible values:
1118
+
1119
+ - **true** - Header will be added to a response from CDN regardless of response
1120
+ code.
1121
+ - **false** - Header will be added only to the following response codes: 200,
1122
+ 201, 204, 206, 301, 302, 303, 304, 307, 308.
1123
+ """
1124
+
1125
+
1126
+ class OptionsStaticResponseHeaders(BaseModel):
1127
+ enabled: bool
1128
+ """Controls the option state.
1129
+
1130
+ Possible values:
1131
+
1132
+ - **true** - Option is enabled.
1133
+ - **false** - Option is disabled.
1134
+ """
1135
+
1136
+ value: List[OptionsStaticResponseHeadersValue]
1137
+
1138
+
1139
+ class OptionsStaticHeaders(BaseModel):
1140
+ enabled: bool
1141
+ """Controls the option state.
1142
+
1143
+ Possible values:
1144
+
1145
+ - **true** - Option is enabled.
1146
+ - **false** - Option is disabled.
1147
+ """
1148
+
1149
+ value: Dict[str, str]
1150
+ """A MAP for static headers in a format of `header_name: header_value`.
1151
+
1152
+ Restrictions:
1153
+
1154
+ - **Header name** - Maximum 128 symbols, may contain Latin letters (A-Z, a-z),
1155
+ numbers (0-9), dashes, and underscores.
1156
+ - **Header value** - Maximum 512 symbols, may contain letters (a-z), numbers
1157
+ (0-9), spaces, and symbols (`~!@#%%^&\\**()-\\__=+ /|\";:?.,><{}[]). Must start
1158
+ with a letter, number, asterisk or {.
1159
+ """
1160
+
1161
+
1162
+ class OptionsStaticRequestHeaders(BaseModel):
1163
+ enabled: bool
1164
+ """Controls the option state.
1165
+
1166
+ Possible values:
1167
+
1168
+ - **true** - Option is enabled.
1169
+ - **false** - Option is disabled.
1170
+ """
1171
+
1172
+ value: Dict[str, str]
1173
+ """A MAP for static headers in a format of `header_name: header_value`.
1174
+
1175
+ Restrictions:
1176
+
1177
+ - **Header name** - Maximum 255 symbols, may contain Latin letters (A-Z, a-z),
1178
+ numbers (0-9), dashes, and underscores.
1179
+ - **Header value** - Maximum 512 symbols, may contain letters (a-z), numbers
1180
+ (0-9), spaces, and symbols (`~!@#%%^&\\**()-\\__=+ /|\";:?.,><{}[]). Must start
1181
+ with a letter, number, asterisk or {.
1182
+ """
1183
+
1184
+
1185
+ class OptionsUserAgentACL(BaseModel):
1186
+ enabled: bool
1187
+ """Controls the option state.
1188
+
1189
+ Possible values:
1190
+
1191
+ - **true** - Option is enabled.
1192
+ - **false** - Option is disabled.
1193
+ """
1194
+
1195
+ excepted_values: List[str]
1196
+ """List of User-Agents that will be allowed/denied.
1197
+
1198
+ The meaning of the parameter depends on `policy_type`:
1199
+
1200
+ - **allow** - List of User-Agents for which access is prohibited.
1201
+ - **deny** - List of User-Agents for which access is allowed.
1202
+
1203
+ Use an empty string `""` to allow/deny access when the User-Agent header is
1204
+ empty.
1205
+ """
1206
+
1207
+ policy_type: Literal["allow", "deny"]
1208
+ """User-Agents policy type.
1209
+
1210
+ Possible values:
1211
+
1212
+ - **allow** - Allow access for all User-Agents except specified in
1213
+ `excepted_values` field.
1214
+ - **deny** - Deny access for all User-Agents except specified in
1215
+ `excepted_values` field.
1216
+ """
1217
+
1218
+
1219
+ class OptionsWaap(BaseModel):
1220
+ enabled: bool
1221
+ """Controls the option state.
1222
+
1223
+ Possible values:
1224
+
1225
+ - **true** - Option is enabled.
1226
+ - **false** - Option is disabled.
1227
+ """
1228
+
1229
+ value: bool
1230
+ """Possible values:
1231
+
1232
+ - **true** - Option is enabled.
1233
+ - **false** - Option is disabled.
1234
+ """
1235
+
1236
+
1237
+ class OptionsWebsockets(BaseModel):
1238
+ enabled: bool
1239
+ """Controls the option state.
1240
+
1241
+ Possible values:
1242
+
1243
+ - **true** - Option is enabled.
1244
+ - **false** - Option is disabled.
1245
+ """
1246
+
1247
+ value: bool
1248
+ """Possible values:
1249
+
1250
+ - **true** - Option is enabled.
1251
+ - **false** - Option is disabled.
1252
+ """
1253
+
1254
+
1255
+ class Options(BaseModel):
1256
+ allowed_http_methods: Optional[OptionsAllowedHTTPMethods] = FieldInfo(alias="allowedHttpMethods", default=None)
1257
+ """HTTP methods allowed for content requests from the CDN."""
1258
+
1259
+ bot_protection: Optional[OptionsBotProtection] = None
1260
+ """
1261
+ Allows to prevent online services from overloading and ensure your business
1262
+ workflow running smoothly.
1263
+ """
1264
+
1265
+ brotli_compression: Optional[OptionsBrotliCompression] = None
1266
+ """Compresses content with Brotli on the CDN side.
1267
+
1268
+ CDN servers will request only uncompressed content from the origin.
1269
+
1270
+ Notes:
1271
+
1272
+ 1. CDN only supports "Brotli compression" when the "origin shielding" feature is
1273
+ activated.
1274
+ 2. If a precache server is not active for a CDN resource, no compression occurs,
1275
+ even if the option is enabled.
1276
+ 3. `brotli_compression` is not supported with `fetch_compressed` or `slice`
1277
+ options enabled.
1278
+ 4. `fetch_compressed` option in CDN resource settings overrides
1279
+ `brotli_compression` in rules. If you enabled `fetch_compressed` in CDN
1280
+ resource and want to enable `brotli_compression` in a rule, you must specify
1281
+ `fetch_compressed:false` in the rule.
1282
+ """
1283
+
1284
+ browser_cache_settings: Optional[OptionsBrowserCacheSettings] = None
1285
+ """Cache expiration time for users browsers in seconds.
1286
+
1287
+ Cache expiration time is applied to the following response codes: 200, 201, 204,
1288
+ 206, 301, 302, 303, 304, 307, 308.
1289
+
1290
+ Responses with other codes will not be cached.
1291
+ """
1292
+
1293
+ cache_http_headers: Optional[OptionsCacheHTTPHeaders] = None
1294
+ """**Legacy option**. Use the `response_headers_hiding_policy` option instead.
1295
+
1296
+ HTTP Headers that must be included in the response.
1297
+ """
1298
+
1299
+ cors: Optional[OptionsCors] = None
1300
+ """Enables or disables CORS (Cross-Origin Resource Sharing) header support.
1301
+
1302
+ CORS header support allows the CDN to add the Access-Control-Allow-Origin header
1303
+ to a response to a browser.
1304
+ """
1305
+
1306
+ country_acl: Optional[OptionsCountryACL] = None
1307
+ """Enables control access to content for specified countries."""
1308
+
1309
+ disable_cache: Optional[OptionsDisableCache] = None
1310
+ """**Legacy option**. Use the `edge_cache_settings` option instead.
1311
+
1312
+ Allows the complete disabling of content caching.
1313
+ """
1314
+
1315
+ disable_proxy_force_ranges: Optional[OptionsDisableProxyForceRanges] = None
1316
+ """Allows 206 responses regardless of the settings of an origin source."""
1317
+
1318
+ edge_cache_settings: Optional[OptionsEdgeCacheSettings] = None
1319
+ """Cache expiration time for CDN servers.
1320
+
1321
+ `value` and `default` fields cannot be used simultaneously.
1322
+ """
1323
+
1324
+ fastedge: Optional[OptionsFastedge] = None
1325
+ """
1326
+ Allows to configure FastEdge app to be called on different request/response
1327
+ phases.
1328
+
1329
+ Note: At least one of `on_request_headers`, `on_request_body`,
1330
+ `on_response_headers`, or `on_response_body` must be specified.
1331
+ """
1332
+
1333
+ fetch_compressed: Optional[OptionsFetchCompressed] = None
1334
+ """Makes the CDN request compressed content from the origin.
1335
+
1336
+ The origin server should support compression. CDN servers will not decompress
1337
+ your content even if a user browser does not accept compression.
1338
+
1339
+ Notes:
1340
+
1341
+ 1. `fetch_compressed` is not supported with `gzipON` or `brotli_compression` or
1342
+ `slice` options enabled.
1343
+ 2. `fetch_compressed` overrides `gzipON` and `brotli_compression` in rule. If
1344
+ you enable it in CDN resource and want to use `gzipON` and
1345
+ `brotli_compression` in a rule, you have to specify
1346
+ `"`fetch_compressed`": false` in the rule.
1347
+ """
1348
+
1349
+ follow_origin_redirect: Optional[OptionsFollowOriginRedirect] = None
1350
+ """
1351
+ Enables redirection from origin. If the origin server returns a redirect, the
1352
+ option allows the CDN to pull the requested content from the origin server that
1353
+ was returned in the redirect.
1354
+ """
1355
+
1356
+ force_return: Optional[OptionsForceReturn] = None
1357
+ """Applies custom HTTP response codes for CDN content.
1358
+
1359
+ The following codes are reserved by our system and cannot be specified in this
1360
+ option: 408, 444, 477, 494, 495, 496, 497, 499.
1361
+ """
1362
+
1363
+ forward_host_header: Optional[OptionsForwardHostHeader] = None
1364
+ """Forwards the Host header from a end-user request to an origin server.
1365
+
1366
+ `hostHeader` and `forward_host_header` options cannot be enabled simultaneously.
1367
+ """
1368
+
1369
+ gzip_on: Optional[OptionsGzipOn] = FieldInfo(alias="gzipOn", default=None)
1370
+ """Compresses content with gzip on the CDN end.
1371
+
1372
+ CDN servers will request only uncompressed content from the origin.
1373
+
1374
+ Notes:
1375
+
1376
+ 1. Compression with gzip is not supported with `fetch_compressed` or `slice`
1377
+ options enabled.
1378
+ 2. `fetch_compressed` option in CDN resource settings overrides `gzipON` in
1379
+ rules. If you enable `fetch_compressed` in CDN resource and want to enable
1380
+ `gzipON` in rules, you need to specify `"`fetch_compressed`":false` for
1381
+ rules.
1382
+ """
1383
+
1384
+ host_header: Optional[OptionsHostHeader] = FieldInfo(alias="hostHeader", default=None)
1385
+ """
1386
+ Sets the Host header that CDN servers use when request content from an origin
1387
+ server. Your server must be able to process requests with the chosen header.
1388
+
1389
+ If the option is `null`, the Host Header value is equal to first CNAME.
1390
+
1391
+ `hostHeader` and `forward_host_header` options cannot be enabled simultaneously.
1392
+ """
1393
+
1394
+ ignore_cookie: Optional[OptionsIgnoreCookie] = None
1395
+ """
1396
+ Defines whether the files with the Set-Cookies header are cached as one file or
1397
+ as different ones.
1398
+ """
1399
+
1400
+ ignore_query_string: Optional[OptionsIgnoreQueryString] = FieldInfo(alias="ignoreQueryString", default=None)
1401
+ """
1402
+ How a file with different query strings is cached: either as one object (option
1403
+ is enabled) or as different objects (option is disabled.)
1404
+
1405
+ `ignoreQueryString`, `query_params_whitelist` and `query_params_blacklist`
1406
+ options cannot be enabled simultaneously.
1407
+ """
1408
+
1409
+ image_stack: Optional[OptionsImageStack] = None
1410
+ """
1411
+ Transforms JPG and PNG images (for example, resize or crop) and automatically
1412
+ converts them to WebP or AVIF format.
1413
+ """
1414
+
1415
+ ip_address_acl: Optional[OptionsIPAddressACL] = None
1416
+ """Controls access to the CDN resource content for specific IP addresses.
1417
+
1418
+ If you want to use IPs from our CDN servers IP list for IP ACL configuration,
1419
+ you have to independently monitor their relevance. We recommend you use a script
1420
+ for automatically update IP ACL.
1421
+ [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses)
1422
+ """
1423
+
1424
+ limit_bandwidth: Optional[OptionsLimitBandwidth] = None
1425
+ """Allows to control the download speed per connection."""
1426
+
1427
+ proxy_cache_key: Optional[OptionsProxyCacheKey] = None
1428
+ """Allows you to modify your cache key.
1429
+
1430
+ If omitted, the default value is `$request_uri`.
1431
+
1432
+ Combine the specified variables to create a key for caching.
1433
+
1434
+ - **$`request_uri`**
1435
+ - **$scheme**
1436
+ - **$uri**
1437
+
1438
+ **Warning**: Enabling and changing this option can invalidate your current cache
1439
+ and affect the cache hit ratio. Furthermore, the "Purge by pattern" option will
1440
+ not work.
1441
+ """
1442
+
1443
+ proxy_cache_methods_set: Optional[OptionsProxyCacheMethodsSet] = None
1444
+ """Caching for POST requests along with default GET and HEAD."""
1445
+
1446
+ proxy_connect_timeout: Optional[OptionsProxyConnectTimeout] = None
1447
+ """The time limit for establishing a connection with the origin."""
1448
+
1449
+ proxy_read_timeout: Optional[OptionsProxyReadTimeout] = None
1450
+ """
1451
+ The time limit for receiving a partial response from the origin. If no response
1452
+ is received within this time, the connection will be closed.
1453
+
1454
+ **Note:** When used with a WebSocket connection, this option supports values
1455
+ only in the range 1–20 seconds (instead of the usual 1–30 seconds).
1456
+ """
1457
+
1458
+ query_params_blacklist: Optional[OptionsQueryParamsBlacklist] = None
1459
+ """
1460
+ Files with the specified query parameters are cached as one object, files with
1461
+ other parameters are cached as different objects.
1462
+
1463
+ `ignoreQueryString`, `query_params_whitelist` and `query_params_blacklist`
1464
+ options cannot be enabled simultaneously.
1465
+ """
1466
+
1467
+ query_params_whitelist: Optional[OptionsQueryParamsWhitelist] = None
1468
+ """
1469
+ Files with the specified query parameters are cached as different objects, files
1470
+ with other parameters are cached as one object.
1471
+
1472
+ `ignoreQueryString`, `query_params_whitelist` and `query_params_blacklist`
1473
+ options cannot be enabled simultaneously.
1474
+ """
1475
+
1476
+ query_string_forwarding: Optional[OptionsQueryStringForwarding] = None
1477
+ """
1478
+ The Query String Forwarding feature allows for the seamless transfer of
1479
+ parameters embedded in playlist files to the corresponding media chunk files.
1480
+ This functionality ensures that specific attributes, such as authentication
1481
+ tokens or tracking information, are consistently passed along from the playlist
1482
+ manifest to the individual media segments. This is particularly useful for
1483
+ maintaining continuity in security, analytics, and any other parameter-based
1484
+ operations across the entire media delivery workflow.
1485
+ """
1486
+
1487
+ redirect_http_to_https: Optional[OptionsRedirectHTTPToHTTPS] = None
1488
+ """Enables redirect from HTTP to HTTPS.
1489
+
1490
+ `redirect_http_to_https` and `redirect_https_to_http` options cannot be enabled
1491
+ simultaneously.
1492
+ """
1493
+
1494
+ redirect_https_to_http: Optional[OptionsRedirectHTTPSToHTTP] = None
1495
+ """Enables redirect from HTTPS to HTTP.
1496
+
1497
+ `redirect_http_to_https` and `redirect_https_to_http` options cannot be enabled
1498
+ simultaneously.
1499
+ """
1500
+
1501
+ referrer_acl: Optional[OptionsReferrerACL] = None
1502
+ """Controls access to the CDN resource content for specified domain names."""
1503
+
1504
+ request_limiter: Optional[OptionsRequestLimiter] = None
1505
+ """Option allows to limit the amount of HTTP requests."""
1506
+
1507
+ response_headers_hiding_policy: Optional[OptionsResponseHeadersHidingPolicy] = None
1508
+ """Hides HTTP headers from an origin server in the CDN response."""
1509
+
1510
+ rewrite: Optional[OptionsRewrite] = None
1511
+ """Changes and redirects requests from the CDN to the origin.
1512
+
1513
+ It operates according to the
1514
+ [Nginx](https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite)
1515
+ configuration.
1516
+ """
1517
+
1518
+ secure_key: Optional[OptionsSecureKey] = None
1519
+ """Configures access with tokenized URLs.
1520
+
1521
+ This makes impossible to access content without a valid (unexpired) token.
1522
+ """
1523
+
1524
+ slice: Optional[OptionsSlice] = None
1525
+ """
1526
+ Requests and caches files larger than 10 MB in parts (no larger than 10 MB per
1527
+ part.) This reduces time to first byte.
1528
+
1529
+ The option is based on the
1530
+ [Slice](https://nginx.org/en/docs/http/ngx_http_slice_module.html) module.
1531
+
1532
+ Notes:
1533
+
1534
+ 1. Origin must support HTTP Range requests.
1535
+ 2. Not supported with `gzipON`, `brotli_compression` or `fetch_compressed`
1536
+ options enabled.
1537
+ """
1538
+
1539
+ sni: Optional[OptionsSni] = None
1540
+ """
1541
+ The hostname that is added to SNI requests from CDN servers to the origin server
1542
+ via HTTPS.
1543
+
1544
+ SNI is generally only required if your origin uses shared hosting or does not
1545
+ have a dedicated IP address. If the origin server presents multiple
1546
+ certificates, SNI allows the origin server to know which certificate to use for
1547
+ the connection.
1548
+
1549
+ The option works only if `originProtocol` parameter is `HTTPS` or `MATCH`.
1550
+ """
1551
+
1552
+ stale: Optional[OptionsStale] = None
1553
+ """Serves stale cached content in case of origin unavailability."""
1554
+
1555
+ static_response_headers: Optional[OptionsStaticResponseHeaders] = None
1556
+ """Custom HTTP Headers that a CDN server adds to a response."""
1557
+
1558
+ static_headers: Optional[OptionsStaticHeaders] = FieldInfo(alias="staticHeaders", default=None)
1559
+ """**Legacy option**. Use the `static_response_headers` option instead.
1560
+
1561
+ Custom HTTP Headers that a CDN server adds to response. Up to fifty custom HTTP
1562
+ Headers can be specified. May contain a header with multiple values.
1563
+ """
1564
+
1565
+ static_request_headers: Optional[OptionsStaticRequestHeaders] = FieldInfo(
1566
+ alias="staticRequestHeaders", default=None
1567
+ )
1568
+ """Custom HTTP Headers for a CDN server to add to request.
1569
+
1570
+ Up to fifty custom HTTP Headers can be specified.
1571
+ """
1572
+
1573
+ user_agent_acl: Optional[OptionsUserAgentACL] = None
1574
+ """Controls access to the content for specified User-Agents."""
1575
+
1576
+ waap: Optional[OptionsWaap] = None
1577
+ """Allows to enable WAAP (Web Application and API Protection)."""
1578
+
1579
+ websockets: Optional[OptionsWebsockets] = None
1580
+ """Enables or disables WebSockets connections to an origin server."""
1581
+
1582
+
1583
+ class RuleTemplate(BaseModel):
1584
+ id: Optional[int] = None
1585
+ """Rule template ID."""
1586
+
1587
+ client: Optional[int] = None
1588
+ """Client ID"""
1589
+
1590
+ default: Optional[bool] = None
1591
+ """Defines whether the template is a system template developed for common cases.
1592
+
1593
+ System templates are available to all customers.
1594
+
1595
+ Possible values:
1596
+
1597
+ - **true** - Template is a system template and cannot be changed by a user.
1598
+ - **false** - Template is a custom template and can be changed by a user.
1599
+ """
1600
+
1601
+ deleted: Optional[bool] = None
1602
+ """Defines whether the template has been deleted.
1603
+
1604
+ Possible values:
1605
+
1606
+ - **true** - Template has been deleted.
1607
+ - **false** - Template has not been deleted.
1608
+ """
1609
+
1610
+ name: Optional[str] = None
1611
+ """Rule template name."""
1612
+
1613
+ options: Optional[Options] = None
1614
+ """List of options that can be configured for the rule.
1615
+
1616
+ In case of `null` value the option is not added to the rule. Option inherits its
1617
+ value from the CDN resource settings.
1618
+ """
1619
+
1620
+ override_origin_protocol: Optional[Literal["HTTPS", "HTTP", "MATCH"]] = FieldInfo(
1621
+ alias="overrideOriginProtocol", default=None
1622
+ )
1623
+ """
1624
+ Sets a protocol other than the one specified in the CDN resource settings to
1625
+ connect to the origin.
1626
+
1627
+ Possible values:
1628
+
1629
+ - **HTTPS** - CDN servers connect to origin via HTTPS protocol.
1630
+ - **HTTP** - CDN servers connect to origin via HTTP protocol.
1631
+ - **MATCH** - Connection protocol is chosen automatically; in this case, content
1632
+ on origin source should be available for the CDN both through HTTP and HTTPS
1633
+ protocols.
1634
+ - **null** - `originProtocol` setting is inherited from the CDN resource
1635
+ settings.
1636
+ """
1637
+
1638
+ rule: Optional[str] = None
1639
+ """Path to the file or folder for which the rule will be applied.
1640
+
1641
+ The rule is applied if the requested URI matches the rule path.
1642
+
1643
+ We add a leading forward slash to any rule path. Specify a path without a
1644
+ forward slash.
1645
+ """
1646
+
1647
+ rule_type: Optional[int] = FieldInfo(alias="ruleType", default=None)
1648
+ """Rule type.
1649
+
1650
+ Possible values:
1651
+
1652
+ - **Type 0** - Regular expression. Must start with '^/' or '/'.
1653
+ - **Type 1** - Regular expression. Note that for this rule type we automatically
1654
+ add / to each rule pattern before your regular expression. This type is
1655
+ **legacy**, please use Type 0.
1656
+ """
1657
+
1658
+ template: Optional[bool] = None
1659
+ """Determines whether the rule is a template."""
1660
+
1661
+ weight: Optional[int] = None
1662
+ """Rule execution order: from lowest (1) to highest.
1663
+
1664
+ If requested URI matches multiple rules, the one higher in the order of the
1665
+ rules will be applied.
1666
+ """