gcore 0.1.0a2__py3-none-any.whl → 0.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gcore might be problematic. Click here for more details.
- gcore/__init__.py +5 -0
- gcore/_base_client.py +22 -2
- gcore/_client.py +9 -0
- gcore/_models.py +2 -0
- gcore/_types.py +2 -0
- gcore/_utils/_proxy.py +4 -1
- gcore/_utils/_resources_proxy.py +24 -0
- gcore/_version.py +1 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/baremetal/flavors.py +2 -2
- gcore/resources/cloud/baremetal/images.py +2 -2
- gcore/resources/cloud/baremetal/servers.py +280 -52
- gcore/resources/cloud/billing_reservations.py +24 -0
- gcore/resources/cloud/file_shares/file_shares.py +16 -0
- gcore/resources/cloud/floating_ips.py +4 -4
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +358 -8
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +206 -2
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +84 -4
- gcore/resources/cloud/inference/deployments/deployments.py +328 -10
- gcore/resources/cloud/instances/flavors.py +2 -2
- gcore/resources/cloud/instances/images.py +318 -2
- gcore/resources/cloud/instances/instances.py +534 -70
- gcore/resources/cloud/instances/interfaces.py +4 -4
- gcore/resources/cloud/load_balancers/flavors.py +2 -2
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +302 -20
- gcore/resources/cloud/load_balancers/l7_policies/rules.py +326 -0
- gcore/resources/cloud/load_balancers/listeners.py +385 -20
- gcore/resources/cloud/load_balancers/load_balancers.py +392 -24
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +24 -0
- gcore/resources/cloud/load_balancers/pools/members.py +34 -6
- gcore/resources/cloud/load_balancers/pools/pools.py +388 -8
- gcore/resources/cloud/networks/networks.py +72 -16
- gcore/resources/cloud/networks/subnets.py +6 -6
- gcore/resources/cloud/registries/registries.py +6 -10
- gcore/resources/cloud/registries/users.py +4 -10
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +10 -10
- gcore/resources/cloud/secrets.py +56 -11
- gcore/resources/cloud/security_groups/security_groups.py +2 -2
- gcore/resources/cloud/ssh_keys.py +2 -2
- gcore/resources/cloud/tasks.py +203 -184
- gcore/resources/cloud/users/role_assignments.py +4 -4
- gcore/resources/cloud/volumes.py +18 -18
- gcore/resources/waap/__init__.py +131 -0
- gcore/resources/waap/advanced_rules.py +135 -0
- gcore/resources/waap/clients.py +135 -0
- gcore/resources/waap/custom_page_sets.py +805 -0
- gcore/resources/waap/domains/__init__.py +173 -0
- gcore/resources/waap/domains/advanced_rules.py +876 -0
- gcore/resources/waap/domains/analytics/__init__.py +33 -0
- gcore/resources/waap/domains/analytics/analytics.py +676 -0
- gcore/resources/waap/domains/analytics/requests.py +378 -0
- gcore/resources/waap/domains/api_discovery/__init__.py +33 -0
- gcore/resources/waap/domains/api_discovery/api_discovery.py +530 -0
- gcore/resources/waap/domains/api_discovery/scan_results.py +352 -0
- gcore/resources/waap/domains/api_path_groups.py +163 -0
- gcore/resources/waap/domains/api_paths.py +771 -0
- gcore/resources/waap/domains/custom_rules.py +889 -0
- gcore/resources/waap/domains/domains.py +914 -0
- gcore/resources/waap/domains/firewall_rules.py +884 -0
- gcore/resources/waap/domains/insight_silences.py +689 -0
- gcore/resources/waap/domains/insights.py +425 -0
- gcore/resources/waap/domains/policies.py +173 -0
- gcore/resources/waap/domains/settings.py +271 -0
- gcore/resources/waap/ip_info.py +1017 -0
- gcore/resources/waap/organizations.py +217 -0
- gcore/resources/waap/statistics.py +225 -0
- gcore/resources/waap/tags.py +233 -0
- gcore/resources/waap/waap.py +391 -0
- gcore/types/cloud/__init__.py +1 -0
- gcore/types/cloud/allowed_address_pairs.py +2 -2
- gcore/types/cloud/baremetal/baremetal_server.py +1 -1
- gcore/types/cloud/baremetal/image_list_params.py +1 -1
- gcore/types/cloud/baremetal/server_create_params.py +9 -9
- gcore/types/cloud/baremetal/server_list_params.py +8 -8
- gcore/types/cloud/baremetal/server_rebuild_params.py +1 -1
- gcore/types/cloud/baremetal_flavor.py +3 -3
- gcore/types/cloud/billing_reservation_list_params.py +5 -0
- gcore/types/cloud/container_probe_config.py +1 -1
- gcore/types/cloud/container_probe_config_create_param.py +2 -3
- gcore/types/cloud/container_scale_triggers.py +2 -2
- gcore/types/cloud/file_share.py +3 -0
- gcore/types/cloud/file_share_list_params.py +7 -1
- gcore/types/cloud/floating_ip_detailed.py +1 -1
- gcore/types/cloud/floating_ip_list_params.py +2 -2
- gcore/types/cloud/gpu_baremetal_cluster.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +21 -1
- gcore/types/cloud/gpu_baremetal_cluster_delete_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_rebuild_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_server.py +1 -1
- gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_clusters/server_attach_interface_params.py +10 -10
- gcore/types/cloud/gpu_baremetal_flavor.py +3 -3
- gcore/types/cloud/image.py +1 -1
- gcore/types/cloud/inference/deployment_create_params.py +4 -4
- gcore/types/cloud/inference/deployment_update_params.py +206 -9
- gcore/types/cloud/inference/inference.py +5 -5
- gcore/types/cloud/instance.py +1 -1
- gcore/types/cloud/instance_create_params.py +8 -10
- gcore/types/cloud/instance_list_params.py +8 -8
- gcore/types/cloud/instances/flavor_list_suitable_params.py +4 -1
- gcore/types/cloud/instances/image_list_params.py +1 -1
- gcore/types/cloud/instances/instance_flavor.py +3 -3
- gcore/types/cloud/instances/interface_attach_params.py +10 -10
- gcore/types/cloud/load_balancer_create_params.py +17 -15
- gcore/types/cloud/load_balancer_flavor_detail.py +3 -3
- gcore/types/cloud/load_balancer_l7_policy.py +5 -5
- gcore/types/cloud/load_balancer_list_params.py +5 -5
- gcore/types/cloud/load_balancer_listener_detail.py +17 -17
- gcore/types/cloud/load_balancer_pool.py +13 -13
- gcore/types/cloud/load_balancer_pool_list.py +99 -4
- gcore/types/cloud/load_balancers/l7_policy_create_params.py +5 -5
- gcore/types/cloud/load_balancers/l7_policy_replace_params.py +5 -5
- gcore/types/cloud/load_balancers/listener_create_params.py +6 -4
- gcore/types/cloud/load_balancers/listener_get_params.py +3 -1
- gcore/types/cloud/load_balancers/listener_list_params.py +4 -2
- gcore/types/cloud/load_balancers/listener_update_params.py +5 -3
- gcore/types/cloud/load_balancers/pool_create_params.py +6 -4
- gcore/types/cloud/load_balancers/pool_list_params.py +5 -6
- gcore/types/cloud/load_balancers/pool_update_params.py +6 -4
- gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py +2 -0
- gcore/types/cloud/load_balancers/pools/member_add_params.py +5 -3
- gcore/types/cloud/member.py +2 -2
- gcore/types/cloud/network.py +22 -22
- gcore/types/cloud/network_create_params.py +2 -0
- gcore/types/cloud/network_details.py +25 -24
- gcore/types/cloud/network_list_params.py +15 -10
- gcore/types/cloud/network_update_params.py +2 -0
- gcore/types/cloud/networks/subnet_create_params.py +1 -1
- gcore/types/cloud/networks/subnet_list_params.py +2 -2
- gcore/types/cloud/quota_get_all_response.py +18 -0
- gcore/types/cloud/quota_get_by_region_response.py +18 -0
- gcore/types/cloud/quotas/request_create_params.py +9 -0
- gcore/types/cloud/quotas/request_get_response.py +9 -0
- gcore/types/cloud/quotas/request_list_response.py +9 -0
- gcore/types/cloud/region.py +4 -4
- gcore/types/cloud/registries/user_create_multiple_params.py +3 -5
- gcore/types/cloud/registries/user_create_params.py +3 -5
- gcore/types/cloud/registry_create_params.py +3 -5
- gcore/types/cloud/reserved_fixed_ip_create_params.py +2 -2
- gcore/types/cloud/reserved_fixed_ip_list_params.py +3 -3
- gcore/types/cloud/secret_list_params.py +24 -0
- gcore/types/cloud/security_group_list_params.py +1 -1
- gcore/types/cloud/session_persistence.py +1 -1
- gcore/types/cloud/ssh_key_created.py +3 -6
- gcore/types/cloud/task.py +1 -4
- gcore/types/cloud/task_list_params.py +56 -46
- gcore/types/cloud/users/role_assignment_create_params.py +1 -1
- gcore/types/cloud/users/role_assignment_update_params.py +1 -1
- gcore/types/cloud/volume_create_params.py +6 -6
- gcore/types/cloud/volume_list_params.py +3 -3
- gcore/types/waap/__init__.py +108 -0
- gcore/types/waap/client_me_response.py +34 -0
- gcore/types/waap/custom_page_set_create_params.py +35 -0
- gcore/types/waap/custom_page_set_list_params.py +25 -0
- gcore/types/waap/custom_page_set_preview_params.py +34 -0
- gcore/types/waap/custom_page_set_update_params.py +35 -0
- gcore/types/waap/domain_list_params.py +30 -0
- gcore/types/waap/domain_list_rule_sets_response.py +10 -0
- gcore/types/waap/domain_update_params.py +12 -0
- gcore/types/waap/domains/__init__.py +47 -0
- gcore/types/waap/domains/advanced_rule_create_params.py +80 -0
- gcore/types/waap/domains/advanced_rule_list_params.py +58 -0
- gcore/types/waap/domains/advanced_rule_update_params.py +83 -0
- gcore/types/waap/domains/analytics/__init__.py +5 -0
- gcore/types/waap/domains/analytics/request_list_params.py +53 -0
- gcore/types/waap/domains/analytics_get_event_statistics_params.py +34 -0
- gcore/types/waap/domains/analytics_list_ddos_attacks_params.py +28 -0
- gcore/types/waap/domains/analytics_list_ddos_info_params.py +31 -0
- gcore/types/waap/domains/analytics_list_event_traffic_params.py +26 -0
- gcore/types/waap/domains/analytics_list_event_traffic_response.py +10 -0
- gcore/types/waap/domains/api_discovery/__init__.py +7 -0
- gcore/types/waap/domains/api_discovery/scan_result_get_response.py +29 -0
- gcore/types/waap/domains/api_discovery/scan_result_list_params.py +41 -0
- gcore/types/waap/domains/api_discovery/scan_result_list_response.py +29 -0
- gcore/types/waap/domains/api_discovery_get_settings_response.py +36 -0
- gcore/types/waap/domains/api_discovery_scan_openapi_response.py +10 -0
- gcore/types/waap/domains/api_discovery_update_settings_params.py +34 -0
- gcore/types/waap/domains/api_discovery_update_settings_response.py +36 -0
- gcore/types/waap/domains/api_discovery_upload_openapi_params.py +19 -0
- gcore/types/waap/domains/api_discovery_upload_openapi_response.py +10 -0
- gcore/types/waap/domains/api_path_create_params.py +31 -0
- gcore/types/waap/domains/api_path_create_response.py +50 -0
- gcore/types/waap/domains/api_path_get_response.py +50 -0
- gcore/types/waap/domains/api_path_group_list_response.py +12 -0
- gcore/types/waap/domains/api_path_list_params.py +62 -0
- gcore/types/waap/domains/api_path_list_response.py +50 -0
- gcore/types/waap/domains/api_path_update_params.py +29 -0
- gcore/types/waap/domains/custom_rule_create_params.py +368 -0
- gcore/types/waap/domains/custom_rule_delete_multiple_params.py +13 -0
- gcore/types/waap/domains/custom_rule_list_params.py +35 -0
- gcore/types/waap/domains/custom_rule_update_params.py +371 -0
- gcore/types/waap/domains/firewall_rule_create_params.py +75 -0
- gcore/types/waap/domains/firewall_rule_delete_multiple_params.py +13 -0
- gcore/types/waap/domains/firewall_rule_list_params.py +33 -0
- gcore/types/waap/domains/firewall_rule_update_params.py +78 -0
- gcore/types/waap/domains/insight_list_params.py +34 -0
- gcore/types/waap/domains/insight_replace_params.py +17 -0
- gcore/types/waap/domains/insight_silence_create_params.py +28 -0
- gcore/types/waap/domains/insight_silence_list_params.py +33 -0
- gcore/types/waap/domains/insight_silence_update_params.py +28 -0
- gcore/types/waap/domains/setting_update_params.py +48 -0
- gcore/types/waap/ip_info_get_attack_time_series_params.py +12 -0
- gcore/types/waap/ip_info_get_attack_time_series_response.py +10 -0
- gcore/types/waap/ip_info_get_blocked_requests_params.py +15 -0
- gcore/types/waap/ip_info_get_blocked_requests_response.py +10 -0
- gcore/types/waap/ip_info_get_counts_params.py +19 -0
- gcore/types/waap/ip_info_get_ddos_attack_series_params.py +12 -0
- gcore/types/waap/ip_info_get_params.py +12 -0
- gcore/types/waap/ip_info_get_top_sessions_params.py +15 -0
- gcore/types/waap/ip_info_get_top_sessions_response.py +10 -0
- gcore/types/waap/ip_info_get_top_urls_params.py +15 -0
- gcore/types/waap/ip_info_get_top_urls_response.py +10 -0
- gcore/types/waap/ip_info_get_top_user_agents_params.py +15 -0
- gcore/types/waap/ip_info_get_top_user_agents_response.py +10 -0
- gcore/types/waap/ip_info_list_attacked_countries_params.py +12 -0
- gcore/types/waap/ip_info_list_attacked_countries_response.py +10 -0
- gcore/types/waap/organization_list_params.py +22 -0
- gcore/types/waap/statistic_get_usage_series_params.py +25 -0
- gcore/types/waap/tag_list_params.py +28 -0
- gcore/types/waap/waap_advanced_rule.py +83 -0
- gcore/types/waap/waap_advanced_rule_descriptor.py +49 -0
- gcore/types/waap/waap_advanced_rule_descriptor_list.py +15 -0
- gcore/types/waap/waap_block_csrf_page_data.py +28 -0
- gcore/types/waap/waap_block_csrf_page_data_param.py +28 -0
- gcore/types/waap/waap_block_page_data.py +28 -0
- gcore/types/waap/waap_block_page_data_param.py +28 -0
- gcore/types/waap/waap_blocked_statistics.py +36 -0
- gcore/types/waap/waap_captcha_page_data.py +31 -0
- gcore/types/waap/waap_captcha_page_data_param.py +31 -0
- gcore/types/waap/waap_common_tag.py +16 -0
- gcore/types/waap/waap_cookie_disabled_page_data.py +18 -0
- gcore/types/waap/waap_cookie_disabled_page_data_param.py +18 -0
- gcore/types/waap/waap_count_statistics.py +36 -0
- gcore/types/waap/waap_custom_page_preview.py +10 -0
- gcore/types/waap/waap_custom_page_set.py +36 -0
- gcore/types/waap/waap_custom_rule.py +373 -0
- gcore/types/waap/waap_customer_rule_state.py +7 -0
- gcore/types/waap/waap_ddos_attack.py +16 -0
- gcore/types/waap/waap_ddos_info.py +17 -0
- gcore/types/waap/waap_detailed_domain.py +37 -0
- gcore/types/waap/waap_domain_api_settings.py +22 -0
- gcore/types/waap/waap_domain_ddos_settings.py +31 -0
- gcore/types/waap/waap_domain_policy.py +29 -0
- gcore/types/waap/waap_domain_settings_model.py +15 -0
- gcore/types/waap/waap_domain_status.py +7 -0
- gcore/types/waap/waap_event_statistics.py +15 -0
- gcore/types/waap/waap_firewall_rule.py +78 -0
- gcore/types/waap/waap_get_account_overview_response.py +34 -0
- gcore/types/waap/waap_handshake_page_data.py +25 -0
- gcore/types/waap/waap_handshake_page_data_param.py +25 -0
- gcore/types/waap/waap_insight.py +38 -0
- gcore/types/waap/waap_insight_silence.py +28 -0
- gcore/types/waap/waap_insight_silence_sort_by.py +9 -0
- gcore/types/waap/waap_insight_sort_by.py +20 -0
- gcore/types/waap/waap_insight_status.py +7 -0
- gcore/types/waap/waap_ip_country_attack.py +16 -0
- gcore/types/waap/waap_ip_ddos_info_model.py +23 -0
- gcore/types/waap/waap_ip_info.py +57 -0
- gcore/types/waap/waap_ip_info_counts.py +16 -0
- gcore/types/waap/waap_javascript_disabled_page_data.py +18 -0
- gcore/types/waap/waap_javascript_disabled_page_data_param.py +18 -0
- gcore/types/waap/waap_network_details.py +17 -0
- gcore/types/waap/waap_organization.py +13 -0
- gcore/types/waap/waap_page_type.py +9 -0
- gcore/types/waap/waap_paginated_custom_page_set.py +22 -0
- gcore/types/waap/waap_paginated_ddos_attack.py +22 -0
- gcore/types/waap/waap_paginated_ddos_info.py +22 -0
- gcore/types/waap/waap_paginated_request_summary.py +22 -0
- gcore/types/waap/waap_pattern_matched_tag.py +37 -0
- gcore/types/waap/waap_policy_action.py +7 -0
- gcore/types/waap/waap_policy_mode.py +10 -0
- gcore/types/waap/waap_request_details.py +92 -0
- gcore/types/waap/waap_request_organization.py +13 -0
- gcore/types/waap/waap_request_summary.py +59 -0
- gcore/types/waap/waap_resolution.py +7 -0
- gcore/types/waap/waap_rule_action_type.py +7 -0
- gcore/types/waap/waap_rule_blocked_requests.py +16 -0
- gcore/types/waap/waap_rule_set.py +41 -0
- gcore/types/waap/waap_statistic_item.py +18 -0
- gcore/types/waap/waap_statistics_series.py +16 -0
- gcore/types/waap/waap_summary_domain.py +26 -0
- gcore/types/waap/waap_tag.py +16 -0
- gcore/types/waap/waap_time_series_attack.py +23 -0
- gcore/types/waap/waap_top_session.py +24 -0
- gcore/types/waap/waap_top_url.py +13 -0
- gcore/types/waap/waap_top_user_agent.py +13 -0
- gcore/types/waap/waap_traffic_metrics.py +68 -0
- gcore/types/waap/waap_traffic_type.py +28 -0
- gcore/types/waap/waap_user_agent_details.py +40 -0
- {gcore-0.1.0a2.dist-info → gcore-0.3.0.dist-info}/METADATA +3 -3
- {gcore-0.1.0a2.dist-info → gcore-0.3.0.dist-info}/RECORD +293 -126
- {gcore-0.1.0a2.dist-info → gcore-0.3.0.dist-info}/WHEEL +0 -0
- {gcore-0.1.0a2.dist-info → gcore-0.3.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -172,8 +172,9 @@ class LoadBalancersResource(SyncAPIResource):
|
|
|
172
172
|
|
|
173
173
|
preferred_connectivity: Preferred option to establish connectivity between load balancer and its pools
|
|
174
174
|
members. L2 provides best performance, L3 provides less IPs usage. It is taking
|
|
175
|
-
effect only if instance_id + ip_address is provided, not subnet_id +
|
|
176
|
-
because we're considering this as intentional subnet_id
|
|
175
|
+
effect only if `instance_id` + `ip_address` is provided, not `subnet_id` +
|
|
176
|
+
`ip_address`, because we're considering this as intentional `subnet_id`
|
|
177
|
+
specification.
|
|
177
178
|
|
|
178
179
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
179
180
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
@@ -181,16 +182,17 @@ class LoadBalancersResource(SyncAPIResource):
|
|
|
181
182
|
modified by the user. Tags are also integrated with cost reports, allowing cost
|
|
182
183
|
data to be filtered based on tag keys or values.
|
|
183
184
|
|
|
184
|
-
vip_ip_family: IP family for load balancer subnet auto-selection if vip_network_id is
|
|
185
|
+
vip_ip_family: IP family for load balancer subnet auto-selection if `vip_network_id` is
|
|
186
|
+
specified
|
|
185
187
|
|
|
186
188
|
vip_network_id: Network ID for load balancer. If not specified, default external network will be
|
|
187
|
-
used. Mutually exclusive with vip_port_id
|
|
189
|
+
used. Mutually exclusive with `vip_port_id`
|
|
188
190
|
|
|
189
191
|
vip_port_id: Existing Reserved Fixed IP port ID for load balancer. Mutually exclusive with
|
|
190
|
-
vip_network_id
|
|
192
|
+
`vip_network_id`
|
|
191
193
|
|
|
192
|
-
vip_subnet_id: Subnet ID for load balancer. If not specified, any subnet from vip_network_id
|
|
193
|
-
will be selected. Ignored when vip_network_id is not specified.
|
|
194
|
+
vip_subnet_id: Subnet ID for load balancer. If not specified, any subnet from `vip_network_id`
|
|
195
|
+
will be selected. Ignored when `vip_network_id` is not specified.
|
|
194
196
|
|
|
195
197
|
extra_headers: Send extra headers
|
|
196
198
|
|
|
@@ -323,17 +325,17 @@ class LoadBalancersResource(SyncAPIResource):
|
|
|
323
325
|
|
|
324
326
|
offset: Offset value is used to exclude the first set of records from the result.
|
|
325
327
|
|
|
326
|
-
order_by: Ordering Load Balancer list result by name, created_at
|
|
327
|
-
operating_status
|
|
328
|
-
fields of the load balancer and directions (name.asc), default is
|
|
329
|
-
"created_at
|
|
328
|
+
order_by: Ordering Load Balancer list result by name, `created_at`, `updated_at`,
|
|
329
|
+
`operating_status`, `provisioning_status`, `vip_address`, `vip_ip_family` and
|
|
330
|
+
flavor fields of the load balancer and directions (name.asc), default is
|
|
331
|
+
"`created_at`.asc"
|
|
330
332
|
|
|
331
333
|
show_stats: Show statistics
|
|
332
334
|
|
|
333
335
|
tag_key: Filter by tag keys.
|
|
334
336
|
|
|
335
337
|
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string. curl -G
|
|
336
|
-
--data-urlencode "tag_key_value
|
|
338
|
+
--data-urlencode "`tag_key_value`={"key": "value"}" --url
|
|
337
339
|
"http://localhost:1111/v1/loadbalancers/1/1"
|
|
338
340
|
|
|
339
341
|
with_ddos: Show Advanced DDoS protection profile, if exists
|
|
@@ -557,6 +559,188 @@ class LoadBalancersResource(SyncAPIResource):
|
|
|
557
559
|
cast_to=TaskIDList,
|
|
558
560
|
)
|
|
559
561
|
|
|
562
|
+
def create_and_poll(
|
|
563
|
+
self,
|
|
564
|
+
*,
|
|
565
|
+
project_id: int | None = None,
|
|
566
|
+
region_id: int | None = None,
|
|
567
|
+
flavor: str | NotGiven = NOT_GIVEN,
|
|
568
|
+
floating_ip: load_balancer_create_params.FloatingIP | NotGiven = NOT_GIVEN,
|
|
569
|
+
listeners: Iterable[load_balancer_create_params.Listener] | NotGiven = NOT_GIVEN,
|
|
570
|
+
logging: load_balancer_create_params.Logging | NotGiven = NOT_GIVEN,
|
|
571
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
572
|
+
name_template: str | NotGiven = NOT_GIVEN,
|
|
573
|
+
preferred_connectivity: LoadBalancerMemberConnectivity | NotGiven = NOT_GIVEN,
|
|
574
|
+
tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
|
|
575
|
+
vip_ip_family: InterfaceIPFamily | NotGiven = NOT_GIVEN,
|
|
576
|
+
vip_network_id: str | NotGiven = NOT_GIVEN,
|
|
577
|
+
vip_port_id: str | NotGiven = NOT_GIVEN,
|
|
578
|
+
vip_subnet_id: str | NotGiven = NOT_GIVEN,
|
|
579
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
580
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
581
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
582
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
583
|
+
extra_headers: Headers | None = None,
|
|
584
|
+
extra_query: Query | None = None,
|
|
585
|
+
extra_body: Body | None = None,
|
|
586
|
+
) -> LoadBalancer:
|
|
587
|
+
response = self.create(
|
|
588
|
+
project_id=project_id,
|
|
589
|
+
region_id=region_id,
|
|
590
|
+
flavor=flavor,
|
|
591
|
+
floating_ip=floating_ip,
|
|
592
|
+
listeners=listeners,
|
|
593
|
+
logging=logging,
|
|
594
|
+
name=name,
|
|
595
|
+
name_template=name_template,
|
|
596
|
+
preferred_connectivity=preferred_connectivity,
|
|
597
|
+
tags=tags,
|
|
598
|
+
vip_ip_family=vip_ip_family,
|
|
599
|
+
vip_network_id=vip_network_id,
|
|
600
|
+
vip_port_id=vip_port_id,
|
|
601
|
+
vip_subnet_id=vip_subnet_id,
|
|
602
|
+
extra_headers=extra_headers,
|
|
603
|
+
extra_query=extra_query,
|
|
604
|
+
extra_body=extra_body,
|
|
605
|
+
timeout=timeout,
|
|
606
|
+
)
|
|
607
|
+
if not response.tasks or len(response.tasks) != 1:
|
|
608
|
+
raise ValueError(f"Expected exactly one task to be created")
|
|
609
|
+
task = self._client.cloud.tasks.poll(
|
|
610
|
+
task_id=response.tasks[0],
|
|
611
|
+
extra_headers=extra_headers,
|
|
612
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
613
|
+
)
|
|
614
|
+
if not task.created_resources or not task.created_resources.loadbalancers or len(task.created_resources.loadbalancers) != 1:
|
|
615
|
+
raise ValueError(f"Expected exactly one resource to be created in a task")
|
|
616
|
+
return self.get(
|
|
617
|
+
loadbalancer_id=task.created_resources.loadbalancers[0],
|
|
618
|
+
project_id=project_id,
|
|
619
|
+
region_id=region_id,
|
|
620
|
+
extra_headers=extra_headers,
|
|
621
|
+
timeout=timeout,
|
|
622
|
+
)
|
|
623
|
+
|
|
624
|
+
def delete_and_poll(
|
|
625
|
+
self,
|
|
626
|
+
loadbalancer_id: str,
|
|
627
|
+
*,
|
|
628
|
+
project_id: int | None = None,
|
|
629
|
+
region_id: int | None = None,
|
|
630
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
631
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
632
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
633
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
634
|
+
extra_headers: Headers | None = None,
|
|
635
|
+
extra_query: Query | None = None,
|
|
636
|
+
extra_body: Body | None = None,
|
|
637
|
+
) -> None:
|
|
638
|
+
"""
|
|
639
|
+
Delete load balancer and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
|
|
640
|
+
"""
|
|
641
|
+
response = self.delete(
|
|
642
|
+
loadbalancer_id=loadbalancer_id,
|
|
643
|
+
project_id=project_id,
|
|
644
|
+
region_id=region_id,
|
|
645
|
+
extra_headers=extra_headers,
|
|
646
|
+
extra_query=extra_query,
|
|
647
|
+
extra_body=extra_body,
|
|
648
|
+
timeout=timeout,
|
|
649
|
+
)
|
|
650
|
+
if not response.tasks:
|
|
651
|
+
raise ValueError("Expected at least one task to be created")
|
|
652
|
+
self._client.cloud.tasks.poll(
|
|
653
|
+
task_id=response.tasks[0],
|
|
654
|
+
extra_headers=extra_headers,
|
|
655
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
656
|
+
)
|
|
657
|
+
|
|
658
|
+
def failover_and_poll(
|
|
659
|
+
self,
|
|
660
|
+
loadbalancer_id: str,
|
|
661
|
+
*,
|
|
662
|
+
project_id: int | None = None,
|
|
663
|
+
region_id: int | None = None,
|
|
664
|
+
force: bool | NotGiven = NOT_GIVEN,
|
|
665
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
666
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
667
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
668
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
669
|
+
extra_headers: Headers | None = None,
|
|
670
|
+
extra_query: Query | None = None,
|
|
671
|
+
extra_body: Body | None = None,
|
|
672
|
+
) -> LoadBalancer:
|
|
673
|
+
"""
|
|
674
|
+
Failover load balancer and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
|
|
675
|
+
"""
|
|
676
|
+
response = self.failover(
|
|
677
|
+
loadbalancer_id=loadbalancer_id,
|
|
678
|
+
project_id=project_id,
|
|
679
|
+
region_id=region_id,
|
|
680
|
+
force=force,
|
|
681
|
+
extra_headers=extra_headers,
|
|
682
|
+
extra_query=extra_query,
|
|
683
|
+
extra_body=extra_body,
|
|
684
|
+
timeout=timeout,
|
|
685
|
+
)
|
|
686
|
+
if not response.tasks:
|
|
687
|
+
raise ValueError("Expected at least one task to be created")
|
|
688
|
+
self._client.cloud.tasks.poll(
|
|
689
|
+
task_id=response.tasks[0],
|
|
690
|
+
extra_headers=extra_headers,
|
|
691
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
692
|
+
)
|
|
693
|
+
return self.get(
|
|
694
|
+
loadbalancer_id=loadbalancer_id,
|
|
695
|
+
project_id=project_id,
|
|
696
|
+
region_id=region_id,
|
|
697
|
+
extra_headers=extra_headers,
|
|
698
|
+
timeout=timeout,
|
|
699
|
+
)
|
|
700
|
+
|
|
701
|
+
def resize_and_poll(
|
|
702
|
+
self,
|
|
703
|
+
loadbalancer_id: str,
|
|
704
|
+
*,
|
|
705
|
+
project_id: int | None = None,
|
|
706
|
+
region_id: int | None = None,
|
|
707
|
+
flavor: str,
|
|
708
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
709
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
710
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
711
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
712
|
+
extra_headers: Headers | None = None,
|
|
713
|
+
extra_query: Query | None = None,
|
|
714
|
+
extra_body: Body | None = None,
|
|
715
|
+
) -> LoadBalancer:
|
|
716
|
+
"""
|
|
717
|
+
Resize load balancer and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
|
|
718
|
+
"""
|
|
719
|
+
response = self.resize(
|
|
720
|
+
loadbalancer_id=loadbalancer_id,
|
|
721
|
+
project_id=project_id,
|
|
722
|
+
region_id=region_id,
|
|
723
|
+
flavor=flavor,
|
|
724
|
+
extra_headers=extra_headers,
|
|
725
|
+
extra_query=extra_query,
|
|
726
|
+
extra_body=extra_body,
|
|
727
|
+
timeout=timeout,
|
|
728
|
+
)
|
|
729
|
+
if not response.tasks:
|
|
730
|
+
raise ValueError("Expected at least one task to be created")
|
|
731
|
+
self._client.cloud.tasks.poll(
|
|
732
|
+
task_id=response.tasks[0],
|
|
733
|
+
extra_headers=extra_headers,
|
|
734
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
735
|
+
)
|
|
736
|
+
return self.get(
|
|
737
|
+
loadbalancer_id=loadbalancer_id,
|
|
738
|
+
project_id=project_id,
|
|
739
|
+
region_id=region_id,
|
|
740
|
+
extra_headers=extra_headers,
|
|
741
|
+
timeout=timeout,
|
|
742
|
+
)
|
|
743
|
+
|
|
560
744
|
|
|
561
745
|
class AsyncLoadBalancersResource(AsyncAPIResource):
|
|
562
746
|
@cached_property
|
|
@@ -645,8 +829,9 @@ class AsyncLoadBalancersResource(AsyncAPIResource):
|
|
|
645
829
|
|
|
646
830
|
preferred_connectivity: Preferred option to establish connectivity between load balancer and its pools
|
|
647
831
|
members. L2 provides best performance, L3 provides less IPs usage. It is taking
|
|
648
|
-
effect only if instance_id + ip_address is provided, not subnet_id +
|
|
649
|
-
because we're considering this as intentional subnet_id
|
|
832
|
+
effect only if `instance_id` + `ip_address` is provided, not `subnet_id` +
|
|
833
|
+
`ip_address`, because we're considering this as intentional `subnet_id`
|
|
834
|
+
specification.
|
|
650
835
|
|
|
651
836
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
652
837
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
@@ -654,16 +839,17 @@ class AsyncLoadBalancersResource(AsyncAPIResource):
|
|
|
654
839
|
modified by the user. Tags are also integrated with cost reports, allowing cost
|
|
655
840
|
data to be filtered based on tag keys or values.
|
|
656
841
|
|
|
657
|
-
vip_ip_family: IP family for load balancer subnet auto-selection if vip_network_id is
|
|
842
|
+
vip_ip_family: IP family for load balancer subnet auto-selection if `vip_network_id` is
|
|
843
|
+
specified
|
|
658
844
|
|
|
659
845
|
vip_network_id: Network ID for load balancer. If not specified, default external network will be
|
|
660
|
-
used. Mutually exclusive with vip_port_id
|
|
846
|
+
used. Mutually exclusive with `vip_port_id`
|
|
661
847
|
|
|
662
848
|
vip_port_id: Existing Reserved Fixed IP port ID for load balancer. Mutually exclusive with
|
|
663
|
-
vip_network_id
|
|
849
|
+
`vip_network_id`
|
|
664
850
|
|
|
665
|
-
vip_subnet_id: Subnet ID for load balancer. If not specified, any subnet from vip_network_id
|
|
666
|
-
will be selected. Ignored when vip_network_id is not specified.
|
|
851
|
+
vip_subnet_id: Subnet ID for load balancer. If not specified, any subnet from `vip_network_id`
|
|
852
|
+
will be selected. Ignored when `vip_network_id` is not specified.
|
|
667
853
|
|
|
668
854
|
extra_headers: Send extra headers
|
|
669
855
|
|
|
@@ -796,17 +982,17 @@ class AsyncLoadBalancersResource(AsyncAPIResource):
|
|
|
796
982
|
|
|
797
983
|
offset: Offset value is used to exclude the first set of records from the result.
|
|
798
984
|
|
|
799
|
-
order_by: Ordering Load Balancer list result by name, created_at
|
|
800
|
-
operating_status
|
|
801
|
-
fields of the load balancer and directions (name.asc), default is
|
|
802
|
-
"created_at
|
|
985
|
+
order_by: Ordering Load Balancer list result by name, `created_at`, `updated_at`,
|
|
986
|
+
`operating_status`, `provisioning_status`, `vip_address`, `vip_ip_family` and
|
|
987
|
+
flavor fields of the load balancer and directions (name.asc), default is
|
|
988
|
+
"`created_at`.asc"
|
|
803
989
|
|
|
804
990
|
show_stats: Show statistics
|
|
805
991
|
|
|
806
992
|
tag_key: Filter by tag keys.
|
|
807
993
|
|
|
808
994
|
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string. curl -G
|
|
809
|
-
--data-urlencode "tag_key_value
|
|
995
|
+
--data-urlencode "`tag_key_value`={"key": "value"}" --url
|
|
810
996
|
"http://localhost:1111/v1/loadbalancers/1/1"
|
|
811
997
|
|
|
812
998
|
with_ddos: Show Advanced DDoS protection profile, if exists
|
|
@@ -1032,6 +1218,188 @@ class AsyncLoadBalancersResource(AsyncAPIResource):
|
|
|
1032
1218
|
cast_to=TaskIDList,
|
|
1033
1219
|
)
|
|
1034
1220
|
|
|
1221
|
+
async def create_and_poll(
|
|
1222
|
+
self,
|
|
1223
|
+
*,
|
|
1224
|
+
project_id: int | None = None,
|
|
1225
|
+
region_id: int | None = None,
|
|
1226
|
+
flavor: str | NotGiven = NOT_GIVEN,
|
|
1227
|
+
floating_ip: load_balancer_create_params.FloatingIP | NotGiven = NOT_GIVEN,
|
|
1228
|
+
listeners: Iterable[load_balancer_create_params.Listener] | NotGiven = NOT_GIVEN,
|
|
1229
|
+
logging: load_balancer_create_params.Logging | NotGiven = NOT_GIVEN,
|
|
1230
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
1231
|
+
name_template: str | NotGiven = NOT_GIVEN,
|
|
1232
|
+
preferred_connectivity: LoadBalancerMemberConnectivity | NotGiven = NOT_GIVEN,
|
|
1233
|
+
tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
|
|
1234
|
+
vip_ip_family: InterfaceIPFamily | NotGiven = NOT_GIVEN,
|
|
1235
|
+
vip_network_id: str | NotGiven = NOT_GIVEN,
|
|
1236
|
+
vip_port_id: str | NotGiven = NOT_GIVEN,
|
|
1237
|
+
vip_subnet_id: str | NotGiven = NOT_GIVEN,
|
|
1238
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
1239
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1240
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1241
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1242
|
+
extra_headers: Headers | None = None,
|
|
1243
|
+
extra_query: Query | None = None,
|
|
1244
|
+
extra_body: Body | None = None,
|
|
1245
|
+
) -> LoadBalancer:
|
|
1246
|
+
response = await self.create(
|
|
1247
|
+
project_id=project_id,
|
|
1248
|
+
region_id=region_id,
|
|
1249
|
+
flavor=flavor,
|
|
1250
|
+
floating_ip=floating_ip,
|
|
1251
|
+
listeners=listeners,
|
|
1252
|
+
logging=logging,
|
|
1253
|
+
name=name,
|
|
1254
|
+
name_template=name_template,
|
|
1255
|
+
preferred_connectivity=preferred_connectivity,
|
|
1256
|
+
tags=tags,
|
|
1257
|
+
vip_ip_family=vip_ip_family,
|
|
1258
|
+
vip_network_id=vip_network_id,
|
|
1259
|
+
vip_port_id=vip_port_id,
|
|
1260
|
+
vip_subnet_id=vip_subnet_id,
|
|
1261
|
+
extra_headers=extra_headers,
|
|
1262
|
+
extra_query=extra_query,
|
|
1263
|
+
extra_body=extra_body,
|
|
1264
|
+
timeout=timeout,
|
|
1265
|
+
)
|
|
1266
|
+
if not response.tasks or len(response.tasks) != 1:
|
|
1267
|
+
raise ValueError(f"Expected exactly one task to be created")
|
|
1268
|
+
task = await self._client.cloud.tasks.poll(
|
|
1269
|
+
task_id=response.tasks[0],
|
|
1270
|
+
extra_headers=extra_headers,
|
|
1271
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
1272
|
+
)
|
|
1273
|
+
if not task.created_resources or not task.created_resources.loadbalancers or len(task.created_resources.loadbalancers) != 1:
|
|
1274
|
+
raise ValueError(f"Expected exactly one resource to be created in a task")
|
|
1275
|
+
return await self.get(
|
|
1276
|
+
loadbalancer_id=task.created_resources.loadbalancers[0],
|
|
1277
|
+
project_id=project_id,
|
|
1278
|
+
region_id=region_id,
|
|
1279
|
+
extra_headers=extra_headers,
|
|
1280
|
+
timeout=timeout,
|
|
1281
|
+
)
|
|
1282
|
+
|
|
1283
|
+
async def delete_and_poll(
|
|
1284
|
+
self,
|
|
1285
|
+
loadbalancer_id: str,
|
|
1286
|
+
*,
|
|
1287
|
+
project_id: int | None = None,
|
|
1288
|
+
region_id: int | None = None,
|
|
1289
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
1290
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1291
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1292
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1293
|
+
extra_headers: Headers | None = None,
|
|
1294
|
+
extra_query: Query | None = None,
|
|
1295
|
+
extra_body: Body | None = None,
|
|
1296
|
+
) -> None:
|
|
1297
|
+
"""
|
|
1298
|
+
Delete load balancer and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
|
|
1299
|
+
"""
|
|
1300
|
+
response = await self.delete(
|
|
1301
|
+
loadbalancer_id=loadbalancer_id,
|
|
1302
|
+
project_id=project_id,
|
|
1303
|
+
region_id=region_id,
|
|
1304
|
+
extra_headers=extra_headers,
|
|
1305
|
+
extra_query=extra_query,
|
|
1306
|
+
extra_body=extra_body,
|
|
1307
|
+
timeout=timeout,
|
|
1308
|
+
)
|
|
1309
|
+
if not response.tasks:
|
|
1310
|
+
raise ValueError("Expected at least one task to be created")
|
|
1311
|
+
await self._client.cloud.tasks.poll(
|
|
1312
|
+
task_id=response.tasks[0],
|
|
1313
|
+
extra_headers=extra_headers,
|
|
1314
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
1315
|
+
)
|
|
1316
|
+
|
|
1317
|
+
async def failover_and_poll(
|
|
1318
|
+
self,
|
|
1319
|
+
loadbalancer_id: str,
|
|
1320
|
+
*,
|
|
1321
|
+
project_id: int | None = None,
|
|
1322
|
+
region_id: int | None = None,
|
|
1323
|
+
force: bool | NotGiven = NOT_GIVEN,
|
|
1324
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
1325
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1326
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1327
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1328
|
+
extra_headers: Headers | None = None,
|
|
1329
|
+
extra_query: Query | None = None,
|
|
1330
|
+
extra_body: Body | None = None,
|
|
1331
|
+
) -> LoadBalancer:
|
|
1332
|
+
"""
|
|
1333
|
+
Failover load balancer and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
|
|
1334
|
+
"""
|
|
1335
|
+
response = await self.failover(
|
|
1336
|
+
loadbalancer_id=loadbalancer_id,
|
|
1337
|
+
project_id=project_id,
|
|
1338
|
+
region_id=region_id,
|
|
1339
|
+
force=force,
|
|
1340
|
+
extra_headers=extra_headers,
|
|
1341
|
+
extra_query=extra_query,
|
|
1342
|
+
extra_body=extra_body,
|
|
1343
|
+
timeout=timeout,
|
|
1344
|
+
)
|
|
1345
|
+
if not response.tasks:
|
|
1346
|
+
raise ValueError("Expected at least one task to be created")
|
|
1347
|
+
await self._client.cloud.tasks.poll(
|
|
1348
|
+
task_id=response.tasks[0],
|
|
1349
|
+
extra_headers=extra_headers,
|
|
1350
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
1351
|
+
)
|
|
1352
|
+
return await self.get(
|
|
1353
|
+
loadbalancer_id=loadbalancer_id,
|
|
1354
|
+
project_id=project_id,
|
|
1355
|
+
region_id=region_id,
|
|
1356
|
+
extra_headers=extra_headers,
|
|
1357
|
+
timeout=timeout,
|
|
1358
|
+
)
|
|
1359
|
+
|
|
1360
|
+
async def resize_and_poll(
|
|
1361
|
+
self,
|
|
1362
|
+
loadbalancer_id: str,
|
|
1363
|
+
*,
|
|
1364
|
+
project_id: int | None = None,
|
|
1365
|
+
region_id: int | None = None,
|
|
1366
|
+
flavor: str,
|
|
1367
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
1368
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
1369
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1370
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1371
|
+
extra_headers: Headers | None = None,
|
|
1372
|
+
extra_query: Query | None = None,
|
|
1373
|
+
extra_body: Body | None = None,
|
|
1374
|
+
) -> LoadBalancer:
|
|
1375
|
+
"""
|
|
1376
|
+
Resize load balancer and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
|
|
1377
|
+
"""
|
|
1378
|
+
response = await self.resize(
|
|
1379
|
+
loadbalancer_id=loadbalancer_id,
|
|
1380
|
+
project_id=project_id,
|
|
1381
|
+
region_id=region_id,
|
|
1382
|
+
flavor=flavor,
|
|
1383
|
+
extra_headers=extra_headers,
|
|
1384
|
+
extra_query=extra_query,
|
|
1385
|
+
extra_body=extra_body,
|
|
1386
|
+
timeout=timeout,
|
|
1387
|
+
)
|
|
1388
|
+
if not response.tasks:
|
|
1389
|
+
raise ValueError("Expected at least one task to be created")
|
|
1390
|
+
await self._client.cloud.tasks.poll(
|
|
1391
|
+
task_id=response.tasks[0],
|
|
1392
|
+
extra_headers=extra_headers,
|
|
1393
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
1394
|
+
)
|
|
1395
|
+
return await self.get(
|
|
1396
|
+
loadbalancer_id=loadbalancer_id,
|
|
1397
|
+
project_id=project_id,
|
|
1398
|
+
region_id=region_id,
|
|
1399
|
+
extra_headers=extra_headers,
|
|
1400
|
+
timeout=timeout,
|
|
1401
|
+
)
|
|
1402
|
+
|
|
1035
1403
|
|
|
1036
1404
|
class LoadBalancersResourceWithRawResponse:
|
|
1037
1405
|
def __init__(self, load_balancers: LoadBalancersResource) -> None:
|
|
@@ -71,6 +71,12 @@ class HealthMonitorsResource(SyncAPIResource):
|
|
|
71
71
|
Create Load Balancer Pool Health Monitor
|
|
72
72
|
|
|
73
73
|
Args:
|
|
74
|
+
project_id: Project ID
|
|
75
|
+
|
|
76
|
+
region_id: Region ID
|
|
77
|
+
|
|
78
|
+
pool_id: Pool ID
|
|
79
|
+
|
|
74
80
|
delay: The time, in seconds, between sending probes to members
|
|
75
81
|
|
|
76
82
|
max_retries: Number of successes before the member is switched to ONLINE state
|
|
@@ -141,6 +147,12 @@ class HealthMonitorsResource(SyncAPIResource):
|
|
|
141
147
|
Delete load balancer pool health monitor
|
|
142
148
|
|
|
143
149
|
Args:
|
|
150
|
+
project_id: Project ID
|
|
151
|
+
|
|
152
|
+
region_id: Region ID
|
|
153
|
+
|
|
154
|
+
pool_id: Pool ID
|
|
155
|
+
|
|
144
156
|
extra_headers: Send extra headers
|
|
145
157
|
|
|
146
158
|
extra_query: Add additional query parameters to the request
|
|
@@ -210,6 +222,12 @@ class AsyncHealthMonitorsResource(AsyncAPIResource):
|
|
|
210
222
|
Create Load Balancer Pool Health Monitor
|
|
211
223
|
|
|
212
224
|
Args:
|
|
225
|
+
project_id: Project ID
|
|
226
|
+
|
|
227
|
+
region_id: Region ID
|
|
228
|
+
|
|
229
|
+
pool_id: Pool ID
|
|
230
|
+
|
|
213
231
|
delay: The time, in seconds, between sending probes to members
|
|
214
232
|
|
|
215
233
|
max_retries: Number of successes before the member is switched to ONLINE state
|
|
@@ -280,6 +298,12 @@ class AsyncHealthMonitorsResource(AsyncAPIResource):
|
|
|
280
298
|
Delete load balancer pool health monitor
|
|
281
299
|
|
|
282
300
|
Args:
|
|
301
|
+
project_id: Project ID
|
|
302
|
+
|
|
303
|
+
region_id: Region ID
|
|
304
|
+
|
|
305
|
+
pool_id: Pool ID
|
|
306
|
+
|
|
283
307
|
extra_headers: Send extra headers
|
|
284
308
|
|
|
285
309
|
extra_query: Add additional query parameters to the request
|
|
@@ -68,21 +68,27 @@ class MembersResource(SyncAPIResource):
|
|
|
68
68
|
Create load balancer pool member
|
|
69
69
|
|
|
70
70
|
Args:
|
|
71
|
+
project_id: Project ID
|
|
72
|
+
|
|
73
|
+
region_id: Region ID
|
|
74
|
+
|
|
75
|
+
pool_id: Pool ID
|
|
76
|
+
|
|
71
77
|
address: Member IP address
|
|
72
78
|
|
|
73
79
|
protocol_port: Member IP port
|
|
74
80
|
|
|
75
81
|
admin_state_up: true if enabled. Defaults to true
|
|
76
82
|
|
|
77
|
-
instance_id: Either subnet_id or instance_id should be provided
|
|
83
|
+
instance_id: Either `subnet_id` or `instance_id` should be provided
|
|
78
84
|
|
|
79
85
|
monitor_address: An alternate IP address used for health monitoring of a backend member. Default
|
|
80
86
|
is null which monitors the member address.
|
|
81
87
|
|
|
82
88
|
monitor_port: An alternate protocol port used for health monitoring of a backend member.
|
|
83
|
-
Default is null which monitors the member protocol_port
|
|
89
|
+
Default is null which monitors the member `protocol_port`.
|
|
84
90
|
|
|
85
|
-
subnet_id: Either subnet_id or instance_id should be provided
|
|
91
|
+
subnet_id: Either `subnet_id` or `instance_id` should be provided
|
|
86
92
|
|
|
87
93
|
weight: Member weight. Valid values: 0 to 256, defaults to 1
|
|
88
94
|
|
|
@@ -139,6 +145,14 @@ class MembersResource(SyncAPIResource):
|
|
|
139
145
|
Delete load balancer pool member
|
|
140
146
|
|
|
141
147
|
Args:
|
|
148
|
+
project_id: Project ID
|
|
149
|
+
|
|
150
|
+
region_id: Region ID
|
|
151
|
+
|
|
152
|
+
pool_id: Pool ID
|
|
153
|
+
|
|
154
|
+
member_id: Member ID
|
|
155
|
+
|
|
142
156
|
extra_headers: Send extra headers
|
|
143
157
|
|
|
144
158
|
extra_query: Add additional query parameters to the request
|
|
@@ -209,21 +223,27 @@ class AsyncMembersResource(AsyncAPIResource):
|
|
|
209
223
|
Create load balancer pool member
|
|
210
224
|
|
|
211
225
|
Args:
|
|
226
|
+
project_id: Project ID
|
|
227
|
+
|
|
228
|
+
region_id: Region ID
|
|
229
|
+
|
|
230
|
+
pool_id: Pool ID
|
|
231
|
+
|
|
212
232
|
address: Member IP address
|
|
213
233
|
|
|
214
234
|
protocol_port: Member IP port
|
|
215
235
|
|
|
216
236
|
admin_state_up: true if enabled. Defaults to true
|
|
217
237
|
|
|
218
|
-
instance_id: Either subnet_id or instance_id should be provided
|
|
238
|
+
instance_id: Either `subnet_id` or `instance_id` should be provided
|
|
219
239
|
|
|
220
240
|
monitor_address: An alternate IP address used for health monitoring of a backend member. Default
|
|
221
241
|
is null which monitors the member address.
|
|
222
242
|
|
|
223
243
|
monitor_port: An alternate protocol port used for health monitoring of a backend member.
|
|
224
|
-
Default is null which monitors the member protocol_port
|
|
244
|
+
Default is null which monitors the member `protocol_port`.
|
|
225
245
|
|
|
226
|
-
subnet_id: Either subnet_id or instance_id should be provided
|
|
246
|
+
subnet_id: Either `subnet_id` or `instance_id` should be provided
|
|
227
247
|
|
|
228
248
|
weight: Member weight. Valid values: 0 to 256, defaults to 1
|
|
229
249
|
|
|
@@ -280,6 +300,14 @@ class AsyncMembersResource(AsyncAPIResource):
|
|
|
280
300
|
Delete load balancer pool member
|
|
281
301
|
|
|
282
302
|
Args:
|
|
303
|
+
project_id: Project ID
|
|
304
|
+
|
|
305
|
+
region_id: Region ID
|
|
306
|
+
|
|
307
|
+
pool_id: Pool ID
|
|
308
|
+
|
|
309
|
+
member_id: Member ID
|
|
310
|
+
|
|
283
311
|
extra_headers: Send extra headers
|
|
284
312
|
|
|
285
313
|
extra_query: Add additional query parameters to the request
|