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
|
@@ -283,11 +283,17 @@ class InterfacesResource(SyncAPIResource):
|
|
|
283
283
|
project_id: int | None = None,
|
|
284
284
|
region_id: int | None = None,
|
|
285
285
|
ddos_profile: interface_attach_params.NewInterfaceExternalExtendSchemaWithDDOSDDOSProfile
|
|
286
|
+
| interface_attach_params.NewInterfaceSpecificSubnetSchemaDDOSProfile
|
|
287
|
+
| interface_attach_params.NewInterfaceAnySubnetSchemaDDOSProfile
|
|
288
|
+
| interface_attach_params.NewInterfaceReservedFixedIPSchemaDDOSProfile
|
|
286
289
|
| NotGiven = NOT_GIVEN,
|
|
287
290
|
interface_name: str | NotGiven = NOT_GIVEN,
|
|
288
291
|
ip_family: Literal["dual", "ipv4", "ipv6"] | NotGiven = NOT_GIVEN,
|
|
289
292
|
port_group: int | NotGiven = NOT_GIVEN,
|
|
290
293
|
security_groups: Iterable[interface_attach_params.NewInterfaceExternalExtendSchemaWithDDOSSecurityGroup]
|
|
294
|
+
| Iterable[interface_attach_params.NewInterfaceSpecificSubnetSchemaSecurityGroup]
|
|
295
|
+
| Iterable[interface_attach_params.NewInterfaceAnySubnetSchemaSecurityGroup]
|
|
296
|
+
| Iterable[interface_attach_params.NewInterfaceReservedFixedIPSchemaSecurityGroup]
|
|
291
297
|
| NotGiven = NOT_GIVEN,
|
|
292
298
|
type: str | NotGiven = NOT_GIVEN,
|
|
293
299
|
subnet_id: str | NotGiven = NOT_GIVEN,
|
|
@@ -328,6 +334,299 @@ class InterfacesResource(SyncAPIResource):
|
|
|
328
334
|
cast_to=TaskIDList,
|
|
329
335
|
)
|
|
330
336
|
|
|
337
|
+
@overload
|
|
338
|
+
def attach_and_poll(
|
|
339
|
+
self,
|
|
340
|
+
instance_id: str,
|
|
341
|
+
*,
|
|
342
|
+
project_id: int | None = None,
|
|
343
|
+
region_id: int | None = None,
|
|
344
|
+
ddos_profile: interface_attach_params.NewInterfaceExternalExtendSchemaWithDDOSDDOSProfile
|
|
345
|
+
| NotGiven = NOT_GIVEN,
|
|
346
|
+
interface_name: str | NotGiven = NOT_GIVEN,
|
|
347
|
+
ip_family: Literal["dual", "ipv4", "ipv6"] | NotGiven = NOT_GIVEN,
|
|
348
|
+
port_group: int | NotGiven = NOT_GIVEN,
|
|
349
|
+
security_groups: Iterable[interface_attach_params.NewInterfaceExternalExtendSchemaWithDDOSSecurityGroup]
|
|
350
|
+
| NotGiven = NOT_GIVEN,
|
|
351
|
+
type: str | NotGiven = NOT_GIVEN,
|
|
352
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
353
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
354
|
+
extra_headers: Headers | None = None,
|
|
355
|
+
extra_query: Query | None = None,
|
|
356
|
+
extra_body: Body | None = None,
|
|
357
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
358
|
+
) -> NetworkInterfaceList:
|
|
359
|
+
"""
|
|
360
|
+
Attach interface to instance
|
|
361
|
+
|
|
362
|
+
Args:
|
|
363
|
+
ddos_profile: Advanced DDoS protection.
|
|
364
|
+
|
|
365
|
+
interface_name: Interface name
|
|
366
|
+
|
|
367
|
+
ip_family: Which subnets should be selected: IPv4, IPv6 or use dual stack.
|
|
368
|
+
|
|
369
|
+
port_group: Each group will be added to the separate trunk.
|
|
370
|
+
|
|
371
|
+
security_groups: List of security group IDs
|
|
372
|
+
|
|
373
|
+
type: Must be 'external'. Union tag
|
|
374
|
+
|
|
375
|
+
extra_headers: Send extra headers
|
|
376
|
+
|
|
377
|
+
extra_query: Add additional query parameters to the request
|
|
378
|
+
|
|
379
|
+
extra_body: Add additional JSON properties to the request
|
|
380
|
+
|
|
381
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
382
|
+
"""
|
|
383
|
+
...
|
|
384
|
+
|
|
385
|
+
@overload
|
|
386
|
+
def attach_and_poll(
|
|
387
|
+
self,
|
|
388
|
+
instance_id: str,
|
|
389
|
+
*,
|
|
390
|
+
project_id: int | None = None,
|
|
391
|
+
region_id: int | None = None,
|
|
392
|
+
subnet_id: str,
|
|
393
|
+
ddos_profile: interface_attach_params.NewInterfaceSpecificSubnetSchemaDDOSProfile | NotGiven = NOT_GIVEN,
|
|
394
|
+
interface_name: str | NotGiven = NOT_GIVEN,
|
|
395
|
+
port_group: int | NotGiven = NOT_GIVEN,
|
|
396
|
+
security_groups: Iterable[interface_attach_params.NewInterfaceSpecificSubnetSchemaSecurityGroup]
|
|
397
|
+
| NotGiven = NOT_GIVEN,
|
|
398
|
+
type: str | NotGiven = NOT_GIVEN,
|
|
399
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
400
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
401
|
+
extra_headers: Headers | None = None,
|
|
402
|
+
extra_query: Query | None = None,
|
|
403
|
+
extra_body: Body | None = None,
|
|
404
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
405
|
+
) -> NetworkInterfaceList:
|
|
406
|
+
"""
|
|
407
|
+
Attach interface to instance
|
|
408
|
+
|
|
409
|
+
Args:
|
|
410
|
+
subnet_id: Port will get an IP address from this subnet
|
|
411
|
+
|
|
412
|
+
ddos_profile: Advanced DDoS protection.
|
|
413
|
+
|
|
414
|
+
interface_name: Interface name
|
|
415
|
+
|
|
416
|
+
port_group: Each group will be added to the separate trunk.
|
|
417
|
+
|
|
418
|
+
security_groups: List of security group IDs
|
|
419
|
+
|
|
420
|
+
type: Must be 'subnet'
|
|
421
|
+
|
|
422
|
+
extra_headers: Send extra headers
|
|
423
|
+
|
|
424
|
+
extra_query: Add additional query parameters to the request
|
|
425
|
+
|
|
426
|
+
extra_body: Add additional JSON properties to the request
|
|
427
|
+
|
|
428
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
429
|
+
"""
|
|
430
|
+
...
|
|
431
|
+
|
|
432
|
+
@overload
|
|
433
|
+
def attach_and_poll(
|
|
434
|
+
self,
|
|
435
|
+
instance_id: str,
|
|
436
|
+
*,
|
|
437
|
+
project_id: int | None = None,
|
|
438
|
+
region_id: int | None = None,
|
|
439
|
+
network_id: str,
|
|
440
|
+
ddos_profile: interface_attach_params.NewInterfaceAnySubnetSchemaDDOSProfile | NotGiven = NOT_GIVEN,
|
|
441
|
+
interface_name: str | NotGiven = NOT_GIVEN,
|
|
442
|
+
ip_family: Literal["dual", "ipv4", "ipv6"] | NotGiven = NOT_GIVEN,
|
|
443
|
+
port_group: int | NotGiven = NOT_GIVEN,
|
|
444
|
+
security_groups: Iterable[interface_attach_params.NewInterfaceAnySubnetSchemaSecurityGroup]
|
|
445
|
+
| NotGiven = NOT_GIVEN,
|
|
446
|
+
type: str | NotGiven = NOT_GIVEN,
|
|
447
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
448
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
449
|
+
extra_headers: Headers | None = None,
|
|
450
|
+
extra_query: Query | None = None,
|
|
451
|
+
extra_body: Body | None = None,
|
|
452
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
453
|
+
) -> NetworkInterfaceList:
|
|
454
|
+
"""
|
|
455
|
+
Attach interface to instance
|
|
456
|
+
|
|
457
|
+
Args:
|
|
458
|
+
network_id: Port will get an IP address in this network subnet
|
|
459
|
+
|
|
460
|
+
ddos_profile: Advanced DDoS protection.
|
|
461
|
+
|
|
462
|
+
interface_name: Interface name
|
|
463
|
+
|
|
464
|
+
ip_family: Which subnets should be selected: IPv4, IPv6 or use dual stack.
|
|
465
|
+
|
|
466
|
+
port_group: Each group will be added to the separate trunk.
|
|
467
|
+
|
|
468
|
+
security_groups: List of security group IDs
|
|
469
|
+
|
|
470
|
+
type: Must be '`any_subnet`'
|
|
471
|
+
|
|
472
|
+
extra_headers: Send extra headers
|
|
473
|
+
|
|
474
|
+
extra_query: Add additional query parameters to the request
|
|
475
|
+
|
|
476
|
+
extra_body: Add additional JSON properties to the request
|
|
477
|
+
|
|
478
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
479
|
+
"""
|
|
480
|
+
...
|
|
481
|
+
|
|
482
|
+
@overload
|
|
483
|
+
def attach_and_poll(
|
|
484
|
+
self,
|
|
485
|
+
instance_id: str,
|
|
486
|
+
*,
|
|
487
|
+
project_id: int | None = None,
|
|
488
|
+
region_id: int | None = None,
|
|
489
|
+
port_id: str,
|
|
490
|
+
ddos_profile: interface_attach_params.NewInterfaceReservedFixedIPSchemaDDOSProfile | NotGiven = NOT_GIVEN,
|
|
491
|
+
interface_name: str | NotGiven = NOT_GIVEN,
|
|
492
|
+
port_group: int | NotGiven = NOT_GIVEN,
|
|
493
|
+
security_groups: Iterable[interface_attach_params.NewInterfaceReservedFixedIPSchemaSecurityGroup]
|
|
494
|
+
| NotGiven = NOT_GIVEN,
|
|
495
|
+
type: str | NotGiven = NOT_GIVEN,
|
|
496
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
497
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
498
|
+
extra_headers: Headers | None = None,
|
|
499
|
+
extra_query: Query | None = None,
|
|
500
|
+
extra_body: Body | None = None,
|
|
501
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
502
|
+
) -> NetworkInterfaceList:
|
|
503
|
+
"""
|
|
504
|
+
Attach interface to instance
|
|
505
|
+
|
|
506
|
+
Args:
|
|
507
|
+
port_id: Port ID
|
|
508
|
+
|
|
509
|
+
ddos_profile: Advanced DDoS protection.
|
|
510
|
+
|
|
511
|
+
interface_name: Interface name
|
|
512
|
+
|
|
513
|
+
port_group: Each group will be added to the separate trunk.
|
|
514
|
+
|
|
515
|
+
security_groups: List of security group IDs
|
|
516
|
+
|
|
517
|
+
type: Must be '`reserved_fixed_ip`'. Union tag
|
|
518
|
+
|
|
519
|
+
extra_headers: Send extra headers
|
|
520
|
+
|
|
521
|
+
extra_query: Add additional query parameters to the request
|
|
522
|
+
|
|
523
|
+
extra_body: Add additional JSON properties to the request
|
|
524
|
+
|
|
525
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
526
|
+
"""
|
|
527
|
+
...
|
|
528
|
+
|
|
529
|
+
def attach_and_poll(
|
|
530
|
+
self,
|
|
531
|
+
instance_id: str,
|
|
532
|
+
*,
|
|
533
|
+
project_id: int | None = None,
|
|
534
|
+
region_id: int | None = None,
|
|
535
|
+
ddos_profile: interface_attach_params.NewInterfaceExternalExtendSchemaWithDDOSDDOSProfile
|
|
536
|
+
| NotGiven = NOT_GIVEN,
|
|
537
|
+
interface_name: str | NotGiven = NOT_GIVEN,
|
|
538
|
+
ip_family: Literal["dual", "ipv4", "ipv6"] | NotGiven = NOT_GIVEN,
|
|
539
|
+
port_group: int | NotGiven = NOT_GIVEN,
|
|
540
|
+
security_groups: Iterable[interface_attach_params.NewInterfaceExternalExtendSchemaWithDDOSSecurityGroup]
|
|
541
|
+
| NotGiven = NOT_GIVEN,
|
|
542
|
+
type: str | NotGiven = NOT_GIVEN,
|
|
543
|
+
subnet_id: str | NotGiven = NOT_GIVEN,
|
|
544
|
+
network_id: str | NotGiven = NOT_GIVEN,
|
|
545
|
+
port_id: str | NotGiven = NOT_GIVEN,
|
|
546
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
547
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
548
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
549
|
+
extra_headers: Headers | None = None,
|
|
550
|
+
extra_query: Query | None = None,
|
|
551
|
+
extra_body: Body | None = None,
|
|
552
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
553
|
+
) -> NetworkInterfaceList:
|
|
554
|
+
if project_id is None:
|
|
555
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
556
|
+
if region_id is None:
|
|
557
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
558
|
+
if not instance_id:
|
|
559
|
+
raise ValueError(f"Expected a non-empty value for `instance_id` but received {instance_id!r}")
|
|
560
|
+
response = self._post(
|
|
561
|
+
f"/cloud/v1/instances/{project_id}/{region_id}/{instance_id}/attach_interface",
|
|
562
|
+
body=maybe_transform(
|
|
563
|
+
{
|
|
564
|
+
"ddos_profile": ddos_profile,
|
|
565
|
+
"interface_name": interface_name,
|
|
566
|
+
"ip_family": ip_family,
|
|
567
|
+
"port_group": port_group,
|
|
568
|
+
"security_groups": security_groups,
|
|
569
|
+
"type": type,
|
|
570
|
+
"subnet_id": subnet_id,
|
|
571
|
+
"network_id": network_id,
|
|
572
|
+
"port_id": port_id,
|
|
573
|
+
},
|
|
574
|
+
interface_attach_params.InterfaceAttachParams,
|
|
575
|
+
),
|
|
576
|
+
options=make_request_options(
|
|
577
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
578
|
+
),
|
|
579
|
+
cast_to=TaskIDList,
|
|
580
|
+
)
|
|
581
|
+
if not response.tasks:
|
|
582
|
+
raise ValueError("Expected at least one task to be created")
|
|
583
|
+
self._client.cloud.tasks.poll(
|
|
584
|
+
task_id=response.tasks[0],
|
|
585
|
+
extra_headers=extra_headers,
|
|
586
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
587
|
+
)
|
|
588
|
+
return self.list(instance_id, project_id=project_id, region_id=region_id, extra_headers=extra_headers)
|
|
589
|
+
|
|
590
|
+
def detach_and_poll(
|
|
591
|
+
self,
|
|
592
|
+
instance_id: str,
|
|
593
|
+
*,
|
|
594
|
+
project_id: int | None = None,
|
|
595
|
+
region_id: int | None = None,
|
|
596
|
+
ip_address: str,
|
|
597
|
+
port_id: str,
|
|
598
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
599
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
600
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
601
|
+
extra_headers: Headers | None = None,
|
|
602
|
+
extra_query: Query | None = None,
|
|
603
|
+
extra_body: Body | None = None,
|
|
604
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
605
|
+
) -> NetworkInterfaceList:
|
|
606
|
+
"""
|
|
607
|
+
Detach interface from instance and poll for completion. Only the first task will be polled.
|
|
608
|
+
If you need to poll more tasks, use the `tasks.poll` method.
|
|
609
|
+
"""
|
|
610
|
+
response = self.detach(
|
|
611
|
+
instance_id=instance_id,
|
|
612
|
+
project_id=project_id,
|
|
613
|
+
region_id=region_id,
|
|
614
|
+
ip_address=ip_address,
|
|
615
|
+
port_id=port_id,
|
|
616
|
+
extra_headers=extra_headers,
|
|
617
|
+
extra_query=extra_query,
|
|
618
|
+
extra_body=extra_body,
|
|
619
|
+
timeout=timeout,
|
|
620
|
+
)
|
|
621
|
+
if not response.tasks:
|
|
622
|
+
raise ValueError("Expected at least one task to be created")
|
|
623
|
+
self._client.cloud.tasks.poll(
|
|
624
|
+
task_id=response.tasks[0],
|
|
625
|
+
extra_headers=extra_headers,
|
|
626
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
627
|
+
)
|
|
628
|
+
return self.list(instance_id, project_id=project_id, region_id=region_id, extra_headers=extra_headers)
|
|
629
|
+
|
|
331
630
|
def detach(
|
|
332
631
|
self,
|
|
333
632
|
instance_id: str,
|
|
@@ -639,11 +938,17 @@ class AsyncInterfacesResource(AsyncAPIResource):
|
|
|
639
938
|
project_id: int | None = None,
|
|
640
939
|
region_id: int | None = None,
|
|
641
940
|
ddos_profile: interface_attach_params.NewInterfaceExternalExtendSchemaWithDDOSDDOSProfile
|
|
941
|
+
| interface_attach_params.NewInterfaceSpecificSubnetSchemaDDOSProfile
|
|
942
|
+
| interface_attach_params.NewInterfaceAnySubnetSchemaDDOSProfile
|
|
943
|
+
| interface_attach_params.NewInterfaceReservedFixedIPSchemaDDOSProfile
|
|
642
944
|
| NotGiven = NOT_GIVEN,
|
|
643
945
|
interface_name: str | NotGiven = NOT_GIVEN,
|
|
644
946
|
ip_family: Literal["dual", "ipv4", "ipv6"] | NotGiven = NOT_GIVEN,
|
|
645
947
|
port_group: int | NotGiven = NOT_GIVEN,
|
|
646
948
|
security_groups: Iterable[interface_attach_params.NewInterfaceExternalExtendSchemaWithDDOSSecurityGroup]
|
|
949
|
+
| Iterable[interface_attach_params.NewInterfaceSpecificSubnetSchemaSecurityGroup]
|
|
950
|
+
| Iterable[interface_attach_params.NewInterfaceAnySubnetSchemaSecurityGroup]
|
|
951
|
+
| Iterable[interface_attach_params.NewInterfaceReservedFixedIPSchemaSecurityGroup]
|
|
647
952
|
| NotGiven = NOT_GIVEN,
|
|
648
953
|
type: str | NotGiven = NOT_GIVEN,
|
|
649
954
|
subnet_id: str | NotGiven = NOT_GIVEN,
|
|
@@ -684,6 +989,221 @@ class AsyncInterfacesResource(AsyncAPIResource):
|
|
|
684
989
|
cast_to=TaskIDList,
|
|
685
990
|
)
|
|
686
991
|
|
|
992
|
+
@overload
|
|
993
|
+
async def attach_and_poll(
|
|
994
|
+
self,
|
|
995
|
+
instance_id: str,
|
|
996
|
+
*,
|
|
997
|
+
project_id: int | None = None,
|
|
998
|
+
region_id: int | None = None,
|
|
999
|
+
ddos_profile: interface_attach_params.NewInterfaceExternalExtendSchemaWithDDOSDDOSProfile
|
|
1000
|
+
| NotGiven = NOT_GIVEN,
|
|
1001
|
+
interface_name: str | NotGiven = NOT_GIVEN,
|
|
1002
|
+
ip_family: Literal["dual", "ipv4", "ipv6"] | NotGiven = NOT_GIVEN,
|
|
1003
|
+
port_group: int | NotGiven = NOT_GIVEN,
|
|
1004
|
+
security_groups: Iterable[interface_attach_params.NewInterfaceExternalExtendSchemaWithDDOSSecurityGroup]
|
|
1005
|
+
| NotGiven = NOT_GIVEN,
|
|
1006
|
+
type: str | NotGiven = NOT_GIVEN,
|
|
1007
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
1008
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1009
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1010
|
+
extra_headers: Headers | None = None,
|
|
1011
|
+
extra_query: Query | None = None,
|
|
1012
|
+
extra_body: Body | None = None,
|
|
1013
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1014
|
+
) -> NetworkInterfaceList:
|
|
1015
|
+
"""
|
|
1016
|
+
Attach interface to instance using external extend and poll for completion. Only the first task will be polled.
|
|
1017
|
+
If you need to poll more tasks, use the `tasks.poll` method.
|
|
1018
|
+
"""
|
|
1019
|
+
...
|
|
1020
|
+
|
|
1021
|
+
@overload
|
|
1022
|
+
async def attach_and_poll(
|
|
1023
|
+
self,
|
|
1024
|
+
instance_id: str,
|
|
1025
|
+
*,
|
|
1026
|
+
project_id: int | None = None,
|
|
1027
|
+
region_id: int | None = None,
|
|
1028
|
+
subnet_id: str,
|
|
1029
|
+
ddos_profile: interface_attach_params.NewInterfaceSpecificSubnetSchemaDDOSProfile | NotGiven = NOT_GIVEN,
|
|
1030
|
+
interface_name: str | NotGiven = NOT_GIVEN,
|
|
1031
|
+
port_group: int | NotGiven = NOT_GIVEN,
|
|
1032
|
+
security_groups: Iterable[interface_attach_params.NewInterfaceSpecificSubnetSchemaSecurityGroup]
|
|
1033
|
+
| NotGiven = NOT_GIVEN,
|
|
1034
|
+
type: str | NotGiven = NOT_GIVEN,
|
|
1035
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
1036
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1037
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1038
|
+
extra_headers: Headers | None = None,
|
|
1039
|
+
extra_query: Query | None = None,
|
|
1040
|
+
extra_body: Body | None = None,
|
|
1041
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1042
|
+
) -> NetworkInterfaceList:
|
|
1043
|
+
"""
|
|
1044
|
+
Attach interface to instance using specific subnet and poll for completion. Only the first task will be polled.
|
|
1045
|
+
If you need to poll more tasks, use the `tasks.poll` method.
|
|
1046
|
+
"""
|
|
1047
|
+
...
|
|
1048
|
+
|
|
1049
|
+
@overload
|
|
1050
|
+
async def attach_and_poll(
|
|
1051
|
+
self,
|
|
1052
|
+
instance_id: str,
|
|
1053
|
+
*,
|
|
1054
|
+
project_id: int | None = None,
|
|
1055
|
+
region_id: int | None = None,
|
|
1056
|
+
network_id: str,
|
|
1057
|
+
ddos_profile: interface_attach_params.NewInterfaceAnySubnetSchemaDDOSProfile | NotGiven = NOT_GIVEN,
|
|
1058
|
+
interface_name: str | NotGiven = NOT_GIVEN,
|
|
1059
|
+
ip_family: Literal["dual", "ipv4", "ipv6"] | NotGiven = NOT_GIVEN,
|
|
1060
|
+
port_group: int | NotGiven = NOT_GIVEN,
|
|
1061
|
+
security_groups: Iterable[interface_attach_params.NewInterfaceAnySubnetSchemaSecurityGroup]
|
|
1062
|
+
| NotGiven = NOT_GIVEN,
|
|
1063
|
+
type: str | NotGiven = NOT_GIVEN,
|
|
1064
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
1065
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1066
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1067
|
+
extra_headers: Headers | None = None,
|
|
1068
|
+
extra_query: Query | None = None,
|
|
1069
|
+
extra_body: Body | None = None,
|
|
1070
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1071
|
+
) -> NetworkInterfaceList:
|
|
1072
|
+
"""
|
|
1073
|
+
Attach interface to instance using any subnet and poll for completion. Only the first task will be polled.
|
|
1074
|
+
If you need to poll more tasks, use the `tasks.poll` method.
|
|
1075
|
+
"""
|
|
1076
|
+
...
|
|
1077
|
+
|
|
1078
|
+
@overload
|
|
1079
|
+
async def attach_and_poll(
|
|
1080
|
+
self,
|
|
1081
|
+
instance_id: str,
|
|
1082
|
+
*,
|
|
1083
|
+
project_id: int | None = None,
|
|
1084
|
+
region_id: int | None = None,
|
|
1085
|
+
port_id: str,
|
|
1086
|
+
ddos_profile: interface_attach_params.NewInterfaceReservedFixedIPSchemaDDOSProfile | NotGiven = NOT_GIVEN,
|
|
1087
|
+
interface_name: str | NotGiven = NOT_GIVEN,
|
|
1088
|
+
port_group: int | NotGiven = NOT_GIVEN,
|
|
1089
|
+
security_groups: Iterable[interface_attach_params.NewInterfaceReservedFixedIPSchemaSecurityGroup]
|
|
1090
|
+
| NotGiven = NOT_GIVEN,
|
|
1091
|
+
type: str | NotGiven = NOT_GIVEN,
|
|
1092
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
1093
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1094
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1095
|
+
extra_headers: Headers | None = None,
|
|
1096
|
+
extra_query: Query | None = None,
|
|
1097
|
+
extra_body: Body | None = None,
|
|
1098
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1099
|
+
) -> NetworkInterfaceList:
|
|
1100
|
+
"""
|
|
1101
|
+
Attach interface to instance using reserved fixed IP and poll for completion. Only the first task will be polled.
|
|
1102
|
+
If you need to poll more tasks, use the `tasks.poll` method.
|
|
1103
|
+
"""
|
|
1104
|
+
...
|
|
1105
|
+
|
|
1106
|
+
async def attach_and_poll(
|
|
1107
|
+
self,
|
|
1108
|
+
instance_id: str,
|
|
1109
|
+
*,
|
|
1110
|
+
project_id: int | None = None,
|
|
1111
|
+
region_id: int | None = None,
|
|
1112
|
+
ddos_profile: interface_attach_params.NewInterfaceExternalExtendSchemaWithDDOSDDOSProfile
|
|
1113
|
+
| NotGiven = NOT_GIVEN,
|
|
1114
|
+
interface_name: str | NotGiven = NOT_GIVEN,
|
|
1115
|
+
ip_family: Literal["dual", "ipv4", "ipv6"] | NotGiven = NOT_GIVEN,
|
|
1116
|
+
port_group: int | NotGiven = NOT_GIVEN,
|
|
1117
|
+
security_groups: Iterable[interface_attach_params.NewInterfaceExternalExtendSchemaWithDDOSSecurityGroup]
|
|
1118
|
+
| NotGiven = NOT_GIVEN,
|
|
1119
|
+
type: str | NotGiven = NOT_GIVEN,
|
|
1120
|
+
subnet_id: str | NotGiven = NOT_GIVEN,
|
|
1121
|
+
network_id: str | NotGiven = NOT_GIVEN,
|
|
1122
|
+
port_id: str | NotGiven = NOT_GIVEN,
|
|
1123
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
1124
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1125
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1126
|
+
extra_headers: Headers | None = None,
|
|
1127
|
+
extra_query: Query | None = None,
|
|
1128
|
+
extra_body: Body | None = None,
|
|
1129
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1130
|
+
) -> NetworkInterfaceList:
|
|
1131
|
+
if project_id is None:
|
|
1132
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
1133
|
+
if region_id is None:
|
|
1134
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
1135
|
+
if not instance_id:
|
|
1136
|
+
raise ValueError(f"Expected a non-empty value for `instance_id` but received {instance_id!r}")
|
|
1137
|
+
response = await self._post(
|
|
1138
|
+
f"/cloud/v1/instances/{project_id}/{region_id}/{instance_id}/attach_interface",
|
|
1139
|
+
body=await async_maybe_transform(
|
|
1140
|
+
{
|
|
1141
|
+
"ddos_profile": ddos_profile,
|
|
1142
|
+
"interface_name": interface_name,
|
|
1143
|
+
"ip_family": ip_family,
|
|
1144
|
+
"port_group": port_group,
|
|
1145
|
+
"security_groups": security_groups,
|
|
1146
|
+
"type": type,
|
|
1147
|
+
"subnet_id": subnet_id,
|
|
1148
|
+
"network_id": network_id,
|
|
1149
|
+
"port_id": port_id,
|
|
1150
|
+
},
|
|
1151
|
+
interface_attach_params.InterfaceAttachParams,
|
|
1152
|
+
),
|
|
1153
|
+
options=make_request_options(
|
|
1154
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1155
|
+
),
|
|
1156
|
+
cast_to=TaskIDList,
|
|
1157
|
+
)
|
|
1158
|
+
if not response.tasks:
|
|
1159
|
+
raise ValueError("Expected at least one task to be created")
|
|
1160
|
+
await self._client.cloud.tasks.poll(
|
|
1161
|
+
task_id=response.tasks[0],
|
|
1162
|
+
extra_headers=extra_headers,
|
|
1163
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
1164
|
+
)
|
|
1165
|
+
return await self.list(instance_id, project_id=project_id, region_id=region_id, extra_headers=extra_headers)
|
|
1166
|
+
|
|
1167
|
+
async def detach_and_poll(
|
|
1168
|
+
self,
|
|
1169
|
+
instance_id: str,
|
|
1170
|
+
*,
|
|
1171
|
+
project_id: int | None = None,
|
|
1172
|
+
region_id: int | None = None,
|
|
1173
|
+
ip_address: str,
|
|
1174
|
+
port_id: str,
|
|
1175
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
1176
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1177
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1178
|
+
extra_headers: Headers | None = None,
|
|
1179
|
+
extra_query: Query | None = None,
|
|
1180
|
+
extra_body: Body | None = None,
|
|
1181
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1182
|
+
) -> NetworkInterfaceList:
|
|
1183
|
+
"""
|
|
1184
|
+
Detach interface from instance and poll for completion. Only the first task will be polled.
|
|
1185
|
+
If you need to poll more tasks, use the `tasks.poll` method.
|
|
1186
|
+
"""
|
|
1187
|
+
response = await self.detach(
|
|
1188
|
+
instance_id=instance_id,
|
|
1189
|
+
project_id=project_id,
|
|
1190
|
+
region_id=region_id,
|
|
1191
|
+
ip_address=ip_address,
|
|
1192
|
+
port_id=port_id,
|
|
1193
|
+
extra_headers=extra_headers,
|
|
1194
|
+
extra_query=extra_query,
|
|
1195
|
+
extra_body=extra_body,
|
|
1196
|
+
timeout=timeout,
|
|
1197
|
+
)
|
|
1198
|
+
if not response.tasks:
|
|
1199
|
+
raise ValueError("Expected at least one task to be created")
|
|
1200
|
+
await self._client.cloud.tasks.poll(
|
|
1201
|
+
task_id=response.tasks[0],
|
|
1202
|
+
extra_headers=extra_headers,
|
|
1203
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
1204
|
+
)
|
|
1205
|
+
return await self.list(instance_id, project_id=project_id, region_id=region_id, extra_headers=extra_headers)
|
|
1206
|
+
|
|
687
1207
|
async def detach(
|
|
688
1208
|
self,
|
|
689
1209
|
instance_id: str,
|
|
@@ -747,9 +1267,15 @@ class InterfacesResourceWithRawResponse:
|
|
|
747
1267
|
self.attach = to_raw_response_wrapper(
|
|
748
1268
|
interfaces.attach,
|
|
749
1269
|
)
|
|
1270
|
+
self.attach_and_poll = to_raw_response_wrapper(
|
|
1271
|
+
interfaces.attach_and_poll,
|
|
1272
|
+
)
|
|
750
1273
|
self.detach = to_raw_response_wrapper(
|
|
751
1274
|
interfaces.detach,
|
|
752
1275
|
)
|
|
1276
|
+
self.detach_and_poll = to_raw_response_wrapper(
|
|
1277
|
+
interfaces.detach_and_poll,
|
|
1278
|
+
)
|
|
753
1279
|
|
|
754
1280
|
|
|
755
1281
|
class AsyncInterfacesResourceWithRawResponse:
|
|
@@ -762,9 +1288,15 @@ class AsyncInterfacesResourceWithRawResponse:
|
|
|
762
1288
|
self.attach = async_to_raw_response_wrapper(
|
|
763
1289
|
interfaces.attach,
|
|
764
1290
|
)
|
|
1291
|
+
self.attach_and_poll = async_to_raw_response_wrapper(
|
|
1292
|
+
interfaces.attach_and_poll,
|
|
1293
|
+
)
|
|
765
1294
|
self.detach = async_to_raw_response_wrapper(
|
|
766
1295
|
interfaces.detach,
|
|
767
1296
|
)
|
|
1297
|
+
self.detach_and_poll = async_to_raw_response_wrapper(
|
|
1298
|
+
interfaces.detach_and_poll,
|
|
1299
|
+
)
|
|
768
1300
|
|
|
769
1301
|
|
|
770
1302
|
class InterfacesResourceWithStreamingResponse:
|
|
@@ -777,9 +1309,15 @@ class InterfacesResourceWithStreamingResponse:
|
|
|
777
1309
|
self.attach = to_streamed_response_wrapper(
|
|
778
1310
|
interfaces.attach,
|
|
779
1311
|
)
|
|
1312
|
+
self.attach_and_poll = to_streamed_response_wrapper(
|
|
1313
|
+
interfaces.attach_and_poll,
|
|
1314
|
+
)
|
|
780
1315
|
self.detach = to_streamed_response_wrapper(
|
|
781
1316
|
interfaces.detach,
|
|
782
1317
|
)
|
|
1318
|
+
self.detach_and_poll = to_streamed_response_wrapper(
|
|
1319
|
+
interfaces.detach_and_poll,
|
|
1320
|
+
)
|
|
783
1321
|
|
|
784
1322
|
|
|
785
1323
|
class AsyncInterfacesResourceWithStreamingResponse:
|
|
@@ -792,6 +1330,12 @@ class AsyncInterfacesResourceWithStreamingResponse:
|
|
|
792
1330
|
self.attach = async_to_streamed_response_wrapper(
|
|
793
1331
|
interfaces.attach,
|
|
794
1332
|
)
|
|
1333
|
+
self.attach_and_poll = async_to_streamed_response_wrapper(
|
|
1334
|
+
interfaces.attach_and_poll,
|
|
1335
|
+
)
|
|
795
1336
|
self.detach = async_to_streamed_response_wrapper(
|
|
796
1337
|
interfaces.detach,
|
|
797
1338
|
)
|
|
1339
|
+
self.detach_and_poll = async_to_streamed_response_wrapper(
|
|
1340
|
+
interfaces.detach_and_poll,
|
|
1341
|
+
)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .k8s import (
|
|
4
|
+
K8sResource,
|
|
5
|
+
AsyncK8sResource,
|
|
6
|
+
K8sResourceWithRawResponse,
|
|
7
|
+
AsyncK8sResourceWithRawResponse,
|
|
8
|
+
K8sResourceWithStreamingResponse,
|
|
9
|
+
AsyncK8sResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .flavors import (
|
|
12
|
+
FlavorsResource,
|
|
13
|
+
AsyncFlavorsResource,
|
|
14
|
+
FlavorsResourceWithRawResponse,
|
|
15
|
+
AsyncFlavorsResourceWithRawResponse,
|
|
16
|
+
FlavorsResourceWithStreamingResponse,
|
|
17
|
+
AsyncFlavorsResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .clusters import (
|
|
20
|
+
ClustersResource,
|
|
21
|
+
AsyncClustersResource,
|
|
22
|
+
ClustersResourceWithRawResponse,
|
|
23
|
+
AsyncClustersResourceWithRawResponse,
|
|
24
|
+
ClustersResourceWithStreamingResponse,
|
|
25
|
+
AsyncClustersResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"FlavorsResource",
|
|
30
|
+
"AsyncFlavorsResource",
|
|
31
|
+
"FlavorsResourceWithRawResponse",
|
|
32
|
+
"AsyncFlavorsResourceWithRawResponse",
|
|
33
|
+
"FlavorsResourceWithStreamingResponse",
|
|
34
|
+
"AsyncFlavorsResourceWithStreamingResponse",
|
|
35
|
+
"ClustersResource",
|
|
36
|
+
"AsyncClustersResource",
|
|
37
|
+
"ClustersResourceWithRawResponse",
|
|
38
|
+
"AsyncClustersResourceWithRawResponse",
|
|
39
|
+
"ClustersResourceWithStreamingResponse",
|
|
40
|
+
"AsyncClustersResourceWithStreamingResponse",
|
|
41
|
+
"K8sResource",
|
|
42
|
+
"AsyncK8sResource",
|
|
43
|
+
"K8sResourceWithRawResponse",
|
|
44
|
+
"AsyncK8sResourceWithRawResponse",
|
|
45
|
+
"K8sResourceWithStreamingResponse",
|
|
46
|
+
"AsyncK8sResourceWithStreamingResponse",
|
|
47
|
+
]
|