gcore 0.13.0__py3-none-any.whl → 0.15.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 (345) 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 +101 -59
  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 +109 -87
  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 +233 -108
  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 +245 -187
  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 +47 -29
  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 +65 -33
  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 +1997 -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 +1845 -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 +1823 -0
  233. gcore/types/cdn/resource_update_params.py +1814 -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 +1715 -0
  237. gcore/types/cdn/resources/origin_shielding.py +15 -0
  238. gcore/types/cdn/resources/rule_create_params.py +1672 -0
  239. gcore/types/cdn/resources/rule_list_response.py +10 -0
  240. gcore/types/cdn/resources/rule_replace_params.py +1674 -0
  241. gcore/types/cdn/resources/rule_update_params.py +1674 -0
  242. gcore/types/cdn/resources/shield_replace_params.py +16 -0
  243. gcore/types/cdn/rule_template.py +1686 -0
  244. gcore/types/cdn/rule_template_create_params.py +1656 -0
  245. gcore/types/cdn/rule_template_list.py +10 -0
  246. gcore/types/cdn/rule_template_replace_params.py +1656 -0
  247. gcore/types/cdn/rule_template_update_params.py +1656 -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_update_params.py +3 -1
  268. gcore/types/cloud/gpu_baremetal_cluster_action_params.py +46 -0
  269. gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_flavor.py +12 -0
  270. gcore/types/cloud/inference/inference_deployment.py +3 -1
  271. gcore/types/cloud/instance_create_params.py +3 -1
  272. gcore/types/cloud/k8s/cluster_create_params.py +46 -4
  273. gcore/types/cloud/k8s/cluster_update_params.py +60 -6
  274. gcore/types/cloud/k8s/clusters/pool_update_params.py +1 -1
  275. gcore/types/cloud/k8s/k8s_cluster.py +40 -3
  276. gcore/types/cloud/load_balancer_update_params.py +3 -1
  277. gcore/types/cloud/network_update_params.py +3 -1
  278. gcore/types/cloud/networks/subnet_update_params.py +3 -1
  279. gcore/types/cloud/quota_get_all_response.py +8 -8
  280. gcore/types/cloud/quota_get_by_region_response.py +8 -8
  281. gcore/types/cloud/quotas/request_create_params.py +4 -4
  282. gcore/types/cloud/quotas/request_get_response.py +4 -4
  283. gcore/types/cloud/quotas/request_list_response.py +4 -4
  284. gcore/types/cloud/registries/user_create_multiple_params.py +5 -3
  285. gcore/types/cloud/registries/user_create_params.py +5 -3
  286. gcore/types/cloud/registry_create_params.py +5 -3
  287. gcore/types/cloud/reserved_fixed_ip_update_params.py +16 -0
  288. gcore/types/cloud/security_group_update_params.py +3 -1
  289. gcore/types/cloud/ssh_key_created.py +6 -3
  290. gcore/types/cloud/volume_update_params.py +3 -1
  291. gcore/types/dns/zone_get_statistics_params.py +12 -9
  292. gcore/types/dns/zone_get_statistics_response.py +3 -1
  293. gcore/types/dns/zone_import_params.py +21 -15
  294. gcore/types/dns/zones/dns_output_rrset.py +7 -3
  295. gcore/types/iam/account_overview.py +31 -28
  296. gcore/types/iam/api_token.py +24 -24
  297. gcore/types/iam/api_token_create_params.py +2 -1
  298. gcore/types/iam/api_token_list.py +24 -24
  299. gcore/types/iam/user.py +7 -2
  300. gcore/types/iam/user_detailed.py +22 -17
  301. gcore/types/iam/user_invite.py +2 -4
  302. gcore/types/iam/user_invite_params.py +4 -1
  303. gcore/types/iam/user_update.py +22 -17
  304. gcore/types/iam/user_update_params.py +7 -2
  305. gcore/types/streaming/ai_contentmoderation_hardnudity.py +6 -4
  306. gcore/types/streaming/ai_contentmoderation_nsfw.py +6 -4
  307. gcore/types/streaming/ai_contentmoderation_softnudity.py +6 -4
  308. gcore/types/streaming/ai_contentmoderation_sport.py +6 -4
  309. gcore/types/streaming/ai_task.py +20 -11
  310. gcore/types/streaming/ai_task_create_params.py +20 -11
  311. gcore/types/streaming/ai_task_get_response.py +5 -4
  312. gcore/types/streaming/ai_task_list_params.py +11 -5
  313. gcore/types/streaming/clip.py +33 -22
  314. gcore/types/streaming/create_video_param.py +75 -43
  315. gcore/types/streaming/playlist.py +7 -5
  316. gcore/types/streaming/playlist_create_params.py +7 -5
  317. gcore/types/streaming/playlist_update_params.py +7 -5
  318. gcore/types/streaming/playlist_video.py +75 -43
  319. gcore/types/streaming/statistic_get_unique_viewers_cdn_params.py +7 -4
  320. gcore/types/streaming/stream.py +207 -136
  321. gcore/types/streaming/stream_create_clip_params.py +33 -22
  322. gcore/types/streaming/stream_create_params.py +41 -24
  323. gcore/types/streaming/stream_update_params.py +41 -24
  324. gcore/types/streaming/video.py +138 -76
  325. gcore/types/streaming/video_list_params.py +4 -2
  326. gcore/types/streaming/video_update_params.py +75 -43
  327. gcore/types/waap/domain_update_params.py +2 -2
  328. gcore/types/waap/domains/advanced_rule_create_params.py +26 -18
  329. gcore/types/waap/domains/advanced_rule_list_params.py +10 -7
  330. gcore/types/waap/domains/advanced_rule_update_params.py +22 -17
  331. gcore/types/waap/domains/api_path_create_params.py +0 -3
  332. gcore/types/waap/domains/api_path_update_params.py +1 -3
  333. gcore/types/waap/domains/custom_rule_create_params.py +36 -35
  334. gcore/types/waap/domains/custom_rule_update_params.py +31 -33
  335. gcore/types/waap/domains/firewall_rule_create_params.py +6 -6
  336. gcore/types/waap/domains/firewall_rule_update_params.py +5 -5
  337. gcore/types/waap/domains/waap_advanced_rule.py +17 -9
  338. gcore/types/waap/domains/waap_custom_rule.py +5 -2
  339. gcore/types/waap/domains/waap_firewall_rule.py +1 -1
  340. gcore/types/waap/domains/waap_insight.py +1 -1
  341. gcore/types/waap/insight_list_types_params.py +1 -1
  342. {gcore-0.13.0.dist-info → gcore-0.15.0.dist-info}/METADATA +1 -1
  343. {gcore-0.13.0.dist-info → gcore-0.15.0.dist-info}/RECORD +345 -224
  344. {gcore-0.13.0.dist-info → gcore-0.15.0.dist-info}/WHEEL +0 -0
  345. {gcore-0.13.0.dist-info → gcore-0.15.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,1997 @@
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
+ "CdnResource",
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
+ "OptionsHttp3Enabled",
37
+ "OptionsIgnoreCookie",
38
+ "OptionsIgnoreQueryString",
39
+ "OptionsImageStack",
40
+ "OptionsIPAddressACL",
41
+ "OptionsLimitBandwidth",
42
+ "OptionsProxyCacheKey",
43
+ "OptionsProxyCacheMethodsSet",
44
+ "OptionsProxyConnectTimeout",
45
+ "OptionsProxyReadTimeout",
46
+ "OptionsQueryParamsBlacklist",
47
+ "OptionsQueryParamsWhitelist",
48
+ "OptionsQueryStringForwarding",
49
+ "OptionsRedirectHTTPToHTTPS",
50
+ "OptionsRedirectHTTPSToHTTP",
51
+ "OptionsReferrerACL",
52
+ "OptionsRequestLimiter",
53
+ "OptionsResponseHeadersHidingPolicy",
54
+ "OptionsRewrite",
55
+ "OptionsSecureKey",
56
+ "OptionsSlice",
57
+ "OptionsSni",
58
+ "OptionsStale",
59
+ "OptionsStaticResponseHeaders",
60
+ "OptionsStaticResponseHeadersValue",
61
+ "OptionsStaticHeaders",
62
+ "OptionsStaticRequestHeaders",
63
+ "OptionsTlsVersions",
64
+ "OptionsUseDefaultLeChain",
65
+ "OptionsUseDns01LeChallenge",
66
+ "OptionsUseRsaLeCert",
67
+ "OptionsUserAgentACL",
68
+ "OptionsWaap",
69
+ "OptionsWebsockets",
70
+ ]
71
+
72
+
73
+ class OptionsAllowedHTTPMethods(BaseModel):
74
+ enabled: bool
75
+ """Controls the option state.
76
+
77
+ Possible values:
78
+
79
+ - **true** - Option is enabled.
80
+ - **false** - Option is disabled.
81
+ """
82
+
83
+ value: List[Literal["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]]
84
+
85
+
86
+ class OptionsBotProtectionBotChallenge(BaseModel):
87
+ enabled: Optional[bool] = None
88
+ """Possible values:
89
+
90
+ - **true** - Bot challenge is enabled.
91
+ - **false** - Bot challenge is disabled.
92
+ """
93
+
94
+
95
+ class OptionsBotProtection(BaseModel):
96
+ bot_challenge: OptionsBotProtectionBotChallenge
97
+ """Controls the bot challenge module state."""
98
+
99
+ enabled: bool
100
+ """Controls the option state.
101
+
102
+ Possible values:
103
+
104
+ - **true** - Option is enabled.
105
+ - **false** - Option is disabled.
106
+ """
107
+
108
+
109
+ class OptionsBrotliCompression(BaseModel):
110
+ enabled: bool
111
+ """Controls the option state.
112
+
113
+ Possible values:
114
+
115
+ - **true** - Option is enabled.
116
+ - **false** - Option is disabled.
117
+ """
118
+
119
+ value: List[
120
+ Literal[
121
+ "application/javascript",
122
+ "application/json",
123
+ "application/vnd.ms-fontobject",
124
+ "application/wasm",
125
+ "application/x-font-ttf",
126
+ "application/x-javascript",
127
+ "application/xml",
128
+ "application/xml+rss",
129
+ "image/svg+xml",
130
+ "image/x-icon",
131
+ "text/css",
132
+ "text/html",
133
+ "text/javascript",
134
+ "text/plain",
135
+ "text/xml",
136
+ ]
137
+ ]
138
+ """Allows to select the content types you want to compress.
139
+
140
+ `text/html` is a mandatory content type.
141
+ """
142
+
143
+
144
+ class OptionsBrowserCacheSettings(BaseModel):
145
+ enabled: bool
146
+ """Controls the option state.
147
+
148
+ Possible values:
149
+
150
+ - **true** - Option is enabled.
151
+ - **false** - Option is disabled.
152
+ """
153
+
154
+ value: str
155
+ """Set the cache expiration time to '0s' to disable caching.
156
+
157
+ The maximum duration is any equivalent to `1y`.
158
+ """
159
+
160
+
161
+ class OptionsCacheHTTPHeaders(BaseModel):
162
+ enabled: bool
163
+ """Controls the option state.
164
+
165
+ Possible values:
166
+
167
+ - **true** - Option is enabled.
168
+ - **false** - Option is disabled.
169
+ """
170
+
171
+ value: List[str]
172
+
173
+
174
+ class OptionsCors(BaseModel):
175
+ enabled: bool
176
+ """Controls the option state.
177
+
178
+ Possible values:
179
+
180
+ - **true** - Option is enabled.
181
+ - **false** - Option is disabled.
182
+ """
183
+
184
+ value: List[str]
185
+ """Value of the Access-Control-Allow-Origin header.
186
+
187
+ Possible values:
188
+
189
+ - **Adds \\** as the Access-Control-Allow-Origin header value** - Content will be
190
+ uploaded for requests from any domain. `"value": ["\\**"]`
191
+ - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value if the
192
+ origin matches one of the listed domains** - Content will be uploaded only for
193
+ requests from the domains specified in the field.
194
+ `"value": ["domain.com", "second.dom.com"]`
195
+ - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value** -
196
+ Content will be uploaded for requests from any domain, and the domain from
197
+ which the request was sent will be added to the "Access-Control-Allow-Origin"
198
+ header in the response. `"value": ["$`http_origin`"]`
199
+ """
200
+
201
+ always: Optional[bool] = None
202
+ """
203
+ Defines whether the Access-Control-Allow-Origin header should be added to a
204
+ response from CDN regardless of response code.
205
+
206
+ Possible values:
207
+
208
+ - **true** - Header will be added to a response regardless of response code.
209
+ - **false** - Header will only be added to responses with codes: 200, 201, 204,
210
+ 206, 301, 302, 303, 304, 307, 308.
211
+ """
212
+
213
+
214
+ class OptionsCountryACL(BaseModel):
215
+ enabled: bool
216
+ """Controls the option state.
217
+
218
+ Possible values:
219
+
220
+ - **true** - Option is enabled.
221
+ - **false** - Option is disabled.
222
+ """
223
+
224
+ excepted_values: List[str]
225
+ """List of countries according to ISO-3166-1.
226
+
227
+ The meaning of the parameter depends on `policy_type` value:
228
+
229
+ - **allow** - List of countries for which access is prohibited.
230
+ - **deny** - List of countries for which access is allowed.
231
+ """
232
+
233
+ policy_type: Literal["allow", "deny"]
234
+ """Defines the type of CDN resource access policy.
235
+
236
+ Possible values:
237
+
238
+ - **allow** - Access is allowed for all the countries except for those specified
239
+ in `excepted_values` field.
240
+ - **deny** - Access is denied for all the countries except for those specified
241
+ in `excepted_values` field.
242
+ """
243
+
244
+
245
+ class OptionsDisableCache(BaseModel):
246
+ enabled: bool
247
+ """Controls the option state.
248
+
249
+ Possible values:
250
+
251
+ - **true** - Option is enabled.
252
+ - **false** - Option is disabled.
253
+ """
254
+
255
+ value: bool
256
+ """Possible values:
257
+
258
+ - **true** - content caching is disabled.
259
+ - **false** - content caching is enabled.
260
+ """
261
+
262
+
263
+ class OptionsDisableProxyForceRanges(BaseModel):
264
+ enabled: bool
265
+ """Controls the option state.
266
+
267
+ Possible values:
268
+
269
+ - **true** - Option is enabled.
270
+ - **false** - Option is disabled.
271
+ """
272
+
273
+ value: bool
274
+ """Possible values:
275
+
276
+ - **true** - Option is enabled.
277
+ - **false** - Option is disabled.
278
+ """
279
+
280
+
281
+ class OptionsEdgeCacheSettings(BaseModel):
282
+ enabled: bool
283
+ """Controls the option state.
284
+
285
+ Possible values:
286
+
287
+ - **true** - Option is enabled.
288
+ - **false** - Option is disabled.
289
+ """
290
+
291
+ custom_values: Optional[Dict[str, str]] = None
292
+ """
293
+ A MAP object representing the caching time in seconds for a response with a
294
+ specific response code.
295
+
296
+ These settings have a higher priority than the `value` field.
297
+
298
+ - Use `any` key to specify caching time for all response codes.
299
+ - Use `0s` value to disable caching for a specific response code.
300
+ """
301
+
302
+ default: Optional[str] = None
303
+ """Enables content caching according to the origin cache settings.
304
+
305
+ The value is applied to the following response codes 200, 201, 204, 206, 301,
306
+ 302, 303, 304, 307, 308, if an origin server does not have caching HTTP headers.
307
+
308
+ Responses with other codes will not be cached.
309
+
310
+ The maximum duration is any equivalent to `1y`.
311
+ """
312
+
313
+ value: Optional[str] = None
314
+ """Caching time.
315
+
316
+ The value is applied to the following response codes: 200, 206, 301, 302.
317
+ Responses with codes 4xx, 5xx will not be cached.
318
+
319
+ Use `0s` to disable caching.
320
+
321
+ The maximum duration is any equivalent to `1y`.
322
+ """
323
+
324
+
325
+ class OptionsFastedgeOnRequestBody(BaseModel):
326
+ app_id: str
327
+ """The ID of the application in FastEdge."""
328
+
329
+ enabled: Optional[bool] = None
330
+ """
331
+ Determines if the FastEdge application should be called whenever HTTP request
332
+ headers are received.
333
+ """
334
+
335
+ execute_on_edge: Optional[bool] = None
336
+ """Determines if the request should be executed at the edge nodes."""
337
+
338
+ execute_on_shield: Optional[bool] = None
339
+ """Determines if the request should be executed at the shield nodes."""
340
+
341
+ interrupt_on_error: Optional[bool] = None
342
+ """Determines if the request execution should be interrupted when an error occurs."""
343
+
344
+
345
+ class OptionsFastedgeOnRequestHeaders(BaseModel):
346
+ app_id: str
347
+ """The ID of the application in FastEdge."""
348
+
349
+ enabled: Optional[bool] = None
350
+ """
351
+ Determines if the FastEdge application should be called whenever HTTP request
352
+ headers are received.
353
+ """
354
+
355
+ execute_on_edge: Optional[bool] = None
356
+ """Determines if the request should be executed at the edge nodes."""
357
+
358
+ execute_on_shield: Optional[bool] = None
359
+ """Determines if the request should be executed at the shield nodes."""
360
+
361
+ interrupt_on_error: Optional[bool] = None
362
+ """Determines if the request execution should be interrupted when an error occurs."""
363
+
364
+
365
+ class OptionsFastedgeOnResponseBody(BaseModel):
366
+ app_id: str
367
+ """The ID of the application in FastEdge."""
368
+
369
+ enabled: Optional[bool] = None
370
+ """
371
+ Determines if the FastEdge application should be called whenever HTTP request
372
+ headers are received.
373
+ """
374
+
375
+ execute_on_edge: Optional[bool] = None
376
+ """Determines if the request should be executed at the edge nodes."""
377
+
378
+ execute_on_shield: Optional[bool] = None
379
+ """Determines if the request should be executed at the shield nodes."""
380
+
381
+ interrupt_on_error: Optional[bool] = None
382
+ """Determines if the request execution should be interrupted when an error occurs."""
383
+
384
+
385
+ class OptionsFastedgeOnResponseHeaders(BaseModel):
386
+ app_id: str
387
+ """The ID of the application in FastEdge."""
388
+
389
+ enabled: Optional[bool] = None
390
+ """
391
+ Determines if the FastEdge application should be called whenever HTTP request
392
+ headers are received.
393
+ """
394
+
395
+ execute_on_edge: Optional[bool] = None
396
+ """Determines if the request should be executed at the edge nodes."""
397
+
398
+ execute_on_shield: Optional[bool] = None
399
+ """Determines if the request should be executed at the shield nodes."""
400
+
401
+ interrupt_on_error: Optional[bool] = None
402
+ """Determines if the request execution should be interrupted when an error occurs."""
403
+
404
+
405
+ class OptionsFastedge(BaseModel):
406
+ enabled: bool
407
+ """Controls the option state.
408
+
409
+ Possible values:
410
+
411
+ - **true** - Option is enabled.
412
+ - **false** - Option is disabled.
413
+ """
414
+
415
+ on_request_body: Optional[OptionsFastedgeOnRequestBody] = None
416
+ """
417
+ Allows to configure FastEdge application that will be called to handle request
418
+ body as soon as CDN receives incoming HTTP request.
419
+ """
420
+
421
+ on_request_headers: Optional[OptionsFastedgeOnRequestHeaders] = None
422
+ """
423
+ Allows to configure FastEdge application that will be called to handle request
424
+ headers as soon as CDN receives incoming HTTP request.
425
+ """
426
+
427
+ on_response_body: Optional[OptionsFastedgeOnResponseBody] = None
428
+ """
429
+ Allows to configure FastEdge application that will be called to handle response
430
+ body before CDN sends the HTTP response.
431
+ """
432
+
433
+ on_response_headers: Optional[OptionsFastedgeOnResponseHeaders] = None
434
+ """
435
+ Allows to configure FastEdge application that will be called to handle response
436
+ headers before CDN sends the HTTP response.
437
+ """
438
+
439
+
440
+ class OptionsFetchCompressed(BaseModel):
441
+ enabled: bool
442
+ """Controls the option state.
443
+
444
+ Possible values:
445
+
446
+ - **true** - Option is enabled.
447
+ - **false** - Option is disabled.
448
+ """
449
+
450
+ value: bool
451
+ """Possible values:
452
+
453
+ - **true** - Option is enabled.
454
+ - **false** - Option is disabled.
455
+ """
456
+
457
+
458
+ class OptionsFollowOriginRedirect(BaseModel):
459
+ codes: List[Literal[301, 302, 303, 307, 308]]
460
+ """Redirect status code that the origin server returns.
461
+
462
+ To serve up to date content to end users, you will need to purge the cache after
463
+ managing the option.
464
+ """
465
+
466
+ enabled: bool
467
+ """Controls the option state.
468
+
469
+ Possible values:
470
+
471
+ - **true** - Option is enabled.
472
+ - **false** - Option is disabled.
473
+ """
474
+
475
+
476
+ class OptionsForceReturnTimeInterval(BaseModel):
477
+ end_time: str
478
+ """Time until which a custom HTTP response code should be applied.
479
+
480
+ Indicated in 24-hour format.
481
+ """
482
+
483
+ start_time: str
484
+ """Time from which a custom HTTP response code should be applied.
485
+
486
+ Indicated in 24-hour format.
487
+ """
488
+
489
+ time_zone: Optional[str] = None
490
+ """Time zone used to calculate time."""
491
+
492
+
493
+ class OptionsForceReturn(BaseModel):
494
+ body: str
495
+ """URL for redirection or text."""
496
+
497
+ code: int
498
+ """Status code value."""
499
+
500
+ enabled: bool
501
+ """Controls the option state.
502
+
503
+ Possible values:
504
+
505
+ - **true** - Option is enabled.
506
+ - **false** - Option is disabled.
507
+ """
508
+
509
+ time_interval: Optional[OptionsForceReturnTimeInterval] = None
510
+ """Controls the time at which a custom HTTP response code should be applied.
511
+
512
+ By default, a custom HTTP response code is applied at any time.
513
+ """
514
+
515
+
516
+ class OptionsForwardHostHeader(BaseModel):
517
+ enabled: bool
518
+ """Controls the option state.
519
+
520
+ Possible values:
521
+
522
+ - **true** - Option is enabled.
523
+ - **false** - Option is disabled.
524
+ """
525
+
526
+ value: bool
527
+ """Possible values:
528
+
529
+ - **true** - Option is enabled.
530
+ - **false** - Option is disabled.
531
+ """
532
+
533
+
534
+ class OptionsGzipOn(BaseModel):
535
+ enabled: bool
536
+ """Controls the option state.
537
+
538
+ Possible values:
539
+
540
+ - **true** - Option is enabled.
541
+ - **false** - Option is disabled.
542
+ """
543
+
544
+ value: bool
545
+ """Possible values:
546
+
547
+ - **true** - Option is enabled.
548
+ - **false** - Option is disabled.
549
+ """
550
+
551
+
552
+ class OptionsHostHeader(BaseModel):
553
+ enabled: bool
554
+ """Controls the option state.
555
+
556
+ Possible values:
557
+
558
+ - **true** - Option is enabled.
559
+ - **false** - Option is disabled.
560
+ """
561
+
562
+ value: str
563
+ """Host Header value."""
564
+
565
+
566
+ class OptionsHttp3Enabled(BaseModel):
567
+ enabled: bool
568
+ """Controls the option state.
569
+
570
+ Possible values:
571
+
572
+ - **true** - Option is enabled.
573
+ - **false** - Option is disabled.
574
+ """
575
+
576
+ value: bool
577
+ """Possible values:
578
+
579
+ - **true** - Option is enabled.
580
+ - **false** - Option is disabled.
581
+ """
582
+
583
+
584
+ class OptionsIgnoreCookie(BaseModel):
585
+ enabled: bool
586
+ """Controls the option state.
587
+
588
+ Possible values:
589
+
590
+ - **true** - Option is enabled.
591
+ - **false** - Option is disabled.
592
+ """
593
+
594
+ value: bool
595
+ """Possible values:
596
+
597
+ - **true** - Option is enabled, files with cookies are cached as one file.
598
+ - **false** - Option is disabled, files with cookies are cached as different
599
+ files.
600
+ """
601
+
602
+
603
+ class OptionsIgnoreQueryString(BaseModel):
604
+ enabled: bool
605
+ """Controls the option state.
606
+
607
+ Possible values:
608
+
609
+ - **true** - Option is enabled.
610
+ - **false** - Option is disabled.
611
+ """
612
+
613
+ value: bool
614
+ """Possible values:
615
+
616
+ - **true** - Option is enabled.
617
+ - **false** - Option is disabled.
618
+ """
619
+
620
+
621
+ class OptionsImageStack(BaseModel):
622
+ enabled: bool
623
+ """Controls the option state.
624
+
625
+ Possible values:
626
+
627
+ - **true** - Option is enabled.
628
+ - **false** - Option is disabled.
629
+ """
630
+
631
+ avif_enabled: Optional[bool] = None
632
+ """Enables or disables automatic conversion of JPEG and PNG images to AVI format."""
633
+
634
+ png_lossless: Optional[bool] = None
635
+ """Enables or disables compression without quality loss for PNG format."""
636
+
637
+ quality: Optional[int] = None
638
+ """Defines quality settings for JPG and PNG images.
639
+
640
+ The higher the value, the better the image quality, and the larger the file size
641
+ after conversion.
642
+ """
643
+
644
+ webp_enabled: Optional[bool] = None
645
+ """Enables or disables automatic conversion of JPEG and PNG images to WebP format."""
646
+
647
+
648
+ class OptionsIPAddressACL(BaseModel):
649
+ enabled: bool
650
+ """Controls the option state.
651
+
652
+ Possible values:
653
+
654
+ - **true** - Option is enabled.
655
+ - **false** - Option is disabled.
656
+ """
657
+
658
+ excepted_values: List[str]
659
+ """List of IP addresses with a subnet mask.
660
+
661
+ The meaning of the parameter depends on `policy_type` value:
662
+
663
+ - **allow** - List of IP addresses for which access is prohibited.
664
+ - **deny** - List of IP addresses for which access is allowed.
665
+
666
+ Examples:
667
+
668
+ - `192.168.3.2/32`
669
+ - `2a03:d000:2980:7::8/128`
670
+ """
671
+
672
+ policy_type: Literal["allow", "deny"]
673
+ """IP access policy type.
674
+
675
+ Possible values:
676
+
677
+ - **allow** - Allow access to all IPs except IPs specified in
678
+ "`excepted_values`" field.
679
+ - **deny** - Deny access to all IPs except IPs specified in "`excepted_values`"
680
+ field.
681
+ """
682
+
683
+
684
+ class OptionsLimitBandwidth(BaseModel):
685
+ enabled: bool
686
+ """Controls the option state.
687
+
688
+ Possible values:
689
+
690
+ - **true** - Option is enabled.
691
+ - **false** - Option is disabled.
692
+ """
693
+
694
+ limit_type: Literal["static", "dynamic"]
695
+ """Method of controlling the download speed per connection.
696
+
697
+ Possible values:
698
+
699
+ - **static** - Use speed and buffer fields to set the download speed limit.
700
+ - **dynamic** - Use query strings **speed** and **buffer** to set the download
701
+ speed limit.
702
+
703
+ For example, when requesting content at the link
704
+
705
+ ```
706
+ http://cdn.example.com/video.mp4?speed=50k&buffer=500k
707
+ ```
708
+
709
+ the download speed will be limited to 50kB/s after 500 kB.
710
+ """
711
+
712
+ buffer: Optional[int] = None
713
+ """Amount of downloaded data after which the user will be rate limited."""
714
+
715
+ speed: Optional[int] = None
716
+ """Maximum download speed per connection."""
717
+
718
+
719
+ class OptionsProxyCacheKey(BaseModel):
720
+ enabled: bool
721
+ """Controls the option state.
722
+
723
+ Possible values:
724
+
725
+ - **true** - Option is enabled.
726
+ - **false** - Option is disabled.
727
+ """
728
+
729
+ value: str
730
+ """Key for caching."""
731
+
732
+
733
+ class OptionsProxyCacheMethodsSet(BaseModel):
734
+ enabled: bool
735
+ """Controls the option state.
736
+
737
+ Possible values:
738
+
739
+ - **true** - Option is enabled.
740
+ - **false** - Option is disabled.
741
+ """
742
+
743
+ value: bool
744
+ """Possible values:
745
+
746
+ - **true** - Option is enabled.
747
+ - **false** - Option is disabled.
748
+ """
749
+
750
+
751
+ class OptionsProxyConnectTimeout(BaseModel):
752
+ enabled: bool
753
+ """Controls the option state.
754
+
755
+ Possible values:
756
+
757
+ - **true** - Option is enabled.
758
+ - **false** - Option is disabled.
759
+ """
760
+
761
+ value: str
762
+ """Timeout value in seconds."""
763
+
764
+
765
+ class OptionsProxyReadTimeout(BaseModel):
766
+ enabled: bool
767
+ """Controls the option state.
768
+
769
+ Possible values:
770
+
771
+ - **true** - Option is enabled.
772
+ - **false** - Option is disabled.
773
+ """
774
+
775
+ value: str
776
+ """Timeout value in seconds."""
777
+
778
+
779
+ class OptionsQueryParamsBlacklist(BaseModel):
780
+ enabled: bool
781
+ """Controls the option state.
782
+
783
+ Possible values:
784
+
785
+ - **true** - Option is enabled.
786
+ - **false** - Option is disabled.
787
+ """
788
+
789
+ value: List[str]
790
+ """List of query parameters."""
791
+
792
+
793
+ class OptionsQueryParamsWhitelist(BaseModel):
794
+ enabled: bool
795
+ """Controls the option state.
796
+
797
+ Possible values:
798
+
799
+ - **true** - Option is enabled.
800
+ - **false** - Option is disabled.
801
+ """
802
+
803
+ value: List[str]
804
+ """List of query parameters."""
805
+
806
+
807
+ class OptionsQueryStringForwarding(BaseModel):
808
+ enabled: bool
809
+ """Controls the option state.
810
+
811
+ Possible values:
812
+
813
+ - **true** - Option is enabled.
814
+ - **false** - Option is disabled.
815
+ """
816
+
817
+ forward_from_file_types: List[str]
818
+ """
819
+ The `forward_from_files_types` field specifies the types of playlist files from
820
+ which parameters will be extracted and forwarded. This typically includes
821
+ formats that list multiple media chunk references, such as HLS and DASH
822
+ playlists. Parameters associated with these playlist files (like query strings
823
+ or headers) will be propagated to the chunks they reference.
824
+ """
825
+
826
+ forward_to_file_types: List[str]
827
+ """
828
+ The field specifies the types of media chunk files to which parameters,
829
+ extracted from playlist files, will be forwarded. These refer to the actual
830
+ segments of media content that are delivered to viewers. Ensuring the correct
831
+ parameters are forwarded to these files is crucial for maintaining the integrity
832
+ of the streaming session.
833
+ """
834
+
835
+ forward_except_keys: Optional[List[str]] = None
836
+ """
837
+ The `forward_except_keys` field provides a mechanism to exclude specific
838
+ parameters from being forwarded from playlist files to media chunk files. By
839
+ listing certain keys in this field, you can ensure that these parameters are
840
+ omitted during the forwarding process. This is particularly useful for
841
+ preventing sensitive or irrelevant information from being included in requests
842
+ for media chunks, thereby enhancing security and optimizing performance.
843
+ """
844
+
845
+ forward_only_keys: Optional[List[str]] = None
846
+ """
847
+ The `forward_only_keys` field allows for granular control over which specific
848
+ parameters are forwarded from playlist files to media chunk files. By specifying
849
+ certain keys, only those parameters will be propagated, ensuring that only
850
+ relevant information is passed along. This is particularly useful for security
851
+ and performance optimization, as it prevents unnecessary or sensitive data from
852
+ being included in requests for media chunks.
853
+ """
854
+
855
+
856
+ class OptionsRedirectHTTPToHTTPS(BaseModel):
857
+ enabled: bool
858
+ """Controls the option state.
859
+
860
+ Possible values:
861
+
862
+ - **true** - Option is enabled.
863
+ - **false** - Option is disabled.
864
+ """
865
+
866
+ value: bool
867
+ """Possible values:
868
+
869
+ - **true** - Option is enabled.
870
+ - **false** - Option is disabled.
871
+ """
872
+
873
+
874
+ class OptionsRedirectHTTPSToHTTP(BaseModel):
875
+ enabled: bool
876
+ """Controls the option state.
877
+
878
+ Possible values:
879
+
880
+ - **true** - Option is enabled.
881
+ - **false** - Option is disabled.
882
+ """
883
+
884
+ value: bool
885
+ """Possible values:
886
+
887
+ - **true** - Option is enabled.
888
+ - **false** - Option is disabled.
889
+ """
890
+
891
+
892
+ class OptionsReferrerACL(BaseModel):
893
+ enabled: bool
894
+ """Controls the option state.
895
+
896
+ Possible values:
897
+
898
+ - **true** - Option is enabled.
899
+ - **false** - Option is disabled.
900
+ """
901
+
902
+ excepted_values: List[str]
903
+ """
904
+ List of domain names or wildcard domains (without protocol: `http://` or
905
+ `https://`.)
906
+
907
+ The meaning of the parameter depends on `policy_type` value:
908
+
909
+ - **allow** - List of domain names for which access is prohibited.
910
+ - **deny** - List of IP domain names for which access is allowed.
911
+
912
+ Examples:
913
+
914
+ - `example.com`
915
+ - `\\**.example.com`
916
+ """
917
+
918
+ policy_type: Literal["allow", "deny"]
919
+ """Policy type.
920
+
921
+ Possible values:
922
+
923
+ - **allow** - Allow access to all domain names except the domain names specified
924
+ in `excepted_values` field.
925
+ - **deny** - Deny access to all domain names except the domain names specified
926
+ in `excepted_values` field.
927
+ """
928
+
929
+
930
+ class OptionsRequestLimiter(BaseModel):
931
+ enabled: bool
932
+ """Controls the option state.
933
+
934
+ Possible values:
935
+
936
+ - **true** - Option is enabled.
937
+ - **false** - Option is disabled.
938
+ """
939
+
940
+ rate: int
941
+ """Maximum request rate."""
942
+
943
+ burst: Optional[int] = None
944
+
945
+ delay: Optional[int] = None
946
+
947
+ rate_unit: Optional[Literal["r/s", "r/m"]] = None
948
+ """Units of measurement for the `rate` field.
949
+
950
+ Possible values:
951
+
952
+ - **r/s** - Requests per second.
953
+ - **r/m** - Requests per minute.
954
+
955
+ If the rate is less than one request per second, it is specified in request per
956
+ minute (r/m.)
957
+ """
958
+
959
+
960
+ class OptionsResponseHeadersHidingPolicy(BaseModel):
961
+ enabled: bool
962
+ """Controls the option state.
963
+
964
+ Possible values:
965
+
966
+ - **true** - Option is enabled.
967
+ - **false** - Option is disabled.
968
+ """
969
+
970
+ excepted: List[str]
971
+ """List of HTTP headers.
972
+
973
+ Parameter meaning depends on the value of the `mode` field:
974
+
975
+ - **show** - List of HTTP headers to hide from response.
976
+ - **hide** - List of HTTP headers to include in response. Other HTTP headers
977
+ will be hidden.
978
+
979
+ The following headers are required and cannot be hidden from response:
980
+
981
+ - `Connection`
982
+ - `Content-Length`
983
+ - `Content-Type`
984
+ - `Date`
985
+ - `Server`
986
+ """
987
+
988
+ mode: Literal["hide", "show"]
989
+ """How HTTP headers are hidden from the response.
990
+
991
+ Possible values:
992
+
993
+ - **show** - Hide only HTTP headers listed in the `excepted` field.
994
+ - **hide** - Hide all HTTP headers except headers listed in the "excepted"
995
+ field.
996
+ """
997
+
998
+
999
+ class OptionsRewrite(BaseModel):
1000
+ body: str
1001
+ """Path for the Rewrite option.
1002
+
1003
+ Example:
1004
+
1005
+ - `/(.\\**) /media/$1`
1006
+ """
1007
+
1008
+ enabled: bool
1009
+ """Controls the option state.
1010
+
1011
+ Possible values:
1012
+
1013
+ - **true** - Option is enabled.
1014
+ - **false** - Option is disabled.
1015
+ """
1016
+
1017
+ flag: Optional[Literal["break", "last", "redirect", "permanent"]] = None
1018
+ """Flag for the Rewrite option.
1019
+
1020
+ Possible values:
1021
+
1022
+ - **last** - Stop processing the current set of `ngx_http_rewrite_module`
1023
+ directives and start a search for a new location matching changed URI.
1024
+ - **break** - Stop processing the current set of the Rewrite option.
1025
+ - **redirect** - Return a temporary redirect with the 302 code; used when a
1026
+ replacement string does not start with `http://`, `https://`, or `$scheme`.
1027
+ - **permanent** - Return a permanent redirect with the 301 code.
1028
+ """
1029
+
1030
+
1031
+ class OptionsSecureKey(BaseModel):
1032
+ enabled: bool
1033
+ """Controls the option state.
1034
+
1035
+ Possible values:
1036
+
1037
+ - **true** - Option is enabled.
1038
+ - **false** - Option is disabled.
1039
+ """
1040
+
1041
+ key: Optional[str] = None
1042
+ """Key generated on your side that will be used for URL signing."""
1043
+
1044
+ type: Optional[Literal[0, 2]] = None
1045
+ """Type of URL signing.
1046
+
1047
+ Possible types:
1048
+
1049
+ - **Type 0** - Includes end user IP to secure token generation.
1050
+ - **Type 2** - Excludes end user IP from secure token generation.
1051
+ """
1052
+
1053
+
1054
+ class OptionsSlice(BaseModel):
1055
+ enabled: bool
1056
+ """Controls the option state.
1057
+
1058
+ Possible values:
1059
+
1060
+ - **true** - Option is enabled.
1061
+ - **false** - Option is disabled.
1062
+ """
1063
+
1064
+ value: bool
1065
+ """Possible values:
1066
+
1067
+ - **true** - Option is enabled.
1068
+ - **false** - Option is disabled.
1069
+ """
1070
+
1071
+
1072
+ class OptionsSni(BaseModel):
1073
+ custom_hostname: str
1074
+ """Custom SNI hostname.
1075
+
1076
+ It is required if `sni_type` is set to custom.
1077
+ """
1078
+
1079
+ enabled: bool
1080
+ """Controls the option state.
1081
+
1082
+ Possible values:
1083
+
1084
+ - **true** - Option is enabled.
1085
+ - **false** - Option is disabled.
1086
+ """
1087
+
1088
+ sni_type: Optional[Literal["dynamic", "custom"]] = None
1089
+ """SNI (Server Name Indication) type.
1090
+
1091
+ Possible values:
1092
+
1093
+ - **dynamic** - SNI hostname depends on `hostHeader` and `forward_host_header`
1094
+ options. It has several possible combinations:
1095
+ - If the `hostHeader` option is enabled and specified, SNI hostname matches the
1096
+ Host header.
1097
+ - If the `forward_host_header` option is enabled and has true value, SNI
1098
+ hostname matches the Host header used in the request made to a CDN.
1099
+ - If the `hostHeader` and `forward_host_header` options are disabled, SNI
1100
+ hostname matches the primary CNAME.
1101
+ - **custom** - custom SNI hostname is in use.
1102
+ """
1103
+
1104
+
1105
+ class OptionsStale(BaseModel):
1106
+ enabled: bool
1107
+ """Controls the option state.
1108
+
1109
+ Possible values:
1110
+
1111
+ - **true** - Option is enabled.
1112
+ - **false** - Option is disabled.
1113
+ """
1114
+
1115
+ value: List[
1116
+ Literal[
1117
+ "error",
1118
+ "http_403",
1119
+ "http_404",
1120
+ "http_429",
1121
+ "http_500",
1122
+ "http_502",
1123
+ "http_503",
1124
+ "http_504",
1125
+ "invalid_header",
1126
+ "timeout",
1127
+ "updating",
1128
+ ]
1129
+ ]
1130
+ """Defines list of errors for which "Always online" option is applied."""
1131
+
1132
+
1133
+ class OptionsStaticResponseHeadersValue(BaseModel):
1134
+ name: str
1135
+ """HTTP Header name.
1136
+
1137
+ Restrictions:
1138
+
1139
+ - Maximum 128 symbols.
1140
+ - Latin letters (A-Z, a-z,) numbers (0-9,) dashes, and underscores only.
1141
+ """
1142
+
1143
+ value: List[str]
1144
+ """Header value.
1145
+
1146
+ Restrictions:
1147
+
1148
+ - Maximum 512 symbols.
1149
+ - Letters (a-z), numbers (0-9), spaces, and symbols (`~!@#%%^&\\**()-\\__=+
1150
+ /|\";:?.,><{}[]).
1151
+ - Must start with a letter, number, asterisk or {.
1152
+ - Multiple values can be added.
1153
+ """
1154
+
1155
+ always: Optional[bool] = None
1156
+ """
1157
+ Defines whether the header will be added to a response from CDN regardless of
1158
+ response code.
1159
+
1160
+ Possible values:
1161
+
1162
+ - **true** - Header will be added to a response from CDN regardless of response
1163
+ code.
1164
+ - **false** - Header will be added only to the following response codes: 200,
1165
+ 201, 204, 206, 301, 302, 303, 304, 307, 308.
1166
+ """
1167
+
1168
+
1169
+ class OptionsStaticResponseHeaders(BaseModel):
1170
+ enabled: bool
1171
+ """Controls the option state.
1172
+
1173
+ Possible values:
1174
+
1175
+ - **true** - Option is enabled.
1176
+ - **false** - Option is disabled.
1177
+ """
1178
+
1179
+ value: List[OptionsStaticResponseHeadersValue]
1180
+
1181
+
1182
+ class OptionsStaticHeaders(BaseModel):
1183
+ enabled: bool
1184
+ """Controls the option state.
1185
+
1186
+ Possible values:
1187
+
1188
+ - **true** - Option is enabled.
1189
+ - **false** - Option is disabled.
1190
+ """
1191
+
1192
+ value: Dict[str, str]
1193
+ """A MAP for static headers in a format of `header_name: header_value`.
1194
+
1195
+ Restrictions:
1196
+
1197
+ - **Header name** - Maximum 128 symbols, may contain Latin letters (A-Z, a-z),
1198
+ numbers (0-9), dashes, and underscores.
1199
+ - **Header value** - Maximum 512 symbols, may contain letters (a-z), numbers
1200
+ (0-9), spaces, and symbols (`~!@#%%^&\\**()-\\__=+ /|\";:?.,><{}[]). Must start
1201
+ with a letter, number, asterisk or {.
1202
+ """
1203
+
1204
+
1205
+ class OptionsStaticRequestHeaders(BaseModel):
1206
+ enabled: bool
1207
+ """Controls the option state.
1208
+
1209
+ Possible values:
1210
+
1211
+ - **true** - Option is enabled.
1212
+ - **false** - Option is disabled.
1213
+ """
1214
+
1215
+ value: Dict[str, str]
1216
+ """A MAP for static headers in a format of `header_name: header_value`.
1217
+
1218
+ Restrictions:
1219
+
1220
+ - **Header name** - Maximum 255 symbols, may contain Latin letters (A-Z, a-z),
1221
+ numbers (0-9), dashes, and underscores.
1222
+ - **Header value** - Maximum 512 symbols, may contain letters (a-z), numbers
1223
+ (0-9), spaces, and symbols (`~!@#%%^&\\**()-\\__=+ /|\";:?.,><{}[]). Must start
1224
+ with a letter, number, asterisk or {.
1225
+ """
1226
+
1227
+
1228
+ class OptionsTlsVersions(BaseModel):
1229
+ enabled: bool
1230
+ """Controls the option state.
1231
+
1232
+ Possible values:
1233
+
1234
+ - **true** - Option is enabled.
1235
+ - **false** - Option is disabled.
1236
+ """
1237
+
1238
+ value: List[Literal["SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"]]
1239
+ """List of SSL/TLS protocol versions (case sensitive)."""
1240
+
1241
+
1242
+ class OptionsUseDefaultLeChain(BaseModel):
1243
+ enabled: bool
1244
+ """Controls the option state.
1245
+
1246
+ Possible values:
1247
+
1248
+ - **true** - Option is enabled.
1249
+ - **false** - Option is disabled.
1250
+ """
1251
+
1252
+ value: bool
1253
+ """Possible values:
1254
+
1255
+ - **true** - Default Let's Encrypt certificate chain. This is a deprecated
1256
+ version, use it only for compatibilities with Android devices 7.1.1 or lower.
1257
+ - **false** - Alternative Let's Encrypt certificate chain.
1258
+ """
1259
+
1260
+
1261
+ class OptionsUseDns01LeChallenge(BaseModel):
1262
+ enabled: bool
1263
+ """Controls the option state.
1264
+
1265
+ Possible values:
1266
+
1267
+ - **true** - Option is enabled.
1268
+ - **false** - Option is disabled.
1269
+ """
1270
+
1271
+ value: bool
1272
+ """Possible values:
1273
+
1274
+ - **true** - DNS-01 challenge is used to issue Let's Encrypt certificate.
1275
+ - **false** - HTTP-01 challenge is used to issue Let's Encrypt certificate.
1276
+ """
1277
+
1278
+
1279
+ class OptionsUseRsaLeCert(BaseModel):
1280
+ enabled: bool
1281
+ """Controls the option state.
1282
+
1283
+ Possible values:
1284
+
1285
+ - **true** - Option is enabled.
1286
+ - **false** - Option is disabled.
1287
+ """
1288
+
1289
+ value: bool
1290
+ """Possible values:
1291
+
1292
+ - **true** - RSA Let's Encrypt certificate.
1293
+ - **false** - ECDSA Let's Encrypt certificate.
1294
+ """
1295
+
1296
+
1297
+ class OptionsUserAgentACL(BaseModel):
1298
+ enabled: bool
1299
+ """Controls the option state.
1300
+
1301
+ Possible values:
1302
+
1303
+ - **true** - Option is enabled.
1304
+ - **false** - Option is disabled.
1305
+ """
1306
+
1307
+ excepted_values: List[str]
1308
+ """List of User-Agents that will be allowed/denied.
1309
+
1310
+ The meaning of the parameter depends on `policy_type`:
1311
+
1312
+ - **allow** - List of User-Agents for which access is prohibited.
1313
+ - **deny** - List of User-Agents for which access is allowed.
1314
+
1315
+ Use an empty string `""` to allow/deny access when the User-Agent header is
1316
+ empty.
1317
+ """
1318
+
1319
+ policy_type: Literal["allow", "deny"]
1320
+ """User-Agents policy type.
1321
+
1322
+ Possible values:
1323
+
1324
+ - **allow** - Allow access for all User-Agents except specified in
1325
+ `excepted_values` field.
1326
+ - **deny** - Deny access for all User-Agents except specified in
1327
+ `excepted_values` field.
1328
+ """
1329
+
1330
+
1331
+ class OptionsWaap(BaseModel):
1332
+ enabled: bool
1333
+ """Controls the option state.
1334
+
1335
+ Possible values:
1336
+
1337
+ - **true** - Option is enabled.
1338
+ - **false** - Option is disabled.
1339
+ """
1340
+
1341
+ value: bool
1342
+ """Possible values:
1343
+
1344
+ - **true** - Option is enabled.
1345
+ - **false** - Option is disabled.
1346
+ """
1347
+
1348
+
1349
+ class OptionsWebsockets(BaseModel):
1350
+ enabled: bool
1351
+ """Controls the option state.
1352
+
1353
+ Possible values:
1354
+
1355
+ - **true** - Option is enabled.
1356
+ - **false** - Option is disabled.
1357
+ """
1358
+
1359
+ value: bool
1360
+ """Possible values:
1361
+
1362
+ - **true** - Option is enabled.
1363
+ - **false** - Option is disabled.
1364
+ """
1365
+
1366
+
1367
+ class Options(BaseModel):
1368
+ allowed_http_methods: Optional[OptionsAllowedHTTPMethods] = FieldInfo(alias="allowedHttpMethods", default=None)
1369
+ """HTTP methods allowed for content requests from the CDN."""
1370
+
1371
+ bot_protection: Optional[OptionsBotProtection] = None
1372
+ """
1373
+ Allows to prevent online services from overloading and ensure your business
1374
+ workflow running smoothly.
1375
+ """
1376
+
1377
+ brotli_compression: Optional[OptionsBrotliCompression] = None
1378
+ """Compresses content with Brotli on the CDN side.
1379
+
1380
+ CDN servers will request only uncompressed content from the origin.
1381
+
1382
+ Notes:
1383
+
1384
+ 1. CDN only supports "Brotli compression" when the "origin shielding" feature is
1385
+ activated.
1386
+ 2. If a precache server is not active for a CDN resource, no compression occurs,
1387
+ even if the option is enabled.
1388
+ 3. `brotli_compression` is not supported with `fetch_compressed` or `slice`
1389
+ options enabled.
1390
+ 4. `fetch_compressed` option in CDN resource settings overrides
1391
+ `brotli_compression` in rules. If you enabled `fetch_compressed` in CDN
1392
+ resource and want to enable `brotli_compression` in a rule, you must specify
1393
+ `fetch_compressed:false` in the rule.
1394
+ """
1395
+
1396
+ browser_cache_settings: Optional[OptionsBrowserCacheSettings] = None
1397
+ """Cache expiration time for users browsers in seconds.
1398
+
1399
+ Cache expiration time is applied to the following response codes: 200, 201, 204,
1400
+ 206, 301, 302, 303, 304, 307, 308.
1401
+
1402
+ Responses with other codes will not be cached.
1403
+ """
1404
+
1405
+ cache_http_headers: Optional[OptionsCacheHTTPHeaders] = None
1406
+ """**Legacy option**. Use the `response_headers_hiding_policy` option instead.
1407
+
1408
+ HTTP Headers that must be included in the response.
1409
+ """
1410
+
1411
+ cors: Optional[OptionsCors] = None
1412
+ """Enables or disables CORS (Cross-Origin Resource Sharing) header support.
1413
+
1414
+ CORS header support allows the CDN to add the Access-Control-Allow-Origin header
1415
+ to a response to a browser.
1416
+ """
1417
+
1418
+ country_acl: Optional[OptionsCountryACL] = None
1419
+ """Enables control access to content for specified countries."""
1420
+
1421
+ disable_cache: Optional[OptionsDisableCache] = None
1422
+ """**Legacy option**. Use the `edge_cache_settings` option instead.
1423
+
1424
+ Allows the complete disabling of content caching.
1425
+ """
1426
+
1427
+ disable_proxy_force_ranges: Optional[OptionsDisableProxyForceRanges] = None
1428
+ """Allows 206 responses regardless of the settings of an origin source."""
1429
+
1430
+ edge_cache_settings: Optional[OptionsEdgeCacheSettings] = None
1431
+ """Cache expiration time for CDN servers.
1432
+
1433
+ `value` and `default` fields cannot be used simultaneously.
1434
+ """
1435
+
1436
+ fastedge: Optional[OptionsFastedge] = None
1437
+ """
1438
+ Allows to configure FastEdge app to be called on different request/response
1439
+ phases.
1440
+
1441
+ Note: At least one of `on_request_headers`, `on_request_body`,
1442
+ `on_response_headers`, or `on_response_body` must be specified.
1443
+ """
1444
+
1445
+ fetch_compressed: Optional[OptionsFetchCompressed] = None
1446
+ """Makes the CDN request compressed content from the origin.
1447
+
1448
+ The origin server should support compression. CDN servers will not decompress
1449
+ your content even if a user browser does not accept compression.
1450
+
1451
+ Notes:
1452
+
1453
+ 1. `fetch_compressed` is not supported with `gzipON` or `brotli_compression` or
1454
+ `slice` options enabled.
1455
+ 2. `fetch_compressed` overrides `gzipON` and `brotli_compression` in rule. If
1456
+ you enable it in CDN resource and want to use `gzipON` and
1457
+ `brotli_compression` in a rule, you have to specify
1458
+ `"`fetch_compressed`": false` in the rule.
1459
+ """
1460
+
1461
+ follow_origin_redirect: Optional[OptionsFollowOriginRedirect] = None
1462
+ """
1463
+ Enables redirection from origin. If the origin server returns a redirect, the
1464
+ option allows the CDN to pull the requested content from the origin server that
1465
+ was returned in the redirect.
1466
+ """
1467
+
1468
+ force_return: Optional[OptionsForceReturn] = None
1469
+ """Applies custom HTTP response codes for CDN content.
1470
+
1471
+ The following codes are reserved by our system and cannot be specified in this
1472
+ option: 408, 444, 477, 494, 495, 496, 497, 499.
1473
+ """
1474
+
1475
+ forward_host_header: Optional[OptionsForwardHostHeader] = None
1476
+ """Forwards the Host header from a end-user request to an origin server.
1477
+
1478
+ `hostHeader` and `forward_host_header` options cannot be enabled simultaneously.
1479
+ """
1480
+
1481
+ gzip_on: Optional[OptionsGzipOn] = FieldInfo(alias="gzipOn", default=None)
1482
+ """Compresses content with gzip on the CDN end.
1483
+
1484
+ CDN servers will request only uncompressed content from the origin.
1485
+
1486
+ Notes:
1487
+
1488
+ 1. Compression with gzip is not supported with `fetch_compressed` or `slice`
1489
+ options enabled.
1490
+ 2. `fetch_compressed` option in CDN resource settings overrides `gzipON` in
1491
+ rules. If you enable `fetch_compressed` in CDN resource and want to enable
1492
+ `gzipON` in rules, you need to specify `"`fetch_compressed`":false` for
1493
+ rules.
1494
+ """
1495
+
1496
+ host_header: Optional[OptionsHostHeader] = FieldInfo(alias="hostHeader", default=None)
1497
+ """
1498
+ Sets the Host header that CDN servers use when request content from an origin
1499
+ server. Your server must be able to process requests with the chosen header.
1500
+
1501
+ If the option is `null`, the Host Header value is equal to first CNAME.
1502
+
1503
+ `hostHeader` and `forward_host_header` options cannot be enabled simultaneously.
1504
+ """
1505
+
1506
+ http3_enabled: Optional[OptionsHttp3Enabled] = None
1507
+ """Enables HTTP/3 protocol for content delivery.
1508
+
1509
+ `http3_enabled` option works only with `"sslEnabled": true`.
1510
+ """
1511
+
1512
+ ignore_cookie: Optional[OptionsIgnoreCookie] = None
1513
+ """
1514
+ Defines whether the files with the Set-Cookies header are cached as one file or
1515
+ as different ones.
1516
+ """
1517
+
1518
+ ignore_query_string: Optional[OptionsIgnoreQueryString] = FieldInfo(alias="ignoreQueryString", default=None)
1519
+ """
1520
+ How a file with different query strings is cached: either as one object (option
1521
+ is enabled) or as different objects (option is disabled.)
1522
+
1523
+ `ignoreQueryString`, `query_params_whitelist` and `query_params_blacklist`
1524
+ options cannot be enabled simultaneously.
1525
+ """
1526
+
1527
+ image_stack: Optional[OptionsImageStack] = None
1528
+ """
1529
+ Transforms JPG and PNG images (for example, resize or crop) and automatically
1530
+ converts them to WebP or AVIF format.
1531
+ """
1532
+
1533
+ ip_address_acl: Optional[OptionsIPAddressACL] = None
1534
+ """Controls access to the CDN resource content for specific IP addresses.
1535
+
1536
+ If you want to use IPs from our CDN servers IP list for IP ACL configuration,
1537
+ you have to independently monitor their relevance. We recommend you use a script
1538
+ for automatically update IP ACL.
1539
+ [Read more.](/docs/api-reference/cdn/ip-addresses-list/get-cdn-servers-ip-addresses)
1540
+ """
1541
+
1542
+ limit_bandwidth: Optional[OptionsLimitBandwidth] = None
1543
+ """Allows to control the download speed per connection."""
1544
+
1545
+ proxy_cache_key: Optional[OptionsProxyCacheKey] = None
1546
+ """Allows you to modify your cache key.
1547
+
1548
+ If omitted, the default value is `$request_uri`.
1549
+
1550
+ Combine the specified variables to create a key for caching.
1551
+
1552
+ - **$`request_uri`**
1553
+ - **$scheme**
1554
+ - **$uri**
1555
+
1556
+ **Warning**: Enabling and changing this option can invalidate your current cache
1557
+ and affect the cache hit ratio. Furthermore, the "Purge by pattern" option will
1558
+ not work.
1559
+ """
1560
+
1561
+ proxy_cache_methods_set: Optional[OptionsProxyCacheMethodsSet] = None
1562
+ """Caching for POST requests along with default GET and HEAD."""
1563
+
1564
+ proxy_connect_timeout: Optional[OptionsProxyConnectTimeout] = None
1565
+ """The time limit for establishing a connection with the origin."""
1566
+
1567
+ proxy_read_timeout: Optional[OptionsProxyReadTimeout] = None
1568
+ """
1569
+ The time limit for receiving a partial response from the origin. If no response
1570
+ is received within this time, the connection will be closed.
1571
+
1572
+ **Note:** When used with a WebSocket connection, this option supports values
1573
+ only in the range 1–20 seconds (instead of the usual 1–30 seconds).
1574
+ """
1575
+
1576
+ query_params_blacklist: Optional[OptionsQueryParamsBlacklist] = None
1577
+ """
1578
+ Files with the specified query parameters are cached as one object, files with
1579
+ other parameters are cached as different objects.
1580
+
1581
+ `ignoreQueryString`, `query_params_whitelist` and `query_params_blacklist`
1582
+ options cannot be enabled simultaneously.
1583
+ """
1584
+
1585
+ query_params_whitelist: Optional[OptionsQueryParamsWhitelist] = None
1586
+ """
1587
+ Files with the specified query parameters are cached as different objects, files
1588
+ with other parameters are cached as one object.
1589
+
1590
+ `ignoreQueryString`, `query_params_whitelist` and `query_params_blacklist`
1591
+ options cannot be enabled simultaneously.
1592
+ """
1593
+
1594
+ query_string_forwarding: Optional[OptionsQueryStringForwarding] = None
1595
+ """
1596
+ The Query String Forwarding feature allows for the seamless transfer of
1597
+ parameters embedded in playlist files to the corresponding media chunk files.
1598
+ This functionality ensures that specific attributes, such as authentication
1599
+ tokens or tracking information, are consistently passed along from the playlist
1600
+ manifest to the individual media segments. This is particularly useful for
1601
+ maintaining continuity in security, analytics, and any other parameter-based
1602
+ operations across the entire media delivery workflow.
1603
+ """
1604
+
1605
+ redirect_http_to_https: Optional[OptionsRedirectHTTPToHTTPS] = None
1606
+ """Enables redirect from HTTP to HTTPS.
1607
+
1608
+ `redirect_http_to_https` and `redirect_https_to_http` options cannot be enabled
1609
+ simultaneously.
1610
+ """
1611
+
1612
+ redirect_https_to_http: Optional[OptionsRedirectHTTPSToHTTP] = None
1613
+ """Enables redirect from HTTPS to HTTP.
1614
+
1615
+ `redirect_http_to_https` and `redirect_https_to_http` options cannot be enabled
1616
+ simultaneously.
1617
+ """
1618
+
1619
+ referrer_acl: Optional[OptionsReferrerACL] = None
1620
+ """Controls access to the CDN resource content for specified domain names."""
1621
+
1622
+ request_limiter: Optional[OptionsRequestLimiter] = None
1623
+ """Option allows to limit the amount of HTTP requests."""
1624
+
1625
+ response_headers_hiding_policy: Optional[OptionsResponseHeadersHidingPolicy] = None
1626
+ """Hides HTTP headers from an origin server in the CDN response."""
1627
+
1628
+ rewrite: Optional[OptionsRewrite] = None
1629
+ """Changes and redirects requests from the CDN to the origin.
1630
+
1631
+ It operates according to the
1632
+ [Nginx](https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite)
1633
+ configuration.
1634
+ """
1635
+
1636
+ secure_key: Optional[OptionsSecureKey] = None
1637
+ """Configures access with tokenized URLs.
1638
+
1639
+ This makes impossible to access content without a valid (unexpired) token.
1640
+ """
1641
+
1642
+ slice: Optional[OptionsSlice] = None
1643
+ """
1644
+ Requests and caches files larger than 10 MB in parts (no larger than 10 MB per
1645
+ part.) This reduces time to first byte.
1646
+
1647
+ The option is based on the
1648
+ [Slice](https://nginx.org/en/docs/http/ngx_http_slice_module.html) module.
1649
+
1650
+ Notes:
1651
+
1652
+ 1. Origin must support HTTP Range requests.
1653
+ 2. Not supported with `gzipON`, `brotli_compression` or `fetch_compressed`
1654
+ options enabled.
1655
+ """
1656
+
1657
+ sni: Optional[OptionsSni] = None
1658
+ """
1659
+ The hostname that is added to SNI requests from CDN servers to the origin server
1660
+ via HTTPS.
1661
+
1662
+ SNI is generally only required if your origin uses shared hosting or does not
1663
+ have a dedicated IP address. If the origin server presents multiple
1664
+ certificates, SNI allows the origin server to know which certificate to use for
1665
+ the connection.
1666
+
1667
+ The option works only if `originProtocol` parameter is `HTTPS` or `MATCH`.
1668
+ """
1669
+
1670
+ stale: Optional[OptionsStale] = None
1671
+ """Serves stale cached content in case of origin unavailability."""
1672
+
1673
+ static_response_headers: Optional[OptionsStaticResponseHeaders] = None
1674
+ """Custom HTTP Headers that a CDN server adds to a response."""
1675
+
1676
+ static_headers: Optional[OptionsStaticHeaders] = FieldInfo(alias="staticHeaders", default=None)
1677
+ """**Legacy option**. Use the `static_response_headers` option instead.
1678
+
1679
+ Custom HTTP Headers that a CDN server adds to response. Up to fifty custom HTTP
1680
+ Headers can be specified. May contain a header with multiple values.
1681
+ """
1682
+
1683
+ static_request_headers: Optional[OptionsStaticRequestHeaders] = FieldInfo(
1684
+ alias="staticRequestHeaders", default=None
1685
+ )
1686
+ """Custom HTTP Headers for a CDN server to add to request.
1687
+
1688
+ Up to fifty custom HTTP Headers can be specified.
1689
+ """
1690
+
1691
+ tls_versions: Optional[OptionsTlsVersions] = None
1692
+ """
1693
+ List of SSL/TLS protocol versions allowed for HTTPS connections from end users
1694
+ to the domain.
1695
+
1696
+ When the option is disabled, all protocols versions are allowed.
1697
+ """
1698
+
1699
+ use_default_le_chain: Optional[OptionsUseDefaultLeChain] = None
1700
+ """Let's Encrypt certificate chain.
1701
+
1702
+ The specified chain will be used during the next Let's Encrypt certificate issue
1703
+ or renewal.
1704
+ """
1705
+
1706
+ use_dns01_le_challenge: Optional[OptionsUseDns01LeChallenge] = None
1707
+ """DNS-01 challenge to issue a Let's Encrypt certificate for the resource.
1708
+
1709
+ DNS service should be activated to enable this option.
1710
+ """
1711
+
1712
+ use_rsa_le_cert: Optional[OptionsUseRsaLeCert] = None
1713
+ """RSA Let's Encrypt certificate type for the CDN resource.
1714
+
1715
+ The specified value will be used during the next Let's Encrypt certificate issue
1716
+ or renewal.
1717
+ """
1718
+
1719
+ user_agent_acl: Optional[OptionsUserAgentACL] = None
1720
+ """Controls access to the content for specified User-Agents."""
1721
+
1722
+ waap: Optional[OptionsWaap] = None
1723
+ """Allows to enable WAAP (Web Application and API Protection)."""
1724
+
1725
+ websockets: Optional[OptionsWebsockets] = None
1726
+ """Enables or disables WebSockets connections to an origin server."""
1727
+
1728
+
1729
+ class CdnResource(BaseModel):
1730
+ id: Optional[int] = None
1731
+ """CDN resource ID."""
1732
+
1733
+ active: Optional[bool] = None
1734
+ """Enables or disables a CDN resource.
1735
+
1736
+ Possible values:
1737
+
1738
+ - **true** - CDN resource is active. Content is being delivered.
1739
+ - **false** - CDN resource is deactivated. Content is not being delivered.
1740
+ """
1741
+
1742
+ can_purge_by_urls: Optional[bool] = None
1743
+ """Defines whether the CDN resource can be used for purge by URLs feature.
1744
+
1745
+ It's available only in case the CDN resource has enabled `ignore_vary_header`
1746
+ option.
1747
+ """
1748
+
1749
+ client: Optional[int] = None
1750
+ """ID of an account to which the CDN resource belongs."""
1751
+
1752
+ cname: Optional[str] = None
1753
+ """Delivery domains that will be used for content delivery through a CDN.
1754
+
1755
+ Delivery domains should be added to your DNS settings.
1756
+ """
1757
+
1758
+ created: Optional[str] = None
1759
+ """Date of CDN resource creation."""
1760
+
1761
+ deleted: Optional[bool] = None
1762
+ """Defines whether CDN resource has been deleted.
1763
+
1764
+ Possible values:
1765
+
1766
+ - **true** - CDN resource is deleted.
1767
+ - **false** - CDN resource is not deleted.
1768
+ """
1769
+
1770
+ description: Optional[str] = None
1771
+ """Optional comment describing the CDN resource."""
1772
+
1773
+ enabled: Optional[bool] = None
1774
+ """Enables or disables a CDN resource change by a user.
1775
+
1776
+ Possible values:
1777
+
1778
+ - **true** - CDN resource is enabled and can be changed. Content can be
1779
+ delivered.
1780
+ - **false** - CDN resource is disabled and cannot be changed. Content can not be
1781
+ delivered.
1782
+ """
1783
+
1784
+ full_custom_enabled: Optional[bool] = None
1785
+ """Defines whether the CDN resource has a custom configuration.
1786
+
1787
+ Possible values:
1788
+
1789
+ - **true** - CDN resource has a custom configuration. You cannot change resource
1790
+ settings, except for the SSL certificate. To change other settings, contact
1791
+ technical support.
1792
+ - **false** - CDN resource has a regular configuration. You can change CDN
1793
+ resource settings.
1794
+ """
1795
+
1796
+ is_primary: Optional[bool] = None
1797
+ """Defines whether a CDN resource has a cache zone shared with other CDN resources.
1798
+
1799
+ Possible values:
1800
+
1801
+ - **true** - CDN resource is main and has a shared caching zone with other CDN
1802
+ resources, which are called reserve.
1803
+ - **false** - CDN resource is reserve and it has a shared caching zone with the
1804
+ main CDN resource. You cannot change some options, create rules, set up origin
1805
+ shielding and use the reserve resource for Streaming.
1806
+ - **null** - CDN resource does not have a shared cache zone.
1807
+
1808
+ The main CDN resource is specified in the `primary_resource` field. It cannot be
1809
+ suspended unless all related reserve CDN resources are suspended.
1810
+ """
1811
+
1812
+ name: Optional[str] = None
1813
+ """CDN resource name."""
1814
+
1815
+ options: Optional[Options] = None
1816
+ """List of options that can be configured for the CDN resource.
1817
+
1818
+ In case of `null` value the option is not added to the CDN resource. Option may
1819
+ inherit its value from the global account settings.
1820
+ """
1821
+
1822
+ origin_group: Optional[int] = FieldInfo(alias="originGroup", default=None)
1823
+ """Origin group ID with which the CDN resource is associated.
1824
+
1825
+ You can use either the `origin` or `originGroup` parameter in the request.
1826
+ """
1827
+
1828
+ origin_group_name: Optional[str] = FieldInfo(alias="originGroup_name", default=None)
1829
+ """Origin group name."""
1830
+
1831
+ origin_protocol: Optional[Literal["HTTP", "HTTPS", "MATCH"]] = FieldInfo(alias="originProtocol", default=None)
1832
+ """Protocol used by CDN servers to request content from an origin source.
1833
+
1834
+ Possible values:
1835
+
1836
+ - **HTTPS** - CDN servers will connect to the origin via HTTPS.
1837
+ - **HTTP** - CDN servers will connect to the origin via HTTP.
1838
+ - **MATCH** - connection protocol will be chosen automatically (content on the
1839
+ origin source should be available for the CDN both through HTTP and HTTPS).
1840
+
1841
+ If protocol is not specified, HTTP is used to connect to an origin server.
1842
+ """
1843
+
1844
+ preset_applied: Optional[bool] = None
1845
+ """Defines whether the CDN resource has a preset applied.
1846
+
1847
+ Possible values:
1848
+
1849
+ - **true** - CDN resource has a preset applied. CDN resource options included in
1850
+ the preset cannot be edited.
1851
+ - **false** - CDN resource does not have a preset applied.
1852
+ """
1853
+
1854
+ primary_resource: Optional[int] = None
1855
+ """
1856
+ ID of the main CDN resource which has a shared caching zone with a reserve CDN
1857
+ resource.
1858
+
1859
+ If the parameter is not empty, then the current CDN resource is the reserve. You
1860
+ cannot change some options, create rules, set up origin shielding, or use the
1861
+ reserve CDN resource for Streaming.
1862
+ """
1863
+
1864
+ proxy_ssl_ca: Optional[int] = None
1865
+ """ID of the trusted CA certificate used to verify an origin.
1866
+
1867
+ It can be used only with `"`proxy_ssl_enabled`": true`.
1868
+ """
1869
+
1870
+ proxy_ssl_data: Optional[int] = None
1871
+ """ID of the SSL certificate used to verify an origin.
1872
+
1873
+ It can be used only with `"`proxy_ssl_enabled`": true`.
1874
+ """
1875
+
1876
+ proxy_ssl_enabled: Optional[bool] = None
1877
+ """
1878
+ Enables or disables SSL certificate validation of the origin server before
1879
+ completing any connection.
1880
+
1881
+ Possible values:
1882
+
1883
+ - **true** - Origin SSL certificate validation is enabled.
1884
+ - **false** - Origin SSL certificate validation is disabled.
1885
+ """
1886
+
1887
+ rules: Optional[List[object]] = None
1888
+ """Rules configured for the CDN resource."""
1889
+
1890
+ secondary_hostnames: Optional[List[str]] = FieldInfo(alias="secondaryHostnames", default=None)
1891
+ """
1892
+ Additional delivery domains (CNAMEs) that will be used to deliver content via
1893
+ the CDN.
1894
+
1895
+ Up to ten additional CNAMEs are possible.
1896
+ """
1897
+
1898
+ shield_dc: Optional[str] = None
1899
+ """Name of the origin shielding location data center.
1900
+
1901
+ Parameter returns **null** if origin shielding is disabled.
1902
+ """
1903
+
1904
+ shield_enabled: Optional[bool] = None
1905
+ """Defines whether origin shield is active and working for the CDN resource.
1906
+
1907
+ Possible values:
1908
+
1909
+ - **true** - Origin shield is active.
1910
+ - **false** - Origin shield is not active.
1911
+ """
1912
+
1913
+ shield_routing_map: Optional[int] = None
1914
+ """
1915
+ Defines whether the origin shield with a dynamic location is enabled for the CDN
1916
+ resource.
1917
+
1918
+ To manage origin shielding, you must contact customer support.
1919
+ """
1920
+
1921
+ shielded: Optional[bool] = None
1922
+ """Defines whether origin shielding feature is enabled for the resource.
1923
+
1924
+ Possible values:
1925
+
1926
+ - **true** - Origin shielding is enabled.
1927
+ - **false** - Origin shielding is disabled.
1928
+ """
1929
+
1930
+ ssl_data: Optional[int] = FieldInfo(alias="sslData", default=None)
1931
+ """ID of the SSL certificate linked to the CDN resource.
1932
+
1933
+ Can be used only with `"sslEnabled": true`.
1934
+ """
1935
+
1936
+ ssl_enabled: Optional[bool] = FieldInfo(alias="sslEnabled", default=None)
1937
+ """Defines whether the HTTPS protocol enabled for content delivery.
1938
+
1939
+ Possible values:
1940
+
1941
+ - **true** - HTTPS is enabled.
1942
+ - **false** - HTTPS is disabled.
1943
+ """
1944
+
1945
+ status: Optional[Literal["active", "suspended", "processed", "deleted"]] = None
1946
+ """CDN resource status.
1947
+
1948
+ Possible values:
1949
+
1950
+ - **active** - CDN resource is active. Content is available to users.
1951
+ - **suspended** - CDN resource is suspended. Content is not available to users.
1952
+ - **processed** - CDN resource has recently been created and is currently being
1953
+ processed. It will take about fifteen minutes to propagate it to all
1954
+ locations.
1955
+ - **deleted** - CDN resource is deleted.
1956
+ """
1957
+
1958
+ suspend_date: Optional[str] = None
1959
+ """
1960
+ Date when the CDN resource was suspended automatically if there is no traffic on
1961
+ it for 90 days.
1962
+
1963
+ Not specified if the resource was not stopped due to lack of traffic.
1964
+ """
1965
+
1966
+ suspended: Optional[bool] = None
1967
+ """
1968
+ Defines whether the CDN resource has been automatically suspended because there
1969
+ was no traffic on it for 90 days.
1970
+
1971
+ Possible values:
1972
+
1973
+ - **true** - CDN resource is currently automatically suspended.
1974
+ - **false** - CDN resource is not automatically suspended.
1975
+
1976
+ You can enable CDN resource using the `active` field. If there is no traffic on
1977
+ the CDN resource within seven days following activation, it will be suspended
1978
+ again.
1979
+
1980
+ To avoid CDN resource suspension due to no traffic, contact technical support.
1981
+ """
1982
+
1983
+ updated: Optional[str] = None
1984
+ """Date of the last CDN resource update."""
1985
+
1986
+ vp_enabled: Optional[bool] = None
1987
+ """Defines whether the CDN resource is integrated with the Streaming Platform.
1988
+
1989
+ Possible values:
1990
+
1991
+ - **true** - CDN resource is configured for Streaming Platform. Changing
1992
+ resource settings can affect its operation.
1993
+ - **false** - CDN resource is not configured for Streaming Platform.
1994
+ """
1995
+
1996
+ waap_domain_id: Optional[str] = None
1997
+ """The ID of the associated WAAP domain."""