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,865 @@
|
|
|
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, Iterable, Optional
|
|
6
|
+
from typing_extensions import Literal
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
|
11
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
12
|
+
from ...._compat import cached_property
|
|
13
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
14
|
+
from ...._response import (
|
|
15
|
+
to_raw_response_wrapper,
|
|
16
|
+
to_streamed_response_wrapper,
|
|
17
|
+
async_to_raw_response_wrapper,
|
|
18
|
+
async_to_streamed_response_wrapper,
|
|
19
|
+
)
|
|
20
|
+
from ....pagination import SyncOffsetPage, AsyncOffsetPage
|
|
21
|
+
from ....types.cloud import IPVersion
|
|
22
|
+
from ...._base_client import AsyncPaginator, make_request_options
|
|
23
|
+
from ....types.cloud.subnet import Subnet
|
|
24
|
+
from ....types.cloud.networks import subnet_list_params, subnet_create_params, subnet_update_params
|
|
25
|
+
from ....types.cloud.ip_version import IPVersion
|
|
26
|
+
from ....types.cloud.task_id_list import TaskIDList
|
|
27
|
+
from ....types.cloud.tag_update_map_param import TagUpdateMapParam
|
|
28
|
+
|
|
29
|
+
__all__ = ["SubnetsResource", "AsyncSubnetsResource"]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class SubnetsResource(SyncAPIResource):
|
|
33
|
+
@cached_property
|
|
34
|
+
def with_raw_response(self) -> SubnetsResourceWithRawResponse:
|
|
35
|
+
"""
|
|
36
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
37
|
+
the raw response object instead of the parsed content.
|
|
38
|
+
|
|
39
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
40
|
+
"""
|
|
41
|
+
return SubnetsResourceWithRawResponse(self)
|
|
42
|
+
|
|
43
|
+
@cached_property
|
|
44
|
+
def with_streaming_response(self) -> SubnetsResourceWithStreamingResponse:
|
|
45
|
+
"""
|
|
46
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
47
|
+
|
|
48
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
49
|
+
"""
|
|
50
|
+
return SubnetsResourceWithStreamingResponse(self)
|
|
51
|
+
|
|
52
|
+
def create(
|
|
53
|
+
self,
|
|
54
|
+
*,
|
|
55
|
+
project_id: int | None = None,
|
|
56
|
+
region_id: int | None = None,
|
|
57
|
+
cidr: str,
|
|
58
|
+
name: str,
|
|
59
|
+
network_id: str,
|
|
60
|
+
connect_to_network_router: bool | NotGiven = NOT_GIVEN,
|
|
61
|
+
dns_nameservers: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
62
|
+
enable_dhcp: bool | NotGiven = NOT_GIVEN,
|
|
63
|
+
gateway_ip: Optional[str] | NotGiven = NOT_GIVEN,
|
|
64
|
+
host_routes: Optional[Iterable[subnet_create_params.HostRoute]] | NotGiven = NOT_GIVEN,
|
|
65
|
+
ip_version: IPVersion | NotGiven = NOT_GIVEN,
|
|
66
|
+
router_id_to_connect: Optional[str] | NotGiven = NOT_GIVEN,
|
|
67
|
+
tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
|
|
68
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
69
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
70
|
+
extra_headers: Headers | None = None,
|
|
71
|
+
extra_query: Query | None = None,
|
|
72
|
+
extra_body: Body | None = None,
|
|
73
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
74
|
+
) -> TaskIDList:
|
|
75
|
+
"""
|
|
76
|
+
Create subnet
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
project_id: Project ID
|
|
80
|
+
|
|
81
|
+
region_id: Region ID
|
|
82
|
+
|
|
83
|
+
cidr: CIDR
|
|
84
|
+
|
|
85
|
+
name: Subnet name
|
|
86
|
+
|
|
87
|
+
network_id: Network ID
|
|
88
|
+
|
|
89
|
+
connect_to_network_router: True if the network's router should get a gateway in this subnet. Must be
|
|
90
|
+
explicitly 'false' when gateway_ip is null.
|
|
91
|
+
|
|
92
|
+
dns_nameservers: List IP addresses of DNS servers to advertise via DHCP.
|
|
93
|
+
|
|
94
|
+
enable_dhcp: True if DHCP should be enabled
|
|
95
|
+
|
|
96
|
+
gateway_ip: Default GW IPv4 address to advertise in DHCP routes in this subnet. Omit this
|
|
97
|
+
field to let the cloud backend allocate it automatically. Set to null if no
|
|
98
|
+
gateway must be advertised by this subnet's DHCP (useful when attaching
|
|
99
|
+
instances to multiple subnets in order to prevent default route conflicts).
|
|
100
|
+
|
|
101
|
+
host_routes: List of custom static routes to advertise via DHCP.
|
|
102
|
+
|
|
103
|
+
ip_version: IP version
|
|
104
|
+
|
|
105
|
+
router_id_to_connect: ID of the router to connect to. Requires `connect_to_network_router` set to
|
|
106
|
+
true. If not specified, attempts to find a router created during network
|
|
107
|
+
creation.
|
|
108
|
+
|
|
109
|
+
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
110
|
+
can be associated with a resource, enabling efficient filtering and grouping for
|
|
111
|
+
better organization and management. Some tags are read-only and cannot be
|
|
112
|
+
modified by the user. Tags are also integrated with cost reports, allowing cost
|
|
113
|
+
data to be filtered based on tag keys or values.
|
|
114
|
+
|
|
115
|
+
extra_headers: Send extra headers
|
|
116
|
+
|
|
117
|
+
extra_query: Add additional query parameters to the request
|
|
118
|
+
|
|
119
|
+
extra_body: Add additional JSON properties to the request
|
|
120
|
+
|
|
121
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
122
|
+
"""
|
|
123
|
+
if project_id is None:
|
|
124
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
125
|
+
if region_id is None:
|
|
126
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
127
|
+
return self._post(
|
|
128
|
+
f"/cloud/v1/subnets/{project_id}/{region_id}",
|
|
129
|
+
body=maybe_transform(
|
|
130
|
+
{
|
|
131
|
+
"cidr": cidr,
|
|
132
|
+
"name": name,
|
|
133
|
+
"network_id": network_id,
|
|
134
|
+
"connect_to_network_router": connect_to_network_router,
|
|
135
|
+
"dns_nameservers": dns_nameservers,
|
|
136
|
+
"enable_dhcp": enable_dhcp,
|
|
137
|
+
"gateway_ip": gateway_ip,
|
|
138
|
+
"host_routes": host_routes,
|
|
139
|
+
"ip_version": ip_version,
|
|
140
|
+
"router_id_to_connect": router_id_to_connect,
|
|
141
|
+
"tags": tags,
|
|
142
|
+
},
|
|
143
|
+
subnet_create_params.SubnetCreateParams,
|
|
144
|
+
),
|
|
145
|
+
options=make_request_options(
|
|
146
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
147
|
+
),
|
|
148
|
+
cast_to=TaskIDList,
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
def update(
|
|
152
|
+
self,
|
|
153
|
+
subnet_id: str,
|
|
154
|
+
*,
|
|
155
|
+
project_id: int | None = None,
|
|
156
|
+
region_id: int | None = None,
|
|
157
|
+
dns_nameservers: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
158
|
+
enable_dhcp: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
159
|
+
gateway_ip: Optional[str] | NotGiven = NOT_GIVEN,
|
|
160
|
+
host_routes: Optional[Iterable[subnet_update_params.HostRoute]] | NotGiven = NOT_GIVEN,
|
|
161
|
+
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
162
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
163
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
164
|
+
extra_headers: Headers | None = None,
|
|
165
|
+
extra_query: Query | None = None,
|
|
166
|
+
extra_body: Body | None = None,
|
|
167
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
168
|
+
) -> Subnet:
|
|
169
|
+
"""
|
|
170
|
+
Change subnet properties
|
|
171
|
+
|
|
172
|
+
Args:
|
|
173
|
+
project_id: Project ID
|
|
174
|
+
|
|
175
|
+
region_id: Region ID
|
|
176
|
+
|
|
177
|
+
subnet_id: Subnet ID
|
|
178
|
+
|
|
179
|
+
dns_nameservers: List IP addresses of DNS servers to advertise via DHCP.
|
|
180
|
+
|
|
181
|
+
enable_dhcp: True if DHCP should be enabled
|
|
182
|
+
|
|
183
|
+
gateway_ip: Default GW IPv4 address to advertise in DHCP routes in this subnet. Omit this
|
|
184
|
+
field to let the cloud backend allocate it automatically. Set to null if no
|
|
185
|
+
gateway must be advertised by this subnet's DHCP (useful when attaching
|
|
186
|
+
instances to multiple subnets in order to prevent default route conflicts).
|
|
187
|
+
|
|
188
|
+
host_routes: List of custom static routes to advertise via DHCP.
|
|
189
|
+
|
|
190
|
+
name: Name
|
|
191
|
+
|
|
192
|
+
extra_headers: Send extra headers
|
|
193
|
+
|
|
194
|
+
extra_query: Add additional query parameters to the request
|
|
195
|
+
|
|
196
|
+
extra_body: Add additional JSON properties to the request
|
|
197
|
+
|
|
198
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
199
|
+
"""
|
|
200
|
+
if project_id is None:
|
|
201
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
202
|
+
if region_id is None:
|
|
203
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
204
|
+
if not subnet_id:
|
|
205
|
+
raise ValueError(f"Expected a non-empty value for `subnet_id` but received {subnet_id!r}")
|
|
206
|
+
return self._patch(
|
|
207
|
+
f"/cloud/v1/subnets/{project_id}/{region_id}/{subnet_id}",
|
|
208
|
+
body=maybe_transform(
|
|
209
|
+
{
|
|
210
|
+
"dns_nameservers": dns_nameservers,
|
|
211
|
+
"enable_dhcp": enable_dhcp,
|
|
212
|
+
"gateway_ip": gateway_ip,
|
|
213
|
+
"host_routes": host_routes,
|
|
214
|
+
"name": name,
|
|
215
|
+
},
|
|
216
|
+
subnet_update_params.SubnetUpdateParams,
|
|
217
|
+
),
|
|
218
|
+
options=make_request_options(
|
|
219
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
220
|
+
),
|
|
221
|
+
cast_to=Subnet,
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
def list(
|
|
225
|
+
self,
|
|
226
|
+
*,
|
|
227
|
+
project_id: int | None = None,
|
|
228
|
+
region_id: int | None = None,
|
|
229
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
230
|
+
network_id: str | NotGiven = NOT_GIVEN,
|
|
231
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
232
|
+
order_by: Literal[
|
|
233
|
+
"available_ips.asc",
|
|
234
|
+
"available_ips.desc",
|
|
235
|
+
"cidr.asc",
|
|
236
|
+
"cidr.desc",
|
|
237
|
+
"created_at.asc",
|
|
238
|
+
"created_at.desc",
|
|
239
|
+
"name.asc",
|
|
240
|
+
"name.desc",
|
|
241
|
+
"total_ips.asc",
|
|
242
|
+
"total_ips.desc",
|
|
243
|
+
"updated_at.asc",
|
|
244
|
+
"updated_at.desc",
|
|
245
|
+
]
|
|
246
|
+
| NotGiven = NOT_GIVEN,
|
|
247
|
+
tag_key: List[str] | NotGiven = NOT_GIVEN,
|
|
248
|
+
tag_key_value: str | NotGiven = NOT_GIVEN,
|
|
249
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
250
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
251
|
+
extra_headers: Headers | None = None,
|
|
252
|
+
extra_query: Query | None = None,
|
|
253
|
+
extra_body: Body | None = None,
|
|
254
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
255
|
+
) -> SyncOffsetPage[Subnet]:
|
|
256
|
+
"""
|
|
257
|
+
List subnets
|
|
258
|
+
|
|
259
|
+
Args:
|
|
260
|
+
project_id: Project ID
|
|
261
|
+
|
|
262
|
+
region_id: Region ID
|
|
263
|
+
|
|
264
|
+
limit: Optional. Limit the number of returned items
|
|
265
|
+
|
|
266
|
+
network_id: Only list subnets of this network
|
|
267
|
+
|
|
268
|
+
offset: Optional. Offset value is used to exclude the first set of records from the
|
|
269
|
+
result
|
|
270
|
+
|
|
271
|
+
order_by: Ordering subnets list result by `name`, `created_at`, `updated_at`,
|
|
272
|
+
`available_ips`, `total_ips`, and `cidr` (default) fields of the subnet and
|
|
273
|
+
directions (`name.asc`).
|
|
274
|
+
|
|
275
|
+
tag_key: Optional. Filter by tag keys. ?tag_key=key1&tag_key=key2
|
|
276
|
+
|
|
277
|
+
tag_key_value: Optional. Filter by tag key-value pairs. curl -G --data-urlencode
|
|
278
|
+
"tag_key_value={"key": "value"}" --url
|
|
279
|
+
"https://example.com/cloud/v1/resource/1/1"
|
|
280
|
+
|
|
281
|
+
extra_headers: Send extra headers
|
|
282
|
+
|
|
283
|
+
extra_query: Add additional query parameters to the request
|
|
284
|
+
|
|
285
|
+
extra_body: Add additional JSON properties to the request
|
|
286
|
+
|
|
287
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
288
|
+
"""
|
|
289
|
+
if project_id is None:
|
|
290
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
291
|
+
if region_id is None:
|
|
292
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
293
|
+
return self._get_api_list(
|
|
294
|
+
f"/cloud/v1/subnets/{project_id}/{region_id}",
|
|
295
|
+
page=SyncOffsetPage[Subnet],
|
|
296
|
+
options=make_request_options(
|
|
297
|
+
extra_headers=extra_headers,
|
|
298
|
+
extra_query=extra_query,
|
|
299
|
+
extra_body=extra_body,
|
|
300
|
+
timeout=timeout,
|
|
301
|
+
query=maybe_transform(
|
|
302
|
+
{
|
|
303
|
+
"limit": limit,
|
|
304
|
+
"network_id": network_id,
|
|
305
|
+
"offset": offset,
|
|
306
|
+
"order_by": order_by,
|
|
307
|
+
"tag_key": tag_key,
|
|
308
|
+
"tag_key_value": tag_key_value,
|
|
309
|
+
},
|
|
310
|
+
subnet_list_params.SubnetListParams,
|
|
311
|
+
),
|
|
312
|
+
),
|
|
313
|
+
model=Subnet,
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
def delete(
|
|
317
|
+
self,
|
|
318
|
+
subnet_id: str,
|
|
319
|
+
*,
|
|
320
|
+
project_id: int | None = None,
|
|
321
|
+
region_id: int | None = None,
|
|
322
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
323
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
324
|
+
extra_headers: Headers | None = None,
|
|
325
|
+
extra_query: Query | None = None,
|
|
326
|
+
extra_body: Body | None = None,
|
|
327
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
328
|
+
) -> None:
|
|
329
|
+
"""
|
|
330
|
+
Delete subnet
|
|
331
|
+
|
|
332
|
+
Args:
|
|
333
|
+
project_id: Project ID
|
|
334
|
+
|
|
335
|
+
region_id: Region ID
|
|
336
|
+
|
|
337
|
+
subnet_id: Subnet ID
|
|
338
|
+
|
|
339
|
+
extra_headers: Send extra headers
|
|
340
|
+
|
|
341
|
+
extra_query: Add additional query parameters to the request
|
|
342
|
+
|
|
343
|
+
extra_body: Add additional JSON properties to the request
|
|
344
|
+
|
|
345
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
346
|
+
"""
|
|
347
|
+
if project_id is None:
|
|
348
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
349
|
+
if region_id is None:
|
|
350
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
351
|
+
if not subnet_id:
|
|
352
|
+
raise ValueError(f"Expected a non-empty value for `subnet_id` but received {subnet_id!r}")
|
|
353
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
354
|
+
return self._delete(
|
|
355
|
+
f"/cloud/v1/subnets/{project_id}/{region_id}/{subnet_id}",
|
|
356
|
+
options=make_request_options(
|
|
357
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
358
|
+
),
|
|
359
|
+
cast_to=NoneType,
|
|
360
|
+
)
|
|
361
|
+
|
|
362
|
+
def get(
|
|
363
|
+
self,
|
|
364
|
+
subnet_id: str,
|
|
365
|
+
*,
|
|
366
|
+
project_id: int | None = None,
|
|
367
|
+
region_id: int | None = None,
|
|
368
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
369
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
370
|
+
extra_headers: Headers | None = None,
|
|
371
|
+
extra_query: Query | None = None,
|
|
372
|
+
extra_body: Body | None = None,
|
|
373
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
374
|
+
) -> Subnet:
|
|
375
|
+
"""
|
|
376
|
+
Get subnet
|
|
377
|
+
|
|
378
|
+
Args:
|
|
379
|
+
project_id: Project ID
|
|
380
|
+
|
|
381
|
+
region_id: Region ID
|
|
382
|
+
|
|
383
|
+
subnet_id: Subnet ID
|
|
384
|
+
|
|
385
|
+
extra_headers: Send extra headers
|
|
386
|
+
|
|
387
|
+
extra_query: Add additional query parameters to the request
|
|
388
|
+
|
|
389
|
+
extra_body: Add additional JSON properties to the request
|
|
390
|
+
|
|
391
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
392
|
+
"""
|
|
393
|
+
if project_id is None:
|
|
394
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
395
|
+
if region_id is None:
|
|
396
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
397
|
+
if not subnet_id:
|
|
398
|
+
raise ValueError(f"Expected a non-empty value for `subnet_id` but received {subnet_id!r}")
|
|
399
|
+
return self._get(
|
|
400
|
+
f"/cloud/v1/subnets/{project_id}/{region_id}/{subnet_id}",
|
|
401
|
+
options=make_request_options(
|
|
402
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
403
|
+
),
|
|
404
|
+
cast_to=Subnet,
|
|
405
|
+
)
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
class AsyncSubnetsResource(AsyncAPIResource):
|
|
409
|
+
@cached_property
|
|
410
|
+
def with_raw_response(self) -> AsyncSubnetsResourceWithRawResponse:
|
|
411
|
+
"""
|
|
412
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
413
|
+
the raw response object instead of the parsed content.
|
|
414
|
+
|
|
415
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
416
|
+
"""
|
|
417
|
+
return AsyncSubnetsResourceWithRawResponse(self)
|
|
418
|
+
|
|
419
|
+
@cached_property
|
|
420
|
+
def with_streaming_response(self) -> AsyncSubnetsResourceWithStreamingResponse:
|
|
421
|
+
"""
|
|
422
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
423
|
+
|
|
424
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
425
|
+
"""
|
|
426
|
+
return AsyncSubnetsResourceWithStreamingResponse(self)
|
|
427
|
+
|
|
428
|
+
async def create(
|
|
429
|
+
self,
|
|
430
|
+
*,
|
|
431
|
+
project_id: int | None = None,
|
|
432
|
+
region_id: int | None = None,
|
|
433
|
+
cidr: str,
|
|
434
|
+
name: str,
|
|
435
|
+
network_id: str,
|
|
436
|
+
connect_to_network_router: bool | NotGiven = NOT_GIVEN,
|
|
437
|
+
dns_nameservers: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
438
|
+
enable_dhcp: bool | NotGiven = NOT_GIVEN,
|
|
439
|
+
gateway_ip: Optional[str] | NotGiven = NOT_GIVEN,
|
|
440
|
+
host_routes: Optional[Iterable[subnet_create_params.HostRoute]] | NotGiven = NOT_GIVEN,
|
|
441
|
+
ip_version: IPVersion | NotGiven = NOT_GIVEN,
|
|
442
|
+
router_id_to_connect: Optional[str] | NotGiven = NOT_GIVEN,
|
|
443
|
+
tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
|
|
444
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
445
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
446
|
+
extra_headers: Headers | None = None,
|
|
447
|
+
extra_query: Query | None = None,
|
|
448
|
+
extra_body: Body | None = None,
|
|
449
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
450
|
+
) -> TaskIDList:
|
|
451
|
+
"""
|
|
452
|
+
Create subnet
|
|
453
|
+
|
|
454
|
+
Args:
|
|
455
|
+
project_id: Project ID
|
|
456
|
+
|
|
457
|
+
region_id: Region ID
|
|
458
|
+
|
|
459
|
+
cidr: CIDR
|
|
460
|
+
|
|
461
|
+
name: Subnet name
|
|
462
|
+
|
|
463
|
+
network_id: Network ID
|
|
464
|
+
|
|
465
|
+
connect_to_network_router: True if the network's router should get a gateway in this subnet. Must be
|
|
466
|
+
explicitly 'false' when gateway_ip is null.
|
|
467
|
+
|
|
468
|
+
dns_nameservers: List IP addresses of DNS servers to advertise via DHCP.
|
|
469
|
+
|
|
470
|
+
enable_dhcp: True if DHCP should be enabled
|
|
471
|
+
|
|
472
|
+
gateway_ip: Default GW IPv4 address to advertise in DHCP routes in this subnet. Omit this
|
|
473
|
+
field to let the cloud backend allocate it automatically. Set to null if no
|
|
474
|
+
gateway must be advertised by this subnet's DHCP (useful when attaching
|
|
475
|
+
instances to multiple subnets in order to prevent default route conflicts).
|
|
476
|
+
|
|
477
|
+
host_routes: List of custom static routes to advertise via DHCP.
|
|
478
|
+
|
|
479
|
+
ip_version: IP version
|
|
480
|
+
|
|
481
|
+
router_id_to_connect: ID of the router to connect to. Requires `connect_to_network_router` set to
|
|
482
|
+
true. If not specified, attempts to find a router created during network
|
|
483
|
+
creation.
|
|
484
|
+
|
|
485
|
+
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
486
|
+
can be associated with a resource, enabling efficient filtering and grouping for
|
|
487
|
+
better organization and management. Some tags are read-only and cannot be
|
|
488
|
+
modified by the user. Tags are also integrated with cost reports, allowing cost
|
|
489
|
+
data to be filtered based on tag keys or values.
|
|
490
|
+
|
|
491
|
+
extra_headers: Send extra headers
|
|
492
|
+
|
|
493
|
+
extra_query: Add additional query parameters to the request
|
|
494
|
+
|
|
495
|
+
extra_body: Add additional JSON properties to the request
|
|
496
|
+
|
|
497
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
498
|
+
"""
|
|
499
|
+
if project_id is None:
|
|
500
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
501
|
+
if region_id is None:
|
|
502
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
503
|
+
return await self._post(
|
|
504
|
+
f"/cloud/v1/subnets/{project_id}/{region_id}",
|
|
505
|
+
body=await async_maybe_transform(
|
|
506
|
+
{
|
|
507
|
+
"cidr": cidr,
|
|
508
|
+
"name": name,
|
|
509
|
+
"network_id": network_id,
|
|
510
|
+
"connect_to_network_router": connect_to_network_router,
|
|
511
|
+
"dns_nameservers": dns_nameservers,
|
|
512
|
+
"enable_dhcp": enable_dhcp,
|
|
513
|
+
"gateway_ip": gateway_ip,
|
|
514
|
+
"host_routes": host_routes,
|
|
515
|
+
"ip_version": ip_version,
|
|
516
|
+
"router_id_to_connect": router_id_to_connect,
|
|
517
|
+
"tags": tags,
|
|
518
|
+
},
|
|
519
|
+
subnet_create_params.SubnetCreateParams,
|
|
520
|
+
),
|
|
521
|
+
options=make_request_options(
|
|
522
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
523
|
+
),
|
|
524
|
+
cast_to=TaskIDList,
|
|
525
|
+
)
|
|
526
|
+
|
|
527
|
+
async def update(
|
|
528
|
+
self,
|
|
529
|
+
subnet_id: str,
|
|
530
|
+
*,
|
|
531
|
+
project_id: int | None = None,
|
|
532
|
+
region_id: int | None = None,
|
|
533
|
+
dns_nameservers: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
534
|
+
enable_dhcp: Optional[bool] | NotGiven = NOT_GIVEN,
|
|
535
|
+
gateway_ip: Optional[str] | NotGiven = NOT_GIVEN,
|
|
536
|
+
host_routes: Optional[Iterable[subnet_update_params.HostRoute]] | NotGiven = NOT_GIVEN,
|
|
537
|
+
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
538
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
539
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
540
|
+
extra_headers: Headers | None = None,
|
|
541
|
+
extra_query: Query | None = None,
|
|
542
|
+
extra_body: Body | None = None,
|
|
543
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
544
|
+
) -> Subnet:
|
|
545
|
+
"""
|
|
546
|
+
Change subnet properties
|
|
547
|
+
|
|
548
|
+
Args:
|
|
549
|
+
project_id: Project ID
|
|
550
|
+
|
|
551
|
+
region_id: Region ID
|
|
552
|
+
|
|
553
|
+
subnet_id: Subnet ID
|
|
554
|
+
|
|
555
|
+
dns_nameservers: List IP addresses of DNS servers to advertise via DHCP.
|
|
556
|
+
|
|
557
|
+
enable_dhcp: True if DHCP should be enabled
|
|
558
|
+
|
|
559
|
+
gateway_ip: Default GW IPv4 address to advertise in DHCP routes in this subnet. Omit this
|
|
560
|
+
field to let the cloud backend allocate it automatically. Set to null if no
|
|
561
|
+
gateway must be advertised by this subnet's DHCP (useful when attaching
|
|
562
|
+
instances to multiple subnets in order to prevent default route conflicts).
|
|
563
|
+
|
|
564
|
+
host_routes: List of custom static routes to advertise via DHCP.
|
|
565
|
+
|
|
566
|
+
name: Name
|
|
567
|
+
|
|
568
|
+
extra_headers: Send extra headers
|
|
569
|
+
|
|
570
|
+
extra_query: Add additional query parameters to the request
|
|
571
|
+
|
|
572
|
+
extra_body: Add additional JSON properties to the request
|
|
573
|
+
|
|
574
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
575
|
+
"""
|
|
576
|
+
if project_id is None:
|
|
577
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
578
|
+
if region_id is None:
|
|
579
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
580
|
+
if not subnet_id:
|
|
581
|
+
raise ValueError(f"Expected a non-empty value for `subnet_id` but received {subnet_id!r}")
|
|
582
|
+
return await self._patch(
|
|
583
|
+
f"/cloud/v1/subnets/{project_id}/{region_id}/{subnet_id}",
|
|
584
|
+
body=await async_maybe_transform(
|
|
585
|
+
{
|
|
586
|
+
"dns_nameservers": dns_nameservers,
|
|
587
|
+
"enable_dhcp": enable_dhcp,
|
|
588
|
+
"gateway_ip": gateway_ip,
|
|
589
|
+
"host_routes": host_routes,
|
|
590
|
+
"name": name,
|
|
591
|
+
},
|
|
592
|
+
subnet_update_params.SubnetUpdateParams,
|
|
593
|
+
),
|
|
594
|
+
options=make_request_options(
|
|
595
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
596
|
+
),
|
|
597
|
+
cast_to=Subnet,
|
|
598
|
+
)
|
|
599
|
+
|
|
600
|
+
def list(
|
|
601
|
+
self,
|
|
602
|
+
*,
|
|
603
|
+
project_id: int | None = None,
|
|
604
|
+
region_id: int | None = None,
|
|
605
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
606
|
+
network_id: str | NotGiven = NOT_GIVEN,
|
|
607
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
608
|
+
order_by: Literal[
|
|
609
|
+
"available_ips.asc",
|
|
610
|
+
"available_ips.desc",
|
|
611
|
+
"cidr.asc",
|
|
612
|
+
"cidr.desc",
|
|
613
|
+
"created_at.asc",
|
|
614
|
+
"created_at.desc",
|
|
615
|
+
"name.asc",
|
|
616
|
+
"name.desc",
|
|
617
|
+
"total_ips.asc",
|
|
618
|
+
"total_ips.desc",
|
|
619
|
+
"updated_at.asc",
|
|
620
|
+
"updated_at.desc",
|
|
621
|
+
]
|
|
622
|
+
| NotGiven = NOT_GIVEN,
|
|
623
|
+
tag_key: List[str] | NotGiven = NOT_GIVEN,
|
|
624
|
+
tag_key_value: str | NotGiven = NOT_GIVEN,
|
|
625
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
626
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
627
|
+
extra_headers: Headers | None = None,
|
|
628
|
+
extra_query: Query | None = None,
|
|
629
|
+
extra_body: Body | None = None,
|
|
630
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
631
|
+
) -> AsyncPaginator[Subnet, AsyncOffsetPage[Subnet]]:
|
|
632
|
+
"""
|
|
633
|
+
List subnets
|
|
634
|
+
|
|
635
|
+
Args:
|
|
636
|
+
project_id: Project ID
|
|
637
|
+
|
|
638
|
+
region_id: Region ID
|
|
639
|
+
|
|
640
|
+
limit: Optional. Limit the number of returned items
|
|
641
|
+
|
|
642
|
+
network_id: Only list subnets of this network
|
|
643
|
+
|
|
644
|
+
offset: Optional. Offset value is used to exclude the first set of records from the
|
|
645
|
+
result
|
|
646
|
+
|
|
647
|
+
order_by: Ordering subnets list result by `name`, `created_at`, `updated_at`,
|
|
648
|
+
`available_ips`, `total_ips`, and `cidr` (default) fields of the subnet and
|
|
649
|
+
directions (`name.asc`).
|
|
650
|
+
|
|
651
|
+
tag_key: Optional. Filter by tag keys. ?tag_key=key1&tag_key=key2
|
|
652
|
+
|
|
653
|
+
tag_key_value: Optional. Filter by tag key-value pairs. curl -G --data-urlencode
|
|
654
|
+
"tag_key_value={"key": "value"}" --url
|
|
655
|
+
"https://example.com/cloud/v1/resource/1/1"
|
|
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
|
+
if project_id is None:
|
|
666
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
667
|
+
if region_id is None:
|
|
668
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
669
|
+
return self._get_api_list(
|
|
670
|
+
f"/cloud/v1/subnets/{project_id}/{region_id}",
|
|
671
|
+
page=AsyncOffsetPage[Subnet],
|
|
672
|
+
options=make_request_options(
|
|
673
|
+
extra_headers=extra_headers,
|
|
674
|
+
extra_query=extra_query,
|
|
675
|
+
extra_body=extra_body,
|
|
676
|
+
timeout=timeout,
|
|
677
|
+
query=maybe_transform(
|
|
678
|
+
{
|
|
679
|
+
"limit": limit,
|
|
680
|
+
"network_id": network_id,
|
|
681
|
+
"offset": offset,
|
|
682
|
+
"order_by": order_by,
|
|
683
|
+
"tag_key": tag_key,
|
|
684
|
+
"tag_key_value": tag_key_value,
|
|
685
|
+
},
|
|
686
|
+
subnet_list_params.SubnetListParams,
|
|
687
|
+
),
|
|
688
|
+
),
|
|
689
|
+
model=Subnet,
|
|
690
|
+
)
|
|
691
|
+
|
|
692
|
+
async def delete(
|
|
693
|
+
self,
|
|
694
|
+
subnet_id: str,
|
|
695
|
+
*,
|
|
696
|
+
project_id: int | None = None,
|
|
697
|
+
region_id: int | None = None,
|
|
698
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
699
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
700
|
+
extra_headers: Headers | None = None,
|
|
701
|
+
extra_query: Query | None = None,
|
|
702
|
+
extra_body: Body | None = None,
|
|
703
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
704
|
+
) -> None:
|
|
705
|
+
"""
|
|
706
|
+
Delete subnet
|
|
707
|
+
|
|
708
|
+
Args:
|
|
709
|
+
project_id: Project ID
|
|
710
|
+
|
|
711
|
+
region_id: Region ID
|
|
712
|
+
|
|
713
|
+
subnet_id: Subnet ID
|
|
714
|
+
|
|
715
|
+
extra_headers: Send extra headers
|
|
716
|
+
|
|
717
|
+
extra_query: Add additional query parameters to the request
|
|
718
|
+
|
|
719
|
+
extra_body: Add additional JSON properties to the request
|
|
720
|
+
|
|
721
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
722
|
+
"""
|
|
723
|
+
if project_id is None:
|
|
724
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
725
|
+
if region_id is None:
|
|
726
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
727
|
+
if not subnet_id:
|
|
728
|
+
raise ValueError(f"Expected a non-empty value for `subnet_id` but received {subnet_id!r}")
|
|
729
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
730
|
+
return await self._delete(
|
|
731
|
+
f"/cloud/v1/subnets/{project_id}/{region_id}/{subnet_id}",
|
|
732
|
+
options=make_request_options(
|
|
733
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
734
|
+
),
|
|
735
|
+
cast_to=NoneType,
|
|
736
|
+
)
|
|
737
|
+
|
|
738
|
+
async def get(
|
|
739
|
+
self,
|
|
740
|
+
subnet_id: str,
|
|
741
|
+
*,
|
|
742
|
+
project_id: int | None = None,
|
|
743
|
+
region_id: int | None = None,
|
|
744
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
745
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
746
|
+
extra_headers: Headers | None = None,
|
|
747
|
+
extra_query: Query | None = None,
|
|
748
|
+
extra_body: Body | None = None,
|
|
749
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
750
|
+
) -> Subnet:
|
|
751
|
+
"""
|
|
752
|
+
Get subnet
|
|
753
|
+
|
|
754
|
+
Args:
|
|
755
|
+
project_id: Project ID
|
|
756
|
+
|
|
757
|
+
region_id: Region ID
|
|
758
|
+
|
|
759
|
+
subnet_id: Subnet ID
|
|
760
|
+
|
|
761
|
+
extra_headers: Send extra headers
|
|
762
|
+
|
|
763
|
+
extra_query: Add additional query parameters to the request
|
|
764
|
+
|
|
765
|
+
extra_body: Add additional JSON properties to the request
|
|
766
|
+
|
|
767
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
768
|
+
"""
|
|
769
|
+
if project_id is None:
|
|
770
|
+
project_id = self._client._get_cloud_project_id_path_param()
|
|
771
|
+
if region_id is None:
|
|
772
|
+
region_id = self._client._get_cloud_region_id_path_param()
|
|
773
|
+
if not subnet_id:
|
|
774
|
+
raise ValueError(f"Expected a non-empty value for `subnet_id` but received {subnet_id!r}")
|
|
775
|
+
return await self._get(
|
|
776
|
+
f"/cloud/v1/subnets/{project_id}/{region_id}/{subnet_id}",
|
|
777
|
+
options=make_request_options(
|
|
778
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
779
|
+
),
|
|
780
|
+
cast_to=Subnet,
|
|
781
|
+
)
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
class SubnetsResourceWithRawResponse:
|
|
785
|
+
def __init__(self, subnets: SubnetsResource) -> None:
|
|
786
|
+
self._subnets = subnets
|
|
787
|
+
|
|
788
|
+
self.create = to_raw_response_wrapper(
|
|
789
|
+
subnets.create,
|
|
790
|
+
)
|
|
791
|
+
self.update = to_raw_response_wrapper(
|
|
792
|
+
subnets.update,
|
|
793
|
+
)
|
|
794
|
+
self.list = to_raw_response_wrapper(
|
|
795
|
+
subnets.list,
|
|
796
|
+
)
|
|
797
|
+
self.delete = to_raw_response_wrapper(
|
|
798
|
+
subnets.delete,
|
|
799
|
+
)
|
|
800
|
+
self.get = to_raw_response_wrapper(
|
|
801
|
+
subnets.get,
|
|
802
|
+
)
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
class AsyncSubnetsResourceWithRawResponse:
|
|
806
|
+
def __init__(self, subnets: AsyncSubnetsResource) -> None:
|
|
807
|
+
self._subnets = subnets
|
|
808
|
+
|
|
809
|
+
self.create = async_to_raw_response_wrapper(
|
|
810
|
+
subnets.create,
|
|
811
|
+
)
|
|
812
|
+
self.update = async_to_raw_response_wrapper(
|
|
813
|
+
subnets.update,
|
|
814
|
+
)
|
|
815
|
+
self.list = async_to_raw_response_wrapper(
|
|
816
|
+
subnets.list,
|
|
817
|
+
)
|
|
818
|
+
self.delete = async_to_raw_response_wrapper(
|
|
819
|
+
subnets.delete,
|
|
820
|
+
)
|
|
821
|
+
self.get = async_to_raw_response_wrapper(
|
|
822
|
+
subnets.get,
|
|
823
|
+
)
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
class SubnetsResourceWithStreamingResponse:
|
|
827
|
+
def __init__(self, subnets: SubnetsResource) -> None:
|
|
828
|
+
self._subnets = subnets
|
|
829
|
+
|
|
830
|
+
self.create = to_streamed_response_wrapper(
|
|
831
|
+
subnets.create,
|
|
832
|
+
)
|
|
833
|
+
self.update = to_streamed_response_wrapper(
|
|
834
|
+
subnets.update,
|
|
835
|
+
)
|
|
836
|
+
self.list = to_streamed_response_wrapper(
|
|
837
|
+
subnets.list,
|
|
838
|
+
)
|
|
839
|
+
self.delete = to_streamed_response_wrapper(
|
|
840
|
+
subnets.delete,
|
|
841
|
+
)
|
|
842
|
+
self.get = to_streamed_response_wrapper(
|
|
843
|
+
subnets.get,
|
|
844
|
+
)
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
class AsyncSubnetsResourceWithStreamingResponse:
|
|
848
|
+
def __init__(self, subnets: AsyncSubnetsResource) -> None:
|
|
849
|
+
self._subnets = subnets
|
|
850
|
+
|
|
851
|
+
self.create = async_to_streamed_response_wrapper(
|
|
852
|
+
subnets.create,
|
|
853
|
+
)
|
|
854
|
+
self.update = async_to_streamed_response_wrapper(
|
|
855
|
+
subnets.update,
|
|
856
|
+
)
|
|
857
|
+
self.list = async_to_streamed_response_wrapper(
|
|
858
|
+
subnets.list,
|
|
859
|
+
)
|
|
860
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
861
|
+
subnets.delete,
|
|
862
|
+
)
|
|
863
|
+
self.get = async_to_streamed_response_wrapper(
|
|
864
|
+
subnets.get,
|
|
865
|
+
)
|