gcore 0.10.0__py3-none-any.whl → 0.12.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.
- gcore/_base_client.py +3 -3
- gcore/_client.py +18 -0
- gcore/_compat.py +48 -48
- gcore/_models.py +41 -41
- gcore/_types.py +35 -1
- gcore/_utils/__init__.py +9 -2
- gcore/_utils/_compat.py +45 -0
- gcore/_utils/_datetime_parse.py +136 -0
- gcore/_utils/_transform.py +11 -1
- gcore/_utils/_typing.py +6 -1
- gcore/_utils/_utils.py +0 -1
- gcore/_version.py +1 -1
- gcore/resources/__init__.py +28 -0
- gcore/resources/cloud/__init__.py +14 -0
- gcore/resources/cloud/audit_logs.py +3 -3
- gcore/resources/cloud/baremetal/images.py +3 -4
- gcore/resources/cloud/baremetal/servers.py +16 -4
- gcore/resources/cloud/cloud.py +32 -0
- gcore/resources/cloud/cost_reports.py +24 -16
- gcore/resources/cloud/file_shares/access_rules.py +2 -2
- gcore/resources/cloud/file_shares/file_shares.py +30 -14
- gcore/resources/cloud/floating_ips.py +196 -4
- gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +1 -1
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +166 -190
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +268 -12
- gcore/resources/cloud/inference/__init__.py +14 -14
- gcore/resources/cloud/inference/applications/__init__.py +47 -0
- gcore/resources/cloud/inference/applications/applications.py +134 -0
- gcore/resources/cloud/inference/applications/deployments.py +649 -0
- gcore/resources/cloud/inference/applications/templates.py +238 -0
- gcore/resources/cloud/inference/deployments/deployments.py +41 -22
- gcore/resources/cloud/inference/inference.py +32 -32
- gcore/resources/cloud/inference/registry_credentials.py +8 -9
- gcore/resources/cloud/instances/images.py +4 -4
- gcore/resources/cloud/instances/instances.py +254 -4
- gcore/resources/cloud/instances/interfaces.py +544 -0
- gcore/resources/cloud/k8s/__init__.py +47 -0
- gcore/resources/cloud/k8s/clusters/__init__.py +47 -0
- gcore/resources/cloud/k8s/clusters/clusters.py +1391 -0
- gcore/resources/cloud/k8s/clusters/nodes.py +291 -0
- gcore/resources/cloud/k8s/clusters/pools/__init__.py +33 -0
- gcore/resources/cloud/k8s/clusters/pools/nodes.py +303 -0
- gcore/resources/cloud/k8s/clusters/pools/pools.py +870 -0
- gcore/resources/cloud/k8s/flavors.py +209 -0
- gcore/resources/cloud/k8s/k8s.py +233 -0
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +11 -12
- gcore/resources/cloud/load_balancers/l7_policies/rules.py +9 -10
- gcore/resources/cloud/load_balancers/listeners.py +18 -18
- gcore/resources/cloud/load_balancers/load_balancers.py +4 -4
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +18 -6
- gcore/resources/cloud/load_balancers/pools/members.py +32 -2
- gcore/resources/cloud/load_balancers/pools/pools.py +32 -8
- gcore/resources/cloud/networks/networks.py +192 -4
- gcore/resources/cloud/networks/subnets.py +140 -8
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +608 -0
- gcore/resources/cloud/reserved_fixed_ips/vip.py +5 -7
- gcore/resources/cloud/security_groups/security_groups.py +6 -6
- gcore/resources/cloud/tasks.py +46 -46
- gcore/resources/cloud/users/role_assignments.py +5 -4
- gcore/resources/cloud/volumes.py +1125 -223
- gcore/resources/dns/__init__.py +75 -0
- gcore/resources/dns/dns.py +374 -0
- gcore/resources/dns/locations.py +288 -0
- gcore/resources/dns/metrics.py +214 -0
- gcore/resources/dns/pickers/__init__.py +33 -0
- gcore/resources/dns/pickers/pickers.py +167 -0
- gcore/resources/dns/pickers/presets.py +135 -0
- gcore/resources/dns/zones/__init__.py +47 -0
- gcore/resources/{cloud/inference/models.py → dns/zones/dnssec.py} +80 -122
- gcore/resources/dns/zones/rrsets.py +1005 -0
- gcore/resources/dns/zones/zones.py +1493 -0
- gcore/resources/storage/__init__.py +75 -0
- gcore/resources/storage/buckets/__init__.py +61 -0
- gcore/resources/storage/buckets/buckets.py +470 -0
- gcore/resources/storage/buckets/cors.py +265 -0
- gcore/resources/storage/buckets/lifecycle.py +276 -0
- gcore/resources/storage/buckets/policy.py +345 -0
- gcore/resources/storage/credentials.py +221 -0
- gcore/resources/storage/locations.py +190 -0
- gcore/resources/storage/statistics.py +364 -0
- gcore/resources/storage/storage.py +1046 -0
- gcore/resources/streaming/ai_tasks.py +56 -70
- gcore/resources/streaming/playlists.py +18 -18
- gcore/resources/streaming/quality_sets.py +8 -8
- gcore/resources/streaming/statistics.py +4 -122
- gcore/resources/streaming/streams/overlays.py +6 -6
- gcore/resources/streaming/streams/streams.py +40 -64
- gcore/resources/streaming/videos/subtitles.py +32 -30
- gcore/resources/streaming/videos/videos.py +78 -72
- gcore/resources/waap/domains/advanced_rules.py +2 -2
- gcore/resources/waap/domains/api_paths.py +13 -13
- gcore/resources/waap/domains/custom_rules.py +2 -2
- gcore/resources/waap/domains/domains.py +4 -4
- gcore/resources/waap/domains/firewall_rules.py +2 -2
- gcore/resources/waap/domains/insight_silences.py +6 -6
- gcore/resources/waap/domains/insights.py +7 -7
- gcore/resources/waap/domains/statistics.py +47 -47
- gcore/types/cloud/__init__.py +2 -4
- gcore/types/cloud/audit_log_list_params.py +2 -1
- gcore/types/cloud/baremetal/image_list_params.py +3 -2
- gcore/types/cloud/baremetal/server_create_params.py +8 -6
- gcore/types/cloud/baremetal/server_list_params.py +3 -2
- gcore/types/cloud/baremetal/server_rebuild_params.py +2 -0
- gcore/types/cloud/cost_report_get_aggregated_monthly_params.py +35 -31
- gcore/types/cloud/cost_report_get_aggregated_params.py +26 -25
- gcore/types/cloud/cost_report_get_detailed_params.py +26 -25
- gcore/types/cloud/ddos_profile.py +13 -7
- gcore/types/cloud/ddos_profile_field.py +21 -8
- gcore/types/cloud/ddos_profile_option_list.py +7 -6
- gcore/types/cloud/ddos_profile_status.py +2 -2
- gcore/types/cloud/ddos_profile_template.py +7 -3
- gcore/types/cloud/ddos_profile_template_field.py +12 -3
- gcore/types/cloud/file_share.py +2 -2
- gcore/types/cloud/file_share_create_params.py +12 -6
- gcore/types/cloud/floating_ip_list_params.py +3 -2
- gcore/types/cloud/gpu_baremetal_cluster.py +101 -74
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +76 -93
- gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +17 -10
- gcore/types/cloud/gpu_baremetal_cluster_list_params.py +14 -3
- gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +4 -2
- gcore/types/cloud/gpu_baremetal_clusters/__init__.py +6 -0
- gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_cluster_server.py +74 -0
- gcore/types/cloud/{gpu_baremetal_cluster_server.py → gpu_baremetal_clusters/gpu_baremetal_cluster_server_v1.py} +10 -10
- gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_cluster_server_v1_list.py +16 -0
- gcore/types/cloud/{gpu_baremetal_flavor.py → gpu_baremetal_clusters/gpu_baremetal_flavor.py} +1 -1
- gcore/types/cloud/{gpu_baremetal_flavor_list.py → gpu_baremetal_clusters/gpu_baremetal_flavor_list.py} +1 -1
- gcore/types/cloud/gpu_baremetal_clusters/server_list_params.py +75 -0
- gcore/types/cloud/inference/__init__.py +0 -5
- gcore/types/cloud/inference/applications/__init__.py +12 -0
- gcore/types/cloud/inference/applications/deployment_create_params.py +68 -0
- gcore/types/cloud/inference/applications/deployment_patch_params.py +62 -0
- gcore/types/cloud/inference/applications/inference_application_deployment.py +111 -0
- gcore/types/cloud/inference/applications/inference_application_deployment_list.py +16 -0
- gcore/types/cloud/inference/applications/inference_application_template.py +94 -0
- gcore/types/cloud/inference/applications/inference_application_template_list.py +16 -0
- gcore/types/cloud/inference/deployment_create_params.py +7 -6
- gcore/types/cloud/inference/deployment_update_params.py +7 -6
- gcore/types/cloud/instance_assign_security_group_params.py +4 -2
- gcore/types/cloud/instance_list_params.py +3 -2
- gcore/types/cloud/instance_unassign_security_group_params.py +4 -2
- gcore/types/cloud/instances/image_list_params.py +3 -2
- gcore/types/cloud/k8s/__init__.py +13 -0
- gcore/types/cloud/k8s/cluster_create_params.py +299 -0
- gcore/types/cloud/k8s/cluster_delete_params.py +16 -0
- gcore/types/cloud/k8s/cluster_update_params.py +203 -0
- gcore/types/cloud/k8s/cluster_upgrade_params.py +16 -0
- gcore/types/cloud/k8s/clusters/__init__.py +10 -0
- gcore/types/cloud/k8s/clusters/k8s_cluster_pool.py +66 -0
- gcore/types/cloud/k8s/clusters/k8s_cluster_pool_list.py +16 -0
- gcore/types/cloud/k8s/clusters/node_list_params.py +16 -0
- gcore/types/cloud/k8s/clusters/pool_create_params.py +53 -0
- gcore/types/cloud/k8s/clusters/pool_resize_params.py +18 -0
- gcore/types/cloud/k8s/clusters/pool_update_params.py +34 -0
- gcore/types/cloud/k8s/clusters/pools/__init__.py +5 -0
- gcore/types/cloud/k8s/clusters/pools/node_list_params.py +18 -0
- gcore/types/cloud/k8s/flavor_list_params.py +19 -0
- gcore/types/cloud/k8s/k8s_cluster.py +209 -0
- gcore/types/cloud/k8s/k8s_cluster_certificate.py +13 -0
- gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py +19 -0
- gcore/types/cloud/k8s/k8s_cluster_list.py +16 -0
- gcore/types/cloud/k8s_cluster_version.py +10 -0
- gcore/types/cloud/{gpu_baremetal_cluster_server_list.py → k8s_cluster_version_list.py} +4 -4
- gcore/types/cloud/load_balancer_create_params.py +23 -4
- gcore/types/cloud/load_balancer_list_params.py +3 -2
- gcore/types/cloud/load_balancers/l7_policies/rule_create_params.py +3 -2
- gcore/types/cloud/load_balancers/l7_policies/rule_replace_params.py +3 -2
- gcore/types/cloud/load_balancers/l7_policy_create_params.py +3 -2
- gcore/types/cloud/load_balancers/l7_policy_replace_params.py +3 -2
- gcore/types/cloud/load_balancers/listener_create_params.py +4 -3
- gcore/types/cloud/load_balancers/listener_update_params.py +5 -3
- gcore/types/cloud/load_balancers/pool_create_params.py +19 -1
- gcore/types/cloud/load_balancers/pool_update_params.py +19 -1
- gcore/types/cloud/load_balancers/pools/member_add_params.py +19 -1
- gcore/types/cloud/member.py +19 -1
- gcore/types/cloud/network_list_params.py +3 -2
- gcore/types/cloud/networks/subnet_create_params.py +3 -2
- gcore/types/cloud/networks/subnet_list_params.py +3 -2
- gcore/types/cloud/networks/subnet_update_params.py +3 -2
- gcore/types/cloud/project.py +9 -9
- gcore/types/cloud/reserved_fixed_ips/vip_replace_connected_ports_params.py +3 -2
- gcore/types/cloud/reserved_fixed_ips/vip_update_connected_ports_params.py +3 -2
- gcore/types/cloud/security_group_create_params.py +4 -2
- gcore/types/cloud/security_group_list_params.py +3 -2
- gcore/types/cloud/task_id_list.py +8 -1
- gcore/types/cloud/task_list_params.py +23 -23
- gcore/types/cloud/usage_report_get_params.py +26 -25
- gcore/types/cloud/users/role_assignment.py +2 -1
- gcore/types/cloud/users/role_assignment_create_params.py +4 -2
- gcore/types/cloud/users/role_assignment_update_params.py +4 -2
- gcore/types/cloud/volume_list_params.py +3 -2
- gcore/types/dns/__init__.py +31 -0
- gcore/types/dns/dns_get_account_overview_response.py +21 -0
- gcore/types/dns/dns_label_name.py +13 -0
- gcore/types/dns/dns_location_translations.py +11 -0
- gcore/types/dns/dns_lookup_params.py +15 -0
- gcore/types/dns/dns_lookup_response.py +21 -0
- gcore/types/dns/dns_name_server.py +17 -0
- gcore/types/dns/location_list_continents_response.py +10 -0
- gcore/types/dns/location_list_countries_response.py +10 -0
- gcore/types/dns/location_list_regions_response.py +10 -0
- gcore/types/dns/location_list_response.py +16 -0
- gcore/types/dns/metric_list_params.py +24 -0
- gcore/types/dns/metric_list_response.py +7 -0
- gcore/types/dns/picker_list_response.py +10 -0
- gcore/types/dns/pickers/__init__.py +5 -0
- gcore/types/dns/pickers/preset_list_response.py +10 -0
- gcore/types/dns/zone_check_delegation_status_response.py +20 -0
- gcore/types/dns/zone_create_params.py +59 -0
- gcore/types/dns/zone_create_response.py +13 -0
- gcore/types/dns/zone_export_response.py +11 -0
- gcore/types/dns/zone_get_response.py +106 -0
- gcore/types/dns/zone_get_statistics_params.py +43 -0
- gcore/types/dns/zone_get_statistics_response.py +19 -0
- gcore/types/dns/zone_import_params.py +32 -0
- gcore/types/dns/zone_import_response.py +26 -0
- gcore/types/dns/zone_list_params.py +57 -0
- gcore/types/dns/zone_list_response.py +105 -0
- gcore/types/dns/zone_replace_params.py +61 -0
- gcore/types/dns/zones/__init__.py +15 -0
- gcore/types/dns/zones/dns_failover_log.py +19 -0
- gcore/types/dns/zones/dns_output_rrset.py +123 -0
- gcore/types/dns/zones/dnssec_get_response.py +38 -0
- gcore/types/dns/zones/dnssec_update_params.py +11 -0
- gcore/types/dns/zones/dnssec_update_response.py +38 -0
- gcore/types/dns/zones/rrset_create_params.py +82 -0
- gcore/types/dns/zones/rrset_get_failover_logs_params.py +21 -0
- gcore/types/dns/zones/rrset_get_failover_logs_response.py +15 -0
- gcore/types/dns/zones/rrset_list_params.py +21 -0
- gcore/types/dns/zones/rrset_list_response.py +14 -0
- gcore/types/dns/zones/rrset_replace_params.py +82 -0
- gcore/types/security/client_profile.py +1 -1
- gcore/types/security/profile_create_params.py +2 -2
- gcore/types/security/profile_recreate_params.py +2 -2
- gcore/types/security/profile_replace_params.py +2 -2
- gcore/types/storage/__init__.py +21 -0
- gcore/types/storage/bucket.py +15 -0
- gcore/types/storage/bucket_list_params.py +15 -0
- gcore/types/storage/buckets/__init__.py +9 -0
- gcore/types/storage/buckets/bucket_cors.py +18 -0
- gcore/types/storage/buckets/bucket_policy.py +7 -0
- gcore/types/storage/buckets/cor_create_params.py +17 -0
- gcore/types/storage/buckets/lifecycle_create_params.py +18 -0
- gcore/types/storage/buckets/policy_get_response.py +7 -0
- gcore/types/storage/credential_recreate_params.py +36 -0
- gcore/types/storage/location.py +24 -0
- gcore/types/storage/location_list_params.py +13 -0
- gcore/types/storage/statistic_get_usage_aggregated_params.py +24 -0
- gcore/types/storage/statistic_get_usage_series_params.py +38 -0
- gcore/types/storage/statistic_get_usage_series_response.py +12 -0
- gcore/types/storage/storage.py +101 -0
- gcore/types/storage/storage_create_params.py +44 -0
- gcore/types/storage/storage_list_params.py +39 -0
- gcore/types/storage/storage_restore_params.py +11 -0
- gcore/types/storage/storage_update_params.py +18 -0
- gcore/types/storage/usage_series.py +201 -0
- gcore/types/storage/usage_total.py +54 -0
- gcore/types/streaming/__init__.py +0 -4
- gcore/types/streaming/ai_contentmoderation_hardnudity.py +1 -1
- gcore/types/streaming/ai_contentmoderation_nsfw.py +1 -1
- gcore/types/streaming/ai_contentmoderation_softnudity.py +1 -1
- gcore/types/streaming/ai_contentmoderation_sport.py +1 -1
- gcore/types/streaming/ai_task.py +1 -5
- gcore/types/streaming/ai_task_create_params.py +2 -2
- gcore/types/streaming/ai_task_get_response.py +0 -46
- gcore/types/streaming/clip.py +2 -1
- gcore/types/streaming/create_video_param.py +13 -12
- gcore/types/streaming/max_stream_series.py +5 -5
- gcore/types/streaming/playlist.py +1 -1
- gcore/types/streaming/playlist_create_params.py +1 -1
- gcore/types/streaming/playlist_update_params.py +1 -1
- gcore/types/streaming/playlist_video.py +13 -12
- gcore/types/streaming/storage_series.py +5 -5
- gcore/types/streaming/stream.py +86 -49
- gcore/types/streaming/stream_create_clip_params.py +2 -1
- gcore/types/streaming/stream_create_params.py +9 -23
- gcore/types/streaming/stream_series.py +5 -5
- gcore/types/streaming/stream_update_params.py +9 -23
- gcore/types/streaming/video.py +53 -42
- gcore/types/streaming/video_update_params.py +13 -12
- gcore/types/streaming/vod_statistics_series.py +5 -5
- gcore/types/streaming/vod_total_stream_duration_series.py +3 -3
- gcore/types/waap/domain_list_params.py +1 -1
- gcore/types/waap/domain_update_params.py +1 -1
- gcore/types/waap/domains/advanced_rule_create_params.py +7 -4
- gcore/types/waap/domains/advanced_rule_update_params.py +6 -3
- gcore/types/waap/domains/api_path_create_params.py +4 -3
- gcore/types/waap/domains/api_path_list_params.py +3 -1
- gcore/types/waap/domains/api_path_update_params.py +5 -4
- gcore/types/waap/domains/custom_rule_create_params.py +13 -14
- gcore/types/waap/domains/custom_rule_update_params.py +12 -13
- gcore/types/waap/domains/firewall_rule_create_params.py +3 -2
- gcore/types/waap/domains/firewall_rule_update_params.py +2 -1
- gcore/types/waap/domains/insight_list_params.py +4 -2
- gcore/types/waap/domains/insight_replace_params.py +1 -1
- gcore/types/waap/domains/insight_silence_list_params.py +5 -3
- gcore/types/waap/domains/setting_update_params.py +3 -2
- gcore/types/waap/domains/statistic_get_ddos_info_params.py +6 -9
- gcore/types/waap/domains/statistic_get_events_aggregated_params.py +9 -10
- gcore/types/waap/domains/statistic_get_requests_series_params.py +8 -9
- gcore/types/waap/domains/statistic_get_traffic_series_params.py +6 -9
- gcore/types/waap/domains/waap_advanced_rule.py +3 -2
- gcore/types/waap/domains/waap_api_path.py +4 -4
- gcore/types/waap/domains/waap_api_scan_result.py +2 -2
- gcore/types/waap/domains/waap_custom_rule.py +4 -7
- gcore/types/waap/domains/waap_firewall_rule.py +3 -2
- gcore/types/waap/domains/waap_insight.py +1 -1
- gcore/types/waap/domains/waap_request_details.py +5 -4
- gcore/types/waap/waap_ip_ddos_info_model.py +3 -3
- gcore/types/waap/waap_rule_set.py +1 -1
- {gcore-0.10.0.dist-info → gcore-0.12.0.dist-info}/METADATA +7 -2
- {gcore-0.10.0.dist-info → gcore-0.12.0.dist-info}/RECORD +313 -193
- gcore/types/cloud/inference/inference_model.py +0 -65
- gcore/types/cloud/inference/inference_registry_credentials_create.py +0 -22
- gcore/types/cloud/inference/model_list_params.py +0 -21
- gcore/types/streaming/ai_contentmoderation_casm.py +0 -39
- gcore/types/streaming/ai_contentmoderation_weapon.py +0 -39
- gcore/types/streaming/meet_series.py +0 -23
- gcore/types/streaming/statistic_get_meet_series_params.py +0 -20
- {gcore-0.10.0.dist-info → gcore-0.12.0.dist-info}/WHEEL +0 -0
- {gcore-0.10.0.dist-info → gcore-0.12.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -107,17 +107,18 @@ class VideosResource(SyncAPIResource):
|
|
|
107
107
|
subtitles based on AI. Read more:
|
|
108
108
|
|
|
109
109
|
- What is
|
|
110
|
-
["AI
|
|
111
|
-
- If the option is enabled via
|
|
112
|
-
|
|
113
|
-
created for
|
|
110
|
+
["AI Speech Recognition"](/docs/api-reference/streaming/ai/create-ai-asr-task).
|
|
111
|
+
- If the option is enabled via
|
|
112
|
+
`auto_transcribe_audio_language: auto|<language_code>`, then immediately after
|
|
113
|
+
successful transcoding, an AI task will be automatically created for
|
|
114
|
+
transcription.
|
|
114
115
|
- If you need to translate subtitles from original language to any other, then
|
|
115
116
|
AI-task of subtitles translation can be applied. Use
|
|
116
|
-
`auto_translate_subtitles_language: default
|
|
117
|
-
point several languages to translate to, then a separate
|
|
118
|
-
generated for each specified language.
|
|
117
|
+
`auto_translate_subtitles_language: default|<language_codes,>` parameter for
|
|
118
|
+
that. Also you can point several languages to translate to, then a separate
|
|
119
|
+
subtitle will be generated for each specified language.
|
|
119
120
|
- How to
|
|
120
|
-
["add AI-generated subtitles to an exist video"](
|
|
121
|
+
["add AI-generated subtitles to an exist video"](/docs/api-reference/streaming/subtitles/add-subtitle).
|
|
121
122
|
The created AI-task(s) will be automatically executed, and result will also be
|
|
122
123
|
automatically attached to this video as subtitle(s). Please note that
|
|
123
124
|
transcription is done automatically for all videos uploaded to our video
|
|
@@ -194,9 +195,9 @@ class VideosResource(SyncAPIResource):
|
|
|
194
195
|
"duration", "`hls_url`", etc. Examples of changing:
|
|
195
196
|
|
|
196
197
|
- Name: `{ "name": "new name of the video" }`
|
|
197
|
-
- Move the video to a new directory:
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
- Move the video to a new directory: ` { "directory_id": 200 }` Please note that
|
|
199
|
+
some parameters are used on initial step (before transcoding) only, so after
|
|
200
|
+
transcoding there is no use in changing their values. For example,
|
|
200
201
|
"`origin_url`" parameter is used for downloading an original file from a
|
|
201
202
|
source and never used after transcoding; or "priority" parameter is used to
|
|
202
203
|
set priority of processing and never used after transcoding.
|
|
@@ -218,16 +219,16 @@ class VideosResource(SyncAPIResource):
|
|
|
218
219
|
attribute of API POST /streaming/ai/transcribe . Example:
|
|
219
220
|
|
|
220
221
|
```
|
|
221
|
-
|
|
222
|
-
|
|
222
|
+
auto_transcribe_audio_language: "auto"
|
|
223
|
+
auto_transcribe_audio_language: "ger"
|
|
223
224
|
```
|
|
224
225
|
|
|
225
226
|
More details:
|
|
226
227
|
|
|
227
228
|
- List of AI tasks – API
|
|
228
|
-
[GET /streaming/ai/tasks](
|
|
229
|
+
[GET /streaming/ai/tasks](/docs/api-reference/streaming/ai/get-list-of-ai-tasks)
|
|
229
230
|
- Add subtitles to an exist video – API
|
|
230
|
-
[POST /streaming/videos/{`video_id`}/subtitles](
|
|
231
|
+
[POST /streaming/videos/{`video_id`}/subtitles](/docs/api-reference/streaming/subtitles/add-subtitle).
|
|
231
232
|
|
|
232
233
|
auto_translate_subtitles_language: Automatic translation of auto-transcribed subtitles to the specified
|
|
233
234
|
language(s). Can be used both together with `auto_transcribe_audio_language`
|
|
@@ -242,8 +243,8 @@ class VideosResource(SyncAPIResource):
|
|
|
242
243
|
subtitle will be generated for each language. Example:
|
|
243
244
|
|
|
244
245
|
```
|
|
245
|
-
|
|
246
|
-
|
|
246
|
+
auto_translate_subtitles_language: default
|
|
247
|
+
auto_translate_subtitles_language: eng,fre,ger
|
|
247
248
|
```
|
|
248
249
|
|
|
249
250
|
Please note that subtitle translation is done separately and after
|
|
@@ -268,7 +269,8 @@ class VideosResource(SyncAPIResource):
|
|
|
268
269
|
|
|
269
270
|
origin_http_headers: Authorization HTTP request header. Will be used as credentials to authenticate a
|
|
270
271
|
request to download a file (specified in "`origin_url`" parameter) on an
|
|
271
|
-
external server. Syntax:
|
|
272
|
+
external server. Syntax:
|
|
273
|
+
`Authorization: <auth-scheme> <authorization-parameters>` Examples:
|
|
272
274
|
|
|
273
275
|
- "`origin_http_headers`": "Authorization: Basic ..."
|
|
274
276
|
- "`origin_http_headers`": "Authorization: Bearer ..."
|
|
@@ -277,10 +279,11 @@ class VideosResource(SyncAPIResource):
|
|
|
277
279
|
|
|
278
280
|
```
|
|
279
281
|
POST https://api.gcore.com/streaming/videos
|
|
282
|
+
|
|
280
283
|
"video": {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
+
"name": "IBC 2024 intro.mp4",
|
|
285
|
+
"origin_url": "https://www.googleapis.com/drive/v3/files/...?alt=media",
|
|
286
|
+
"origin_http_headers": "Authorization: Bearer ABC"
|
|
284
287
|
}
|
|
285
288
|
```
|
|
286
289
|
|
|
@@ -295,8 +298,8 @@ class VideosResource(SyncAPIResource):
|
|
|
295
298
|
image. Also use attribute "`screenshot_id`" to select poster as a default
|
|
296
299
|
screnshot. Attribute accepts single image as base64-encoded string
|
|
297
300
|
[(RFC 2397 – The "data" URL scheme)](https://www.rfc-editor.org/rfc/rfc2397). In
|
|
298
|
-
format: `data:[];base64
|
|
299
|
-
and file sizes up to 1Mb. Examples:
|
|
301
|
+
format: `data:[<mediatype>];base64,<data>` MIME-types are image/jpeg,
|
|
302
|
+
image/webp, and image/png and file sizes up to 1Mb. Examples:
|
|
300
303
|
|
|
301
304
|
- `data:image/jpeg;base64,/9j/4AA...qf/2Q==`
|
|
302
305
|
- `data:image/png;base64,iVBORw0KGg...ggg==`
|
|
@@ -657,19 +660,19 @@ class VideosResource(SyncAPIResource):
|
|
|
657
660
|
version only of tus-js-client.
|
|
658
661
|
|
|
659
662
|
```
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
663
|
+
uploads[data.video.id] = new tus.Upload(file, {
|
|
664
|
+
endpoint: `https://${data.servers[0].hostname}/upload/`,
|
|
665
|
+
metadata: {
|
|
666
|
+
filename: data.video.name,
|
|
667
|
+
token: data.token,
|
|
668
|
+
video_id: data.video.id,
|
|
669
|
+
client_id: data.video.client_id
|
|
670
|
+
},
|
|
671
|
+
onSuccess: function() {
|
|
672
|
+
...
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
uploads[data.video.id].start();
|
|
673
676
|
```
|
|
674
677
|
|
|
675
678
|
Args:
|
|
@@ -792,17 +795,18 @@ class AsyncVideosResource(AsyncAPIResource):
|
|
|
792
795
|
subtitles based on AI. Read more:
|
|
793
796
|
|
|
794
797
|
- What is
|
|
795
|
-
["AI
|
|
796
|
-
- If the option is enabled via
|
|
797
|
-
|
|
798
|
-
created for
|
|
798
|
+
["AI Speech Recognition"](/docs/api-reference/streaming/ai/create-ai-asr-task).
|
|
799
|
+
- If the option is enabled via
|
|
800
|
+
`auto_transcribe_audio_language: auto|<language_code>`, then immediately after
|
|
801
|
+
successful transcoding, an AI task will be automatically created for
|
|
802
|
+
transcription.
|
|
799
803
|
- If you need to translate subtitles from original language to any other, then
|
|
800
804
|
AI-task of subtitles translation can be applied. Use
|
|
801
|
-
`auto_translate_subtitles_language: default
|
|
802
|
-
point several languages to translate to, then a separate
|
|
803
|
-
generated for each specified language.
|
|
805
|
+
`auto_translate_subtitles_language: default|<language_codes,>` parameter for
|
|
806
|
+
that. Also you can point several languages to translate to, then a separate
|
|
807
|
+
subtitle will be generated for each specified language.
|
|
804
808
|
- How to
|
|
805
|
-
["add AI-generated subtitles to an exist video"](
|
|
809
|
+
["add AI-generated subtitles to an exist video"](/docs/api-reference/streaming/subtitles/add-subtitle).
|
|
806
810
|
The created AI-task(s) will be automatically executed, and result will also be
|
|
807
811
|
automatically attached to this video as subtitle(s). Please note that
|
|
808
812
|
transcription is done automatically for all videos uploaded to our video
|
|
@@ -879,9 +883,9 @@ class AsyncVideosResource(AsyncAPIResource):
|
|
|
879
883
|
"duration", "`hls_url`", etc. Examples of changing:
|
|
880
884
|
|
|
881
885
|
- Name: `{ "name": "new name of the video" }`
|
|
882
|
-
- Move the video to a new directory:
|
|
883
|
-
|
|
884
|
-
|
|
886
|
+
- Move the video to a new directory: ` { "directory_id": 200 }` Please note that
|
|
887
|
+
some parameters are used on initial step (before transcoding) only, so after
|
|
888
|
+
transcoding there is no use in changing their values. For example,
|
|
885
889
|
"`origin_url`" parameter is used for downloading an original file from a
|
|
886
890
|
source and never used after transcoding; or "priority" parameter is used to
|
|
887
891
|
set priority of processing and never used after transcoding.
|
|
@@ -903,16 +907,16 @@ class AsyncVideosResource(AsyncAPIResource):
|
|
|
903
907
|
attribute of API POST /streaming/ai/transcribe . Example:
|
|
904
908
|
|
|
905
909
|
```
|
|
906
|
-
|
|
907
|
-
|
|
910
|
+
auto_transcribe_audio_language: "auto"
|
|
911
|
+
auto_transcribe_audio_language: "ger"
|
|
908
912
|
```
|
|
909
913
|
|
|
910
914
|
More details:
|
|
911
915
|
|
|
912
916
|
- List of AI tasks – API
|
|
913
|
-
[GET /streaming/ai/tasks](
|
|
917
|
+
[GET /streaming/ai/tasks](/docs/api-reference/streaming/ai/get-list-of-ai-tasks)
|
|
914
918
|
- Add subtitles to an exist video – API
|
|
915
|
-
[POST /streaming/videos/{`video_id`}/subtitles](
|
|
919
|
+
[POST /streaming/videos/{`video_id`}/subtitles](/docs/api-reference/streaming/subtitles/add-subtitle).
|
|
916
920
|
|
|
917
921
|
auto_translate_subtitles_language: Automatic translation of auto-transcribed subtitles to the specified
|
|
918
922
|
language(s). Can be used both together with `auto_transcribe_audio_language`
|
|
@@ -927,8 +931,8 @@ class AsyncVideosResource(AsyncAPIResource):
|
|
|
927
931
|
subtitle will be generated for each language. Example:
|
|
928
932
|
|
|
929
933
|
```
|
|
930
|
-
|
|
931
|
-
|
|
934
|
+
auto_translate_subtitles_language: default
|
|
935
|
+
auto_translate_subtitles_language: eng,fre,ger
|
|
932
936
|
```
|
|
933
937
|
|
|
934
938
|
Please note that subtitle translation is done separately and after
|
|
@@ -953,7 +957,8 @@ class AsyncVideosResource(AsyncAPIResource):
|
|
|
953
957
|
|
|
954
958
|
origin_http_headers: Authorization HTTP request header. Will be used as credentials to authenticate a
|
|
955
959
|
request to download a file (specified in "`origin_url`" parameter) on an
|
|
956
|
-
external server. Syntax:
|
|
960
|
+
external server. Syntax:
|
|
961
|
+
`Authorization: <auth-scheme> <authorization-parameters>` Examples:
|
|
957
962
|
|
|
958
963
|
- "`origin_http_headers`": "Authorization: Basic ..."
|
|
959
964
|
- "`origin_http_headers`": "Authorization: Bearer ..."
|
|
@@ -962,10 +967,11 @@ class AsyncVideosResource(AsyncAPIResource):
|
|
|
962
967
|
|
|
963
968
|
```
|
|
964
969
|
POST https://api.gcore.com/streaming/videos
|
|
970
|
+
|
|
965
971
|
"video": {
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
972
|
+
"name": "IBC 2024 intro.mp4",
|
|
973
|
+
"origin_url": "https://www.googleapis.com/drive/v3/files/...?alt=media",
|
|
974
|
+
"origin_http_headers": "Authorization: Bearer ABC"
|
|
969
975
|
}
|
|
970
976
|
```
|
|
971
977
|
|
|
@@ -980,8 +986,8 @@ class AsyncVideosResource(AsyncAPIResource):
|
|
|
980
986
|
image. Also use attribute "`screenshot_id`" to select poster as a default
|
|
981
987
|
screnshot. Attribute accepts single image as base64-encoded string
|
|
982
988
|
[(RFC 2397 – The "data" URL scheme)](https://www.rfc-editor.org/rfc/rfc2397). In
|
|
983
|
-
format: `data:[];base64
|
|
984
|
-
and file sizes up to 1Mb. Examples:
|
|
989
|
+
format: `data:[<mediatype>];base64,<data>` MIME-types are image/jpeg,
|
|
990
|
+
image/webp, and image/png and file sizes up to 1Mb. Examples:
|
|
985
991
|
|
|
986
992
|
- `data:image/jpeg;base64,/9j/4AA...qf/2Q==`
|
|
987
993
|
- `data:image/png;base64,iVBORw0KGg...ggg==`
|
|
@@ -1346,19 +1352,19 @@ class AsyncVideosResource(AsyncAPIResource):
|
|
|
1346
1352
|
version only of tus-js-client.
|
|
1347
1353
|
|
|
1348
1354
|
```
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1355
|
+
uploads[data.video.id] = new tus.Upload(file, {
|
|
1356
|
+
endpoint: `https://${data.servers[0].hostname}/upload/`,
|
|
1357
|
+
metadata: {
|
|
1358
|
+
filename: data.video.name,
|
|
1359
|
+
token: data.token,
|
|
1360
|
+
video_id: data.video.id,
|
|
1361
|
+
client_id: data.video.client_id
|
|
1362
|
+
},
|
|
1363
|
+
onSuccess: function() {
|
|
1364
|
+
...
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
uploads[data.video.id].start();
|
|
1362
1368
|
```
|
|
1363
1369
|
|
|
1364
1370
|
Args:
|
|
@@ -68,7 +68,7 @@ class AdvancedRulesResource(SyncAPIResource):
|
|
|
68
68
|
Args:
|
|
69
69
|
domain_id: The domain ID
|
|
70
70
|
|
|
71
|
-
action: The action that
|
|
71
|
+
action: The action that the rule takes when triggered
|
|
72
72
|
|
|
73
73
|
enabled: Whether or not the rule is enabled
|
|
74
74
|
|
|
@@ -444,7 +444,7 @@ class AsyncAdvancedRulesResource(AsyncAPIResource):
|
|
|
444
444
|
Args:
|
|
445
445
|
domain_id: The domain ID
|
|
446
446
|
|
|
447
|
-
action: The action that
|
|
447
|
+
action: The action that the rule takes when triggered
|
|
448
448
|
|
|
449
449
|
enabled: Whether or not the rule is enabled
|
|
450
450
|
|
|
@@ -7,7 +7,7 @@ from typing_extensions import Literal
|
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
|
10
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, SequenceNotStr
|
|
11
11
|
from ...._utils import maybe_transform, async_maybe_transform
|
|
12
12
|
from ...._compat import cached_property
|
|
13
13
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -52,9 +52,9 @@ class APIPathsResource(SyncAPIResource):
|
|
|
52
52
|
http_scheme: Literal["HTTP", "HTTPS"],
|
|
53
53
|
method: Literal["GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS"],
|
|
54
54
|
path: str,
|
|
55
|
-
api_groups:
|
|
55
|
+
api_groups: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
|
|
56
56
|
api_version: str | NotGiven = NOT_GIVEN,
|
|
57
|
-
tags:
|
|
57
|
+
tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
|
|
58
58
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
59
59
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
60
60
|
extra_headers: Headers | None = None,
|
|
@@ -113,10 +113,10 @@ class APIPathsResource(SyncAPIResource):
|
|
|
113
113
|
path_id: str,
|
|
114
114
|
*,
|
|
115
115
|
domain_id: int,
|
|
116
|
-
api_groups:
|
|
116
|
+
api_groups: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
|
|
117
117
|
path: str | NotGiven = NOT_GIVEN,
|
|
118
118
|
status: Literal["CONFIRMED_API", "POTENTIAL_API", "NOT_API", "DELISTED_API"] | NotGiven = NOT_GIVEN,
|
|
119
|
-
tags:
|
|
119
|
+
tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
|
|
120
120
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
121
121
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
122
122
|
extra_headers: Headers | None = None,
|
|
@@ -137,7 +137,7 @@ class APIPathsResource(SyncAPIResource):
|
|
|
137
137
|
path: The updated API path. When updating the path, variables can be renamed, path
|
|
138
138
|
parts can be converted to variables and vice versa.
|
|
139
139
|
|
|
140
|
-
status: The
|
|
140
|
+
status: The status of the discovered API path
|
|
141
141
|
|
|
142
142
|
tags: An array of tags associated with the API path
|
|
143
143
|
|
|
@@ -176,7 +176,7 @@ class APIPathsResource(SyncAPIResource):
|
|
|
176
176
|
api_group: Optional[str] | NotGiven = NOT_GIVEN,
|
|
177
177
|
api_version: Optional[str] | NotGiven = NOT_GIVEN,
|
|
178
178
|
http_scheme: Optional[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN,
|
|
179
|
-
ids: Optional[
|
|
179
|
+
ids: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
|
|
180
180
|
limit: int | NotGiven = NOT_GIVEN,
|
|
181
181
|
method: Optional[Literal["GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS"]]
|
|
182
182
|
| NotGiven = NOT_GIVEN,
|
|
@@ -382,9 +382,9 @@ class AsyncAPIPathsResource(AsyncAPIResource):
|
|
|
382
382
|
http_scheme: Literal["HTTP", "HTTPS"],
|
|
383
383
|
method: Literal["GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS"],
|
|
384
384
|
path: str,
|
|
385
|
-
api_groups:
|
|
385
|
+
api_groups: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
|
|
386
386
|
api_version: str | NotGiven = NOT_GIVEN,
|
|
387
|
-
tags:
|
|
387
|
+
tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
|
|
388
388
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
389
389
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
390
390
|
extra_headers: Headers | None = None,
|
|
@@ -443,10 +443,10 @@ class AsyncAPIPathsResource(AsyncAPIResource):
|
|
|
443
443
|
path_id: str,
|
|
444
444
|
*,
|
|
445
445
|
domain_id: int,
|
|
446
|
-
api_groups:
|
|
446
|
+
api_groups: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
|
|
447
447
|
path: str | NotGiven = NOT_GIVEN,
|
|
448
448
|
status: Literal["CONFIRMED_API", "POTENTIAL_API", "NOT_API", "DELISTED_API"] | NotGiven = NOT_GIVEN,
|
|
449
|
-
tags:
|
|
449
|
+
tags: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
|
|
450
450
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
451
451
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
452
452
|
extra_headers: Headers | None = None,
|
|
@@ -467,7 +467,7 @@ class AsyncAPIPathsResource(AsyncAPIResource):
|
|
|
467
467
|
path: The updated API path. When updating the path, variables can be renamed, path
|
|
468
468
|
parts can be converted to variables and vice versa.
|
|
469
469
|
|
|
470
|
-
status: The
|
|
470
|
+
status: The status of the discovered API path
|
|
471
471
|
|
|
472
472
|
tags: An array of tags associated with the API path
|
|
473
473
|
|
|
@@ -506,7 +506,7 @@ class AsyncAPIPathsResource(AsyncAPIResource):
|
|
|
506
506
|
api_group: Optional[str] | NotGiven = NOT_GIVEN,
|
|
507
507
|
api_version: Optional[str] | NotGiven = NOT_GIVEN,
|
|
508
508
|
http_scheme: Optional[Literal["HTTP", "HTTPS"]] | NotGiven = NOT_GIVEN,
|
|
509
|
-
ids: Optional[
|
|
509
|
+
ids: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
|
|
510
510
|
limit: int | NotGiven = NOT_GIVEN,
|
|
511
511
|
method: Optional[Literal["GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS"]]
|
|
512
512
|
| NotGiven = NOT_GIVEN,
|
|
@@ -72,7 +72,7 @@ class CustomRulesResource(SyncAPIResource):
|
|
|
72
72
|
Args:
|
|
73
73
|
domain_id: The domain ID
|
|
74
74
|
|
|
75
|
-
action: The action that
|
|
75
|
+
action: The action that the rule takes when triggered
|
|
76
76
|
|
|
77
77
|
conditions: The conditions required for the WAAP engine to trigger the rule. Rules may have
|
|
78
78
|
between 1 and 5 conditions. All conditions must pass for the rule to trigger
|
|
@@ -446,7 +446,7 @@ class AsyncCustomRulesResource(AsyncAPIResource):
|
|
|
446
446
|
Args:
|
|
447
447
|
domain_id: The domain ID
|
|
448
448
|
|
|
449
|
-
action: The action that
|
|
449
|
+
action: The action that the rule takes when triggered
|
|
450
450
|
|
|
451
451
|
conditions: The conditions required for the WAAP engine to trigger the rule. Rules may have
|
|
452
452
|
between 1 and 5 conditions. All conditions must pass for the rule to trigger
|
|
@@ -186,7 +186,7 @@ class DomainsResource(SyncAPIResource):
|
|
|
186
186
|
Args:
|
|
187
187
|
domain_id: The domain ID
|
|
188
188
|
|
|
189
|
-
status:
|
|
189
|
+
status: The current status of the domain
|
|
190
190
|
|
|
191
191
|
extra_headers: Send extra headers
|
|
192
192
|
|
|
@@ -237,7 +237,7 @@ class DomainsResource(SyncAPIResource):
|
|
|
237
237
|
|
|
238
238
|
ordering: Sort the response by given field.
|
|
239
239
|
|
|
240
|
-
status:
|
|
240
|
+
status: Filter domains based on the domain status
|
|
241
241
|
|
|
242
242
|
extra_headers: Send extra headers
|
|
243
243
|
|
|
@@ -489,7 +489,7 @@ class AsyncDomainsResource(AsyncAPIResource):
|
|
|
489
489
|
Args:
|
|
490
490
|
domain_id: The domain ID
|
|
491
491
|
|
|
492
|
-
status:
|
|
492
|
+
status: The current status of the domain
|
|
493
493
|
|
|
494
494
|
extra_headers: Send extra headers
|
|
495
495
|
|
|
@@ -540,7 +540,7 @@ class AsyncDomainsResource(AsyncAPIResource):
|
|
|
540
540
|
|
|
541
541
|
ordering: Sort the response by given field.
|
|
542
542
|
|
|
543
|
-
status:
|
|
543
|
+
status: Filter domains based on the domain status
|
|
544
544
|
|
|
545
545
|
extra_headers: Send extra headers
|
|
546
546
|
|
|
@@ -72,7 +72,7 @@ class FirewallRulesResource(SyncAPIResource):
|
|
|
72
72
|
Args:
|
|
73
73
|
domain_id: The domain ID
|
|
74
74
|
|
|
75
|
-
action: The action that
|
|
75
|
+
action: The action that the rule takes when triggered
|
|
76
76
|
|
|
77
77
|
conditions: The condition required for the WAAP engine to trigger the rule.
|
|
78
78
|
|
|
@@ -444,7 +444,7 @@ class AsyncFirewallRulesResource(AsyncAPIResource):
|
|
|
444
444
|
Args:
|
|
445
445
|
domain_id: The domain ID
|
|
446
446
|
|
|
447
|
-
action: The action that
|
|
447
|
+
action: The action that the rule takes when triggered
|
|
448
448
|
|
|
449
449
|
conditions: The condition required for the WAAP engine to trigger the rule.
|
|
450
450
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict,
|
|
5
|
+
from typing import Dict, Union, Optional
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from typing_extensions import Literal
|
|
8
8
|
|
|
9
9
|
import httpx
|
|
10
10
|
|
|
11
|
-
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
|
11
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, SequenceNotStr
|
|
12
12
|
from ...._utils import maybe_transform, async_maybe_transform
|
|
13
13
|
from ...._compat import cached_property
|
|
14
14
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -173,10 +173,10 @@ class InsightSilencesResource(SyncAPIResource):
|
|
|
173
173
|
self,
|
|
174
174
|
domain_id: int,
|
|
175
175
|
*,
|
|
176
|
-
id: Optional[
|
|
176
|
+
id: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
|
|
177
177
|
author: Optional[str] | NotGiven = NOT_GIVEN,
|
|
178
178
|
comment: Optional[str] | NotGiven = NOT_GIVEN,
|
|
179
|
-
insight_type: Optional[
|
|
179
|
+
insight_type: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
|
|
180
180
|
limit: int | NotGiven = NOT_GIVEN,
|
|
181
181
|
offset: int | NotGiven = NOT_GIVEN,
|
|
182
182
|
ordering: Literal[
|
|
@@ -472,10 +472,10 @@ class AsyncInsightSilencesResource(AsyncAPIResource):
|
|
|
472
472
|
self,
|
|
473
473
|
domain_id: int,
|
|
474
474
|
*,
|
|
475
|
-
id: Optional[
|
|
475
|
+
id: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
|
|
476
476
|
author: Optional[str] | NotGiven = NOT_GIVEN,
|
|
477
477
|
comment: Optional[str] | NotGiven = NOT_GIVEN,
|
|
478
|
-
insight_type: Optional[
|
|
478
|
+
insight_type: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
|
|
479
479
|
limit: int | NotGiven = NOT_GIVEN,
|
|
480
480
|
offset: int | NotGiven = NOT_GIVEN,
|
|
481
481
|
ordering: Literal[
|
|
@@ -7,7 +7,7 @@ from typing_extensions import Literal
|
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
10
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
|
|
11
11
|
from ...._utils import maybe_transform, async_maybe_transform
|
|
12
12
|
from ...._compat import cached_property
|
|
13
13
|
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -49,9 +49,9 @@ class InsightsResource(SyncAPIResource):
|
|
|
49
49
|
self,
|
|
50
50
|
domain_id: int,
|
|
51
51
|
*,
|
|
52
|
-
id: Optional[
|
|
52
|
+
id: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
|
|
53
53
|
description: Optional[str] | NotGiven = NOT_GIVEN,
|
|
54
|
-
insight_type: Optional[
|
|
54
|
+
insight_type: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
|
|
55
55
|
limit: int | NotGiven = NOT_GIVEN,
|
|
56
56
|
offset: int | NotGiven = NOT_GIVEN,
|
|
57
57
|
ordering: Literal[
|
|
@@ -186,7 +186,7 @@ class InsightsResource(SyncAPIResource):
|
|
|
186
186
|
|
|
187
187
|
insight_id: The ID of the insight
|
|
188
188
|
|
|
189
|
-
status: The
|
|
189
|
+
status: The status of the insight
|
|
190
190
|
|
|
191
191
|
extra_headers: Send extra headers
|
|
192
192
|
|
|
@@ -232,9 +232,9 @@ class AsyncInsightsResource(AsyncAPIResource):
|
|
|
232
232
|
self,
|
|
233
233
|
domain_id: int,
|
|
234
234
|
*,
|
|
235
|
-
id: Optional[
|
|
235
|
+
id: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
|
|
236
236
|
description: Optional[str] | NotGiven = NOT_GIVEN,
|
|
237
|
-
insight_type: Optional[
|
|
237
|
+
insight_type: Optional[SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
|
|
238
238
|
limit: int | NotGiven = NOT_GIVEN,
|
|
239
239
|
offset: int | NotGiven = NOT_GIVEN,
|
|
240
240
|
ordering: Literal[
|
|
@@ -369,7 +369,7 @@ class AsyncInsightsResource(AsyncAPIResource):
|
|
|
369
369
|
|
|
370
370
|
insight_id: The ID of the insight
|
|
371
371
|
|
|
372
|
-
status: The
|
|
372
|
+
status: The status of the insight
|
|
373
373
|
|
|
374
374
|
extra_headers: Send extra headers
|
|
375
375
|
|