gcore 0.9.0__py3-none-any.whl → 0.11.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 +26 -10
- gcore/resources/cloud/load_balancers/pools/members.py +34 -4
- 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/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 +4 -4
- 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/security/bgp_announces.py +15 -15
- 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 +1042 -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/__init__.py +14 -0
- gcore/resources/waap/custom_page_sets.py +40 -34
- gcore/resources/waap/domains/__init__.py +14 -28
- gcore/resources/waap/domains/advanced_rules.py +7 -10
- gcore/resources/waap/domains/{api_discovery/api_discovery.py → api_discovery.py} +292 -59
- gcore/resources/waap/domains/api_path_groups.py +5 -5
- gcore/resources/waap/domains/api_paths.py +28 -30
- gcore/resources/waap/domains/custom_rules.py +7 -10
- gcore/resources/waap/domains/domains.py +124 -68
- gcore/resources/waap/domains/firewall_rules.py +5 -7
- gcore/resources/waap/domains/insight_silences.py +34 -11
- gcore/resources/waap/domains/insights.py +43 -17
- gcore/resources/waap/domains/statistics.py +977 -0
- gcore/resources/waap/insights.py +233 -0
- gcore/resources/waap/ip_info/__init__.py +33 -0
- gcore/resources/waap/{ip_info.py → ip_info/ip_info.py} +149 -235
- gcore/resources/waap/ip_info/metrics.py +203 -0
- gcore/resources/waap/waap.py +40 -8
- 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/health_monitor.py +6 -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/{waap/domains/analytics → cloud/k8s/clusters/pools}/__init__.py +1 -1
- 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 +31 -7
- 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 +27 -4
- gcore/types/cloud/load_balancers/pool_update_params.py +27 -4
- gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py +7 -2
- gcore/types/cloud/load_balancers/pools/member_add_params.py +20 -2
- 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/region.py +0 -3
- 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/__init__.py +1 -1
- gcore/types/security/{bgp_announce_change_params.py → bgp_announce_toggle_params.py} +2 -2
- 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/__init__.py +6 -54
- gcore/types/waap/custom_page_set_create_params.py +121 -14
- gcore/types/waap/custom_page_set_preview_params.py +11 -4
- gcore/types/waap/custom_page_set_update_params.py +122 -15
- gcore/types/waap/domain_list_params.py +2 -4
- gcore/types/waap/domain_update_params.py +1 -1
- gcore/types/waap/domains/__init__.py +28 -18
- gcore/types/waap/domains/advanced_rule_create_params.py +7 -4
- gcore/types/waap/domains/advanced_rule_list_params.py +1 -3
- gcore/types/waap/domains/advanced_rule_update_params.py +6 -3
- gcore/types/waap/domains/{api_discovery/scan_result_list_params.py → api_discovery_list_scan_results_params.py} +2 -2
- gcore/types/waap/domains/api_path_create_params.py +4 -3
- gcore/types/waap/domains/{api_path_group_list_response.py → api_path_group_list.py} +2 -2
- 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_list_params.py +1 -3
- 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 +19 -7
- gcore/types/waap/domains/insight_replace_params.py +3 -5
- gcore/types/waap/domains/insight_silence_list_params.py +17 -6
- gcore/types/waap/domains/setting_update_params.py +3 -2
- gcore/types/waap/domains/{analytics_list_ddos_attacks_params.py → statistic_get_ddos_attacks_params.py} +2 -2
- gcore/types/waap/domains/statistic_get_ddos_info_params.py +28 -0
- gcore/types/waap/domains/statistic_get_events_aggregated_params.py +33 -0
- gcore/types/waap/domains/statistic_get_requests_series_params.py +74 -0
- gcore/types/waap/domains/statistic_get_traffic_series_params.py +22 -0
- gcore/types/waap/domains/statistic_get_traffic_series_response.py +10 -0
- gcore/types/waap/{waap_advanced_rule.py → domains/waap_advanced_rule.py} +4 -3
- gcore/types/waap/domains/{api_discovery_get_settings_response.py → waap_api_discovery_settings.py} +2 -2
- gcore/types/waap/domains/{api_path_get_response.py → waap_api_path.py} +6 -6
- gcore/types/waap/domains/{api_discovery/scan_result_get_response.py → waap_api_scan_result.py} +5 -5
- gcore/types/waap/{waap_blocked_statistics.py → domains/waap_blocked_statistics.py} +1 -1
- gcore/types/waap/{waap_count_statistics.py → domains/waap_count_statistics.py} +1 -1
- gcore/types/waap/{waap_custom_rule.py → domains/waap_custom_rule.py} +5 -8
- gcore/types/waap/{waap_ddos_attack.py → domains/waap_ddos_attack.py} +1 -1
- gcore/types/waap/{waap_ddos_info.py → domains/waap_ddos_info.py} +1 -1
- gcore/types/waap/{waap_event_statistics.py → domains/waap_event_statistics.py} +1 -1
- gcore/types/waap/{waap_firewall_rule.py → domains/waap_firewall_rule.py} +4 -3
- gcore/types/waap/{waap_insight.py → domains/waap_insight.py} +4 -4
- gcore/types/waap/{waap_insight_silence.py → domains/waap_insight_silence.py} +1 -1
- gcore/types/waap/domains/waap_request_details.py +186 -0
- gcore/types/waap/{waap_request_summary.py → domains/waap_request_summary.py} +1 -1
- gcore/types/waap/domains/{api_discovery_scan_openapi_response.py → waap_task_id.py} +2 -2
- gcore/types/waap/{waap_traffic_metrics.py → domains/waap_traffic_metrics.py} +1 -1
- gcore/types/waap/insight_list_types_params.py +28 -0
- gcore/types/waap/ip_info/__init__.py +6 -0
- gcore/types/waap/{ip_info_get_counts_params.py → ip_info/metric_list_params.py} +2 -2
- gcore/types/waap/{waap_ip_info_counts.py → ip_info/waap_ip_info_counts.py} +1 -1
- gcore/types/waap/{ip_info_get_params.py → ip_info_get_ip_info_params.py} +2 -2
- gcore/types/waap/{waap_ip_info.py → ip_info_get_ip_info_response.py} +2 -2
- gcore/types/waap/ip_info_get_top_urls_response.py +12 -3
- gcore/types/waap/{ip_info_get_top_sessions_params.py → ip_info_get_top_user_sessions_params.py} +2 -2
- gcore/types/waap/{ip_info_get_top_sessions_response.py → ip_info_get_top_user_sessions_response.py} +2 -2
- gcore/types/waap/waap_custom_page_set.py +113 -13
- gcore/types/waap/waap_detailed_domain.py +2 -2
- gcore/types/waap/waap_insight_type.py +33 -0
- gcore/types/waap/waap_ip_ddos_info_model.py +3 -3
- gcore/types/waap/waap_rule_set.py +26 -3
- gcore/types/waap/waap_summary_domain.py +2 -2
- {gcore-0.9.0.dist-info → gcore-0.11.0.dist-info}/METADATA +7 -2
- {gcore-0.9.0.dist-info → gcore-0.11.0.dist-info}/RECORD +362 -281
- gcore/resources/waap/domains/analytics/__init__.py +0 -33
- gcore/resources/waap/domains/analytics/analytics.py +0 -676
- gcore/resources/waap/domains/analytics/requests.py +0 -378
- gcore/resources/waap/domains/api_discovery/__init__.py +0 -33
- gcore/resources/waap/domains/api_discovery/scan_results.py +0 -352
- gcore/resources/waap/domains/policies.py +0 -173
- 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/types/waap/domains/analytics/request_list_params.py +0 -53
- gcore/types/waap/domains/analytics_get_event_statistics_params.py +0 -34
- gcore/types/waap/domains/analytics_list_ddos_info_params.py +0 -31
- gcore/types/waap/domains/analytics_list_event_traffic_params.py +0 -26
- gcore/types/waap/domains/analytics_list_event_traffic_response.py +0 -10
- gcore/types/waap/domains/api_discovery/__init__.py +0 -7
- gcore/types/waap/domains/api_discovery/scan_result_list_response.py +0 -29
- gcore/types/waap/domains/api_discovery_update_settings_response.py +0 -36
- gcore/types/waap/domains/api_discovery_upload_openapi_response.py +0 -10
- gcore/types/waap/domains/api_path_create_response.py +0 -50
- gcore/types/waap/domains/api_path_list_response.py +0 -50
- gcore/types/waap/waap_block_csrf_page_data.py +0 -28
- gcore/types/waap/waap_block_csrf_page_data_param.py +0 -28
- gcore/types/waap/waap_block_page_data.py +0 -28
- gcore/types/waap/waap_block_page_data_param.py +0 -28
- gcore/types/waap/waap_captcha_page_data.py +0 -31
- gcore/types/waap/waap_captcha_page_data_param.py +0 -31
- gcore/types/waap/waap_common_tag.py +0 -16
- gcore/types/waap/waap_cookie_disabled_page_data.py +0 -18
- gcore/types/waap/waap_cookie_disabled_page_data_param.py +0 -18
- gcore/types/waap/waap_customer_rule_state.py +0 -7
- gcore/types/waap/waap_domain_policy.py +0 -29
- gcore/types/waap/waap_domain_status.py +0 -7
- gcore/types/waap/waap_handshake_page_data.py +0 -25
- gcore/types/waap/waap_handshake_page_data_param.py +0 -25
- gcore/types/waap/waap_insight_silence_sort_by.py +0 -9
- gcore/types/waap/waap_insight_sort_by.py +0 -20
- gcore/types/waap/waap_insight_status.py +0 -7
- gcore/types/waap/waap_javascript_disabled_page_data.py +0 -18
- gcore/types/waap/waap_javascript_disabled_page_data_param.py +0 -18
- gcore/types/waap/waap_network_details.py +0 -17
- gcore/types/waap/waap_page_type.py +0 -9
- gcore/types/waap/waap_paginated_custom_page_set.py +0 -22
- gcore/types/waap/waap_paginated_ddos_attack.py +0 -22
- gcore/types/waap/waap_paginated_ddos_info.py +0 -22
- gcore/types/waap/waap_paginated_request_summary.py +0 -22
- gcore/types/waap/waap_pattern_matched_tag.py +0 -37
- gcore/types/waap/waap_policy_action.py +0 -7
- gcore/types/waap/waap_request_details.py +0 -92
- gcore/types/waap/waap_request_organization.py +0 -13
- gcore/types/waap/waap_resolution.py +0 -7
- gcore/types/waap/waap_rule_action_type.py +0 -7
- gcore/types/waap/waap_top_url.py +0 -13
- gcore/types/waap/waap_traffic_type.py +0 -28
- gcore/types/waap/waap_user_agent_details.py +0 -40
- {gcore-0.9.0.dist-info → gcore-0.11.0.dist-info}/WHEEL +0 -0
- {gcore-0.9.0.dist-info → gcore-0.11.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,1042 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
|
10
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
11
|
+
from ..._compat import cached_property
|
|
12
|
+
from .locations import (
|
|
13
|
+
LocationsResource,
|
|
14
|
+
AsyncLocationsResource,
|
|
15
|
+
LocationsResourceWithRawResponse,
|
|
16
|
+
AsyncLocationsResourceWithRawResponse,
|
|
17
|
+
LocationsResourceWithStreamingResponse,
|
|
18
|
+
AsyncLocationsResourceWithStreamingResponse,
|
|
19
|
+
)
|
|
20
|
+
from .statistics import (
|
|
21
|
+
StatisticsResource,
|
|
22
|
+
AsyncStatisticsResource,
|
|
23
|
+
StatisticsResourceWithRawResponse,
|
|
24
|
+
AsyncStatisticsResourceWithRawResponse,
|
|
25
|
+
StatisticsResourceWithStreamingResponse,
|
|
26
|
+
AsyncStatisticsResourceWithStreamingResponse,
|
|
27
|
+
)
|
|
28
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
29
|
+
from ..._response import (
|
|
30
|
+
to_raw_response_wrapper,
|
|
31
|
+
to_streamed_response_wrapper,
|
|
32
|
+
async_to_raw_response_wrapper,
|
|
33
|
+
async_to_streamed_response_wrapper,
|
|
34
|
+
)
|
|
35
|
+
from .credentials import (
|
|
36
|
+
CredentialsResource,
|
|
37
|
+
AsyncCredentialsResource,
|
|
38
|
+
CredentialsResourceWithRawResponse,
|
|
39
|
+
AsyncCredentialsResourceWithRawResponse,
|
|
40
|
+
CredentialsResourceWithStreamingResponse,
|
|
41
|
+
AsyncCredentialsResourceWithStreamingResponse,
|
|
42
|
+
)
|
|
43
|
+
from ...pagination import SyncOffsetPage, AsyncOffsetPage
|
|
44
|
+
from ..._base_client import AsyncPaginator, make_request_options
|
|
45
|
+
from ...types.storage import storage_list_params, storage_create_params, storage_update_params, storage_restore_params
|
|
46
|
+
from .buckets.buckets import (
|
|
47
|
+
BucketsResource,
|
|
48
|
+
AsyncBucketsResource,
|
|
49
|
+
BucketsResourceWithRawResponse,
|
|
50
|
+
AsyncBucketsResourceWithRawResponse,
|
|
51
|
+
BucketsResourceWithStreamingResponse,
|
|
52
|
+
AsyncBucketsResourceWithStreamingResponse,
|
|
53
|
+
)
|
|
54
|
+
from ...types.storage.storage import Storage
|
|
55
|
+
|
|
56
|
+
__all__ = ["StorageResource", "AsyncStorageResource"]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class StorageResource(SyncAPIResource):
|
|
60
|
+
@cached_property
|
|
61
|
+
def locations(self) -> LocationsResource:
|
|
62
|
+
return LocationsResource(self._client)
|
|
63
|
+
|
|
64
|
+
@cached_property
|
|
65
|
+
def statistics(self) -> StatisticsResource:
|
|
66
|
+
return StatisticsResource(self._client)
|
|
67
|
+
|
|
68
|
+
@cached_property
|
|
69
|
+
def credentials(self) -> CredentialsResource:
|
|
70
|
+
return CredentialsResource(self._client)
|
|
71
|
+
|
|
72
|
+
@cached_property
|
|
73
|
+
def buckets(self) -> BucketsResource:
|
|
74
|
+
return BucketsResource(self._client)
|
|
75
|
+
|
|
76
|
+
@cached_property
|
|
77
|
+
def with_raw_response(self) -> StorageResourceWithRawResponse:
|
|
78
|
+
"""
|
|
79
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
80
|
+
the raw response object instead of the parsed content.
|
|
81
|
+
|
|
82
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
83
|
+
"""
|
|
84
|
+
return StorageResourceWithRawResponse(self)
|
|
85
|
+
|
|
86
|
+
@cached_property
|
|
87
|
+
def with_streaming_response(self) -> StorageResourceWithStreamingResponse:
|
|
88
|
+
"""
|
|
89
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
90
|
+
|
|
91
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
92
|
+
"""
|
|
93
|
+
return StorageResourceWithStreamingResponse(self)
|
|
94
|
+
|
|
95
|
+
def create(
|
|
96
|
+
self,
|
|
97
|
+
*,
|
|
98
|
+
location: Literal["s-ed1", "s-drc2", "s-sgc1", "s-nhn2", "s-darz", "s-ws1", "ams", "sin", "fra", "mia"],
|
|
99
|
+
name: str,
|
|
100
|
+
type: Literal["sftp", "s3"],
|
|
101
|
+
generate_sftp_password: bool | NotGiven = NOT_GIVEN,
|
|
102
|
+
sftp_password: str | NotGiven = NOT_GIVEN,
|
|
103
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
104
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
105
|
+
extra_headers: Headers | None = None,
|
|
106
|
+
extra_query: Query | None = None,
|
|
107
|
+
extra_body: Body | None = None,
|
|
108
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
109
|
+
) -> Storage:
|
|
110
|
+
"""
|
|
111
|
+
Creates a new storage instance (S3 or SFTP) in the specified location and
|
|
112
|
+
returns the storage details including credentials.
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
location: Geographic location where the storage will be provisioned. Each location
|
|
116
|
+
represents a specific data center region.
|
|
117
|
+
|
|
118
|
+
name: Unique storage name identifier. Must contain only letters, numbers, dashes, and
|
|
119
|
+
underscores. Cannot be empty and must be less than 256 characters.
|
|
120
|
+
|
|
121
|
+
type: Storage protocol type. Choose 's3' for S3-compatible object storage with API
|
|
122
|
+
access, or `sftp` for SFTP file transfer protocol.
|
|
123
|
+
|
|
124
|
+
generate_sftp_password: Automatically generate a secure password for SFTP storage access. Only
|
|
125
|
+
applicable when type is `sftp`. When `true`, a random password will be generated
|
|
126
|
+
and returned in the response.
|
|
127
|
+
|
|
128
|
+
sftp_password: Custom password for SFTP storage access. Only applicable when type is `sftp`. If
|
|
129
|
+
not provided and `generate_sftp_password` is `false`, no password authentication
|
|
130
|
+
will be available.
|
|
131
|
+
|
|
132
|
+
extra_headers: Send extra headers
|
|
133
|
+
|
|
134
|
+
extra_query: Add additional query parameters to the request
|
|
135
|
+
|
|
136
|
+
extra_body: Add additional JSON properties to the request
|
|
137
|
+
|
|
138
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
139
|
+
"""
|
|
140
|
+
return self._post(
|
|
141
|
+
"/storage/provisioning/v2/storage",
|
|
142
|
+
body=maybe_transform(
|
|
143
|
+
{
|
|
144
|
+
"location": location,
|
|
145
|
+
"name": name,
|
|
146
|
+
"type": type,
|
|
147
|
+
"generate_sftp_password": generate_sftp_password,
|
|
148
|
+
"sftp_password": sftp_password,
|
|
149
|
+
},
|
|
150
|
+
storage_create_params.StorageCreateParams,
|
|
151
|
+
),
|
|
152
|
+
options=make_request_options(
|
|
153
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
154
|
+
),
|
|
155
|
+
cast_to=Storage,
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
def update(
|
|
159
|
+
self,
|
|
160
|
+
storage_id: int,
|
|
161
|
+
*,
|
|
162
|
+
expires: str | NotGiven = NOT_GIVEN,
|
|
163
|
+
server_alias: str | NotGiven = NOT_GIVEN,
|
|
164
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
165
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
166
|
+
extra_headers: Headers | None = None,
|
|
167
|
+
extra_query: Query | None = None,
|
|
168
|
+
extra_body: Body | None = None,
|
|
169
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
170
|
+
) -> Storage:
|
|
171
|
+
"""
|
|
172
|
+
Updates storage configuration such as expiration date and server alias.
|
|
173
|
+
|
|
174
|
+
Args:
|
|
175
|
+
expires: ISO 8601 timestamp when the storage should expire. Leave empty to remove
|
|
176
|
+
expiration.
|
|
177
|
+
|
|
178
|
+
server_alias: Custom domain alias for accessing the storage. Leave empty to remove alias.
|
|
179
|
+
|
|
180
|
+
extra_headers: Send extra headers
|
|
181
|
+
|
|
182
|
+
extra_query: Add additional query parameters to the request
|
|
183
|
+
|
|
184
|
+
extra_body: Add additional JSON properties to the request
|
|
185
|
+
|
|
186
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
187
|
+
"""
|
|
188
|
+
return self._post(
|
|
189
|
+
f"/storage/provisioning/v1/storage/{storage_id}",
|
|
190
|
+
body=maybe_transform(
|
|
191
|
+
{
|
|
192
|
+
"expires": expires,
|
|
193
|
+
"server_alias": server_alias,
|
|
194
|
+
},
|
|
195
|
+
storage_update_params.StorageUpdateParams,
|
|
196
|
+
),
|
|
197
|
+
options=make_request_options(
|
|
198
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
199
|
+
),
|
|
200
|
+
cast_to=Storage,
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
def list(
|
|
204
|
+
self,
|
|
205
|
+
*,
|
|
206
|
+
id: str | NotGiven = NOT_GIVEN,
|
|
207
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
208
|
+
location: str | NotGiven = NOT_GIVEN,
|
|
209
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
210
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
211
|
+
order_by: str | NotGiven = NOT_GIVEN,
|
|
212
|
+
order_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
|
|
213
|
+
show_deleted: bool | NotGiven = NOT_GIVEN,
|
|
214
|
+
status: Literal["active", "suspended", "deleted", "pending"] | NotGiven = NOT_GIVEN,
|
|
215
|
+
type: Literal["s3", "sftp"] | NotGiven = NOT_GIVEN,
|
|
216
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
217
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
218
|
+
extra_headers: Headers | None = None,
|
|
219
|
+
extra_query: Query | None = None,
|
|
220
|
+
extra_body: Body | None = None,
|
|
221
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
222
|
+
) -> SyncOffsetPage[Storage]:
|
|
223
|
+
"""
|
|
224
|
+
Returns storages with the same filtering and pagination as v2, but in a
|
|
225
|
+
simplified response shape for easier client consumption. Response format: count:
|
|
226
|
+
total number of storages matching the filter (independent of pagination)
|
|
227
|
+
results: the current page of storages according to limit/offset
|
|
228
|
+
|
|
229
|
+
Args:
|
|
230
|
+
id: Filter by storage ID
|
|
231
|
+
|
|
232
|
+
limit: Max number of records in response
|
|
233
|
+
|
|
234
|
+
location: Filter by storage location/region
|
|
235
|
+
|
|
236
|
+
name: Filter by storage name (exact match)
|
|
237
|
+
|
|
238
|
+
offset: Number of records to skip before beginning to write in response.
|
|
239
|
+
|
|
240
|
+
order_by: Field name to sort by
|
|
241
|
+
|
|
242
|
+
order_direction: Ascending or descending order
|
|
243
|
+
|
|
244
|
+
show_deleted: Include deleted storages in the response
|
|
245
|
+
|
|
246
|
+
status: Filter by storage status
|
|
247
|
+
|
|
248
|
+
type: Filter by storage type
|
|
249
|
+
|
|
250
|
+
extra_headers: Send extra headers
|
|
251
|
+
|
|
252
|
+
extra_query: Add additional query parameters to the request
|
|
253
|
+
|
|
254
|
+
extra_body: Add additional JSON properties to the request
|
|
255
|
+
|
|
256
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
257
|
+
"""
|
|
258
|
+
return self._get_api_list(
|
|
259
|
+
"/storage/provisioning/v3/storage",
|
|
260
|
+
page=SyncOffsetPage[Storage],
|
|
261
|
+
options=make_request_options(
|
|
262
|
+
extra_headers=extra_headers,
|
|
263
|
+
extra_query=extra_query,
|
|
264
|
+
extra_body=extra_body,
|
|
265
|
+
timeout=timeout,
|
|
266
|
+
query=maybe_transform(
|
|
267
|
+
{
|
|
268
|
+
"id": id,
|
|
269
|
+
"limit": limit,
|
|
270
|
+
"location": location,
|
|
271
|
+
"name": name,
|
|
272
|
+
"offset": offset,
|
|
273
|
+
"order_by": order_by,
|
|
274
|
+
"order_direction": order_direction,
|
|
275
|
+
"show_deleted": show_deleted,
|
|
276
|
+
"status": status,
|
|
277
|
+
"type": type,
|
|
278
|
+
},
|
|
279
|
+
storage_list_params.StorageListParams,
|
|
280
|
+
),
|
|
281
|
+
),
|
|
282
|
+
model=Storage,
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
def delete(
|
|
286
|
+
self,
|
|
287
|
+
storage_id: int,
|
|
288
|
+
*,
|
|
289
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
290
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
291
|
+
extra_headers: Headers | None = None,
|
|
292
|
+
extra_query: Query | None = None,
|
|
293
|
+
extra_body: Body | None = None,
|
|
294
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
295
|
+
) -> None:
|
|
296
|
+
"""Permanently deletes a storage and all its data.
|
|
297
|
+
|
|
298
|
+
This action cannot be undone.
|
|
299
|
+
|
|
300
|
+
Args:
|
|
301
|
+
extra_headers: Send extra headers
|
|
302
|
+
|
|
303
|
+
extra_query: Add additional query parameters to the request
|
|
304
|
+
|
|
305
|
+
extra_body: Add additional JSON properties to the request
|
|
306
|
+
|
|
307
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
308
|
+
"""
|
|
309
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
310
|
+
return self._delete(
|
|
311
|
+
f"/storage/provisioning/v1/storage/{storage_id}",
|
|
312
|
+
options=make_request_options(
|
|
313
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
314
|
+
),
|
|
315
|
+
cast_to=NoneType,
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
def get(
|
|
319
|
+
self,
|
|
320
|
+
storage_id: int,
|
|
321
|
+
*,
|
|
322
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
323
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
324
|
+
extra_headers: Headers | None = None,
|
|
325
|
+
extra_query: Query | None = None,
|
|
326
|
+
extra_body: Body | None = None,
|
|
327
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
328
|
+
) -> Storage:
|
|
329
|
+
"""
|
|
330
|
+
Retrieves detailed information about a specific storage including its
|
|
331
|
+
configuration, credentials, and current status.
|
|
332
|
+
|
|
333
|
+
Args:
|
|
334
|
+
extra_headers: Send extra headers
|
|
335
|
+
|
|
336
|
+
extra_query: Add additional query parameters to the request
|
|
337
|
+
|
|
338
|
+
extra_body: Add additional JSON properties to the request
|
|
339
|
+
|
|
340
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
341
|
+
"""
|
|
342
|
+
return self._get(
|
|
343
|
+
f"/storage/provisioning/v1/storage/{storage_id}",
|
|
344
|
+
options=make_request_options(
|
|
345
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
346
|
+
),
|
|
347
|
+
cast_to=Storage,
|
|
348
|
+
)
|
|
349
|
+
|
|
350
|
+
def link_ssh_key(
|
|
351
|
+
self,
|
|
352
|
+
key_id: int,
|
|
353
|
+
*,
|
|
354
|
+
storage_id: int,
|
|
355
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
356
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
357
|
+
extra_headers: Headers | None = None,
|
|
358
|
+
extra_query: Query | None = None,
|
|
359
|
+
extra_body: Body | None = None,
|
|
360
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
361
|
+
) -> None:
|
|
362
|
+
"""
|
|
363
|
+
Associates an SSH public key with an SFTP storage, enabling passwordless
|
|
364
|
+
authentication. Only works with SFTP storage types - not applicable to
|
|
365
|
+
S3-compatible storage.
|
|
366
|
+
|
|
367
|
+
Args:
|
|
368
|
+
extra_headers: Send extra headers
|
|
369
|
+
|
|
370
|
+
extra_query: Add additional query parameters to the request
|
|
371
|
+
|
|
372
|
+
extra_body: Add additional JSON properties to the request
|
|
373
|
+
|
|
374
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
375
|
+
"""
|
|
376
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
377
|
+
return self._post(
|
|
378
|
+
f"/storage/provisioning/v1/storage/{storage_id}/key/{key_id}/link",
|
|
379
|
+
options=make_request_options(
|
|
380
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
381
|
+
),
|
|
382
|
+
cast_to=NoneType,
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
def restore(
|
|
386
|
+
self,
|
|
387
|
+
storage_id: int,
|
|
388
|
+
*,
|
|
389
|
+
client_id: int | NotGiven = NOT_GIVEN,
|
|
390
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
391
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
392
|
+
extra_headers: Headers | None = None,
|
|
393
|
+
extra_query: Query | None = None,
|
|
394
|
+
extra_body: Body | None = None,
|
|
395
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
396
|
+
) -> None:
|
|
397
|
+
"""
|
|
398
|
+
Restores a previously deleted S3 storage if it was deleted within the last 2
|
|
399
|
+
weeks. SFTP storages cannot be restored.
|
|
400
|
+
|
|
401
|
+
Args:
|
|
402
|
+
extra_headers: Send extra headers
|
|
403
|
+
|
|
404
|
+
extra_query: Add additional query parameters to the request
|
|
405
|
+
|
|
406
|
+
extra_body: Add additional JSON properties to the request
|
|
407
|
+
|
|
408
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
409
|
+
"""
|
|
410
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
411
|
+
return self._post(
|
|
412
|
+
f"/storage/provisioning/v1/storage/{storage_id}/restore",
|
|
413
|
+
options=make_request_options(
|
|
414
|
+
extra_headers=extra_headers,
|
|
415
|
+
extra_query=extra_query,
|
|
416
|
+
extra_body=extra_body,
|
|
417
|
+
timeout=timeout,
|
|
418
|
+
query=maybe_transform({"client_id": client_id}, storage_restore_params.StorageRestoreParams),
|
|
419
|
+
),
|
|
420
|
+
cast_to=NoneType,
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
def unlink_ssh_key(
|
|
424
|
+
self,
|
|
425
|
+
key_id: int,
|
|
426
|
+
*,
|
|
427
|
+
storage_id: int,
|
|
428
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
429
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
430
|
+
extra_headers: Headers | None = None,
|
|
431
|
+
extra_query: Query | None = None,
|
|
432
|
+
extra_body: Body | None = None,
|
|
433
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
434
|
+
) -> None:
|
|
435
|
+
"""
|
|
436
|
+
Removes SSH key association from an SFTP storage, disabling passwordless
|
|
437
|
+
authentication for that key. The key itself remains available for other
|
|
438
|
+
storages.
|
|
439
|
+
|
|
440
|
+
Args:
|
|
441
|
+
extra_headers: Send extra headers
|
|
442
|
+
|
|
443
|
+
extra_query: Add additional query parameters to the request
|
|
444
|
+
|
|
445
|
+
extra_body: Add additional JSON properties to the request
|
|
446
|
+
|
|
447
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
448
|
+
"""
|
|
449
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
450
|
+
return self._post(
|
|
451
|
+
f"/storage/provisioning/v1/storage/{storage_id}/key/{key_id}/unlink",
|
|
452
|
+
options=make_request_options(
|
|
453
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
454
|
+
),
|
|
455
|
+
cast_to=NoneType,
|
|
456
|
+
)
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
class AsyncStorageResource(AsyncAPIResource):
|
|
460
|
+
@cached_property
|
|
461
|
+
def locations(self) -> AsyncLocationsResource:
|
|
462
|
+
return AsyncLocationsResource(self._client)
|
|
463
|
+
|
|
464
|
+
@cached_property
|
|
465
|
+
def statistics(self) -> AsyncStatisticsResource:
|
|
466
|
+
return AsyncStatisticsResource(self._client)
|
|
467
|
+
|
|
468
|
+
@cached_property
|
|
469
|
+
def credentials(self) -> AsyncCredentialsResource:
|
|
470
|
+
return AsyncCredentialsResource(self._client)
|
|
471
|
+
|
|
472
|
+
@cached_property
|
|
473
|
+
def buckets(self) -> AsyncBucketsResource:
|
|
474
|
+
return AsyncBucketsResource(self._client)
|
|
475
|
+
|
|
476
|
+
@cached_property
|
|
477
|
+
def with_raw_response(self) -> AsyncStorageResourceWithRawResponse:
|
|
478
|
+
"""
|
|
479
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
480
|
+
the raw response object instead of the parsed content.
|
|
481
|
+
|
|
482
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
483
|
+
"""
|
|
484
|
+
return AsyncStorageResourceWithRawResponse(self)
|
|
485
|
+
|
|
486
|
+
@cached_property
|
|
487
|
+
def with_streaming_response(self) -> AsyncStorageResourceWithStreamingResponse:
|
|
488
|
+
"""
|
|
489
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
490
|
+
|
|
491
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
492
|
+
"""
|
|
493
|
+
return AsyncStorageResourceWithStreamingResponse(self)
|
|
494
|
+
|
|
495
|
+
async def create(
|
|
496
|
+
self,
|
|
497
|
+
*,
|
|
498
|
+
location: Literal["s-ed1", "s-drc2", "s-sgc1", "s-nhn2", "s-darz", "s-ws1", "ams", "sin", "fra", "mia"],
|
|
499
|
+
name: str,
|
|
500
|
+
type: Literal["sftp", "s3"],
|
|
501
|
+
generate_sftp_password: bool | NotGiven = NOT_GIVEN,
|
|
502
|
+
sftp_password: str | NotGiven = NOT_GIVEN,
|
|
503
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
504
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
505
|
+
extra_headers: Headers | None = None,
|
|
506
|
+
extra_query: Query | None = None,
|
|
507
|
+
extra_body: Body | None = None,
|
|
508
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
509
|
+
) -> Storage:
|
|
510
|
+
"""
|
|
511
|
+
Creates a new storage instance (S3 or SFTP) in the specified location and
|
|
512
|
+
returns the storage details including credentials.
|
|
513
|
+
|
|
514
|
+
Args:
|
|
515
|
+
location: Geographic location where the storage will be provisioned. Each location
|
|
516
|
+
represents a specific data center region.
|
|
517
|
+
|
|
518
|
+
name: Unique storage name identifier. Must contain only letters, numbers, dashes, and
|
|
519
|
+
underscores. Cannot be empty and must be less than 256 characters.
|
|
520
|
+
|
|
521
|
+
type: Storage protocol type. Choose 's3' for S3-compatible object storage with API
|
|
522
|
+
access, or `sftp` for SFTP file transfer protocol.
|
|
523
|
+
|
|
524
|
+
generate_sftp_password: Automatically generate a secure password for SFTP storage access. Only
|
|
525
|
+
applicable when type is `sftp`. When `true`, a random password will be generated
|
|
526
|
+
and returned in the response.
|
|
527
|
+
|
|
528
|
+
sftp_password: Custom password for SFTP storage access. Only applicable when type is `sftp`. If
|
|
529
|
+
not provided and `generate_sftp_password` is `false`, no password authentication
|
|
530
|
+
will be available.
|
|
531
|
+
|
|
532
|
+
extra_headers: Send extra headers
|
|
533
|
+
|
|
534
|
+
extra_query: Add additional query parameters to the request
|
|
535
|
+
|
|
536
|
+
extra_body: Add additional JSON properties to the request
|
|
537
|
+
|
|
538
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
539
|
+
"""
|
|
540
|
+
return await self._post(
|
|
541
|
+
"/storage/provisioning/v2/storage",
|
|
542
|
+
body=await async_maybe_transform(
|
|
543
|
+
{
|
|
544
|
+
"location": location,
|
|
545
|
+
"name": name,
|
|
546
|
+
"type": type,
|
|
547
|
+
"generate_sftp_password": generate_sftp_password,
|
|
548
|
+
"sftp_password": sftp_password,
|
|
549
|
+
},
|
|
550
|
+
storage_create_params.StorageCreateParams,
|
|
551
|
+
),
|
|
552
|
+
options=make_request_options(
|
|
553
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
554
|
+
),
|
|
555
|
+
cast_to=Storage,
|
|
556
|
+
)
|
|
557
|
+
|
|
558
|
+
async def update(
|
|
559
|
+
self,
|
|
560
|
+
storage_id: int,
|
|
561
|
+
*,
|
|
562
|
+
expires: str | NotGiven = NOT_GIVEN,
|
|
563
|
+
server_alias: str | NotGiven = NOT_GIVEN,
|
|
564
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
565
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
566
|
+
extra_headers: Headers | None = None,
|
|
567
|
+
extra_query: Query | None = None,
|
|
568
|
+
extra_body: Body | None = None,
|
|
569
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
570
|
+
) -> Storage:
|
|
571
|
+
"""
|
|
572
|
+
Updates storage configuration such as expiration date and server alias.
|
|
573
|
+
|
|
574
|
+
Args:
|
|
575
|
+
expires: ISO 8601 timestamp when the storage should expire. Leave empty to remove
|
|
576
|
+
expiration.
|
|
577
|
+
|
|
578
|
+
server_alias: Custom domain alias for accessing the storage. Leave empty to remove alias.
|
|
579
|
+
|
|
580
|
+
extra_headers: Send extra headers
|
|
581
|
+
|
|
582
|
+
extra_query: Add additional query parameters to the request
|
|
583
|
+
|
|
584
|
+
extra_body: Add additional JSON properties to the request
|
|
585
|
+
|
|
586
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
587
|
+
"""
|
|
588
|
+
return await self._post(
|
|
589
|
+
f"/storage/provisioning/v1/storage/{storage_id}",
|
|
590
|
+
body=await async_maybe_transform(
|
|
591
|
+
{
|
|
592
|
+
"expires": expires,
|
|
593
|
+
"server_alias": server_alias,
|
|
594
|
+
},
|
|
595
|
+
storage_update_params.StorageUpdateParams,
|
|
596
|
+
),
|
|
597
|
+
options=make_request_options(
|
|
598
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
599
|
+
),
|
|
600
|
+
cast_to=Storage,
|
|
601
|
+
)
|
|
602
|
+
|
|
603
|
+
def list(
|
|
604
|
+
self,
|
|
605
|
+
*,
|
|
606
|
+
id: str | NotGiven = NOT_GIVEN,
|
|
607
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
608
|
+
location: str | NotGiven = NOT_GIVEN,
|
|
609
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
610
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
611
|
+
order_by: str | NotGiven = NOT_GIVEN,
|
|
612
|
+
order_direction: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
|
|
613
|
+
show_deleted: bool | NotGiven = NOT_GIVEN,
|
|
614
|
+
status: Literal["active", "suspended", "deleted", "pending"] | NotGiven = NOT_GIVEN,
|
|
615
|
+
type: Literal["s3", "sftp"] | NotGiven = NOT_GIVEN,
|
|
616
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
617
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
618
|
+
extra_headers: Headers | None = None,
|
|
619
|
+
extra_query: Query | None = None,
|
|
620
|
+
extra_body: Body | None = None,
|
|
621
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
622
|
+
) -> AsyncPaginator[Storage, AsyncOffsetPage[Storage]]:
|
|
623
|
+
"""
|
|
624
|
+
Returns storages with the same filtering and pagination as v2, but in a
|
|
625
|
+
simplified response shape for easier client consumption. Response format: count:
|
|
626
|
+
total number of storages matching the filter (independent of pagination)
|
|
627
|
+
results: the current page of storages according to limit/offset
|
|
628
|
+
|
|
629
|
+
Args:
|
|
630
|
+
id: Filter by storage ID
|
|
631
|
+
|
|
632
|
+
limit: Max number of records in response
|
|
633
|
+
|
|
634
|
+
location: Filter by storage location/region
|
|
635
|
+
|
|
636
|
+
name: Filter by storage name (exact match)
|
|
637
|
+
|
|
638
|
+
offset: Number of records to skip before beginning to write in response.
|
|
639
|
+
|
|
640
|
+
order_by: Field name to sort by
|
|
641
|
+
|
|
642
|
+
order_direction: Ascending or descending order
|
|
643
|
+
|
|
644
|
+
show_deleted: Include deleted storages in the response
|
|
645
|
+
|
|
646
|
+
status: Filter by storage status
|
|
647
|
+
|
|
648
|
+
type: Filter by storage type
|
|
649
|
+
|
|
650
|
+
extra_headers: Send extra headers
|
|
651
|
+
|
|
652
|
+
extra_query: Add additional query parameters to the request
|
|
653
|
+
|
|
654
|
+
extra_body: Add additional JSON properties to the request
|
|
655
|
+
|
|
656
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
657
|
+
"""
|
|
658
|
+
return self._get_api_list(
|
|
659
|
+
"/storage/provisioning/v3/storage",
|
|
660
|
+
page=AsyncOffsetPage[Storage],
|
|
661
|
+
options=make_request_options(
|
|
662
|
+
extra_headers=extra_headers,
|
|
663
|
+
extra_query=extra_query,
|
|
664
|
+
extra_body=extra_body,
|
|
665
|
+
timeout=timeout,
|
|
666
|
+
query=maybe_transform(
|
|
667
|
+
{
|
|
668
|
+
"id": id,
|
|
669
|
+
"limit": limit,
|
|
670
|
+
"location": location,
|
|
671
|
+
"name": name,
|
|
672
|
+
"offset": offset,
|
|
673
|
+
"order_by": order_by,
|
|
674
|
+
"order_direction": order_direction,
|
|
675
|
+
"show_deleted": show_deleted,
|
|
676
|
+
"status": status,
|
|
677
|
+
"type": type,
|
|
678
|
+
},
|
|
679
|
+
storage_list_params.StorageListParams,
|
|
680
|
+
),
|
|
681
|
+
),
|
|
682
|
+
model=Storage,
|
|
683
|
+
)
|
|
684
|
+
|
|
685
|
+
async def delete(
|
|
686
|
+
self,
|
|
687
|
+
storage_id: int,
|
|
688
|
+
*,
|
|
689
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
690
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
691
|
+
extra_headers: Headers | None = None,
|
|
692
|
+
extra_query: Query | None = None,
|
|
693
|
+
extra_body: Body | None = None,
|
|
694
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
695
|
+
) -> None:
|
|
696
|
+
"""Permanently deletes a storage and all its data.
|
|
697
|
+
|
|
698
|
+
This action cannot be undone.
|
|
699
|
+
|
|
700
|
+
Args:
|
|
701
|
+
extra_headers: Send extra headers
|
|
702
|
+
|
|
703
|
+
extra_query: Add additional query parameters to the request
|
|
704
|
+
|
|
705
|
+
extra_body: Add additional JSON properties to the request
|
|
706
|
+
|
|
707
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
708
|
+
"""
|
|
709
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
710
|
+
return await self._delete(
|
|
711
|
+
f"/storage/provisioning/v1/storage/{storage_id}",
|
|
712
|
+
options=make_request_options(
|
|
713
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
714
|
+
),
|
|
715
|
+
cast_to=NoneType,
|
|
716
|
+
)
|
|
717
|
+
|
|
718
|
+
async def get(
|
|
719
|
+
self,
|
|
720
|
+
storage_id: int,
|
|
721
|
+
*,
|
|
722
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
723
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
724
|
+
extra_headers: Headers | None = None,
|
|
725
|
+
extra_query: Query | None = None,
|
|
726
|
+
extra_body: Body | None = None,
|
|
727
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
728
|
+
) -> Storage:
|
|
729
|
+
"""
|
|
730
|
+
Retrieves detailed information about a specific storage including its
|
|
731
|
+
configuration, credentials, and current status.
|
|
732
|
+
|
|
733
|
+
Args:
|
|
734
|
+
extra_headers: Send extra headers
|
|
735
|
+
|
|
736
|
+
extra_query: Add additional query parameters to the request
|
|
737
|
+
|
|
738
|
+
extra_body: Add additional JSON properties to the request
|
|
739
|
+
|
|
740
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
741
|
+
"""
|
|
742
|
+
return await self._get(
|
|
743
|
+
f"/storage/provisioning/v1/storage/{storage_id}",
|
|
744
|
+
options=make_request_options(
|
|
745
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
746
|
+
),
|
|
747
|
+
cast_to=Storage,
|
|
748
|
+
)
|
|
749
|
+
|
|
750
|
+
async def link_ssh_key(
|
|
751
|
+
self,
|
|
752
|
+
key_id: int,
|
|
753
|
+
*,
|
|
754
|
+
storage_id: int,
|
|
755
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
756
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
757
|
+
extra_headers: Headers | None = None,
|
|
758
|
+
extra_query: Query | None = None,
|
|
759
|
+
extra_body: Body | None = None,
|
|
760
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
761
|
+
) -> None:
|
|
762
|
+
"""
|
|
763
|
+
Associates an SSH public key with an SFTP storage, enabling passwordless
|
|
764
|
+
authentication. Only works with SFTP storage types - not applicable to
|
|
765
|
+
S3-compatible storage.
|
|
766
|
+
|
|
767
|
+
Args:
|
|
768
|
+
extra_headers: Send extra headers
|
|
769
|
+
|
|
770
|
+
extra_query: Add additional query parameters to the request
|
|
771
|
+
|
|
772
|
+
extra_body: Add additional JSON properties to the request
|
|
773
|
+
|
|
774
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
775
|
+
"""
|
|
776
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
777
|
+
return await self._post(
|
|
778
|
+
f"/storage/provisioning/v1/storage/{storage_id}/key/{key_id}/link",
|
|
779
|
+
options=make_request_options(
|
|
780
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
781
|
+
),
|
|
782
|
+
cast_to=NoneType,
|
|
783
|
+
)
|
|
784
|
+
|
|
785
|
+
async def restore(
|
|
786
|
+
self,
|
|
787
|
+
storage_id: int,
|
|
788
|
+
*,
|
|
789
|
+
client_id: int | NotGiven = NOT_GIVEN,
|
|
790
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
791
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
792
|
+
extra_headers: Headers | None = None,
|
|
793
|
+
extra_query: Query | None = None,
|
|
794
|
+
extra_body: Body | None = None,
|
|
795
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
796
|
+
) -> None:
|
|
797
|
+
"""
|
|
798
|
+
Restores a previously deleted S3 storage if it was deleted within the last 2
|
|
799
|
+
weeks. SFTP storages cannot be restored.
|
|
800
|
+
|
|
801
|
+
Args:
|
|
802
|
+
extra_headers: Send extra headers
|
|
803
|
+
|
|
804
|
+
extra_query: Add additional query parameters to the request
|
|
805
|
+
|
|
806
|
+
extra_body: Add additional JSON properties to the request
|
|
807
|
+
|
|
808
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
809
|
+
"""
|
|
810
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
811
|
+
return await self._post(
|
|
812
|
+
f"/storage/provisioning/v1/storage/{storage_id}/restore",
|
|
813
|
+
options=make_request_options(
|
|
814
|
+
extra_headers=extra_headers,
|
|
815
|
+
extra_query=extra_query,
|
|
816
|
+
extra_body=extra_body,
|
|
817
|
+
timeout=timeout,
|
|
818
|
+
query=await async_maybe_transform(
|
|
819
|
+
{"client_id": client_id}, storage_restore_params.StorageRestoreParams
|
|
820
|
+
),
|
|
821
|
+
),
|
|
822
|
+
cast_to=NoneType,
|
|
823
|
+
)
|
|
824
|
+
|
|
825
|
+
async def unlink_ssh_key(
|
|
826
|
+
self,
|
|
827
|
+
key_id: int,
|
|
828
|
+
*,
|
|
829
|
+
storage_id: int,
|
|
830
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
831
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
832
|
+
extra_headers: Headers | None = None,
|
|
833
|
+
extra_query: Query | None = None,
|
|
834
|
+
extra_body: Body | None = None,
|
|
835
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
836
|
+
) -> None:
|
|
837
|
+
"""
|
|
838
|
+
Removes SSH key association from an SFTP storage, disabling passwordless
|
|
839
|
+
authentication for that key. The key itself remains available for other
|
|
840
|
+
storages.
|
|
841
|
+
|
|
842
|
+
Args:
|
|
843
|
+
extra_headers: Send extra headers
|
|
844
|
+
|
|
845
|
+
extra_query: Add additional query parameters to the request
|
|
846
|
+
|
|
847
|
+
extra_body: Add additional JSON properties to the request
|
|
848
|
+
|
|
849
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
850
|
+
"""
|
|
851
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
852
|
+
return await self._post(
|
|
853
|
+
f"/storage/provisioning/v1/storage/{storage_id}/key/{key_id}/unlink",
|
|
854
|
+
options=make_request_options(
|
|
855
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
856
|
+
),
|
|
857
|
+
cast_to=NoneType,
|
|
858
|
+
)
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
class StorageResourceWithRawResponse:
|
|
862
|
+
def __init__(self, storage: StorageResource) -> None:
|
|
863
|
+
self._storage = storage
|
|
864
|
+
|
|
865
|
+
self.create = to_raw_response_wrapper(
|
|
866
|
+
storage.create,
|
|
867
|
+
)
|
|
868
|
+
self.update = to_raw_response_wrapper(
|
|
869
|
+
storage.update,
|
|
870
|
+
)
|
|
871
|
+
self.list = to_raw_response_wrapper(
|
|
872
|
+
storage.list,
|
|
873
|
+
)
|
|
874
|
+
self.delete = to_raw_response_wrapper(
|
|
875
|
+
storage.delete,
|
|
876
|
+
)
|
|
877
|
+
self.get = to_raw_response_wrapper(
|
|
878
|
+
storage.get,
|
|
879
|
+
)
|
|
880
|
+
self.link_ssh_key = to_raw_response_wrapper(
|
|
881
|
+
storage.link_ssh_key,
|
|
882
|
+
)
|
|
883
|
+
self.restore = to_raw_response_wrapper(
|
|
884
|
+
storage.restore,
|
|
885
|
+
)
|
|
886
|
+
self.unlink_ssh_key = to_raw_response_wrapper(
|
|
887
|
+
storage.unlink_ssh_key,
|
|
888
|
+
)
|
|
889
|
+
|
|
890
|
+
@cached_property
|
|
891
|
+
def locations(self) -> LocationsResourceWithRawResponse:
|
|
892
|
+
return LocationsResourceWithRawResponse(self._storage.locations)
|
|
893
|
+
|
|
894
|
+
@cached_property
|
|
895
|
+
def statistics(self) -> StatisticsResourceWithRawResponse:
|
|
896
|
+
return StatisticsResourceWithRawResponse(self._storage.statistics)
|
|
897
|
+
|
|
898
|
+
@cached_property
|
|
899
|
+
def credentials(self) -> CredentialsResourceWithRawResponse:
|
|
900
|
+
return CredentialsResourceWithRawResponse(self._storage.credentials)
|
|
901
|
+
|
|
902
|
+
@cached_property
|
|
903
|
+
def buckets(self) -> BucketsResourceWithRawResponse:
|
|
904
|
+
return BucketsResourceWithRawResponse(self._storage.buckets)
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
class AsyncStorageResourceWithRawResponse:
|
|
908
|
+
def __init__(self, storage: AsyncStorageResource) -> None:
|
|
909
|
+
self._storage = storage
|
|
910
|
+
|
|
911
|
+
self.create = async_to_raw_response_wrapper(
|
|
912
|
+
storage.create,
|
|
913
|
+
)
|
|
914
|
+
self.update = async_to_raw_response_wrapper(
|
|
915
|
+
storage.update,
|
|
916
|
+
)
|
|
917
|
+
self.list = async_to_raw_response_wrapper(
|
|
918
|
+
storage.list,
|
|
919
|
+
)
|
|
920
|
+
self.delete = async_to_raw_response_wrapper(
|
|
921
|
+
storage.delete,
|
|
922
|
+
)
|
|
923
|
+
self.get = async_to_raw_response_wrapper(
|
|
924
|
+
storage.get,
|
|
925
|
+
)
|
|
926
|
+
self.link_ssh_key = async_to_raw_response_wrapper(
|
|
927
|
+
storage.link_ssh_key,
|
|
928
|
+
)
|
|
929
|
+
self.restore = async_to_raw_response_wrapper(
|
|
930
|
+
storage.restore,
|
|
931
|
+
)
|
|
932
|
+
self.unlink_ssh_key = async_to_raw_response_wrapper(
|
|
933
|
+
storage.unlink_ssh_key,
|
|
934
|
+
)
|
|
935
|
+
|
|
936
|
+
@cached_property
|
|
937
|
+
def locations(self) -> AsyncLocationsResourceWithRawResponse:
|
|
938
|
+
return AsyncLocationsResourceWithRawResponse(self._storage.locations)
|
|
939
|
+
|
|
940
|
+
@cached_property
|
|
941
|
+
def statistics(self) -> AsyncStatisticsResourceWithRawResponse:
|
|
942
|
+
return AsyncStatisticsResourceWithRawResponse(self._storage.statistics)
|
|
943
|
+
|
|
944
|
+
@cached_property
|
|
945
|
+
def credentials(self) -> AsyncCredentialsResourceWithRawResponse:
|
|
946
|
+
return AsyncCredentialsResourceWithRawResponse(self._storage.credentials)
|
|
947
|
+
|
|
948
|
+
@cached_property
|
|
949
|
+
def buckets(self) -> AsyncBucketsResourceWithRawResponse:
|
|
950
|
+
return AsyncBucketsResourceWithRawResponse(self._storage.buckets)
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
class StorageResourceWithStreamingResponse:
|
|
954
|
+
def __init__(self, storage: StorageResource) -> None:
|
|
955
|
+
self._storage = storage
|
|
956
|
+
|
|
957
|
+
self.create = to_streamed_response_wrapper(
|
|
958
|
+
storage.create,
|
|
959
|
+
)
|
|
960
|
+
self.update = to_streamed_response_wrapper(
|
|
961
|
+
storage.update,
|
|
962
|
+
)
|
|
963
|
+
self.list = to_streamed_response_wrapper(
|
|
964
|
+
storage.list,
|
|
965
|
+
)
|
|
966
|
+
self.delete = to_streamed_response_wrapper(
|
|
967
|
+
storage.delete,
|
|
968
|
+
)
|
|
969
|
+
self.get = to_streamed_response_wrapper(
|
|
970
|
+
storage.get,
|
|
971
|
+
)
|
|
972
|
+
self.link_ssh_key = to_streamed_response_wrapper(
|
|
973
|
+
storage.link_ssh_key,
|
|
974
|
+
)
|
|
975
|
+
self.restore = to_streamed_response_wrapper(
|
|
976
|
+
storage.restore,
|
|
977
|
+
)
|
|
978
|
+
self.unlink_ssh_key = to_streamed_response_wrapper(
|
|
979
|
+
storage.unlink_ssh_key,
|
|
980
|
+
)
|
|
981
|
+
|
|
982
|
+
@cached_property
|
|
983
|
+
def locations(self) -> LocationsResourceWithStreamingResponse:
|
|
984
|
+
return LocationsResourceWithStreamingResponse(self._storage.locations)
|
|
985
|
+
|
|
986
|
+
@cached_property
|
|
987
|
+
def statistics(self) -> StatisticsResourceWithStreamingResponse:
|
|
988
|
+
return StatisticsResourceWithStreamingResponse(self._storage.statistics)
|
|
989
|
+
|
|
990
|
+
@cached_property
|
|
991
|
+
def credentials(self) -> CredentialsResourceWithStreamingResponse:
|
|
992
|
+
return CredentialsResourceWithStreamingResponse(self._storage.credentials)
|
|
993
|
+
|
|
994
|
+
@cached_property
|
|
995
|
+
def buckets(self) -> BucketsResourceWithStreamingResponse:
|
|
996
|
+
return BucketsResourceWithStreamingResponse(self._storage.buckets)
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
class AsyncStorageResourceWithStreamingResponse:
|
|
1000
|
+
def __init__(self, storage: AsyncStorageResource) -> None:
|
|
1001
|
+
self._storage = storage
|
|
1002
|
+
|
|
1003
|
+
self.create = async_to_streamed_response_wrapper(
|
|
1004
|
+
storage.create,
|
|
1005
|
+
)
|
|
1006
|
+
self.update = async_to_streamed_response_wrapper(
|
|
1007
|
+
storage.update,
|
|
1008
|
+
)
|
|
1009
|
+
self.list = async_to_streamed_response_wrapper(
|
|
1010
|
+
storage.list,
|
|
1011
|
+
)
|
|
1012
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
1013
|
+
storage.delete,
|
|
1014
|
+
)
|
|
1015
|
+
self.get = async_to_streamed_response_wrapper(
|
|
1016
|
+
storage.get,
|
|
1017
|
+
)
|
|
1018
|
+
self.link_ssh_key = async_to_streamed_response_wrapper(
|
|
1019
|
+
storage.link_ssh_key,
|
|
1020
|
+
)
|
|
1021
|
+
self.restore = async_to_streamed_response_wrapper(
|
|
1022
|
+
storage.restore,
|
|
1023
|
+
)
|
|
1024
|
+
self.unlink_ssh_key = async_to_streamed_response_wrapper(
|
|
1025
|
+
storage.unlink_ssh_key,
|
|
1026
|
+
)
|
|
1027
|
+
|
|
1028
|
+
@cached_property
|
|
1029
|
+
def locations(self) -> AsyncLocationsResourceWithStreamingResponse:
|
|
1030
|
+
return AsyncLocationsResourceWithStreamingResponse(self._storage.locations)
|
|
1031
|
+
|
|
1032
|
+
@cached_property
|
|
1033
|
+
def statistics(self) -> AsyncStatisticsResourceWithStreamingResponse:
|
|
1034
|
+
return AsyncStatisticsResourceWithStreamingResponse(self._storage.statistics)
|
|
1035
|
+
|
|
1036
|
+
@cached_property
|
|
1037
|
+
def credentials(self) -> AsyncCredentialsResourceWithStreamingResponse:
|
|
1038
|
+
return AsyncCredentialsResourceWithStreamingResponse(self._storage.credentials)
|
|
1039
|
+
|
|
1040
|
+
@cached_property
|
|
1041
|
+
def buckets(self) -> AsyncBucketsResourceWithStreamingResponse:
|
|
1042
|
+
return AsyncBucketsResourceWithStreamingResponse(self._storage.buckets)
|