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,765 @@
|
|
|
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 List, Optional
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ..._types import NOT_GIVEN, Body, Query, Headers, 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 ...pagination import SyncOffsetPage, AsyncOffsetPage
|
|
20
|
+
from ...types.cloud import floating_ip_list_params, floating_ip_assign_params, floating_ip_create_params
|
|
21
|
+
from ..._base_client import AsyncPaginator, make_request_options
|
|
22
|
+
from ...types.cloud.floating_ip import FloatingIP
|
|
23
|
+
from ...types.cloud.task_id_list import TaskIDList
|
|
24
|
+
from ...types.cloud.floating_ip_detailed import FloatingIPDetailed
|
|
25
|
+
from ...types.cloud.tag_update_map_param import TagUpdateMapParam
|
|
26
|
+
|
|
27
|
+
__all__ = ["FloatingIPsResource", "AsyncFloatingIPsResource"]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class FloatingIPsResource(SyncAPIResource):
|
|
31
|
+
@cached_property
|
|
32
|
+
def with_raw_response(self) -> FloatingIPsResourceWithRawResponse:
|
|
33
|
+
"""
|
|
34
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
35
|
+
the raw response object instead of the parsed content.
|
|
36
|
+
|
|
37
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
38
|
+
"""
|
|
39
|
+
return FloatingIPsResourceWithRawResponse(self)
|
|
40
|
+
|
|
41
|
+
@cached_property
|
|
42
|
+
def with_streaming_response(self) -> FloatingIPsResourceWithStreamingResponse:
|
|
43
|
+
"""
|
|
44
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
45
|
+
|
|
46
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
47
|
+
"""
|
|
48
|
+
return FloatingIPsResourceWithStreamingResponse(self)
|
|
49
|
+
|
|
50
|
+
def create(
|
|
51
|
+
self,
|
|
52
|
+
*,
|
|
53
|
+
project_id: int | None = None,
|
|
54
|
+
region_id: int | None = None,
|
|
55
|
+
fixed_ip_address: Optional[str] | NotGiven = NOT_GIVEN,
|
|
56
|
+
port_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
57
|
+
tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
|
|
58
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
59
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
60
|
+
extra_headers: Headers | None = None,
|
|
61
|
+
extra_query: Query | None = None,
|
|
62
|
+
extra_body: Body | None = None,
|
|
63
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
64
|
+
) -> TaskIDList:
|
|
65
|
+
"""
|
|
66
|
+
Create floating IP
|
|
67
|
+
|
|
68
|
+
Args:
|
|
69
|
+
project_id: Project ID
|
|
70
|
+
|
|
71
|
+
region_id: Region ID
|
|
72
|
+
|
|
73
|
+
fixed_ip_address: If the port has multiple IP addresses, a specific one can be selected using this
|
|
74
|
+
field. If not specified, the first IP in the port's list will be used by
|
|
75
|
+
default.
|
|
76
|
+
|
|
77
|
+
port_id: If provided, the floating IP will be immediately attached to the specified port.
|
|
78
|
+
|
|
79
|
+
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
80
|
+
can be associated with a resource, enabling efficient filtering and grouping for
|
|
81
|
+
better organization and management. Some tags are read-only and cannot be
|
|
82
|
+
modified by the user. Tags are also integrated with cost reports, allowing cost
|
|
83
|
+
data to be filtered based on tag keys or values.
|
|
84
|
+
|
|
85
|
+
extra_headers: Send extra headers
|
|
86
|
+
|
|
87
|
+
extra_query: Add additional query parameters to the request
|
|
88
|
+
|
|
89
|
+
extra_body: Add additional JSON properties to the request
|
|
90
|
+
|
|
91
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
92
|
+
"""
|
|
93
|
+
if project_id is None:
|
|
94
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
95
|
+
if region_id is None:
|
|
96
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
97
|
+
return self._post(
|
|
98
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}",
|
|
99
|
+
body=maybe_transform(
|
|
100
|
+
{
|
|
101
|
+
"fixed_ip_address": fixed_ip_address,
|
|
102
|
+
"port_id": port_id,
|
|
103
|
+
"tags": tags,
|
|
104
|
+
},
|
|
105
|
+
floating_ip_create_params.FloatingIPCreateParams,
|
|
106
|
+
),
|
|
107
|
+
options=make_request_options(
|
|
108
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
109
|
+
),
|
|
110
|
+
cast_to=TaskIDList,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
def list(
|
|
114
|
+
self,
|
|
115
|
+
*,
|
|
116
|
+
project_id: int | None = None,
|
|
117
|
+
region_id: int | None = None,
|
|
118
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
119
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
120
|
+
tag_key: List[str] | NotGiven = NOT_GIVEN,
|
|
121
|
+
tag_key_value: str | NotGiven = NOT_GIVEN,
|
|
122
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
123
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
124
|
+
extra_headers: Headers | None = None,
|
|
125
|
+
extra_query: Query | None = None,
|
|
126
|
+
extra_body: Body | None = None,
|
|
127
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
128
|
+
) -> SyncOffsetPage[FloatingIPDetailed]:
|
|
129
|
+
"""
|
|
130
|
+
List floating IPs
|
|
131
|
+
|
|
132
|
+
Args:
|
|
133
|
+
project_id: Project ID
|
|
134
|
+
|
|
135
|
+
region_id: Region ID
|
|
136
|
+
|
|
137
|
+
limit: Optional. Limit the number of returned items
|
|
138
|
+
|
|
139
|
+
offset: Optional. Offset value is used to exclude the first set of records from the
|
|
140
|
+
result
|
|
141
|
+
|
|
142
|
+
tag_key: Optional. Filter by tag keys. ?tag_key=key1&tag_key=key2
|
|
143
|
+
|
|
144
|
+
tag_key_value: Optional. Filter by tag key-value pairs. curl -G --data-urlencode
|
|
145
|
+
"tag_key_value={"key": "value"}" --url
|
|
146
|
+
"https://example.com/cloud/v1/resource/1/1"
|
|
147
|
+
|
|
148
|
+
extra_headers: Send extra headers
|
|
149
|
+
|
|
150
|
+
extra_query: Add additional query parameters to the request
|
|
151
|
+
|
|
152
|
+
extra_body: Add additional JSON properties to the request
|
|
153
|
+
|
|
154
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
155
|
+
"""
|
|
156
|
+
if project_id is None:
|
|
157
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
158
|
+
if region_id is None:
|
|
159
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
160
|
+
return self._get_api_list(
|
|
161
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}",
|
|
162
|
+
page=SyncOffsetPage[FloatingIPDetailed],
|
|
163
|
+
options=make_request_options(
|
|
164
|
+
extra_headers=extra_headers,
|
|
165
|
+
extra_query=extra_query,
|
|
166
|
+
extra_body=extra_body,
|
|
167
|
+
timeout=timeout,
|
|
168
|
+
query=maybe_transform(
|
|
169
|
+
{
|
|
170
|
+
"limit": limit,
|
|
171
|
+
"offset": offset,
|
|
172
|
+
"tag_key": tag_key,
|
|
173
|
+
"tag_key_value": tag_key_value,
|
|
174
|
+
},
|
|
175
|
+
floating_ip_list_params.FloatingIPListParams,
|
|
176
|
+
),
|
|
177
|
+
),
|
|
178
|
+
model=FloatingIPDetailed,
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
def delete(
|
|
182
|
+
self,
|
|
183
|
+
floating_ip_id: str,
|
|
184
|
+
*,
|
|
185
|
+
project_id: int | None = None,
|
|
186
|
+
region_id: int | None = None,
|
|
187
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
188
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
189
|
+
extra_headers: Headers | None = None,
|
|
190
|
+
extra_query: Query | None = None,
|
|
191
|
+
extra_body: Body | None = None,
|
|
192
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
193
|
+
) -> TaskIDList:
|
|
194
|
+
"""
|
|
195
|
+
Delete floating IP
|
|
196
|
+
|
|
197
|
+
Args:
|
|
198
|
+
extra_headers: Send extra headers
|
|
199
|
+
|
|
200
|
+
extra_query: Add additional query parameters to the request
|
|
201
|
+
|
|
202
|
+
extra_body: Add additional JSON properties to the request
|
|
203
|
+
|
|
204
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
205
|
+
"""
|
|
206
|
+
if project_id is None:
|
|
207
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
208
|
+
if region_id is None:
|
|
209
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
210
|
+
if not floating_ip_id:
|
|
211
|
+
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
212
|
+
return self._delete(
|
|
213
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}",
|
|
214
|
+
options=make_request_options(
|
|
215
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
216
|
+
),
|
|
217
|
+
cast_to=TaskIDList,
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
def assign(
|
|
221
|
+
self,
|
|
222
|
+
floating_ip_id: str,
|
|
223
|
+
*,
|
|
224
|
+
project_id: int | None = None,
|
|
225
|
+
region_id: int | None = None,
|
|
226
|
+
port_id: str,
|
|
227
|
+
fixed_ip_address: Optional[str] | NotGiven = NOT_GIVEN,
|
|
228
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
229
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
230
|
+
extra_headers: Headers | None = None,
|
|
231
|
+
extra_query: Query | None = None,
|
|
232
|
+
extra_body: Body | None = None,
|
|
233
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
234
|
+
) -> FloatingIP:
|
|
235
|
+
"""
|
|
236
|
+
Assign floating IP to instance or loadbalancer
|
|
237
|
+
|
|
238
|
+
Args:
|
|
239
|
+
port_id: Port ID
|
|
240
|
+
|
|
241
|
+
fixed_ip_address: Fixed IP address
|
|
242
|
+
|
|
243
|
+
extra_headers: Send extra headers
|
|
244
|
+
|
|
245
|
+
extra_query: Add additional query parameters to the request
|
|
246
|
+
|
|
247
|
+
extra_body: Add additional JSON properties to the request
|
|
248
|
+
|
|
249
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
250
|
+
"""
|
|
251
|
+
if project_id is None:
|
|
252
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
253
|
+
if region_id is None:
|
|
254
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
255
|
+
if not floating_ip_id:
|
|
256
|
+
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
257
|
+
return self._post(
|
|
258
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/assign",
|
|
259
|
+
body=maybe_transform(
|
|
260
|
+
{
|
|
261
|
+
"port_id": port_id,
|
|
262
|
+
"fixed_ip_address": fixed_ip_address,
|
|
263
|
+
},
|
|
264
|
+
floating_ip_assign_params.FloatingIPAssignParams,
|
|
265
|
+
),
|
|
266
|
+
options=make_request_options(
|
|
267
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
268
|
+
),
|
|
269
|
+
cast_to=FloatingIP,
|
|
270
|
+
)
|
|
271
|
+
|
|
272
|
+
def get(
|
|
273
|
+
self,
|
|
274
|
+
floating_ip_id: str,
|
|
275
|
+
*,
|
|
276
|
+
project_id: int | None = None,
|
|
277
|
+
region_id: int | None = None,
|
|
278
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
279
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
280
|
+
extra_headers: Headers | None = None,
|
|
281
|
+
extra_query: Query | None = None,
|
|
282
|
+
extra_body: Body | None = None,
|
|
283
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
284
|
+
) -> FloatingIP:
|
|
285
|
+
"""
|
|
286
|
+
Get floating IP
|
|
287
|
+
|
|
288
|
+
Args:
|
|
289
|
+
extra_headers: Send extra headers
|
|
290
|
+
|
|
291
|
+
extra_query: Add additional query parameters to the request
|
|
292
|
+
|
|
293
|
+
extra_body: Add additional JSON properties to the request
|
|
294
|
+
|
|
295
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
296
|
+
"""
|
|
297
|
+
if project_id is None:
|
|
298
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
299
|
+
if region_id is None:
|
|
300
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
301
|
+
if not floating_ip_id:
|
|
302
|
+
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
303
|
+
return self._get(
|
|
304
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}",
|
|
305
|
+
options=make_request_options(
|
|
306
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
307
|
+
),
|
|
308
|
+
cast_to=FloatingIP,
|
|
309
|
+
)
|
|
310
|
+
|
|
311
|
+
def unassign(
|
|
312
|
+
self,
|
|
313
|
+
floating_ip_id: str,
|
|
314
|
+
*,
|
|
315
|
+
project_id: int | None = None,
|
|
316
|
+
region_id: int | None = None,
|
|
317
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
318
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
319
|
+
extra_headers: Headers | None = None,
|
|
320
|
+
extra_query: Query | None = None,
|
|
321
|
+
extra_body: Body | None = None,
|
|
322
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
323
|
+
) -> FloatingIP:
|
|
324
|
+
"""
|
|
325
|
+
Unassign floating IP from the instance
|
|
326
|
+
|
|
327
|
+
Args:
|
|
328
|
+
extra_headers: Send extra headers
|
|
329
|
+
|
|
330
|
+
extra_query: Add additional query parameters to the request
|
|
331
|
+
|
|
332
|
+
extra_body: Add additional JSON properties to the request
|
|
333
|
+
|
|
334
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
335
|
+
"""
|
|
336
|
+
if project_id is None:
|
|
337
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
338
|
+
if region_id is None:
|
|
339
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
340
|
+
if not floating_ip_id:
|
|
341
|
+
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
342
|
+
return self._post(
|
|
343
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/unassign",
|
|
344
|
+
options=make_request_options(
|
|
345
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
346
|
+
),
|
|
347
|
+
cast_to=FloatingIP,
|
|
348
|
+
)
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
352
|
+
@cached_property
|
|
353
|
+
def with_raw_response(self) -> AsyncFloatingIPsResourceWithRawResponse:
|
|
354
|
+
"""
|
|
355
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
356
|
+
the raw response object instead of the parsed content.
|
|
357
|
+
|
|
358
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
359
|
+
"""
|
|
360
|
+
return AsyncFloatingIPsResourceWithRawResponse(self)
|
|
361
|
+
|
|
362
|
+
@cached_property
|
|
363
|
+
def with_streaming_response(self) -> AsyncFloatingIPsResourceWithStreamingResponse:
|
|
364
|
+
"""
|
|
365
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
366
|
+
|
|
367
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
368
|
+
"""
|
|
369
|
+
return AsyncFloatingIPsResourceWithStreamingResponse(self)
|
|
370
|
+
|
|
371
|
+
async def create(
|
|
372
|
+
self,
|
|
373
|
+
*,
|
|
374
|
+
project_id: int | None = None,
|
|
375
|
+
region_id: int | None = None,
|
|
376
|
+
fixed_ip_address: Optional[str] | NotGiven = NOT_GIVEN,
|
|
377
|
+
port_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
378
|
+
tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
|
|
379
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
380
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
381
|
+
extra_headers: Headers | None = None,
|
|
382
|
+
extra_query: Query | None = None,
|
|
383
|
+
extra_body: Body | None = None,
|
|
384
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
385
|
+
) -> TaskIDList:
|
|
386
|
+
"""
|
|
387
|
+
Create floating IP
|
|
388
|
+
|
|
389
|
+
Args:
|
|
390
|
+
project_id: Project ID
|
|
391
|
+
|
|
392
|
+
region_id: Region ID
|
|
393
|
+
|
|
394
|
+
fixed_ip_address: If the port has multiple IP addresses, a specific one can be selected using this
|
|
395
|
+
field. If not specified, the first IP in the port's list will be used by
|
|
396
|
+
default.
|
|
397
|
+
|
|
398
|
+
port_id: If provided, the floating IP will be immediately attached to the specified port.
|
|
399
|
+
|
|
400
|
+
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
401
|
+
can be associated with a resource, enabling efficient filtering and grouping for
|
|
402
|
+
better organization and management. Some tags are read-only and cannot be
|
|
403
|
+
modified by the user. Tags are also integrated with cost reports, allowing cost
|
|
404
|
+
data to be filtered based on tag keys or values.
|
|
405
|
+
|
|
406
|
+
extra_headers: Send extra headers
|
|
407
|
+
|
|
408
|
+
extra_query: Add additional query parameters to the request
|
|
409
|
+
|
|
410
|
+
extra_body: Add additional JSON properties to the request
|
|
411
|
+
|
|
412
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
413
|
+
"""
|
|
414
|
+
if project_id is None:
|
|
415
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
416
|
+
if region_id is None:
|
|
417
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
418
|
+
return await self._post(
|
|
419
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}",
|
|
420
|
+
body=await async_maybe_transform(
|
|
421
|
+
{
|
|
422
|
+
"fixed_ip_address": fixed_ip_address,
|
|
423
|
+
"port_id": port_id,
|
|
424
|
+
"tags": tags,
|
|
425
|
+
},
|
|
426
|
+
floating_ip_create_params.FloatingIPCreateParams,
|
|
427
|
+
),
|
|
428
|
+
options=make_request_options(
|
|
429
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
430
|
+
),
|
|
431
|
+
cast_to=TaskIDList,
|
|
432
|
+
)
|
|
433
|
+
|
|
434
|
+
def list(
|
|
435
|
+
self,
|
|
436
|
+
*,
|
|
437
|
+
project_id: int | None = None,
|
|
438
|
+
region_id: int | None = None,
|
|
439
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
440
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
441
|
+
tag_key: List[str] | NotGiven = NOT_GIVEN,
|
|
442
|
+
tag_key_value: str | NotGiven = NOT_GIVEN,
|
|
443
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
444
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
445
|
+
extra_headers: Headers | None = None,
|
|
446
|
+
extra_query: Query | None = None,
|
|
447
|
+
extra_body: Body | None = None,
|
|
448
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
449
|
+
) -> AsyncPaginator[FloatingIPDetailed, AsyncOffsetPage[FloatingIPDetailed]]:
|
|
450
|
+
"""
|
|
451
|
+
List floating IPs
|
|
452
|
+
|
|
453
|
+
Args:
|
|
454
|
+
project_id: Project ID
|
|
455
|
+
|
|
456
|
+
region_id: Region ID
|
|
457
|
+
|
|
458
|
+
limit: Optional. Limit the number of returned items
|
|
459
|
+
|
|
460
|
+
offset: Optional. Offset value is used to exclude the first set of records from the
|
|
461
|
+
result
|
|
462
|
+
|
|
463
|
+
tag_key: Optional. Filter by tag keys. ?tag_key=key1&tag_key=key2
|
|
464
|
+
|
|
465
|
+
tag_key_value: Optional. Filter by tag key-value pairs. curl -G --data-urlencode
|
|
466
|
+
"tag_key_value={"key": "value"}" --url
|
|
467
|
+
"https://example.com/cloud/v1/resource/1/1"
|
|
468
|
+
|
|
469
|
+
extra_headers: Send extra headers
|
|
470
|
+
|
|
471
|
+
extra_query: Add additional query parameters to the request
|
|
472
|
+
|
|
473
|
+
extra_body: Add additional JSON properties to the request
|
|
474
|
+
|
|
475
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
476
|
+
"""
|
|
477
|
+
if project_id is None:
|
|
478
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
479
|
+
if region_id is None:
|
|
480
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
481
|
+
return self._get_api_list(
|
|
482
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}",
|
|
483
|
+
page=AsyncOffsetPage[FloatingIPDetailed],
|
|
484
|
+
options=make_request_options(
|
|
485
|
+
extra_headers=extra_headers,
|
|
486
|
+
extra_query=extra_query,
|
|
487
|
+
extra_body=extra_body,
|
|
488
|
+
timeout=timeout,
|
|
489
|
+
query=maybe_transform(
|
|
490
|
+
{
|
|
491
|
+
"limit": limit,
|
|
492
|
+
"offset": offset,
|
|
493
|
+
"tag_key": tag_key,
|
|
494
|
+
"tag_key_value": tag_key_value,
|
|
495
|
+
},
|
|
496
|
+
floating_ip_list_params.FloatingIPListParams,
|
|
497
|
+
),
|
|
498
|
+
),
|
|
499
|
+
model=FloatingIPDetailed,
|
|
500
|
+
)
|
|
501
|
+
|
|
502
|
+
async def delete(
|
|
503
|
+
self,
|
|
504
|
+
floating_ip_id: str,
|
|
505
|
+
*,
|
|
506
|
+
project_id: int | None = None,
|
|
507
|
+
region_id: int | None = None,
|
|
508
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
509
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
510
|
+
extra_headers: Headers | None = None,
|
|
511
|
+
extra_query: Query | None = None,
|
|
512
|
+
extra_body: Body | None = None,
|
|
513
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
514
|
+
) -> TaskIDList:
|
|
515
|
+
"""
|
|
516
|
+
Delete floating IP
|
|
517
|
+
|
|
518
|
+
Args:
|
|
519
|
+
extra_headers: Send extra headers
|
|
520
|
+
|
|
521
|
+
extra_query: Add additional query parameters to the request
|
|
522
|
+
|
|
523
|
+
extra_body: Add additional JSON properties to the request
|
|
524
|
+
|
|
525
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
526
|
+
"""
|
|
527
|
+
if project_id is None:
|
|
528
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
529
|
+
if region_id is None:
|
|
530
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
531
|
+
if not floating_ip_id:
|
|
532
|
+
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
533
|
+
return await self._delete(
|
|
534
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}",
|
|
535
|
+
options=make_request_options(
|
|
536
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
537
|
+
),
|
|
538
|
+
cast_to=TaskIDList,
|
|
539
|
+
)
|
|
540
|
+
|
|
541
|
+
async def assign(
|
|
542
|
+
self,
|
|
543
|
+
floating_ip_id: str,
|
|
544
|
+
*,
|
|
545
|
+
project_id: int | None = None,
|
|
546
|
+
region_id: int | None = None,
|
|
547
|
+
port_id: str,
|
|
548
|
+
fixed_ip_address: Optional[str] | NotGiven = NOT_GIVEN,
|
|
549
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
550
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
551
|
+
extra_headers: Headers | None = None,
|
|
552
|
+
extra_query: Query | None = None,
|
|
553
|
+
extra_body: Body | None = None,
|
|
554
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
555
|
+
) -> FloatingIP:
|
|
556
|
+
"""
|
|
557
|
+
Assign floating IP to instance or loadbalancer
|
|
558
|
+
|
|
559
|
+
Args:
|
|
560
|
+
port_id: Port ID
|
|
561
|
+
|
|
562
|
+
fixed_ip_address: Fixed IP address
|
|
563
|
+
|
|
564
|
+
extra_headers: Send extra headers
|
|
565
|
+
|
|
566
|
+
extra_query: Add additional query parameters to the request
|
|
567
|
+
|
|
568
|
+
extra_body: Add additional JSON properties to the request
|
|
569
|
+
|
|
570
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
571
|
+
"""
|
|
572
|
+
if project_id is None:
|
|
573
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
574
|
+
if region_id is None:
|
|
575
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
576
|
+
if not floating_ip_id:
|
|
577
|
+
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
578
|
+
return await self._post(
|
|
579
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/assign",
|
|
580
|
+
body=await async_maybe_transform(
|
|
581
|
+
{
|
|
582
|
+
"port_id": port_id,
|
|
583
|
+
"fixed_ip_address": fixed_ip_address,
|
|
584
|
+
},
|
|
585
|
+
floating_ip_assign_params.FloatingIPAssignParams,
|
|
586
|
+
),
|
|
587
|
+
options=make_request_options(
|
|
588
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
589
|
+
),
|
|
590
|
+
cast_to=FloatingIP,
|
|
591
|
+
)
|
|
592
|
+
|
|
593
|
+
async def get(
|
|
594
|
+
self,
|
|
595
|
+
floating_ip_id: str,
|
|
596
|
+
*,
|
|
597
|
+
project_id: int | None = None,
|
|
598
|
+
region_id: int | None = None,
|
|
599
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
600
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
601
|
+
extra_headers: Headers | None = None,
|
|
602
|
+
extra_query: Query | None = None,
|
|
603
|
+
extra_body: Body | None = None,
|
|
604
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
605
|
+
) -> FloatingIP:
|
|
606
|
+
"""
|
|
607
|
+
Get floating IP
|
|
608
|
+
|
|
609
|
+
Args:
|
|
610
|
+
extra_headers: Send extra headers
|
|
611
|
+
|
|
612
|
+
extra_query: Add additional query parameters to the request
|
|
613
|
+
|
|
614
|
+
extra_body: Add additional JSON properties to the request
|
|
615
|
+
|
|
616
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
617
|
+
"""
|
|
618
|
+
if project_id is None:
|
|
619
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
620
|
+
if region_id is None:
|
|
621
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
622
|
+
if not floating_ip_id:
|
|
623
|
+
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
624
|
+
return await self._get(
|
|
625
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}",
|
|
626
|
+
options=make_request_options(
|
|
627
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
628
|
+
),
|
|
629
|
+
cast_to=FloatingIP,
|
|
630
|
+
)
|
|
631
|
+
|
|
632
|
+
async def unassign(
|
|
633
|
+
self,
|
|
634
|
+
floating_ip_id: str,
|
|
635
|
+
*,
|
|
636
|
+
project_id: int | None = None,
|
|
637
|
+
region_id: int | None = None,
|
|
638
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
639
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
640
|
+
extra_headers: Headers | None = None,
|
|
641
|
+
extra_query: Query | None = None,
|
|
642
|
+
extra_body: Body | None = None,
|
|
643
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
644
|
+
) -> FloatingIP:
|
|
645
|
+
"""
|
|
646
|
+
Unassign floating IP from the instance
|
|
647
|
+
|
|
648
|
+
Args:
|
|
649
|
+
extra_headers: Send extra headers
|
|
650
|
+
|
|
651
|
+
extra_query: Add additional query parameters to the request
|
|
652
|
+
|
|
653
|
+
extra_body: Add additional JSON properties to the request
|
|
654
|
+
|
|
655
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
656
|
+
"""
|
|
657
|
+
if project_id is None:
|
|
658
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
659
|
+
if region_id is None:
|
|
660
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
661
|
+
if not floating_ip_id:
|
|
662
|
+
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
|
|
663
|
+
return await self._post(
|
|
664
|
+
f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}/unassign",
|
|
665
|
+
options=make_request_options(
|
|
666
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
667
|
+
),
|
|
668
|
+
cast_to=FloatingIP,
|
|
669
|
+
)
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
class FloatingIPsResourceWithRawResponse:
|
|
673
|
+
def __init__(self, floating_ips: FloatingIPsResource) -> None:
|
|
674
|
+
self._floating_ips = floating_ips
|
|
675
|
+
|
|
676
|
+
self.create = to_raw_response_wrapper(
|
|
677
|
+
floating_ips.create,
|
|
678
|
+
)
|
|
679
|
+
self.list = to_raw_response_wrapper(
|
|
680
|
+
floating_ips.list,
|
|
681
|
+
)
|
|
682
|
+
self.delete = to_raw_response_wrapper(
|
|
683
|
+
floating_ips.delete,
|
|
684
|
+
)
|
|
685
|
+
self.assign = to_raw_response_wrapper(
|
|
686
|
+
floating_ips.assign,
|
|
687
|
+
)
|
|
688
|
+
self.get = to_raw_response_wrapper(
|
|
689
|
+
floating_ips.get,
|
|
690
|
+
)
|
|
691
|
+
self.unassign = to_raw_response_wrapper(
|
|
692
|
+
floating_ips.unassign,
|
|
693
|
+
)
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
class AsyncFloatingIPsResourceWithRawResponse:
|
|
697
|
+
def __init__(self, floating_ips: AsyncFloatingIPsResource) -> None:
|
|
698
|
+
self._floating_ips = floating_ips
|
|
699
|
+
|
|
700
|
+
self.create = async_to_raw_response_wrapper(
|
|
701
|
+
floating_ips.create,
|
|
702
|
+
)
|
|
703
|
+
self.list = async_to_raw_response_wrapper(
|
|
704
|
+
floating_ips.list,
|
|
705
|
+
)
|
|
706
|
+
self.delete = async_to_raw_response_wrapper(
|
|
707
|
+
floating_ips.delete,
|
|
708
|
+
)
|
|
709
|
+
self.assign = async_to_raw_response_wrapper(
|
|
710
|
+
floating_ips.assign,
|
|
711
|
+
)
|
|
712
|
+
self.get = async_to_raw_response_wrapper(
|
|
713
|
+
floating_ips.get,
|
|
714
|
+
)
|
|
715
|
+
self.unassign = async_to_raw_response_wrapper(
|
|
716
|
+
floating_ips.unassign,
|
|
717
|
+
)
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
class FloatingIPsResourceWithStreamingResponse:
|
|
721
|
+
def __init__(self, floating_ips: FloatingIPsResource) -> None:
|
|
722
|
+
self._floating_ips = floating_ips
|
|
723
|
+
|
|
724
|
+
self.create = to_streamed_response_wrapper(
|
|
725
|
+
floating_ips.create,
|
|
726
|
+
)
|
|
727
|
+
self.list = to_streamed_response_wrapper(
|
|
728
|
+
floating_ips.list,
|
|
729
|
+
)
|
|
730
|
+
self.delete = to_streamed_response_wrapper(
|
|
731
|
+
floating_ips.delete,
|
|
732
|
+
)
|
|
733
|
+
self.assign = to_streamed_response_wrapper(
|
|
734
|
+
floating_ips.assign,
|
|
735
|
+
)
|
|
736
|
+
self.get = to_streamed_response_wrapper(
|
|
737
|
+
floating_ips.get,
|
|
738
|
+
)
|
|
739
|
+
self.unassign = to_streamed_response_wrapper(
|
|
740
|
+
floating_ips.unassign,
|
|
741
|
+
)
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
class AsyncFloatingIPsResourceWithStreamingResponse:
|
|
745
|
+
def __init__(self, floating_ips: AsyncFloatingIPsResource) -> None:
|
|
746
|
+
self._floating_ips = floating_ips
|
|
747
|
+
|
|
748
|
+
self.create = async_to_streamed_response_wrapper(
|
|
749
|
+
floating_ips.create,
|
|
750
|
+
)
|
|
751
|
+
self.list = async_to_streamed_response_wrapper(
|
|
752
|
+
floating_ips.list,
|
|
753
|
+
)
|
|
754
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
755
|
+
floating_ips.delete,
|
|
756
|
+
)
|
|
757
|
+
self.assign = async_to_streamed_response_wrapper(
|
|
758
|
+
floating_ips.assign,
|
|
759
|
+
)
|
|
760
|
+
self.get = async_to_streamed_response_wrapper(
|
|
761
|
+
floating_ips.get,
|
|
762
|
+
)
|
|
763
|
+
self.unassign = async_to_streamed_response_wrapper(
|
|
764
|
+
floating_ips.unassign,
|
|
765
|
+
)
|