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,965 @@
|
|
|
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
|
+
from typing_extensions import Literal, overload
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from .vip import (
|
|
11
|
+
VipResource,
|
|
12
|
+
AsyncVipResource,
|
|
13
|
+
VipResourceWithRawResponse,
|
|
14
|
+
AsyncVipResourceWithRawResponse,
|
|
15
|
+
VipResourceWithStreamingResponse,
|
|
16
|
+
AsyncVipResourceWithStreamingResponse,
|
|
17
|
+
)
|
|
18
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
19
|
+
from ...._utils import required_args, maybe_transform, async_maybe_transform
|
|
20
|
+
from ...._compat import cached_property
|
|
21
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
22
|
+
from ...._response import (
|
|
23
|
+
to_raw_response_wrapper,
|
|
24
|
+
to_streamed_response_wrapper,
|
|
25
|
+
async_to_raw_response_wrapper,
|
|
26
|
+
async_to_streamed_response_wrapper,
|
|
27
|
+
)
|
|
28
|
+
from ....pagination import SyncOffsetPage, AsyncOffsetPage
|
|
29
|
+
from ....types.cloud import InterfaceIPFamily, reserved_fixed_ip_list_params, reserved_fixed_ip_create_params
|
|
30
|
+
from ...._base_client import AsyncPaginator, make_request_options
|
|
31
|
+
from ....types.cloud.task_id_list import TaskIDList
|
|
32
|
+
from ....types.cloud.reserved_fixed_ip import ReservedFixedIP
|
|
33
|
+
from ....types.cloud.interface_ip_family import InterfaceIPFamily
|
|
34
|
+
|
|
35
|
+
__all__ = ["ReservedFixedIPsResource", "AsyncReservedFixedIPsResource"]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class ReservedFixedIPsResource(SyncAPIResource):
|
|
39
|
+
@cached_property
|
|
40
|
+
def vip(self) -> VipResource:
|
|
41
|
+
return VipResource(self._client)
|
|
42
|
+
|
|
43
|
+
@cached_property
|
|
44
|
+
def with_raw_response(self) -> ReservedFixedIPsResourceWithRawResponse:
|
|
45
|
+
"""
|
|
46
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
47
|
+
the raw response object instead of the parsed content.
|
|
48
|
+
|
|
49
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
50
|
+
"""
|
|
51
|
+
return ReservedFixedIPsResourceWithRawResponse(self)
|
|
52
|
+
|
|
53
|
+
@cached_property
|
|
54
|
+
def with_streaming_response(self) -> ReservedFixedIPsResourceWithStreamingResponse:
|
|
55
|
+
"""
|
|
56
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
57
|
+
|
|
58
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
59
|
+
"""
|
|
60
|
+
return ReservedFixedIPsResourceWithStreamingResponse(self)
|
|
61
|
+
|
|
62
|
+
@overload
|
|
63
|
+
def create(
|
|
64
|
+
self,
|
|
65
|
+
*,
|
|
66
|
+
project_id: int | None = None,
|
|
67
|
+
region_id: int | None = None,
|
|
68
|
+
type: Literal["external"],
|
|
69
|
+
ip_family: Optional[InterfaceIPFamily] | NotGiven = NOT_GIVEN,
|
|
70
|
+
is_vip: bool | NotGiven = NOT_GIVEN,
|
|
71
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
72
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
73
|
+
extra_headers: Headers | None = None,
|
|
74
|
+
extra_query: Query | None = None,
|
|
75
|
+
extra_body: Body | None = None,
|
|
76
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
77
|
+
) -> TaskIDList:
|
|
78
|
+
"""
|
|
79
|
+
Create reserved fixed IP
|
|
80
|
+
|
|
81
|
+
Args:
|
|
82
|
+
type: Must be 'external'
|
|
83
|
+
|
|
84
|
+
ip_family: Which subnets should be selected: IPv4, IPv6 or use dual stack.
|
|
85
|
+
|
|
86
|
+
is_vip: If reserved fixed IP is a VIP
|
|
87
|
+
|
|
88
|
+
extra_headers: Send extra headers
|
|
89
|
+
|
|
90
|
+
extra_query: Add additional query parameters to the request
|
|
91
|
+
|
|
92
|
+
extra_body: Add additional JSON properties to the request
|
|
93
|
+
|
|
94
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
95
|
+
"""
|
|
96
|
+
...
|
|
97
|
+
|
|
98
|
+
@overload
|
|
99
|
+
def create(
|
|
100
|
+
self,
|
|
101
|
+
*,
|
|
102
|
+
project_id: int | None = None,
|
|
103
|
+
region_id: int | None = None,
|
|
104
|
+
subnet_id: str,
|
|
105
|
+
type: Literal["subnet"],
|
|
106
|
+
is_vip: bool | NotGiven = NOT_GIVEN,
|
|
107
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
108
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
109
|
+
extra_headers: Headers | None = None,
|
|
110
|
+
extra_query: Query | None = None,
|
|
111
|
+
extra_body: Body | None = None,
|
|
112
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
113
|
+
) -> TaskIDList:
|
|
114
|
+
"""
|
|
115
|
+
Create reserved fixed IP
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
subnet_id: Reserved fixed IP will be allocated in this subnet
|
|
119
|
+
|
|
120
|
+
type: Must be 'subnet'.
|
|
121
|
+
|
|
122
|
+
is_vip: If reserved fixed IP is a VIP
|
|
123
|
+
|
|
124
|
+
extra_headers: Send extra headers
|
|
125
|
+
|
|
126
|
+
extra_query: Add additional query parameters to the request
|
|
127
|
+
|
|
128
|
+
extra_body: Add additional JSON properties to the request
|
|
129
|
+
|
|
130
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
131
|
+
"""
|
|
132
|
+
...
|
|
133
|
+
|
|
134
|
+
@overload
|
|
135
|
+
def create(
|
|
136
|
+
self,
|
|
137
|
+
*,
|
|
138
|
+
project_id: int | None = None,
|
|
139
|
+
region_id: int | None = None,
|
|
140
|
+
network_id: str,
|
|
141
|
+
type: Literal["any_subnet"],
|
|
142
|
+
ip_family: Optional[InterfaceIPFamily] | NotGiven = NOT_GIVEN,
|
|
143
|
+
is_vip: bool | NotGiven = NOT_GIVEN,
|
|
144
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
145
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
146
|
+
extra_headers: Headers | None = None,
|
|
147
|
+
extra_query: Query | None = None,
|
|
148
|
+
extra_body: Body | None = None,
|
|
149
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
150
|
+
) -> TaskIDList:
|
|
151
|
+
"""
|
|
152
|
+
Create reserved fixed IP
|
|
153
|
+
|
|
154
|
+
Args:
|
|
155
|
+
network_id: Reserved fixed IP will be allocated in a subnet of this network
|
|
156
|
+
|
|
157
|
+
type: Must be 'any_subnet'.
|
|
158
|
+
|
|
159
|
+
ip_family: Which subnets should be selected: IPv4, IPv6 or use dual stack.
|
|
160
|
+
|
|
161
|
+
is_vip: If reserved fixed IP is a VIP
|
|
162
|
+
|
|
163
|
+
extra_headers: Send extra headers
|
|
164
|
+
|
|
165
|
+
extra_query: Add additional query parameters to the request
|
|
166
|
+
|
|
167
|
+
extra_body: Add additional JSON properties to the request
|
|
168
|
+
|
|
169
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
170
|
+
"""
|
|
171
|
+
...
|
|
172
|
+
|
|
173
|
+
@overload
|
|
174
|
+
def create(
|
|
175
|
+
self,
|
|
176
|
+
*,
|
|
177
|
+
project_id: int | None = None,
|
|
178
|
+
region_id: int | None = None,
|
|
179
|
+
ip_address: str,
|
|
180
|
+
network_id: str,
|
|
181
|
+
type: Literal["ip_address"],
|
|
182
|
+
is_vip: bool | NotGiven = NOT_GIVEN,
|
|
183
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
184
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
185
|
+
extra_headers: Headers | None = None,
|
|
186
|
+
extra_query: Query | None = None,
|
|
187
|
+
extra_body: Body | None = None,
|
|
188
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
189
|
+
) -> TaskIDList:
|
|
190
|
+
"""
|
|
191
|
+
Create reserved fixed IP
|
|
192
|
+
|
|
193
|
+
Args:
|
|
194
|
+
ip_address: Reserved fixed IP will be allocated the given IP address
|
|
195
|
+
|
|
196
|
+
network_id: Reserved fixed IP will be allocated in a subnet of this network
|
|
197
|
+
|
|
198
|
+
type: Must be 'ip_address'.
|
|
199
|
+
|
|
200
|
+
is_vip: If reserved fixed IP is a VIP
|
|
201
|
+
|
|
202
|
+
extra_headers: Send extra headers
|
|
203
|
+
|
|
204
|
+
extra_query: Add additional query parameters to the request
|
|
205
|
+
|
|
206
|
+
extra_body: Add additional JSON properties to the request
|
|
207
|
+
|
|
208
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
209
|
+
"""
|
|
210
|
+
...
|
|
211
|
+
|
|
212
|
+
@overload
|
|
213
|
+
def create(
|
|
214
|
+
self,
|
|
215
|
+
*,
|
|
216
|
+
project_id: int | None = None,
|
|
217
|
+
region_id: int | None = None,
|
|
218
|
+
port_id: str,
|
|
219
|
+
type: Literal["port"],
|
|
220
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
221
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
222
|
+
extra_headers: Headers | None = None,
|
|
223
|
+
extra_query: Query | None = None,
|
|
224
|
+
extra_body: Body | None = None,
|
|
225
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
226
|
+
) -> TaskIDList:
|
|
227
|
+
"""
|
|
228
|
+
Create reserved fixed IP
|
|
229
|
+
|
|
230
|
+
Args:
|
|
231
|
+
port_id: Port ID to make a reserved fixed IP (for example, `vip_port_id` of the Load
|
|
232
|
+
Balancer entity).
|
|
233
|
+
|
|
234
|
+
type: Must be 'port'.
|
|
235
|
+
|
|
236
|
+
extra_headers: Send extra headers
|
|
237
|
+
|
|
238
|
+
extra_query: Add additional query parameters to the request
|
|
239
|
+
|
|
240
|
+
extra_body: Add additional JSON properties to the request
|
|
241
|
+
|
|
242
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
243
|
+
"""
|
|
244
|
+
...
|
|
245
|
+
|
|
246
|
+
@required_args(
|
|
247
|
+
["type"],
|
|
248
|
+
["subnet_id", "type"],
|
|
249
|
+
["network_id", "type"],
|
|
250
|
+
["ip_address", "network_id", "type"],
|
|
251
|
+
["port_id", "type"],
|
|
252
|
+
)
|
|
253
|
+
def create(
|
|
254
|
+
self,
|
|
255
|
+
*,
|
|
256
|
+
project_id: int | None = None,
|
|
257
|
+
region_id: int | None = None,
|
|
258
|
+
type: Literal["external"] | Literal["subnet"] | Literal["any_subnet"] | Literal["ip_address"] | Literal["port"],
|
|
259
|
+
ip_family: Optional[InterfaceIPFamily] | NotGiven = NOT_GIVEN,
|
|
260
|
+
is_vip: bool | NotGiven = NOT_GIVEN,
|
|
261
|
+
subnet_id: str | NotGiven = NOT_GIVEN,
|
|
262
|
+
network_id: str | NotGiven = NOT_GIVEN,
|
|
263
|
+
ip_address: str | NotGiven = NOT_GIVEN,
|
|
264
|
+
port_id: str | NotGiven = NOT_GIVEN,
|
|
265
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
266
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
267
|
+
extra_headers: Headers | None = None,
|
|
268
|
+
extra_query: Query | None = None,
|
|
269
|
+
extra_body: Body | None = None,
|
|
270
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
271
|
+
) -> TaskIDList:
|
|
272
|
+
if project_id is None:
|
|
273
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
274
|
+
if region_id is None:
|
|
275
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
276
|
+
return self._post(
|
|
277
|
+
f"/cloud/v1/reserved_fixed_ips/{project_id}/{region_id}",
|
|
278
|
+
body=maybe_transform(
|
|
279
|
+
{
|
|
280
|
+
"type": type,
|
|
281
|
+
"ip_family": ip_family,
|
|
282
|
+
"is_vip": is_vip,
|
|
283
|
+
"subnet_id": subnet_id,
|
|
284
|
+
"network_id": network_id,
|
|
285
|
+
"ip_address": ip_address,
|
|
286
|
+
"port_id": port_id,
|
|
287
|
+
},
|
|
288
|
+
reserved_fixed_ip_create_params.ReservedFixedIPCreateParams,
|
|
289
|
+
),
|
|
290
|
+
options=make_request_options(
|
|
291
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
292
|
+
),
|
|
293
|
+
cast_to=TaskIDList,
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
def list(
|
|
297
|
+
self,
|
|
298
|
+
*,
|
|
299
|
+
project_id: int | None = None,
|
|
300
|
+
region_id: int | None = None,
|
|
301
|
+
available_only: bool | NotGiven = NOT_GIVEN,
|
|
302
|
+
device_id: str | NotGiven = NOT_GIVEN,
|
|
303
|
+
external_only: bool | NotGiven = NOT_GIVEN,
|
|
304
|
+
internal_only: bool | NotGiven = NOT_GIVEN,
|
|
305
|
+
ip_address: str | NotGiven = NOT_GIVEN,
|
|
306
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
307
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
308
|
+
order_by: str | NotGiven = NOT_GIVEN,
|
|
309
|
+
vip_only: bool | NotGiven = NOT_GIVEN,
|
|
310
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
311
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
312
|
+
extra_headers: Headers | None = None,
|
|
313
|
+
extra_query: Query | None = None,
|
|
314
|
+
extra_body: Body | None = None,
|
|
315
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
316
|
+
) -> SyncOffsetPage[ReservedFixedIP]:
|
|
317
|
+
"""
|
|
318
|
+
List reserved fixed IPs
|
|
319
|
+
|
|
320
|
+
Args:
|
|
321
|
+
available_only: Set to true if the response should only list IP addresses that are not attached
|
|
322
|
+
to any instance
|
|
323
|
+
|
|
324
|
+
device_id: Filter IPs by device ID it is attached to
|
|
325
|
+
|
|
326
|
+
external_only: Set to true if the response should only list public IP addresses
|
|
327
|
+
|
|
328
|
+
internal_only: Set to true if the response should only list private IP addresses
|
|
329
|
+
|
|
330
|
+
ip_address: An IPv4 address to filter results by. Regular expression allowed
|
|
331
|
+
|
|
332
|
+
limit: Limit the number of returned IPs
|
|
333
|
+
|
|
334
|
+
offset: Offset value is used to exclude the first set of records from the result
|
|
335
|
+
|
|
336
|
+
order_by: Ordering reserved fixed IP list result by name, status, updated_at, created_at
|
|
337
|
+
or fixed_ip_address fields of the reserved fixed IP and directions (status.asc),
|
|
338
|
+
default is "fixed_ip_address.asc"
|
|
339
|
+
|
|
340
|
+
vip_only: Set to true if the response should only list VIPs
|
|
341
|
+
|
|
342
|
+
extra_headers: Send extra headers
|
|
343
|
+
|
|
344
|
+
extra_query: Add additional query parameters to the request
|
|
345
|
+
|
|
346
|
+
extra_body: Add additional JSON properties to the request
|
|
347
|
+
|
|
348
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
349
|
+
"""
|
|
350
|
+
if project_id is None:
|
|
351
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
352
|
+
if region_id is None:
|
|
353
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
354
|
+
return self._get_api_list(
|
|
355
|
+
f"/cloud/v1/reserved_fixed_ips/{project_id}/{region_id}",
|
|
356
|
+
page=SyncOffsetPage[ReservedFixedIP],
|
|
357
|
+
options=make_request_options(
|
|
358
|
+
extra_headers=extra_headers,
|
|
359
|
+
extra_query=extra_query,
|
|
360
|
+
extra_body=extra_body,
|
|
361
|
+
timeout=timeout,
|
|
362
|
+
query=maybe_transform(
|
|
363
|
+
{
|
|
364
|
+
"available_only": available_only,
|
|
365
|
+
"device_id": device_id,
|
|
366
|
+
"external_only": external_only,
|
|
367
|
+
"internal_only": internal_only,
|
|
368
|
+
"ip_address": ip_address,
|
|
369
|
+
"limit": limit,
|
|
370
|
+
"offset": offset,
|
|
371
|
+
"order_by": order_by,
|
|
372
|
+
"vip_only": vip_only,
|
|
373
|
+
},
|
|
374
|
+
reserved_fixed_ip_list_params.ReservedFixedIPListParams,
|
|
375
|
+
),
|
|
376
|
+
),
|
|
377
|
+
model=ReservedFixedIP,
|
|
378
|
+
)
|
|
379
|
+
|
|
380
|
+
def delete(
|
|
381
|
+
self,
|
|
382
|
+
port_id: str,
|
|
383
|
+
*,
|
|
384
|
+
project_id: int | None = None,
|
|
385
|
+
region_id: int | None = None,
|
|
386
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
387
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
388
|
+
extra_headers: Headers | None = None,
|
|
389
|
+
extra_query: Query | None = None,
|
|
390
|
+
extra_body: Body | None = None,
|
|
391
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
392
|
+
) -> TaskIDList:
|
|
393
|
+
"""
|
|
394
|
+
Delete reserved fixed ip
|
|
395
|
+
|
|
396
|
+
Args:
|
|
397
|
+
extra_headers: Send extra headers
|
|
398
|
+
|
|
399
|
+
extra_query: Add additional query parameters to the request
|
|
400
|
+
|
|
401
|
+
extra_body: Add additional JSON properties to the request
|
|
402
|
+
|
|
403
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
404
|
+
"""
|
|
405
|
+
if project_id is None:
|
|
406
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
407
|
+
if region_id is None:
|
|
408
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
409
|
+
if not port_id:
|
|
410
|
+
raise ValueError(f"Expected a non-empty value for `port_id` but received {port_id!r}")
|
|
411
|
+
return self._delete(
|
|
412
|
+
f"/cloud/v1/reserved_fixed_ips/{project_id}/{region_id}/{port_id}",
|
|
413
|
+
options=make_request_options(
|
|
414
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
415
|
+
),
|
|
416
|
+
cast_to=TaskIDList,
|
|
417
|
+
)
|
|
418
|
+
|
|
419
|
+
def get(
|
|
420
|
+
self,
|
|
421
|
+
port_id: str,
|
|
422
|
+
*,
|
|
423
|
+
project_id: int | None = None,
|
|
424
|
+
region_id: int | None = None,
|
|
425
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
426
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
427
|
+
extra_headers: Headers | None = None,
|
|
428
|
+
extra_query: Query | None = None,
|
|
429
|
+
extra_body: Body | None = None,
|
|
430
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
431
|
+
) -> ReservedFixedIP:
|
|
432
|
+
"""
|
|
433
|
+
Get reserved fixed IP
|
|
434
|
+
|
|
435
|
+
Args:
|
|
436
|
+
extra_headers: Send extra headers
|
|
437
|
+
|
|
438
|
+
extra_query: Add additional query parameters to the request
|
|
439
|
+
|
|
440
|
+
extra_body: Add additional JSON properties to the request
|
|
441
|
+
|
|
442
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
443
|
+
"""
|
|
444
|
+
if project_id is None:
|
|
445
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
446
|
+
if region_id is None:
|
|
447
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
448
|
+
if not port_id:
|
|
449
|
+
raise ValueError(f"Expected a non-empty value for `port_id` but received {port_id!r}")
|
|
450
|
+
return self._get(
|
|
451
|
+
f"/cloud/v1/reserved_fixed_ips/{project_id}/{region_id}/{port_id}",
|
|
452
|
+
options=make_request_options(
|
|
453
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
454
|
+
),
|
|
455
|
+
cast_to=ReservedFixedIP,
|
|
456
|
+
)
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
class AsyncReservedFixedIPsResource(AsyncAPIResource):
|
|
460
|
+
@cached_property
|
|
461
|
+
def vip(self) -> AsyncVipResource:
|
|
462
|
+
return AsyncVipResource(self._client)
|
|
463
|
+
|
|
464
|
+
@cached_property
|
|
465
|
+
def with_raw_response(self) -> AsyncReservedFixedIPsResourceWithRawResponse:
|
|
466
|
+
"""
|
|
467
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
468
|
+
the raw response object instead of the parsed content.
|
|
469
|
+
|
|
470
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
471
|
+
"""
|
|
472
|
+
return AsyncReservedFixedIPsResourceWithRawResponse(self)
|
|
473
|
+
|
|
474
|
+
@cached_property
|
|
475
|
+
def with_streaming_response(self) -> AsyncReservedFixedIPsResourceWithStreamingResponse:
|
|
476
|
+
"""
|
|
477
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
478
|
+
|
|
479
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
480
|
+
"""
|
|
481
|
+
return AsyncReservedFixedIPsResourceWithStreamingResponse(self)
|
|
482
|
+
|
|
483
|
+
@overload
|
|
484
|
+
async def create(
|
|
485
|
+
self,
|
|
486
|
+
*,
|
|
487
|
+
project_id: int | None = None,
|
|
488
|
+
region_id: int | None = None,
|
|
489
|
+
type: Literal["external"],
|
|
490
|
+
ip_family: Optional[InterfaceIPFamily] | NotGiven = NOT_GIVEN,
|
|
491
|
+
is_vip: bool | NotGiven = NOT_GIVEN,
|
|
492
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
493
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
494
|
+
extra_headers: Headers | None = None,
|
|
495
|
+
extra_query: Query | None = None,
|
|
496
|
+
extra_body: Body | None = None,
|
|
497
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
498
|
+
) -> TaskIDList:
|
|
499
|
+
"""
|
|
500
|
+
Create reserved fixed IP
|
|
501
|
+
|
|
502
|
+
Args:
|
|
503
|
+
type: Must be 'external'
|
|
504
|
+
|
|
505
|
+
ip_family: Which subnets should be selected: IPv4, IPv6 or use dual stack.
|
|
506
|
+
|
|
507
|
+
is_vip: If reserved fixed IP is a VIP
|
|
508
|
+
|
|
509
|
+
extra_headers: Send extra headers
|
|
510
|
+
|
|
511
|
+
extra_query: Add additional query parameters to the request
|
|
512
|
+
|
|
513
|
+
extra_body: Add additional JSON properties to the request
|
|
514
|
+
|
|
515
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
516
|
+
"""
|
|
517
|
+
...
|
|
518
|
+
|
|
519
|
+
@overload
|
|
520
|
+
async def create(
|
|
521
|
+
self,
|
|
522
|
+
*,
|
|
523
|
+
project_id: int | None = None,
|
|
524
|
+
region_id: int | None = None,
|
|
525
|
+
subnet_id: str,
|
|
526
|
+
type: Literal["subnet"],
|
|
527
|
+
is_vip: bool | NotGiven = NOT_GIVEN,
|
|
528
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
529
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
530
|
+
extra_headers: Headers | None = None,
|
|
531
|
+
extra_query: Query | None = None,
|
|
532
|
+
extra_body: Body | None = None,
|
|
533
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
534
|
+
) -> TaskIDList:
|
|
535
|
+
"""
|
|
536
|
+
Create reserved fixed IP
|
|
537
|
+
|
|
538
|
+
Args:
|
|
539
|
+
subnet_id: Reserved fixed IP will be allocated in this subnet
|
|
540
|
+
|
|
541
|
+
type: Must be 'subnet'.
|
|
542
|
+
|
|
543
|
+
is_vip: If reserved fixed IP is a VIP
|
|
544
|
+
|
|
545
|
+
extra_headers: Send extra headers
|
|
546
|
+
|
|
547
|
+
extra_query: Add additional query parameters to the request
|
|
548
|
+
|
|
549
|
+
extra_body: Add additional JSON properties to the request
|
|
550
|
+
|
|
551
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
552
|
+
"""
|
|
553
|
+
...
|
|
554
|
+
|
|
555
|
+
@overload
|
|
556
|
+
async def create(
|
|
557
|
+
self,
|
|
558
|
+
*,
|
|
559
|
+
project_id: int | None = None,
|
|
560
|
+
region_id: int | None = None,
|
|
561
|
+
network_id: str,
|
|
562
|
+
type: Literal["any_subnet"],
|
|
563
|
+
ip_family: Optional[InterfaceIPFamily] | NotGiven = NOT_GIVEN,
|
|
564
|
+
is_vip: bool | NotGiven = NOT_GIVEN,
|
|
565
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
566
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
567
|
+
extra_headers: Headers | None = None,
|
|
568
|
+
extra_query: Query | None = None,
|
|
569
|
+
extra_body: Body | None = None,
|
|
570
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
571
|
+
) -> TaskIDList:
|
|
572
|
+
"""
|
|
573
|
+
Create reserved fixed IP
|
|
574
|
+
|
|
575
|
+
Args:
|
|
576
|
+
network_id: Reserved fixed IP will be allocated in a subnet of this network
|
|
577
|
+
|
|
578
|
+
type: Must be 'any_subnet'.
|
|
579
|
+
|
|
580
|
+
ip_family: Which subnets should be selected: IPv4, IPv6 or use dual stack.
|
|
581
|
+
|
|
582
|
+
is_vip: If reserved fixed IP is a VIP
|
|
583
|
+
|
|
584
|
+
extra_headers: Send extra headers
|
|
585
|
+
|
|
586
|
+
extra_query: Add additional query parameters to the request
|
|
587
|
+
|
|
588
|
+
extra_body: Add additional JSON properties to the request
|
|
589
|
+
|
|
590
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
591
|
+
"""
|
|
592
|
+
...
|
|
593
|
+
|
|
594
|
+
@overload
|
|
595
|
+
async def create(
|
|
596
|
+
self,
|
|
597
|
+
*,
|
|
598
|
+
project_id: int | None = None,
|
|
599
|
+
region_id: int | None = None,
|
|
600
|
+
ip_address: str,
|
|
601
|
+
network_id: str,
|
|
602
|
+
type: Literal["ip_address"],
|
|
603
|
+
is_vip: bool | NotGiven = NOT_GIVEN,
|
|
604
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
605
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
606
|
+
extra_headers: Headers | None = None,
|
|
607
|
+
extra_query: Query | None = None,
|
|
608
|
+
extra_body: Body | None = None,
|
|
609
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
610
|
+
) -> TaskIDList:
|
|
611
|
+
"""
|
|
612
|
+
Create reserved fixed IP
|
|
613
|
+
|
|
614
|
+
Args:
|
|
615
|
+
ip_address: Reserved fixed IP will be allocated the given IP address
|
|
616
|
+
|
|
617
|
+
network_id: Reserved fixed IP will be allocated in a subnet of this network
|
|
618
|
+
|
|
619
|
+
type: Must be 'ip_address'.
|
|
620
|
+
|
|
621
|
+
is_vip: If reserved fixed IP is a VIP
|
|
622
|
+
|
|
623
|
+
extra_headers: Send extra headers
|
|
624
|
+
|
|
625
|
+
extra_query: Add additional query parameters to the request
|
|
626
|
+
|
|
627
|
+
extra_body: Add additional JSON properties to the request
|
|
628
|
+
|
|
629
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
630
|
+
"""
|
|
631
|
+
...
|
|
632
|
+
|
|
633
|
+
@overload
|
|
634
|
+
async def create(
|
|
635
|
+
self,
|
|
636
|
+
*,
|
|
637
|
+
project_id: int | None = None,
|
|
638
|
+
region_id: int | None = None,
|
|
639
|
+
port_id: str,
|
|
640
|
+
type: Literal["port"],
|
|
641
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
642
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
643
|
+
extra_headers: Headers | None = None,
|
|
644
|
+
extra_query: Query | None = None,
|
|
645
|
+
extra_body: Body | None = None,
|
|
646
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
647
|
+
) -> TaskIDList:
|
|
648
|
+
"""
|
|
649
|
+
Create reserved fixed IP
|
|
650
|
+
|
|
651
|
+
Args:
|
|
652
|
+
port_id: Port ID to make a reserved fixed IP (for example, `vip_port_id` of the Load
|
|
653
|
+
Balancer entity).
|
|
654
|
+
|
|
655
|
+
type: Must be 'port'.
|
|
656
|
+
|
|
657
|
+
extra_headers: Send extra headers
|
|
658
|
+
|
|
659
|
+
extra_query: Add additional query parameters to the request
|
|
660
|
+
|
|
661
|
+
extra_body: Add additional JSON properties to the request
|
|
662
|
+
|
|
663
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
664
|
+
"""
|
|
665
|
+
...
|
|
666
|
+
|
|
667
|
+
@required_args(
|
|
668
|
+
["type"],
|
|
669
|
+
["subnet_id", "type"],
|
|
670
|
+
["network_id", "type"],
|
|
671
|
+
["ip_address", "network_id", "type"],
|
|
672
|
+
["port_id", "type"],
|
|
673
|
+
)
|
|
674
|
+
async def create(
|
|
675
|
+
self,
|
|
676
|
+
*,
|
|
677
|
+
project_id: int | None = None,
|
|
678
|
+
region_id: int | None = None,
|
|
679
|
+
type: Literal["external"] | Literal["subnet"] | Literal["any_subnet"] | Literal["ip_address"] | Literal["port"],
|
|
680
|
+
ip_family: Optional[InterfaceIPFamily] | NotGiven = NOT_GIVEN,
|
|
681
|
+
is_vip: bool | NotGiven = NOT_GIVEN,
|
|
682
|
+
subnet_id: str | NotGiven = NOT_GIVEN,
|
|
683
|
+
network_id: str | NotGiven = NOT_GIVEN,
|
|
684
|
+
ip_address: str | NotGiven = NOT_GIVEN,
|
|
685
|
+
port_id: str | NotGiven = NOT_GIVEN,
|
|
686
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
687
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
688
|
+
extra_headers: Headers | None = None,
|
|
689
|
+
extra_query: Query | None = None,
|
|
690
|
+
extra_body: Body | None = None,
|
|
691
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
692
|
+
) -> TaskIDList:
|
|
693
|
+
if project_id is None:
|
|
694
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
695
|
+
if region_id is None:
|
|
696
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
697
|
+
return await self._post(
|
|
698
|
+
f"/cloud/v1/reserved_fixed_ips/{project_id}/{region_id}",
|
|
699
|
+
body=await async_maybe_transform(
|
|
700
|
+
{
|
|
701
|
+
"type": type,
|
|
702
|
+
"ip_family": ip_family,
|
|
703
|
+
"is_vip": is_vip,
|
|
704
|
+
"subnet_id": subnet_id,
|
|
705
|
+
"network_id": network_id,
|
|
706
|
+
"ip_address": ip_address,
|
|
707
|
+
"port_id": port_id,
|
|
708
|
+
},
|
|
709
|
+
reserved_fixed_ip_create_params.ReservedFixedIPCreateParams,
|
|
710
|
+
),
|
|
711
|
+
options=make_request_options(
|
|
712
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
713
|
+
),
|
|
714
|
+
cast_to=TaskIDList,
|
|
715
|
+
)
|
|
716
|
+
|
|
717
|
+
def list(
|
|
718
|
+
self,
|
|
719
|
+
*,
|
|
720
|
+
project_id: int | None = None,
|
|
721
|
+
region_id: int | None = None,
|
|
722
|
+
available_only: bool | NotGiven = NOT_GIVEN,
|
|
723
|
+
device_id: str | NotGiven = NOT_GIVEN,
|
|
724
|
+
external_only: bool | NotGiven = NOT_GIVEN,
|
|
725
|
+
internal_only: bool | NotGiven = NOT_GIVEN,
|
|
726
|
+
ip_address: str | NotGiven = NOT_GIVEN,
|
|
727
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
728
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
729
|
+
order_by: str | NotGiven = NOT_GIVEN,
|
|
730
|
+
vip_only: bool | NotGiven = NOT_GIVEN,
|
|
731
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
732
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
733
|
+
extra_headers: Headers | None = None,
|
|
734
|
+
extra_query: Query | None = None,
|
|
735
|
+
extra_body: Body | None = None,
|
|
736
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
737
|
+
) -> AsyncPaginator[ReservedFixedIP, AsyncOffsetPage[ReservedFixedIP]]:
|
|
738
|
+
"""
|
|
739
|
+
List reserved fixed IPs
|
|
740
|
+
|
|
741
|
+
Args:
|
|
742
|
+
available_only: Set to true if the response should only list IP addresses that are not attached
|
|
743
|
+
to any instance
|
|
744
|
+
|
|
745
|
+
device_id: Filter IPs by device ID it is attached to
|
|
746
|
+
|
|
747
|
+
external_only: Set to true if the response should only list public IP addresses
|
|
748
|
+
|
|
749
|
+
internal_only: Set to true if the response should only list private IP addresses
|
|
750
|
+
|
|
751
|
+
ip_address: An IPv4 address to filter results by. Regular expression allowed
|
|
752
|
+
|
|
753
|
+
limit: Limit the number of returned IPs
|
|
754
|
+
|
|
755
|
+
offset: Offset value is used to exclude the first set of records from the result
|
|
756
|
+
|
|
757
|
+
order_by: Ordering reserved fixed IP list result by name, status, updated_at, created_at
|
|
758
|
+
or fixed_ip_address fields of the reserved fixed IP and directions (status.asc),
|
|
759
|
+
default is "fixed_ip_address.asc"
|
|
760
|
+
|
|
761
|
+
vip_only: Set to true if the response should only list VIPs
|
|
762
|
+
|
|
763
|
+
extra_headers: Send extra headers
|
|
764
|
+
|
|
765
|
+
extra_query: Add additional query parameters to the request
|
|
766
|
+
|
|
767
|
+
extra_body: Add additional JSON properties to the request
|
|
768
|
+
|
|
769
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
770
|
+
"""
|
|
771
|
+
if project_id is None:
|
|
772
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
773
|
+
if region_id is None:
|
|
774
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
775
|
+
return self._get_api_list(
|
|
776
|
+
f"/cloud/v1/reserved_fixed_ips/{project_id}/{region_id}",
|
|
777
|
+
page=AsyncOffsetPage[ReservedFixedIP],
|
|
778
|
+
options=make_request_options(
|
|
779
|
+
extra_headers=extra_headers,
|
|
780
|
+
extra_query=extra_query,
|
|
781
|
+
extra_body=extra_body,
|
|
782
|
+
timeout=timeout,
|
|
783
|
+
query=maybe_transform(
|
|
784
|
+
{
|
|
785
|
+
"available_only": available_only,
|
|
786
|
+
"device_id": device_id,
|
|
787
|
+
"external_only": external_only,
|
|
788
|
+
"internal_only": internal_only,
|
|
789
|
+
"ip_address": ip_address,
|
|
790
|
+
"limit": limit,
|
|
791
|
+
"offset": offset,
|
|
792
|
+
"order_by": order_by,
|
|
793
|
+
"vip_only": vip_only,
|
|
794
|
+
},
|
|
795
|
+
reserved_fixed_ip_list_params.ReservedFixedIPListParams,
|
|
796
|
+
),
|
|
797
|
+
),
|
|
798
|
+
model=ReservedFixedIP,
|
|
799
|
+
)
|
|
800
|
+
|
|
801
|
+
async def delete(
|
|
802
|
+
self,
|
|
803
|
+
port_id: str,
|
|
804
|
+
*,
|
|
805
|
+
project_id: int | None = None,
|
|
806
|
+
region_id: int | None = None,
|
|
807
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
808
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
809
|
+
extra_headers: Headers | None = None,
|
|
810
|
+
extra_query: Query | None = None,
|
|
811
|
+
extra_body: Body | None = None,
|
|
812
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
813
|
+
) -> TaskIDList:
|
|
814
|
+
"""
|
|
815
|
+
Delete reserved fixed ip
|
|
816
|
+
|
|
817
|
+
Args:
|
|
818
|
+
extra_headers: Send extra headers
|
|
819
|
+
|
|
820
|
+
extra_query: Add additional query parameters to the request
|
|
821
|
+
|
|
822
|
+
extra_body: Add additional JSON properties to the request
|
|
823
|
+
|
|
824
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
825
|
+
"""
|
|
826
|
+
if project_id is None:
|
|
827
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
828
|
+
if region_id is None:
|
|
829
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
830
|
+
if not port_id:
|
|
831
|
+
raise ValueError(f"Expected a non-empty value for `port_id` but received {port_id!r}")
|
|
832
|
+
return await self._delete(
|
|
833
|
+
f"/cloud/v1/reserved_fixed_ips/{project_id}/{region_id}/{port_id}",
|
|
834
|
+
options=make_request_options(
|
|
835
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
836
|
+
),
|
|
837
|
+
cast_to=TaskIDList,
|
|
838
|
+
)
|
|
839
|
+
|
|
840
|
+
async def get(
|
|
841
|
+
self,
|
|
842
|
+
port_id: str,
|
|
843
|
+
*,
|
|
844
|
+
project_id: int | None = None,
|
|
845
|
+
region_id: int | None = None,
|
|
846
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
847
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
848
|
+
extra_headers: Headers | None = None,
|
|
849
|
+
extra_query: Query | None = None,
|
|
850
|
+
extra_body: Body | None = None,
|
|
851
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
852
|
+
) -> ReservedFixedIP:
|
|
853
|
+
"""
|
|
854
|
+
Get reserved fixed IP
|
|
855
|
+
|
|
856
|
+
Args:
|
|
857
|
+
extra_headers: Send extra headers
|
|
858
|
+
|
|
859
|
+
extra_query: Add additional query parameters to the request
|
|
860
|
+
|
|
861
|
+
extra_body: Add additional JSON properties to the request
|
|
862
|
+
|
|
863
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
864
|
+
"""
|
|
865
|
+
if project_id is None:
|
|
866
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
867
|
+
if region_id is None:
|
|
868
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
869
|
+
if not port_id:
|
|
870
|
+
raise ValueError(f"Expected a non-empty value for `port_id` but received {port_id!r}")
|
|
871
|
+
return await self._get(
|
|
872
|
+
f"/cloud/v1/reserved_fixed_ips/{project_id}/{region_id}/{port_id}",
|
|
873
|
+
options=make_request_options(
|
|
874
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
875
|
+
),
|
|
876
|
+
cast_to=ReservedFixedIP,
|
|
877
|
+
)
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
class ReservedFixedIPsResourceWithRawResponse:
|
|
881
|
+
def __init__(self, reserved_fixed_ips: ReservedFixedIPsResource) -> None:
|
|
882
|
+
self._reserved_fixed_ips = reserved_fixed_ips
|
|
883
|
+
|
|
884
|
+
self.create = to_raw_response_wrapper(
|
|
885
|
+
reserved_fixed_ips.create,
|
|
886
|
+
)
|
|
887
|
+
self.list = to_raw_response_wrapper(
|
|
888
|
+
reserved_fixed_ips.list,
|
|
889
|
+
)
|
|
890
|
+
self.delete = to_raw_response_wrapper(
|
|
891
|
+
reserved_fixed_ips.delete,
|
|
892
|
+
)
|
|
893
|
+
self.get = to_raw_response_wrapper(
|
|
894
|
+
reserved_fixed_ips.get,
|
|
895
|
+
)
|
|
896
|
+
|
|
897
|
+
@cached_property
|
|
898
|
+
def vip(self) -> VipResourceWithRawResponse:
|
|
899
|
+
return VipResourceWithRawResponse(self._reserved_fixed_ips.vip)
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
class AsyncReservedFixedIPsResourceWithRawResponse:
|
|
903
|
+
def __init__(self, reserved_fixed_ips: AsyncReservedFixedIPsResource) -> None:
|
|
904
|
+
self._reserved_fixed_ips = reserved_fixed_ips
|
|
905
|
+
|
|
906
|
+
self.create = async_to_raw_response_wrapper(
|
|
907
|
+
reserved_fixed_ips.create,
|
|
908
|
+
)
|
|
909
|
+
self.list = async_to_raw_response_wrapper(
|
|
910
|
+
reserved_fixed_ips.list,
|
|
911
|
+
)
|
|
912
|
+
self.delete = async_to_raw_response_wrapper(
|
|
913
|
+
reserved_fixed_ips.delete,
|
|
914
|
+
)
|
|
915
|
+
self.get = async_to_raw_response_wrapper(
|
|
916
|
+
reserved_fixed_ips.get,
|
|
917
|
+
)
|
|
918
|
+
|
|
919
|
+
@cached_property
|
|
920
|
+
def vip(self) -> AsyncVipResourceWithRawResponse:
|
|
921
|
+
return AsyncVipResourceWithRawResponse(self._reserved_fixed_ips.vip)
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
class ReservedFixedIPsResourceWithStreamingResponse:
|
|
925
|
+
def __init__(self, reserved_fixed_ips: ReservedFixedIPsResource) -> None:
|
|
926
|
+
self._reserved_fixed_ips = reserved_fixed_ips
|
|
927
|
+
|
|
928
|
+
self.create = to_streamed_response_wrapper(
|
|
929
|
+
reserved_fixed_ips.create,
|
|
930
|
+
)
|
|
931
|
+
self.list = to_streamed_response_wrapper(
|
|
932
|
+
reserved_fixed_ips.list,
|
|
933
|
+
)
|
|
934
|
+
self.delete = to_streamed_response_wrapper(
|
|
935
|
+
reserved_fixed_ips.delete,
|
|
936
|
+
)
|
|
937
|
+
self.get = to_streamed_response_wrapper(
|
|
938
|
+
reserved_fixed_ips.get,
|
|
939
|
+
)
|
|
940
|
+
|
|
941
|
+
@cached_property
|
|
942
|
+
def vip(self) -> VipResourceWithStreamingResponse:
|
|
943
|
+
return VipResourceWithStreamingResponse(self._reserved_fixed_ips.vip)
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
class AsyncReservedFixedIPsResourceWithStreamingResponse:
|
|
947
|
+
def __init__(self, reserved_fixed_ips: AsyncReservedFixedIPsResource) -> None:
|
|
948
|
+
self._reserved_fixed_ips = reserved_fixed_ips
|
|
949
|
+
|
|
950
|
+
self.create = async_to_streamed_response_wrapper(
|
|
951
|
+
reserved_fixed_ips.create,
|
|
952
|
+
)
|
|
953
|
+
self.list = async_to_streamed_response_wrapper(
|
|
954
|
+
reserved_fixed_ips.list,
|
|
955
|
+
)
|
|
956
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
957
|
+
reserved_fixed_ips.delete,
|
|
958
|
+
)
|
|
959
|
+
self.get = async_to_streamed_response_wrapper(
|
|
960
|
+
reserved_fixed_ips.get,
|
|
961
|
+
)
|
|
962
|
+
|
|
963
|
+
@cached_property
|
|
964
|
+
def vip(self) -> AsyncVipResourceWithStreamingResponse:
|
|
965
|
+
return AsyncVipResourceWithStreamingResponse(self._reserved_fixed_ips.vip)
|