gcore 0.1.0a1__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/__init__.py +84 -0
- gcore/_base_client.py +1943 -0
- gcore/_client.py +484 -0
- gcore/_compat.py +219 -0
- gcore/_constants.py +16 -0
- gcore/_exceptions.py +108 -0
- gcore/_files.py +123 -0
- gcore/_models.py +803 -0
- gcore/_qs.py +150 -0
- gcore/_resource.py +43 -0
- gcore/_response.py +830 -0
- gcore/_streaming.py +333 -0
- gcore/_types.py +217 -0
- gcore/_utils/__init__.py +57 -0
- gcore/_utils/_logs.py +25 -0
- gcore/_utils/_proxy.py +62 -0
- gcore/_utils/_reflection.py +42 -0
- gcore/_utils/_streams.py +12 -0
- gcore/_utils/_sync.py +86 -0
- gcore/_utils/_transform.py +447 -0
- gcore/_utils/_typing.py +151 -0
- gcore/_utils/_utils.py +422 -0
- gcore/_version.py +4 -0
- gcore/lib/.keep +4 -0
- gcore/lib/polling.py +19 -0
- gcore/pagination.py +70 -0
- gcore/py.typed +0 -0
- gcore/resources/__init__.py +19 -0
- gcore/resources/cloud/__init__.py +327 -0
- gcore/resources/cloud/baremetal/__init__.py +61 -0
- gcore/resources/cloud/baremetal/baremetal.py +166 -0
- gcore/resources/cloud/baremetal/flavors.py +371 -0
- gcore/resources/cloud/baremetal/images.py +238 -0
- gcore/resources/cloud/baremetal/servers.py +808 -0
- gcore/resources/cloud/billing_reservations.py +362 -0
- gcore/resources/cloud/cloud.py +774 -0
- gcore/resources/cloud/file_shares/__init__.py +33 -0
- gcore/resources/cloud/file_shares/access_rules.py +434 -0
- gcore/resources/cloud/file_shares/file_shares.py +994 -0
- gcore/resources/cloud/floating_ips.py +765 -0
- gcore/resources/cloud/gpu_baremetal_clusters/__init__.py +75 -0
- gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +211 -0
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +1143 -0
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +581 -0
- gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +175 -0
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +1098 -0
- gcore/resources/cloud/inference/__init__.py +89 -0
- gcore/resources/cloud/inference/deployments/__init__.py +33 -0
- gcore/resources/cloud/inference/deployments/deployments.py +1187 -0
- gcore/resources/cloud/inference/deployments/logs.py +235 -0
- gcore/resources/cloud/inference/flavors.py +280 -0
- gcore/resources/cloud/inference/inference.py +295 -0
- gcore/resources/cloud/inference/models.py +289 -0
- gcore/resources/cloud/inference/registry_credentials.py +649 -0
- gcore/resources/cloud/inference/secrets.py +629 -0
- gcore/resources/cloud/instances/__init__.py +75 -0
- gcore/resources/cloud/instances/flavors.py +449 -0
- gcore/resources/cloud/instances/images.py +987 -0
- gcore/resources/cloud/instances/instances.py +2349 -0
- gcore/resources/cloud/instances/interfaces.py +797 -0
- gcore/resources/cloud/instances/metrics.py +217 -0
- gcore/resources/cloud/ip_ranges.py +135 -0
- gcore/resources/cloud/load_balancers/__init__.py +103 -0
- gcore/resources/cloud/load_balancers/flavors.py +193 -0
- gcore/resources/cloud/load_balancers/l7_policies/__init__.py +33 -0
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +738 -0
- gcore/resources/cloud/load_balancers/l7_policies/rules.py +722 -0
- gcore/resources/cloud/load_balancers/listeners.py +788 -0
- gcore/resources/cloud/load_balancers/load_balancers.py +1237 -0
- gcore/resources/cloud/load_balancers/metrics.py +205 -0
- gcore/resources/cloud/load_balancers/pools/__init__.py +47 -0
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +352 -0
- gcore/resources/cloud/load_balancers/pools/members.py +353 -0
- gcore/resources/cloud/load_balancers/pools/pools.py +872 -0
- gcore/resources/cloud/load_balancers/statuses.py +260 -0
- gcore/resources/cloud/networks/__init__.py +47 -0
- gcore/resources/cloud/networks/networks.py +715 -0
- gcore/resources/cloud/networks/routers.py +875 -0
- gcore/resources/cloud/networks/subnets.py +865 -0
- gcore/resources/cloud/placement_groups.py +465 -0
- gcore/resources/cloud/projects.py +608 -0
- gcore/resources/cloud/quotas/__init__.py +33 -0
- gcore/resources/cloud/quotas/quotas.py +335 -0
- gcore/resources/cloud/quotas/requests.py +482 -0
- gcore/resources/cloud/regions.py +328 -0
- gcore/resources/cloud/registries/__init__.py +75 -0
- gcore/resources/cloud/registries/artifacts.py +277 -0
- gcore/resources/cloud/registries/registries.py +688 -0
- gcore/resources/cloud/registries/repositories.py +265 -0
- gcore/resources/cloud/registries/tags.py +190 -0
- gcore/resources/cloud/registries/users.py +701 -0
- gcore/resources/cloud/reserved_fixed_ips/__init__.py +33 -0
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +965 -0
- gcore/resources/cloud/reserved_fixed_ips/vip.py +577 -0
- gcore/resources/cloud/secrets.py +797 -0
- gcore/resources/cloud/security_groups/__init__.py +33 -0
- gcore/resources/cloud/security_groups/rules.py +626 -0
- gcore/resources/cloud/security_groups/security_groups.py +863 -0
- gcore/resources/cloud/ssh_keys.py +635 -0
- gcore/resources/cloud/tasks.py +699 -0
- gcore/resources/cloud/users/__init__.py +33 -0
- gcore/resources/cloud/users/role_assignments.py +533 -0
- gcore/resources/cloud/users/users.py +102 -0
- gcore/resources/cloud/volumes.py +1710 -0
- gcore/types/__init__.py +3 -0
- gcore/types/cloud/__init__.py +199 -0
- gcore/types/cloud/allowed_address_pairs.py +15 -0
- gcore/types/cloud/aws_iam_data.py +13 -0
- gcore/types/cloud/aws_iam_data_param.py +15 -0
- gcore/types/cloud/baremetal/__init__.py +13 -0
- gcore/types/cloud/baremetal/baremetal_fixed_address.py +30 -0
- gcore/types/cloud/baremetal/baremetal_floating_address.py +15 -0
- gcore/types/cloud/baremetal/baremetal_server.py +178 -0
- gcore/types/cloud/baremetal/flavor_list_params.py +35 -0
- gcore/types/cloud/baremetal/flavor_list_suitable_params.py +22 -0
- gcore/types/cloud/baremetal/image_list_params.py +33 -0
- gcore/types/cloud/baremetal/server_create_params.py +370 -0
- gcore/types/cloud/baremetal/server_list_params.py +114 -0
- gcore/types/cloud/baremetal/server_rebuild_params.py +23 -0
- gcore/types/cloud/baremetal_flavor.py +58 -0
- gcore/types/cloud/baremetal_flavor_list.py +16 -0
- gcore/types/cloud/billing_reservation.py +153 -0
- gcore/types/cloud/billing_reservation_list_params.py +54 -0
- gcore/types/cloud/blackhole_port.py +66 -0
- gcore/types/cloud/capacity.py +13 -0
- gcore/types/cloud/console.py +18 -0
- gcore/types/cloud/container_probe.py +36 -0
- gcore/types/cloud/container_probe_config.py +16 -0
- gcore/types/cloud/container_probe_config_create_param.py +18 -0
- gcore/types/cloud/container_probe_create_param.py +38 -0
- gcore/types/cloud/container_probe_exec.py +12 -0
- gcore/types/cloud/container_probe_exec_create_param.py +13 -0
- gcore/types/cloud/container_probe_http_get.py +26 -0
- gcore/types/cloud/container_probe_http_get_create_param.py +25 -0
- gcore/types/cloud/container_probe_tcp_socket.py +10 -0
- gcore/types/cloud/container_probe_tcp_socket_create_param.py +12 -0
- gcore/types/cloud/container_scale.py +25 -0
- gcore/types/cloud/container_scale_trigger_rate.py +13 -0
- gcore/types/cloud/container_scale_trigger_sqs.py +33 -0
- gcore/types/cloud/container_scale_trigger_threshold.py +10 -0
- gcore/types/cloud/container_scale_triggers.py +36 -0
- gcore/types/cloud/ddos_profile.py +33 -0
- gcore/types/cloud/ddos_profile_field.py +31 -0
- gcore/types/cloud/ddos_profile_option_list.py +15 -0
- gcore/types/cloud/ddos_profile_status.py +13 -0
- gcore/types/cloud/ddos_profile_template.py +18 -0
- gcore/types/cloud/ddos_profile_template_field.py +23 -0
- gcore/types/cloud/deploy_status.py +13 -0
- gcore/types/cloud/file_share.py +111 -0
- gcore/types/cloud/file_share_create_params.py +104 -0
- gcore/types/cloud/file_share_list_params.py +24 -0
- gcore/types/cloud/file_share_resize_params.py +18 -0
- gcore/types/cloud/file_share_update_params.py +18 -0
- gcore/types/cloud/file_shares/__init__.py +7 -0
- gcore/types/cloud/file_shares/access_rule.py +21 -0
- gcore/types/cloud/file_shares/access_rule_create_params.py +21 -0
- gcore/types/cloud/file_shares/access_rule_list.py +16 -0
- gcore/types/cloud/fixed_address.py +38 -0
- gcore/types/cloud/fixed_address_short.py +24 -0
- gcore/types/cloud/flavor_hardware_description.py +27 -0
- gcore/types/cloud/floating_address.py +15 -0
- gcore/types/cloud/floating_ip.py +77 -0
- gcore/types/cloud/floating_ip_assign_params.py +20 -0
- gcore/types/cloud/floating_ip_create_params.py +40 -0
- gcore/types/cloud/floating_ip_detailed.py +222 -0
- gcore/types/cloud/floating_ip_list_params.py +35 -0
- gcore/types/cloud/floating_ip_status.py +7 -0
- gcore/types/cloud/gpu_baremetal_cluster.py +116 -0
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +135 -0
- gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +28 -0
- gcore/types/cloud/gpu_baremetal_cluster_list_params.py +19 -0
- gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +26 -0
- gcore/types/cloud/gpu_baremetal_cluster_resize_params.py +16 -0
- gcore/types/cloud/gpu_baremetal_cluster_server.py +200 -0
- gcore/types/cloud/gpu_baremetal_cluster_server_list.py +16 -0
- gcore/types/cloud/gpu_baremetal_clusters/__init__.py +9 -0
- gcore/types/cloud/gpu_baremetal_clusters/flavor_list_params.py +21 -0
- gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +58 -0
- gcore/types/cloud/gpu_baremetal_clusters/server_attach_interface_params.py +253 -0
- gcore/types/cloud/gpu_baremetal_clusters/server_delete_params.py +21 -0
- gcore/types/cloud/gpu_baremetal_clusters/server_detach_interface_params.py +19 -0
- gcore/types/cloud/gpu_baremetal_flavor.py +133 -0
- gcore/types/cloud/gpu_baremetal_flavor_list.py +16 -0
- gcore/types/cloud/gpu_image.py +70 -0
- gcore/types/cloud/gpu_image_list.py +16 -0
- gcore/types/cloud/health_monitor.py +48 -0
- gcore/types/cloud/health_monitor_status.py +22 -0
- gcore/types/cloud/http_method.py +7 -0
- gcore/types/cloud/image.py +100 -0
- gcore/types/cloud/image_list.py +16 -0
- gcore/types/cloud/inference/__init__.py +25 -0
- gcore/types/cloud/inference/container.py +26 -0
- gcore/types/cloud/inference/deployment_create_params.py +222 -0
- gcore/types/cloud/inference/deployment_list_params.py +21 -0
- gcore/types/cloud/inference/deployment_update_params.py +215 -0
- gcore/types/cloud/inference/deployments/__init__.py +5 -0
- gcore/types/cloud/inference/deployments/log_list_params.py +28 -0
- gcore/types/cloud/inference/flavor_list_params.py +18 -0
- gcore/types/cloud/inference/inference.py +95 -0
- gcore/types/cloud/inference/inference_apikey_secret.py +15 -0
- gcore/types/cloud/inference/inference_flavor.py +34 -0
- gcore/types/cloud/inference/inference_log.py +21 -0
- gcore/types/cloud/inference/inference_registry_credential.py +19 -0
- gcore/types/cloud/inference/inference_registry_credential_full.py +22 -0
- gcore/types/cloud/inference/inference_secret.py +17 -0
- gcore/types/cloud/inference/mlcatalog_model_card.py +65 -0
- gcore/types/cloud/inference/mlcatalog_order_by_choices.py +7 -0
- gcore/types/cloud/inference/model_list_params.py +23 -0
- gcore/types/cloud/inference/registry_credential_create_params.py +24 -0
- gcore/types/cloud/inference/registry_credential_list_params.py +21 -0
- gcore/types/cloud/inference/registry_credential_replace_params.py +21 -0
- gcore/types/cloud/inference/secret_create_params.py +23 -0
- gcore/types/cloud/inference/secret_list_params.py +21 -0
- gcore/types/cloud/inference/secret_replace_params.py +20 -0
- gcore/types/cloud/inference_probes.py +19 -0
- gcore/types/cloud/ingress_opts_out.py +16 -0
- gcore/types/cloud/ingress_opts_param.py +18 -0
- gcore/types/cloud/instance.py +296 -0
- gcore/types/cloud/instance_action_params.py +32 -0
- gcore/types/cloud/instance_add_to_placement_group_params.py +16 -0
- gcore/types/cloud/instance_assign_security_group_params.py +28 -0
- gcore/types/cloud/instance_create_params.py +622 -0
- gcore/types/cloud/instance_delete_params.py +33 -0
- gcore/types/cloud/instance_get_console_params.py +16 -0
- gcore/types/cloud/instance_interface.py +40 -0
- gcore/types/cloud/instance_isolation.py +12 -0
- gcore/types/cloud/instance_list.py +16 -0
- gcore/types/cloud/instance_list_params.py +146 -0
- gcore/types/cloud/instance_metrics_time_unit.py +7 -0
- gcore/types/cloud/instance_resize_params.py +16 -0
- gcore/types/cloud/instance_unassign_security_group_params.py +28 -0
- gcore/types/cloud/instance_update_params.py +18 -0
- gcore/types/cloud/instances/__init__.py +19 -0
- gcore/types/cloud/instances/flavor_list_for_resize_params.py +16 -0
- gcore/types/cloud/instances/flavor_list_params.py +25 -0
- gcore/types/cloud/instances/flavor_list_suitable_params.py +56 -0
- gcore/types/cloud/instances/image_create_from_volume_params.py +53 -0
- gcore/types/cloud/instances/image_get_params.py +16 -0
- gcore/types/cloud/instances/image_list_params.py +33 -0
- gcore/types/cloud/instances/image_update_params.py +43 -0
- gcore/types/cloud/instances/image_upload_params.py +62 -0
- gcore/types/cloud/instances/instance_flavor.py +49 -0
- gcore/types/cloud/instances/instance_flavor_list.py +16 -0
- gcore/types/cloud/instances/interface_attach_params.py +253 -0
- gcore/types/cloud/instances/interface_detach_params.py +19 -0
- gcore/types/cloud/instances/metric_list_params.py +23 -0
- gcore/types/cloud/instances/metrics.py +52 -0
- gcore/types/cloud/instances/metrics_list.py +16 -0
- gcore/types/cloud/interface_ip_family.py +7 -0
- gcore/types/cloud/ip_assignment.py +13 -0
- gcore/types/cloud/ip_ranges.py +12 -0
- gcore/types/cloud/ip_version.py +7 -0
- gcore/types/cloud/laas_index_retention_policy.py +12 -0
- gcore/types/cloud/laas_index_retention_policy_param.py +13 -0
- gcore/types/cloud/lb_algorithm.py +7 -0
- gcore/types/cloud/lb_health_monitor_type.py +7 -0
- gcore/types/cloud/lb_listener_protocol.py +7 -0
- gcore/types/cloud/lb_pool_protocol.py +7 -0
- gcore/types/cloud/lb_session_persistence_type.py +7 -0
- gcore/types/cloud/listener_status.py +27 -0
- gcore/types/cloud/load_balancer.py +144 -0
- gcore/types/cloud/load_balancer_create_params.py +327 -0
- gcore/types/cloud/load_balancer_failover_params.py +16 -0
- gcore/types/cloud/load_balancer_flavor_detail.py +40 -0
- gcore/types/cloud/load_balancer_flavor_list.py +16 -0
- gcore/types/cloud/load_balancer_get_params.py +19 -0
- gcore/types/cloud/load_balancer_instance_role.py +7 -0
- gcore/types/cloud/load_balancer_l7_policy.py +86 -0
- gcore/types/cloud/load_balancer_l7_policy_list.py +16 -0
- gcore/types/cloud/load_balancer_l7_rule.py +72 -0
- gcore/types/cloud/load_balancer_l7_rule_list.py +16 -0
- gcore/types/cloud/load_balancer_list_params.py +53 -0
- gcore/types/cloud/load_balancer_listener_detail.py +97 -0
- gcore/types/cloud/load_balancer_listener_list.py +16 -0
- gcore/types/cloud/load_balancer_member_connectivity.py +7 -0
- gcore/types/cloud/load_balancer_metrics.py +32 -0
- gcore/types/cloud/load_balancer_metrics_list.py +16 -0
- gcore/types/cloud/load_balancer_operating_status.py +7 -0
- gcore/types/cloud/load_balancer_pool.py +87 -0
- gcore/types/cloud/load_balancer_pool_list.py +16 -0
- gcore/types/cloud/load_balancer_resize_params.py +16 -0
- gcore/types/cloud/load_balancer_statistics.py +22 -0
- gcore/types/cloud/load_balancer_status.py +38 -0
- gcore/types/cloud/load_balancer_status_list.py +16 -0
- gcore/types/cloud/load_balancer_update_params.py +43 -0
- gcore/types/cloud/load_balancers/__init__.py +15 -0
- gcore/types/cloud/load_balancers/flavor_list_params.py +16 -0
- gcore/types/cloud/load_balancers/l7_policies/__init__.py +6 -0
- gcore/types/cloud/load_balancers/l7_policies/rule_create_params.py +50 -0
- gcore/types/cloud/load_balancers/l7_policies/rule_replace_params.py +43 -0
- gcore/types/cloud/load_balancers/l7_policy_create_params.py +54 -0
- gcore/types/cloud/load_balancers/l7_policy_replace_params.py +51 -0
- gcore/types/cloud/load_balancers/listener_create_params.py +72 -0
- gcore/types/cloud/load_balancers/listener_get_params.py +16 -0
- gcore/types/cloud/load_balancers/listener_list_params.py +19 -0
- gcore/types/cloud/load_balancers/listener_update_params.py +55 -0
- gcore/types/cloud/load_balancers/metric_list_params.py +21 -0
- gcore/types/cloud/load_balancers/pool_create_params.py +141 -0
- gcore/types/cloud/load_balancers/pool_list_params.py +25 -0
- gcore/types/cloud/load_balancers/pool_update_params.py +139 -0
- gcore/types/cloud/load_balancers/pools/__init__.py +6 -0
- gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py +49 -0
- gcore/types/cloud/load_balancers/pools/member_add_params.py +44 -0
- gcore/types/cloud/logging.py +22 -0
- gcore/types/cloud/member.py +47 -0
- gcore/types/cloud/member_status.py +24 -0
- gcore/types/cloud/network.py +79 -0
- gcore/types/cloud/network_create_params.py +34 -0
- gcore/types/cloud/network_details.py +79 -0
- gcore/types/cloud/network_interface.py +78 -0
- gcore/types/cloud/network_interface_list.py +16 -0
- gcore/types/cloud/network_list_params.py +36 -0
- gcore/types/cloud/network_update_params.py +16 -0
- gcore/types/cloud/networks/__init__.py +14 -0
- gcore/types/cloud/networks/router.py +83 -0
- gcore/types/cloud/networks/router_attach_subnet_params.py +24 -0
- gcore/types/cloud/networks/router_create_params.py +75 -0
- gcore/types/cloud/networks/router_detach_subnet_params.py +16 -0
- gcore/types/cloud/networks/router_list.py +16 -0
- gcore/types/cloud/networks/router_list_params.py +19 -0
- gcore/types/cloud/networks/router_update_params.py +45 -0
- gcore/types/cloud/networks/subnet_create_params.py +82 -0
- gcore/types/cloud/networks/subnet_list_params.py +58 -0
- gcore/types/cloud/networks/subnet_update_params.py +47 -0
- gcore/types/cloud/placement_group.py +41 -0
- gcore/types/cloud/placement_group_create_params.py +19 -0
- gcore/types/cloud/placement_group_list.py +16 -0
- gcore/types/cloud/pool_status.py +31 -0
- gcore/types/cloud/project.py +47 -0
- gcore/types/cloud/project_create_params.py +22 -0
- gcore/types/cloud/project_list_params.py +27 -0
- gcore/types/cloud/project_replace_params.py +18 -0
- gcore/types/cloud/provisioning_status.py +9 -0
- gcore/types/cloud/quota_get_all_response.py +340 -0
- gcore/types/cloud/quota_get_by_region_response.py +288 -0
- gcore/types/cloud/quota_get_global_response.py +51 -0
- gcore/types/cloud/quotas/__init__.py +8 -0
- gcore/types/cloud/quotas/request_create_params.py +193 -0
- gcore/types/cloud/quotas/request_get_response.py +205 -0
- gcore/types/cloud/quotas/request_list_params.py +22 -0
- gcore/types/cloud/quotas/request_list_response.py +205 -0
- gcore/types/cloud/region.py +101 -0
- gcore/types/cloud/region_capacity.py +16 -0
- gcore/types/cloud/region_capacity_list.py +16 -0
- gcore/types/cloud/region_get_params.py +18 -0
- gcore/types/cloud/region_list_params.py +31 -0
- gcore/types/cloud/registries/__init__.py +14 -0
- gcore/types/cloud/registries/registry_artifact.py +35 -0
- gcore/types/cloud/registries/registry_artifact_list.py +16 -0
- gcore/types/cloud/registries/registry_repository.py +30 -0
- gcore/types/cloud/registries/registry_repository_list.py +16 -0
- gcore/types/cloud/registries/registry_user.py +28 -0
- gcore/types/cloud/registries/registry_user_created.py +31 -0
- gcore/types/cloud/registries/registry_user_list.py +16 -0
- gcore/types/cloud/registries/user_create_multiple_params.py +36 -0
- gcore/types/cloud/registries/user_create_params.py +30 -0
- gcore/types/cloud/registries/user_update_params.py +21 -0
- gcore/types/cloud/registry.py +33 -0
- gcore/types/cloud/registry_create_params.py +24 -0
- gcore/types/cloud/registry_list.py +16 -0
- gcore/types/cloud/registry_resize_params.py +16 -0
- gcore/types/cloud/registry_tag.py +27 -0
- gcore/types/cloud/reserved_fixed_ip.py +98 -0
- gcore/types/cloud/reserved_fixed_ip_create_params.py +107 -0
- gcore/types/cloud/reserved_fixed_ip_list_params.py +47 -0
- gcore/types/cloud/reserved_fixed_ips/__init__.py +12 -0
- gcore/types/cloud/reserved_fixed_ips/candidate_port.py +26 -0
- gcore/types/cloud/reserved_fixed_ips/candidate_port_list.py +16 -0
- gcore/types/cloud/reserved_fixed_ips/connected_port.py +26 -0
- gcore/types/cloud/reserved_fixed_ips/connected_port_list.py +16 -0
- gcore/types/cloud/reserved_fixed_ips/ip_with_subnet.py +17 -0
- gcore/types/cloud/reserved_fixed_ips/vip_replace_connected_ports_params.py +17 -0
- gcore/types/cloud/reserved_fixed_ips/vip_toggle_params.py +16 -0
- gcore/types/cloud/reserved_fixed_ips/vip_update_connected_ports_params.py +17 -0
- gcore/types/cloud/route.py +16 -0
- gcore/types/cloud/secret.py +64 -0
- gcore/types/cloud/secret_create_params.py +66 -0
- gcore/types/cloud/secret_list_response.py +16 -0
- gcore/types/cloud/secret_upload_tls_certificate_params.py +39 -0
- gcore/types/cloud/security_group.py +45 -0
- gcore/types/cloud/security_group_copy_params.py +16 -0
- gcore/types/cloud/security_group_create_params.py +94 -0
- gcore/types/cloud/security_group_list_params.py +30 -0
- gcore/types/cloud/security_group_rule.py +83 -0
- gcore/types/cloud/security_group_update_params.py +83 -0
- gcore/types/cloud/security_groups/__init__.py +6 -0
- gcore/types/cloud/security_groups/rule_create_params.py +65 -0
- gcore/types/cloud/security_groups/rule_replace_params.py +72 -0
- gcore/types/cloud/session_persistence.py +22 -0
- gcore/types/cloud/ssh_key.py +39 -0
- gcore/types/cloud/ssh_key_create_params.py +31 -0
- gcore/types/cloud/ssh_key_created.py +53 -0
- gcore/types/cloud/ssh_key_list_params.py +21 -0
- gcore/types/cloud/ssh_key_update_params.py +15 -0
- gcore/types/cloud/subnet.py +87 -0
- gcore/types/cloud/tag.py +16 -0
- gcore/types/cloud/tag_update_map_param.py +10 -0
- gcore/types/cloud/task.py +191 -0
- gcore/types/cloud/task_acknowledge_all_params.py +16 -0
- gcore/types/cloud/task_id_list.py +12 -0
- gcore/types/cloud/task_list_params.py +104 -0
- gcore/types/cloud/users/__init__.py +9 -0
- gcore/types/cloud/users/role_assignment.py +33 -0
- gcore/types/cloud/users/role_assignment_create_params.py +22 -0
- gcore/types/cloud/users/role_assignment_list_params.py +25 -0
- gcore/types/cloud/users/role_assignment_update_delete.py +10 -0
- gcore/types/cloud/users/role_assignment_update_params.py +22 -0
- gcore/types/cloud/volume.py +141 -0
- gcore/types/cloud/volume_attach_to_instance_params.py +21 -0
- gcore/types/cloud/volume_change_type_params.py +18 -0
- gcore/types/cloud/volume_create_params.py +176 -0
- gcore/types/cloud/volume_delete_params.py +18 -0
- gcore/types/cloud/volume_detach_from_instance_params.py +18 -0
- gcore/types/cloud/volume_list_params.py +56 -0
- gcore/types/cloud/volume_resize_params.py +18 -0
- gcore/types/cloud/volume_update_params.py +18 -0
- gcore-0.1.0a1.dist-info/METADATA +485 -0
- gcore-0.1.0a1.dist-info/RECORD +420 -0
- gcore-0.1.0a1.dist-info/WHEEL +4 -0
- gcore-0.1.0a1.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
8
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
9
|
+
from ...._compat import cached_property
|
|
10
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
11
|
+
from ...._response import (
|
|
12
|
+
to_raw_response_wrapper,
|
|
13
|
+
to_streamed_response_wrapper,
|
|
14
|
+
async_to_raw_response_wrapper,
|
|
15
|
+
async_to_streamed_response_wrapper,
|
|
16
|
+
)
|
|
17
|
+
from ....types.cloud import InstanceMetricsTimeUnit
|
|
18
|
+
from ...._base_client import make_request_options
|
|
19
|
+
from ....types.cloud.load_balancers import metric_list_params
|
|
20
|
+
from ....types.cloud.instance_metrics_time_unit import InstanceMetricsTimeUnit
|
|
21
|
+
from ....types.cloud.load_balancer_metrics_list import LoadBalancerMetricsList
|
|
22
|
+
|
|
23
|
+
__all__ = ["MetricsResource", "AsyncMetricsResource"]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class MetricsResource(SyncAPIResource):
|
|
27
|
+
@cached_property
|
|
28
|
+
def with_raw_response(self) -> MetricsResourceWithRawResponse:
|
|
29
|
+
"""
|
|
30
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
31
|
+
the raw response object instead of the parsed content.
|
|
32
|
+
|
|
33
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
34
|
+
"""
|
|
35
|
+
return MetricsResourceWithRawResponse(self)
|
|
36
|
+
|
|
37
|
+
@cached_property
|
|
38
|
+
def with_streaming_response(self) -> MetricsResourceWithStreamingResponse:
|
|
39
|
+
"""
|
|
40
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
41
|
+
|
|
42
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
43
|
+
"""
|
|
44
|
+
return MetricsResourceWithStreamingResponse(self)
|
|
45
|
+
|
|
46
|
+
def list(
|
|
47
|
+
self,
|
|
48
|
+
loadbalancer_id: str,
|
|
49
|
+
*,
|
|
50
|
+
project_id: int | None = None,
|
|
51
|
+
region_id: int | None = None,
|
|
52
|
+
time_interval: int,
|
|
53
|
+
time_unit: InstanceMetricsTimeUnit,
|
|
54
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
55
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
56
|
+
extra_headers: Headers | None = None,
|
|
57
|
+
extra_query: Query | None = None,
|
|
58
|
+
extra_body: Body | None = None,
|
|
59
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
60
|
+
) -> LoadBalancerMetricsList:
|
|
61
|
+
"""
|
|
62
|
+
Get loadbalancer metrics, including cpu, memory and network
|
|
63
|
+
|
|
64
|
+
Args:
|
|
65
|
+
time_interval: Time interval
|
|
66
|
+
|
|
67
|
+
time_unit: Time interval unit
|
|
68
|
+
|
|
69
|
+
extra_headers: Send extra headers
|
|
70
|
+
|
|
71
|
+
extra_query: Add additional query parameters to the request
|
|
72
|
+
|
|
73
|
+
extra_body: Add additional JSON properties to the request
|
|
74
|
+
|
|
75
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
76
|
+
"""
|
|
77
|
+
if project_id is None:
|
|
78
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
79
|
+
if region_id is None:
|
|
80
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
81
|
+
if not loadbalancer_id:
|
|
82
|
+
raise ValueError(f"Expected a non-empty value for `loadbalancer_id` but received {loadbalancer_id!r}")
|
|
83
|
+
return self._post(
|
|
84
|
+
f"/cloud/v1/loadbalancers/{project_id}/{region_id}/{loadbalancer_id}/metrics",
|
|
85
|
+
body=maybe_transform(
|
|
86
|
+
{
|
|
87
|
+
"time_interval": time_interval,
|
|
88
|
+
"time_unit": time_unit,
|
|
89
|
+
},
|
|
90
|
+
metric_list_params.MetricListParams,
|
|
91
|
+
),
|
|
92
|
+
options=make_request_options(
|
|
93
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
94
|
+
),
|
|
95
|
+
cast_to=LoadBalancerMetricsList,
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class AsyncMetricsResource(AsyncAPIResource):
|
|
100
|
+
@cached_property
|
|
101
|
+
def with_raw_response(self) -> AsyncMetricsResourceWithRawResponse:
|
|
102
|
+
"""
|
|
103
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
104
|
+
the raw response object instead of the parsed content.
|
|
105
|
+
|
|
106
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
107
|
+
"""
|
|
108
|
+
return AsyncMetricsResourceWithRawResponse(self)
|
|
109
|
+
|
|
110
|
+
@cached_property
|
|
111
|
+
def with_streaming_response(self) -> AsyncMetricsResourceWithStreamingResponse:
|
|
112
|
+
"""
|
|
113
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
114
|
+
|
|
115
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
116
|
+
"""
|
|
117
|
+
return AsyncMetricsResourceWithStreamingResponse(self)
|
|
118
|
+
|
|
119
|
+
async def list(
|
|
120
|
+
self,
|
|
121
|
+
loadbalancer_id: str,
|
|
122
|
+
*,
|
|
123
|
+
project_id: int | None = None,
|
|
124
|
+
region_id: int | None = None,
|
|
125
|
+
time_interval: int,
|
|
126
|
+
time_unit: InstanceMetricsTimeUnit,
|
|
127
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
128
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
129
|
+
extra_headers: Headers | None = None,
|
|
130
|
+
extra_query: Query | None = None,
|
|
131
|
+
extra_body: Body | None = None,
|
|
132
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
133
|
+
) -> LoadBalancerMetricsList:
|
|
134
|
+
"""
|
|
135
|
+
Get loadbalancer metrics, including cpu, memory and network
|
|
136
|
+
|
|
137
|
+
Args:
|
|
138
|
+
time_interval: Time interval
|
|
139
|
+
|
|
140
|
+
time_unit: Time interval unit
|
|
141
|
+
|
|
142
|
+
extra_headers: Send extra headers
|
|
143
|
+
|
|
144
|
+
extra_query: Add additional query parameters to the request
|
|
145
|
+
|
|
146
|
+
extra_body: Add additional JSON properties to the request
|
|
147
|
+
|
|
148
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
149
|
+
"""
|
|
150
|
+
if project_id is None:
|
|
151
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
152
|
+
if region_id is None:
|
|
153
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
154
|
+
if not loadbalancer_id:
|
|
155
|
+
raise ValueError(f"Expected a non-empty value for `loadbalancer_id` but received {loadbalancer_id!r}")
|
|
156
|
+
return await self._post(
|
|
157
|
+
f"/cloud/v1/loadbalancers/{project_id}/{region_id}/{loadbalancer_id}/metrics",
|
|
158
|
+
body=await async_maybe_transform(
|
|
159
|
+
{
|
|
160
|
+
"time_interval": time_interval,
|
|
161
|
+
"time_unit": time_unit,
|
|
162
|
+
},
|
|
163
|
+
metric_list_params.MetricListParams,
|
|
164
|
+
),
|
|
165
|
+
options=make_request_options(
|
|
166
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
167
|
+
),
|
|
168
|
+
cast_to=LoadBalancerMetricsList,
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
class MetricsResourceWithRawResponse:
|
|
173
|
+
def __init__(self, metrics: MetricsResource) -> None:
|
|
174
|
+
self._metrics = metrics
|
|
175
|
+
|
|
176
|
+
self.list = to_raw_response_wrapper(
|
|
177
|
+
metrics.list,
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
class AsyncMetricsResourceWithRawResponse:
|
|
182
|
+
def __init__(self, metrics: AsyncMetricsResource) -> None:
|
|
183
|
+
self._metrics = metrics
|
|
184
|
+
|
|
185
|
+
self.list = async_to_raw_response_wrapper(
|
|
186
|
+
metrics.list,
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
class MetricsResourceWithStreamingResponse:
|
|
191
|
+
def __init__(self, metrics: MetricsResource) -> None:
|
|
192
|
+
self._metrics = metrics
|
|
193
|
+
|
|
194
|
+
self.list = to_streamed_response_wrapper(
|
|
195
|
+
metrics.list,
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
class AsyncMetricsResourceWithStreamingResponse:
|
|
200
|
+
def __init__(self, metrics: AsyncMetricsResource) -> None:
|
|
201
|
+
self._metrics = metrics
|
|
202
|
+
|
|
203
|
+
self.list = async_to_streamed_response_wrapper(
|
|
204
|
+
metrics.list,
|
|
205
|
+
)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .pools import (
|
|
4
|
+
PoolsResource,
|
|
5
|
+
AsyncPoolsResource,
|
|
6
|
+
PoolsResourceWithRawResponse,
|
|
7
|
+
AsyncPoolsResourceWithRawResponse,
|
|
8
|
+
PoolsResourceWithStreamingResponse,
|
|
9
|
+
AsyncPoolsResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .members import (
|
|
12
|
+
MembersResource,
|
|
13
|
+
AsyncMembersResource,
|
|
14
|
+
MembersResourceWithRawResponse,
|
|
15
|
+
AsyncMembersResourceWithRawResponse,
|
|
16
|
+
MembersResourceWithStreamingResponse,
|
|
17
|
+
AsyncMembersResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .health_monitors import (
|
|
20
|
+
HealthMonitorsResource,
|
|
21
|
+
AsyncHealthMonitorsResource,
|
|
22
|
+
HealthMonitorsResourceWithRawResponse,
|
|
23
|
+
AsyncHealthMonitorsResourceWithRawResponse,
|
|
24
|
+
HealthMonitorsResourceWithStreamingResponse,
|
|
25
|
+
AsyncHealthMonitorsResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
"HealthMonitorsResource",
|
|
30
|
+
"AsyncHealthMonitorsResource",
|
|
31
|
+
"HealthMonitorsResourceWithRawResponse",
|
|
32
|
+
"AsyncHealthMonitorsResourceWithRawResponse",
|
|
33
|
+
"HealthMonitorsResourceWithStreamingResponse",
|
|
34
|
+
"AsyncHealthMonitorsResourceWithStreamingResponse",
|
|
35
|
+
"MembersResource",
|
|
36
|
+
"AsyncMembersResource",
|
|
37
|
+
"MembersResourceWithRawResponse",
|
|
38
|
+
"AsyncMembersResourceWithRawResponse",
|
|
39
|
+
"MembersResourceWithStreamingResponse",
|
|
40
|
+
"AsyncMembersResourceWithStreamingResponse",
|
|
41
|
+
"PoolsResource",
|
|
42
|
+
"AsyncPoolsResource",
|
|
43
|
+
"PoolsResourceWithRawResponse",
|
|
44
|
+
"AsyncPoolsResourceWithRawResponse",
|
|
45
|
+
"PoolsResourceWithStreamingResponse",
|
|
46
|
+
"AsyncPoolsResourceWithStreamingResponse",
|
|
47
|
+
]
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
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 ....._resource import SyncAPIResource, AsyncAPIResource
|
|
13
|
+
from ....._response import (
|
|
14
|
+
to_raw_response_wrapper,
|
|
15
|
+
to_streamed_response_wrapper,
|
|
16
|
+
async_to_raw_response_wrapper,
|
|
17
|
+
async_to_streamed_response_wrapper,
|
|
18
|
+
)
|
|
19
|
+
from .....types.cloud import HTTPMethod, LbHealthMonitorType
|
|
20
|
+
from ....._base_client import make_request_options
|
|
21
|
+
from .....types.cloud.http_method import HTTPMethod
|
|
22
|
+
from .....types.cloud.task_id_list import TaskIDList
|
|
23
|
+
from .....types.cloud.load_balancers.pools import health_monitor_create_params
|
|
24
|
+
from .....types.cloud.lb_health_monitor_type import LbHealthMonitorType
|
|
25
|
+
|
|
26
|
+
__all__ = ["HealthMonitorsResource", "AsyncHealthMonitorsResource"]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class HealthMonitorsResource(SyncAPIResource):
|
|
30
|
+
@cached_property
|
|
31
|
+
def with_raw_response(self) -> HealthMonitorsResourceWithRawResponse:
|
|
32
|
+
"""
|
|
33
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
34
|
+
the raw response object instead of the parsed content.
|
|
35
|
+
|
|
36
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
37
|
+
"""
|
|
38
|
+
return HealthMonitorsResourceWithRawResponse(self)
|
|
39
|
+
|
|
40
|
+
@cached_property
|
|
41
|
+
def with_streaming_response(self) -> HealthMonitorsResourceWithStreamingResponse:
|
|
42
|
+
"""
|
|
43
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
44
|
+
|
|
45
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
46
|
+
"""
|
|
47
|
+
return HealthMonitorsResourceWithStreamingResponse(self)
|
|
48
|
+
|
|
49
|
+
def create(
|
|
50
|
+
self,
|
|
51
|
+
pool_id: str,
|
|
52
|
+
*,
|
|
53
|
+
project_id: int | None = None,
|
|
54
|
+
region_id: int | None = None,
|
|
55
|
+
delay: int,
|
|
56
|
+
max_retries: int,
|
|
57
|
+
api_timeout: int,
|
|
58
|
+
type: LbHealthMonitorType,
|
|
59
|
+
expected_codes: Optional[str] | NotGiven = NOT_GIVEN,
|
|
60
|
+
http_method: Optional[HTTPMethod] | NotGiven = NOT_GIVEN,
|
|
61
|
+
max_retries_down: Optional[int] | NotGiven = NOT_GIVEN,
|
|
62
|
+
url_path: Optional[str] | NotGiven = NOT_GIVEN,
|
|
63
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
64
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
65
|
+
extra_headers: Headers | None = None,
|
|
66
|
+
extra_query: Query | None = None,
|
|
67
|
+
extra_body: Body | None = None,
|
|
68
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
69
|
+
) -> TaskIDList:
|
|
70
|
+
"""
|
|
71
|
+
Create Load Balancer Pool Health Monitor
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
delay: The time, in seconds, between sending probes to members
|
|
75
|
+
|
|
76
|
+
max_retries: Number of successes before the member is switched to ONLINE state
|
|
77
|
+
|
|
78
|
+
api_timeout: The maximum time to connect. Must be less than the delay value
|
|
79
|
+
|
|
80
|
+
type: Health monitor type. Once health monitor is created, cannot be changed.
|
|
81
|
+
|
|
82
|
+
expected_codes: Can only be used together with `HTTP` or `HTTPS` health monitor type.
|
|
83
|
+
|
|
84
|
+
http_method: HTTP method. Can only be used together with `HTTP` or `HTTPS` health monitor
|
|
85
|
+
type.
|
|
86
|
+
|
|
87
|
+
max_retries_down: Number of failures before the member is switched to ERROR state.
|
|
88
|
+
|
|
89
|
+
url_path: URL Path. Defaults to '/'. Can only be used together with `HTTP` or `HTTPS`
|
|
90
|
+
health monitor type.
|
|
91
|
+
|
|
92
|
+
extra_headers: Send extra headers
|
|
93
|
+
|
|
94
|
+
extra_query: Add additional query parameters to the request
|
|
95
|
+
|
|
96
|
+
extra_body: Add additional JSON properties to the request
|
|
97
|
+
|
|
98
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
99
|
+
"""
|
|
100
|
+
if project_id is None:
|
|
101
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
102
|
+
if region_id is None:
|
|
103
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
104
|
+
if not pool_id:
|
|
105
|
+
raise ValueError(f"Expected a non-empty value for `pool_id` but received {pool_id!r}")
|
|
106
|
+
return self._post(
|
|
107
|
+
f"/cloud/v1/lbpools/{project_id}/{region_id}/{pool_id}/healthmonitor",
|
|
108
|
+
body=maybe_transform(
|
|
109
|
+
{
|
|
110
|
+
"delay": delay,
|
|
111
|
+
"max_retries": max_retries,
|
|
112
|
+
"api_timeout": api_timeout,
|
|
113
|
+
"type": type,
|
|
114
|
+
"expected_codes": expected_codes,
|
|
115
|
+
"http_method": http_method,
|
|
116
|
+
"max_retries_down": max_retries_down,
|
|
117
|
+
"url_path": url_path,
|
|
118
|
+
},
|
|
119
|
+
health_monitor_create_params.HealthMonitorCreateParams,
|
|
120
|
+
),
|
|
121
|
+
options=make_request_options(
|
|
122
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
123
|
+
),
|
|
124
|
+
cast_to=TaskIDList,
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
def delete(
|
|
128
|
+
self,
|
|
129
|
+
pool_id: str,
|
|
130
|
+
*,
|
|
131
|
+
project_id: int | None = None,
|
|
132
|
+
region_id: int | None = None,
|
|
133
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
134
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
135
|
+
extra_headers: Headers | None = None,
|
|
136
|
+
extra_query: Query | None = None,
|
|
137
|
+
extra_body: Body | None = None,
|
|
138
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
139
|
+
) -> None:
|
|
140
|
+
"""
|
|
141
|
+
Delete load balancer pool health monitor
|
|
142
|
+
|
|
143
|
+
Args:
|
|
144
|
+
extra_headers: Send extra headers
|
|
145
|
+
|
|
146
|
+
extra_query: Add additional query parameters to the request
|
|
147
|
+
|
|
148
|
+
extra_body: Add additional JSON properties to the request
|
|
149
|
+
|
|
150
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
151
|
+
"""
|
|
152
|
+
if project_id is None:
|
|
153
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
154
|
+
if region_id is None:
|
|
155
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
156
|
+
if not pool_id:
|
|
157
|
+
raise ValueError(f"Expected a non-empty value for `pool_id` but received {pool_id!r}")
|
|
158
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
159
|
+
return self._delete(
|
|
160
|
+
f"/cloud/v1/lbpools/{project_id}/{region_id}/{pool_id}/healthmonitor",
|
|
161
|
+
options=make_request_options(
|
|
162
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
163
|
+
),
|
|
164
|
+
cast_to=NoneType,
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
class AsyncHealthMonitorsResource(AsyncAPIResource):
|
|
169
|
+
@cached_property
|
|
170
|
+
def with_raw_response(self) -> AsyncHealthMonitorsResourceWithRawResponse:
|
|
171
|
+
"""
|
|
172
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
173
|
+
the raw response object instead of the parsed content.
|
|
174
|
+
|
|
175
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
176
|
+
"""
|
|
177
|
+
return AsyncHealthMonitorsResourceWithRawResponse(self)
|
|
178
|
+
|
|
179
|
+
@cached_property
|
|
180
|
+
def with_streaming_response(self) -> AsyncHealthMonitorsResourceWithStreamingResponse:
|
|
181
|
+
"""
|
|
182
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
183
|
+
|
|
184
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
185
|
+
"""
|
|
186
|
+
return AsyncHealthMonitorsResourceWithStreamingResponse(self)
|
|
187
|
+
|
|
188
|
+
async def create(
|
|
189
|
+
self,
|
|
190
|
+
pool_id: str,
|
|
191
|
+
*,
|
|
192
|
+
project_id: int | None = None,
|
|
193
|
+
region_id: int | None = None,
|
|
194
|
+
delay: int,
|
|
195
|
+
max_retries: int,
|
|
196
|
+
api_timeout: int,
|
|
197
|
+
type: LbHealthMonitorType,
|
|
198
|
+
expected_codes: Optional[str] | NotGiven = NOT_GIVEN,
|
|
199
|
+
http_method: Optional[HTTPMethod] | NotGiven = NOT_GIVEN,
|
|
200
|
+
max_retries_down: Optional[int] | NotGiven = NOT_GIVEN,
|
|
201
|
+
url_path: Optional[str] | NotGiven = NOT_GIVEN,
|
|
202
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
203
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
204
|
+
extra_headers: Headers | None = None,
|
|
205
|
+
extra_query: Query | None = None,
|
|
206
|
+
extra_body: Body | None = None,
|
|
207
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
208
|
+
) -> TaskIDList:
|
|
209
|
+
"""
|
|
210
|
+
Create Load Balancer Pool Health Monitor
|
|
211
|
+
|
|
212
|
+
Args:
|
|
213
|
+
delay: The time, in seconds, between sending probes to members
|
|
214
|
+
|
|
215
|
+
max_retries: Number of successes before the member is switched to ONLINE state
|
|
216
|
+
|
|
217
|
+
api_timeout: The maximum time to connect. Must be less than the delay value
|
|
218
|
+
|
|
219
|
+
type: Health monitor type. Once health monitor is created, cannot be changed.
|
|
220
|
+
|
|
221
|
+
expected_codes: Can only be used together with `HTTP` or `HTTPS` health monitor type.
|
|
222
|
+
|
|
223
|
+
http_method: HTTP method. Can only be used together with `HTTP` or `HTTPS` health monitor
|
|
224
|
+
type.
|
|
225
|
+
|
|
226
|
+
max_retries_down: Number of failures before the member is switched to ERROR state.
|
|
227
|
+
|
|
228
|
+
url_path: URL Path. Defaults to '/'. Can only be used together with `HTTP` or `HTTPS`
|
|
229
|
+
health monitor type.
|
|
230
|
+
|
|
231
|
+
extra_headers: Send extra headers
|
|
232
|
+
|
|
233
|
+
extra_query: Add additional query parameters to the request
|
|
234
|
+
|
|
235
|
+
extra_body: Add additional JSON properties to the request
|
|
236
|
+
|
|
237
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
238
|
+
"""
|
|
239
|
+
if project_id is None:
|
|
240
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
241
|
+
if region_id is None:
|
|
242
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
243
|
+
if not pool_id:
|
|
244
|
+
raise ValueError(f"Expected a non-empty value for `pool_id` but received {pool_id!r}")
|
|
245
|
+
return await self._post(
|
|
246
|
+
f"/cloud/v1/lbpools/{project_id}/{region_id}/{pool_id}/healthmonitor",
|
|
247
|
+
body=await async_maybe_transform(
|
|
248
|
+
{
|
|
249
|
+
"delay": delay,
|
|
250
|
+
"max_retries": max_retries,
|
|
251
|
+
"api_timeout": api_timeout,
|
|
252
|
+
"type": type,
|
|
253
|
+
"expected_codes": expected_codes,
|
|
254
|
+
"http_method": http_method,
|
|
255
|
+
"max_retries_down": max_retries_down,
|
|
256
|
+
"url_path": url_path,
|
|
257
|
+
},
|
|
258
|
+
health_monitor_create_params.HealthMonitorCreateParams,
|
|
259
|
+
),
|
|
260
|
+
options=make_request_options(
|
|
261
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
262
|
+
),
|
|
263
|
+
cast_to=TaskIDList,
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
async def delete(
|
|
267
|
+
self,
|
|
268
|
+
pool_id: str,
|
|
269
|
+
*,
|
|
270
|
+
project_id: int | None = None,
|
|
271
|
+
region_id: int | None = None,
|
|
272
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
273
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
274
|
+
extra_headers: Headers | None = None,
|
|
275
|
+
extra_query: Query | None = None,
|
|
276
|
+
extra_body: Body | None = None,
|
|
277
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
278
|
+
) -> None:
|
|
279
|
+
"""
|
|
280
|
+
Delete load balancer pool health monitor
|
|
281
|
+
|
|
282
|
+
Args:
|
|
283
|
+
extra_headers: Send extra headers
|
|
284
|
+
|
|
285
|
+
extra_query: Add additional query parameters to the request
|
|
286
|
+
|
|
287
|
+
extra_body: Add additional JSON properties to the request
|
|
288
|
+
|
|
289
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
290
|
+
"""
|
|
291
|
+
if project_id is None:
|
|
292
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
293
|
+
if region_id is None:
|
|
294
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
295
|
+
if not pool_id:
|
|
296
|
+
raise ValueError(f"Expected a non-empty value for `pool_id` but received {pool_id!r}")
|
|
297
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
298
|
+
return await self._delete(
|
|
299
|
+
f"/cloud/v1/lbpools/{project_id}/{region_id}/{pool_id}/healthmonitor",
|
|
300
|
+
options=make_request_options(
|
|
301
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
302
|
+
),
|
|
303
|
+
cast_to=NoneType,
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
class HealthMonitorsResourceWithRawResponse:
|
|
308
|
+
def __init__(self, health_monitors: HealthMonitorsResource) -> None:
|
|
309
|
+
self._health_monitors = health_monitors
|
|
310
|
+
|
|
311
|
+
self.create = to_raw_response_wrapper(
|
|
312
|
+
health_monitors.create,
|
|
313
|
+
)
|
|
314
|
+
self.delete = to_raw_response_wrapper(
|
|
315
|
+
health_monitors.delete,
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
class AsyncHealthMonitorsResourceWithRawResponse:
|
|
320
|
+
def __init__(self, health_monitors: AsyncHealthMonitorsResource) -> None:
|
|
321
|
+
self._health_monitors = health_monitors
|
|
322
|
+
|
|
323
|
+
self.create = async_to_raw_response_wrapper(
|
|
324
|
+
health_monitors.create,
|
|
325
|
+
)
|
|
326
|
+
self.delete = async_to_raw_response_wrapper(
|
|
327
|
+
health_monitors.delete,
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
class HealthMonitorsResourceWithStreamingResponse:
|
|
332
|
+
def __init__(self, health_monitors: HealthMonitorsResource) -> None:
|
|
333
|
+
self._health_monitors = health_monitors
|
|
334
|
+
|
|
335
|
+
self.create = to_streamed_response_wrapper(
|
|
336
|
+
health_monitors.create,
|
|
337
|
+
)
|
|
338
|
+
self.delete = to_streamed_response_wrapper(
|
|
339
|
+
health_monitors.delete,
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
class AsyncHealthMonitorsResourceWithStreamingResponse:
|
|
344
|
+
def __init__(self, health_monitors: AsyncHealthMonitorsResource) -> None:
|
|
345
|
+
self._health_monitors = health_monitors
|
|
346
|
+
|
|
347
|
+
self.create = async_to_streamed_response_wrapper(
|
|
348
|
+
health_monitors.create,
|
|
349
|
+
)
|
|
350
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
351
|
+
health_monitors.delete,
|
|
352
|
+
)
|