gcore 0.2.0__py3-none-any.whl → 0.4.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 +2 -1
- gcore/_base_client.py +44 -2
- gcore/_client.py +9 -0
- gcore/_models.py +2 -0
- gcore/_types.py +2 -0
- gcore/_version.py +1 -1
- gcore/pagination.py +61 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/baremetal/flavors.py +11 -137
- gcore/resources/cloud/baremetal/images.py +10 -12
- gcore/resources/cloud/baremetal/servers.py +75 -78
- gcore/resources/cloud/billing_reservations.py +2 -2
- gcore/resources/cloud/file_shares/file_shares.py +7 -8
- gcore/resources/cloud/floating_ips.py +9 -14
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +39 -28
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +11 -12
- gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +2 -2
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +12 -8
- gcore/resources/cloud/inference/deployments/deployments.py +16 -8
- gcore/resources/cloud/inference/registry_credentials.py +2 -2
- gcore/resources/cloud/inference/secrets.py +8 -8
- gcore/resources/cloud/instances/flavors.py +9 -233
- gcore/resources/cloud/instances/images.py +47 -37
- gcore/resources/cloud/instances/instances.py +107 -100
- gcore/resources/cloud/instances/interfaces.py +6 -6
- gcore/resources/cloud/ip_ranges.py +34 -2
- gcore/resources/cloud/load_balancers/flavors.py +2 -2
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +30 -22
- gcore/resources/cloud/load_balancers/listeners.py +31 -22
- gcore/resources/cloud/load_balancers/load_balancers.py +99 -43
- gcore/resources/cloud/load_balancers/metrics.py +2 -2
- gcore/resources/cloud/load_balancers/pools/health_monitors.py +2 -2
- gcore/resources/cloud/load_balancers/pools/members.py +12 -8
- gcore/resources/cloud/networks/networks.py +83 -19
- gcore/resources/cloud/networks/routers.py +18 -18
- gcore/resources/cloud/networks/subnets.py +55 -15
- gcore/resources/cloud/projects.py +38 -24
- gcore/resources/cloud/quotas/quotas.py +6 -6
- gcore/resources/cloud/quotas/requests.py +8 -8
- gcore/resources/cloud/registries/artifacts.py +4 -4
- gcore/resources/cloud/registries/registries.py +14 -20
- gcore/resources/cloud/registries/repositories.py +4 -4
- gcore/resources/cloud/registries/tags.py +2 -2
- gcore/resources/cloud/registries/users.py +25 -32
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +26 -26
- gcore/resources/cloud/reserved_fixed_ips/vip.py +10 -10
- gcore/resources/cloud/security_groups/rules.py +6 -6
- gcore/resources/cloud/security_groups/security_groups.py +70 -31
- gcore/resources/cloud/ssh_keys.py +2 -2
- gcore/resources/cloud/tasks.py +102 -94
- gcore/resources/cloud/users/role_assignments.py +16 -18
- gcore/resources/cloud/volumes.py +155 -65
- gcore/resources/iam/__init__.py +47 -0
- gcore/resources/iam/api_tokens.py +521 -0
- gcore/resources/iam/iam.py +199 -0
- gcore/resources/iam/users.py +642 -0
- gcore/resources/waap/__init__.py +84 -0
- gcore/resources/waap/advanced_rules.py +135 -0
- gcore/resources/waap/custom_page_sets.py +805 -0
- gcore/resources/waap/domains/__init__.py +140 -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 +399 -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 +5 -5
- 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 +257 -0
- gcore/types/cloud/allowed_address_pairs.py +2 -2
- gcore/types/cloud/baremetal/__init__.py +0 -1
- gcore/types/cloud/baremetal/baremetal_server.py +1 -1
- gcore/types/cloud/baremetal/image_list_params.py +1 -5
- gcore/types/cloud/baremetal/server_create_params.py +13 -17
- gcore/types/cloud/baremetal/server_list_params.py +8 -12
- gcore/types/cloud/baremetal/server_rebuild_params.py +1 -1
- gcore/types/cloud/baremetal_flavor.py +3 -3
- gcore/types/cloud/container_probe_config.py +1 -1
- gcore/types/cloud/container_probe_config_create_param.py +1 -1
- gcore/types/cloud/container_scale_triggers.py +2 -2
- gcore/types/cloud/ddos_profile.py +9 -3
- gcore/types/cloud/file_share_create_params.py +3 -5
- gcore/types/cloud/floating_ip_create_params.py +2 -4
- gcore/types/cloud/floating_ip_detailed.py +1 -1
- gcore/types/cloud/floating_ip_list_params.py +2 -6
- gcore/types/cloud/gpu_baremetal_cluster.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +4 -5
- 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 +3 -5
- 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/health_monitor.py +6 -1
- 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 +6 -6
- gcore/types/cloud/inference/inference.py +2 -4
- gcore/types/cloud/instance.py +1 -1
- gcore/types/cloud/instance_create_params.py +15 -18
- gcore/types/cloud/instance_list_params.py +8 -12
- gcore/types/cloud/instances/__init__.py +0 -2
- gcore/types/cloud/instances/image_create_from_volume_params.py +2 -4
- gcore/types/cloud/instances/image_list_params.py +1 -5
- gcore/types/cloud/instances/image_upload_params.py +2 -4
- 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 +25 -19
- 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 -9
- gcore/types/cloud/load_balancer_listener_detail.py +4 -4
- gcore/types/cloud/load_balancer_update_params.py +24 -0
- 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 +4 -4
- gcore/types/cloud/load_balancers/listener_update_params.py +3 -3
- gcore/types/cloud/load_balancers/pool_create_params.py +10 -5
- gcore/types/cloud/load_balancers/pool_update_params.py +10 -5
- gcore/types/cloud/load_balancers/pools/member_add_params.py +9 -4
- gcore/types/cloud/member.py +8 -3
- gcore/types/cloud/network.py +2 -2
- gcore/types/cloud/network_create_params.py +2 -3
- gcore/types/cloud/network_details.py +2 -2
- gcore/types/cloud/network_list_params.py +5 -6
- gcore/types/cloud/network_update_params.py +28 -2
- gcore/types/cloud/networks/router_list_params.py +2 -2
- gcore/types/cloud/networks/subnet_create_params.py +3 -4
- gcore/types/cloud/networks/subnet_list_params.py +2 -6
- gcore/types/cloud/networks/subnet_update_params.py +25 -0
- gcore/types/cloud/region.py +4 -4
- gcore/types/cloud/registries/__init__.py +1 -0
- gcore/types/cloud/registries/user_create_multiple_params.py +3 -5
- gcore/types/cloud/registries/user_create_params.py +3 -5
- gcore/types/cloud/registries/user_refresh_secret_response.py +31 -0
- 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/security_group_list_params.py +3 -7
- gcore/types/cloud/security_group_update_params.py +25 -0
- gcore/types/cloud/session_persistence.py +1 -1
- gcore/types/cloud/ssh_key_created.py +3 -6
- gcore/types/cloud/tag_update_map_param.py +2 -2
- gcore/types/cloud/task.py +1 -1
- gcore/types/cloud/task_list_params.py +49 -45
- 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 -7
- gcore/types/cloud/volume_update_params.py +29 -3
- gcore/types/iam/__init__.py +17 -0
- gcore/types/iam/account_overview.py +488 -0
- gcore/types/iam/api_token.py +78 -0
- gcore/types/iam/api_token_create.py +15 -0
- gcore/types/iam/api_token_create_params.py +42 -0
- gcore/types/iam/api_token_list.py +81 -0
- gcore/types/iam/api_token_list_params.py +41 -0
- gcore/types/iam/user.py +86 -0
- gcore/types/iam/user_detailed.py +104 -0
- gcore/types/iam/user_invite.py +15 -0
- gcore/types/iam/user_invite_params.py +37 -0
- gcore/types/iam/user_list_params.py +15 -0
- gcore/types/iam/user_update.py +104 -0
- gcore/types/iam/user_update_params.py +52 -0
- gcore/types/waap/__init__.py +97 -2
- 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_rule_sets_response.py +10 -0
- gcore/types/waap/domains/__init__.py +42 -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 +372 -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 +375 -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 +7 -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 +377 -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_api_urls.py → waap_domain_api_settings.py} +9 -2
- gcore/types/waap/waap_domain_policy.py +29 -0
- gcore/types/waap/{waap_domain_settings.py → waap_domain_settings_model.py} +4 -4
- 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_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.2.0.dist-info → gcore-0.4.0.dist-info}/METADATA +40 -3
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/RECORD +312 -149
- gcore/types/cloud/baremetal/flavor_list_suitable_params.py +0 -22
- gcore/types/cloud/instances/flavor_list_for_resize_params.py +0 -16
- gcore/types/cloud/instances/flavor_list_suitable_params.py +0 -56
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/WHEEL +0 -0
- {gcore-0.2.0.dist-info → gcore-0.4.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -76,7 +76,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
|
|
|
76
76
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
77
77
|
) -> TaskIDList:
|
|
78
78
|
"""
|
|
79
|
-
Create reserved fixed IP
|
|
79
|
+
Create a new reserved fixed IP with the specified configuration.
|
|
80
80
|
|
|
81
81
|
Args:
|
|
82
82
|
type: Must be 'external'
|
|
@@ -112,7 +112,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
|
|
|
112
112
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
113
113
|
) -> TaskIDList:
|
|
114
114
|
"""
|
|
115
|
-
Create reserved fixed IP
|
|
115
|
+
Create a new reserved fixed IP with the specified configuration.
|
|
116
116
|
|
|
117
117
|
Args:
|
|
118
118
|
subnet_id: Reserved fixed IP will be allocated in this subnet
|
|
@@ -149,12 +149,12 @@ class ReservedFixedIPsResource(SyncAPIResource):
|
|
|
149
149
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
150
150
|
) -> TaskIDList:
|
|
151
151
|
"""
|
|
152
|
-
Create reserved fixed IP
|
|
152
|
+
Create a new reserved fixed IP with the specified configuration.
|
|
153
153
|
|
|
154
154
|
Args:
|
|
155
155
|
network_id: Reserved fixed IP will be allocated in a subnet of this network
|
|
156
156
|
|
|
157
|
-
type: Must be 'any_subnet'.
|
|
157
|
+
type: Must be '`any_subnet`'.
|
|
158
158
|
|
|
159
159
|
ip_family: Which subnets should be selected: IPv4, IPv6 or use dual stack.
|
|
160
160
|
|
|
@@ -188,14 +188,14 @@ class ReservedFixedIPsResource(SyncAPIResource):
|
|
|
188
188
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
189
189
|
) -> TaskIDList:
|
|
190
190
|
"""
|
|
191
|
-
Create reserved fixed IP
|
|
191
|
+
Create a new reserved fixed IP with the specified configuration.
|
|
192
192
|
|
|
193
193
|
Args:
|
|
194
194
|
ip_address: Reserved fixed IP will be allocated the given IP address
|
|
195
195
|
|
|
196
196
|
network_id: Reserved fixed IP will be allocated in a subnet of this network
|
|
197
197
|
|
|
198
|
-
type: Must be 'ip_address'.
|
|
198
|
+
type: Must be '`ip_address`'.
|
|
199
199
|
|
|
200
200
|
is_vip: If reserved fixed IP is a VIP
|
|
201
201
|
|
|
@@ -225,7 +225,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
|
|
|
225
225
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
226
226
|
) -> TaskIDList:
|
|
227
227
|
"""
|
|
228
|
-
Create reserved fixed IP
|
|
228
|
+
Create a new reserved fixed IP with the specified configuration.
|
|
229
229
|
|
|
230
230
|
Args:
|
|
231
231
|
port_id: Port ID to make a reserved fixed IP (for example, `vip_port_id` of the Load
|
|
@@ -315,7 +315,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
|
|
|
315
315
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
316
316
|
) -> SyncOffsetPage[ReservedFixedIP]:
|
|
317
317
|
"""
|
|
318
|
-
List reserved fixed IPs
|
|
318
|
+
List all reserved fixed IPs in the specified project and region.
|
|
319
319
|
|
|
320
320
|
Args:
|
|
321
321
|
available_only: Set to true if the response should only list IP addresses that are not attached
|
|
@@ -333,9 +333,9 @@ class ReservedFixedIPsResource(SyncAPIResource):
|
|
|
333
333
|
|
|
334
334
|
offset: Offset value is used to exclude the first set of records from the result
|
|
335
335
|
|
|
336
|
-
order_by: Ordering reserved fixed IP list result by name, status, updated_at
|
|
337
|
-
or fixed_ip_address fields
|
|
338
|
-
|
|
336
|
+
order_by: Ordering reserved fixed IP list result by name, status, `updated_at`,
|
|
337
|
+
`created_at` or `fixed_ip_address` fields and directions (status.asc), default
|
|
338
|
+
is "`fixed_ip_address`.asc"
|
|
339
339
|
|
|
340
340
|
vip_only: Set to true if the response should only list VIPs
|
|
341
341
|
|
|
@@ -391,7 +391,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
|
|
|
391
391
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
392
392
|
) -> TaskIDList:
|
|
393
393
|
"""
|
|
394
|
-
Delete reserved fixed
|
|
394
|
+
Delete a specific reserved fixed IP and all its associated resources.
|
|
395
395
|
|
|
396
396
|
Args:
|
|
397
397
|
extra_headers: Send extra headers
|
|
@@ -430,7 +430,7 @@ class ReservedFixedIPsResource(SyncAPIResource):
|
|
|
430
430
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
431
431
|
) -> ReservedFixedIP:
|
|
432
432
|
"""
|
|
433
|
-
Get reserved fixed IP
|
|
433
|
+
Get detailed information about a specific reserved fixed IP.
|
|
434
434
|
|
|
435
435
|
Args:
|
|
436
436
|
extra_headers: Send extra headers
|
|
@@ -497,7 +497,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
|
|
|
497
497
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
498
498
|
) -> TaskIDList:
|
|
499
499
|
"""
|
|
500
|
-
Create reserved fixed IP
|
|
500
|
+
Create a new reserved fixed IP with the specified configuration.
|
|
501
501
|
|
|
502
502
|
Args:
|
|
503
503
|
type: Must be 'external'
|
|
@@ -533,7 +533,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
|
|
|
533
533
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
534
534
|
) -> TaskIDList:
|
|
535
535
|
"""
|
|
536
|
-
Create reserved fixed IP
|
|
536
|
+
Create a new reserved fixed IP with the specified configuration.
|
|
537
537
|
|
|
538
538
|
Args:
|
|
539
539
|
subnet_id: Reserved fixed IP will be allocated in this subnet
|
|
@@ -570,12 +570,12 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
|
|
|
570
570
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
571
571
|
) -> TaskIDList:
|
|
572
572
|
"""
|
|
573
|
-
Create reserved fixed IP
|
|
573
|
+
Create a new reserved fixed IP with the specified configuration.
|
|
574
574
|
|
|
575
575
|
Args:
|
|
576
576
|
network_id: Reserved fixed IP will be allocated in a subnet of this network
|
|
577
577
|
|
|
578
|
-
type: Must be 'any_subnet'.
|
|
578
|
+
type: Must be '`any_subnet`'.
|
|
579
579
|
|
|
580
580
|
ip_family: Which subnets should be selected: IPv4, IPv6 or use dual stack.
|
|
581
581
|
|
|
@@ -609,14 +609,14 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
|
|
|
609
609
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
610
610
|
) -> TaskIDList:
|
|
611
611
|
"""
|
|
612
|
-
Create reserved fixed IP
|
|
612
|
+
Create a new reserved fixed IP with the specified configuration.
|
|
613
613
|
|
|
614
614
|
Args:
|
|
615
615
|
ip_address: Reserved fixed IP will be allocated the given IP address
|
|
616
616
|
|
|
617
617
|
network_id: Reserved fixed IP will be allocated in a subnet of this network
|
|
618
618
|
|
|
619
|
-
type: Must be 'ip_address'.
|
|
619
|
+
type: Must be '`ip_address`'.
|
|
620
620
|
|
|
621
621
|
is_vip: If reserved fixed IP is a VIP
|
|
622
622
|
|
|
@@ -646,7 +646,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
|
|
|
646
646
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
647
647
|
) -> TaskIDList:
|
|
648
648
|
"""
|
|
649
|
-
Create reserved fixed IP
|
|
649
|
+
Create a new reserved fixed IP with the specified configuration.
|
|
650
650
|
|
|
651
651
|
Args:
|
|
652
652
|
port_id: Port ID to make a reserved fixed IP (for example, `vip_port_id` of the Load
|
|
@@ -736,7 +736,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
|
|
|
736
736
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
737
737
|
) -> AsyncPaginator[ReservedFixedIP, AsyncOffsetPage[ReservedFixedIP]]:
|
|
738
738
|
"""
|
|
739
|
-
List reserved fixed IPs
|
|
739
|
+
List all reserved fixed IPs in the specified project and region.
|
|
740
740
|
|
|
741
741
|
Args:
|
|
742
742
|
available_only: Set to true if the response should only list IP addresses that are not attached
|
|
@@ -754,9 +754,9 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
|
|
|
754
754
|
|
|
755
755
|
offset: Offset value is used to exclude the first set of records from the result
|
|
756
756
|
|
|
757
|
-
order_by: Ordering reserved fixed IP list result by name, status, updated_at
|
|
758
|
-
or fixed_ip_address fields
|
|
759
|
-
|
|
757
|
+
order_by: Ordering reserved fixed IP list result by name, status, `updated_at`,
|
|
758
|
+
`created_at` or `fixed_ip_address` fields and directions (status.asc), default
|
|
759
|
+
is "`fixed_ip_address`.asc"
|
|
760
760
|
|
|
761
761
|
vip_only: Set to true if the response should only list VIPs
|
|
762
762
|
|
|
@@ -812,7 +812,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
|
|
|
812
812
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
813
813
|
) -> TaskIDList:
|
|
814
814
|
"""
|
|
815
|
-
Delete reserved fixed
|
|
815
|
+
Delete a specific reserved fixed IP and all its associated resources.
|
|
816
816
|
|
|
817
817
|
Args:
|
|
818
818
|
extra_headers: Send extra headers
|
|
@@ -851,7 +851,7 @@ class AsyncReservedFixedIPsResource(AsyncAPIResource):
|
|
|
851
851
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
852
852
|
) -> ReservedFixedIP:
|
|
853
853
|
"""
|
|
854
|
-
Get reserved fixed IP
|
|
854
|
+
Get detailed information about a specific reserved fixed IP.
|
|
855
855
|
|
|
856
856
|
Args:
|
|
857
857
|
extra_headers: Send extra headers
|
|
@@ -63,7 +63,7 @@ class VipResource(SyncAPIResource):
|
|
|
63
63
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
64
64
|
) -> CandidatePortList:
|
|
65
65
|
"""
|
|
66
|
-
List instance ports that are available for connecting to VIP
|
|
66
|
+
List all instance ports that are available for connecting to a VIP.
|
|
67
67
|
|
|
68
68
|
Args:
|
|
69
69
|
extra_headers: Send extra headers
|
|
@@ -102,7 +102,7 @@ class VipResource(SyncAPIResource):
|
|
|
102
102
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
103
103
|
) -> ConnectedPortList:
|
|
104
104
|
"""
|
|
105
|
-
List instance ports that share VIP
|
|
105
|
+
List all instance ports that share a VIP.
|
|
106
106
|
|
|
107
107
|
Args:
|
|
108
108
|
extra_headers: Send extra headers
|
|
@@ -142,7 +142,7 @@ class VipResource(SyncAPIResource):
|
|
|
142
142
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
143
143
|
) -> ConnectedPortList:
|
|
144
144
|
"""
|
|
145
|
-
Replace ports that share VIP
|
|
145
|
+
Replace the list of instance ports that share a VIP.
|
|
146
146
|
|
|
147
147
|
Args:
|
|
148
148
|
port_ids: List of port IDs that will share one VIP
|
|
@@ -187,7 +187,7 @@ class VipResource(SyncAPIResource):
|
|
|
187
187
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
188
188
|
) -> ReservedFixedIP:
|
|
189
189
|
"""
|
|
190
|
-
|
|
190
|
+
Update the VIP status of a reserved fixed IP.
|
|
191
191
|
|
|
192
192
|
Args:
|
|
193
193
|
is_vip: If reserved fixed IP should be a VIP
|
|
@@ -230,7 +230,7 @@ class VipResource(SyncAPIResource):
|
|
|
230
230
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
231
231
|
) -> ConnectedPortList:
|
|
232
232
|
"""
|
|
233
|
-
Add ports
|
|
233
|
+
Add instance ports to share a VIP.
|
|
234
234
|
|
|
235
235
|
Args:
|
|
236
236
|
port_ids: List of port IDs that will share one VIP
|
|
@@ -295,7 +295,7 @@ class AsyncVipResource(AsyncAPIResource):
|
|
|
295
295
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
296
296
|
) -> CandidatePortList:
|
|
297
297
|
"""
|
|
298
|
-
List instance ports that are available for connecting to VIP
|
|
298
|
+
List all instance ports that are available for connecting to a VIP.
|
|
299
299
|
|
|
300
300
|
Args:
|
|
301
301
|
extra_headers: Send extra headers
|
|
@@ -334,7 +334,7 @@ class AsyncVipResource(AsyncAPIResource):
|
|
|
334
334
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
335
335
|
) -> ConnectedPortList:
|
|
336
336
|
"""
|
|
337
|
-
List instance ports that share VIP
|
|
337
|
+
List all instance ports that share a VIP.
|
|
338
338
|
|
|
339
339
|
Args:
|
|
340
340
|
extra_headers: Send extra headers
|
|
@@ -374,7 +374,7 @@ class AsyncVipResource(AsyncAPIResource):
|
|
|
374
374
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
375
375
|
) -> ConnectedPortList:
|
|
376
376
|
"""
|
|
377
|
-
Replace ports that share VIP
|
|
377
|
+
Replace the list of instance ports that share a VIP.
|
|
378
378
|
|
|
379
379
|
Args:
|
|
380
380
|
port_ids: List of port IDs that will share one VIP
|
|
@@ -419,7 +419,7 @@ class AsyncVipResource(AsyncAPIResource):
|
|
|
419
419
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
420
420
|
) -> ReservedFixedIP:
|
|
421
421
|
"""
|
|
422
|
-
|
|
422
|
+
Update the VIP status of a reserved fixed IP.
|
|
423
423
|
|
|
424
424
|
Args:
|
|
425
425
|
is_vip: If reserved fixed IP should be a VIP
|
|
@@ -462,7 +462,7 @@ class AsyncVipResource(AsyncAPIResource):
|
|
|
462
462
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
463
463
|
) -> ConnectedPortList:
|
|
464
464
|
"""
|
|
465
|
-
Add ports
|
|
465
|
+
Add instance ports to share a VIP.
|
|
466
466
|
|
|
467
467
|
Args:
|
|
468
468
|
port_ids: List of port IDs that will share one VIP
|
|
@@ -92,7 +92,7 @@ class RulesResource(SyncAPIResource):
|
|
|
92
92
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
93
93
|
) -> SecurityGroupRule:
|
|
94
94
|
"""
|
|
95
|
-
Add new rule to security group
|
|
95
|
+
Add a new rule to an existing security group.
|
|
96
96
|
|
|
97
97
|
Args:
|
|
98
98
|
description: Rule description
|
|
@@ -160,7 +160,7 @@ class RulesResource(SyncAPIResource):
|
|
|
160
160
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
161
161
|
) -> None:
|
|
162
162
|
"""
|
|
163
|
-
Delete security group
|
|
163
|
+
Delete a specific rule from a security group.
|
|
164
164
|
|
|
165
165
|
Args:
|
|
166
166
|
extra_headers: Send extra headers
|
|
@@ -235,7 +235,7 @@ class RulesResource(SyncAPIResource):
|
|
|
235
235
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
236
236
|
) -> SecurityGroupRule:
|
|
237
237
|
"""
|
|
238
|
-
|
|
238
|
+
Update the configuration of an existing security group rule.
|
|
239
239
|
|
|
240
240
|
Args:
|
|
241
241
|
direction: Ingress or egress, which is the direction in which the security group rule is
|
|
@@ -363,7 +363,7 @@ class AsyncRulesResource(AsyncAPIResource):
|
|
|
363
363
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
364
364
|
) -> SecurityGroupRule:
|
|
365
365
|
"""
|
|
366
|
-
Add new rule to security group
|
|
366
|
+
Add a new rule to an existing security group.
|
|
367
367
|
|
|
368
368
|
Args:
|
|
369
369
|
description: Rule description
|
|
@@ -431,7 +431,7 @@ class AsyncRulesResource(AsyncAPIResource):
|
|
|
431
431
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
432
432
|
) -> None:
|
|
433
433
|
"""
|
|
434
|
-
Delete security group
|
|
434
|
+
Delete a specific rule from a security group.
|
|
435
435
|
|
|
436
436
|
Args:
|
|
437
437
|
extra_headers: Send extra headers
|
|
@@ -506,7 +506,7 @@ class AsyncRulesResource(AsyncAPIResource):
|
|
|
506
506
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
507
507
|
) -> SecurityGroupRule:
|
|
508
508
|
"""
|
|
509
|
-
|
|
509
|
+
Update the configuration of an existing security group rule.
|
|
510
510
|
|
|
511
511
|
Args:
|
|
512
512
|
direction: Ingress or egress, which is the direction in which the security group rule is
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import List, Iterable
|
|
5
|
+
from typing import List, Iterable, Optional
|
|
6
6
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
@@ -33,6 +33,7 @@ from ....types.cloud import (
|
|
|
33
33
|
)
|
|
34
34
|
from ...._base_client import AsyncPaginator, make_request_options
|
|
35
35
|
from ....types.cloud.security_group import SecurityGroup
|
|
36
|
+
from ....types.cloud.tag_update_map_param import TagUpdateMapParam
|
|
36
37
|
|
|
37
38
|
__all__ = ["SecurityGroupsResource", "AsyncSecurityGroupsResource"]
|
|
38
39
|
|
|
@@ -76,7 +77,7 @@ class SecurityGroupsResource(SyncAPIResource):
|
|
|
76
77
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
77
78
|
) -> SecurityGroup:
|
|
78
79
|
"""
|
|
79
|
-
Create security group
|
|
80
|
+
Create a new security group with the specified configuration.
|
|
80
81
|
|
|
81
82
|
Args:
|
|
82
83
|
security_group: Security group
|
|
@@ -118,6 +119,7 @@ class SecurityGroupsResource(SyncAPIResource):
|
|
|
118
119
|
region_id: int | None = None,
|
|
119
120
|
changed_rules: Iterable[security_group_update_params.ChangedRule] | NotGiven = NOT_GIVEN,
|
|
120
121
|
name: str | NotGiven = NOT_GIVEN,
|
|
122
|
+
tags: Optional[TagUpdateMapParam] | NotGiven = NOT_GIVEN,
|
|
121
123
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
122
124
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
123
125
|
extra_headers: Headers | None = None,
|
|
@@ -126,13 +128,33 @@ class SecurityGroupsResource(SyncAPIResource):
|
|
|
126
128
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
127
129
|
) -> SecurityGroup:
|
|
128
130
|
"""
|
|
129
|
-
|
|
131
|
+
Update the configuration of an existing security group.
|
|
130
132
|
|
|
131
133
|
Args:
|
|
132
134
|
changed_rules: List of rules to create or delete
|
|
133
135
|
|
|
134
136
|
name: Name
|
|
135
137
|
|
|
138
|
+
tags: Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
|
|
139
|
+
key-value pairs to add or update tags. Set tag values to `null` to remove tags.
|
|
140
|
+
Unspecified tags remain unchanged. Read-only tags are always preserved and
|
|
141
|
+
cannot be modified. **Examples:**
|
|
142
|
+
|
|
143
|
+
- **Add/update tags:**
|
|
144
|
+
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
145
|
+
updates existing ones.
|
|
146
|
+
- **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
|
|
147
|
+
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
148
|
+
tags are preserved).
|
|
149
|
+
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
150
|
+
specified tags.
|
|
151
|
+
- **Mixed operations:**
|
|
152
|
+
`{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
|
|
153
|
+
adds/updates 'environment' and '`cost_center`' while removing
|
|
154
|
+
'`deprecated_tag`', preserving other existing tags.
|
|
155
|
+
- **Replace all:** first delete existing tags with null values, then add new
|
|
156
|
+
ones in the same request.
|
|
157
|
+
|
|
136
158
|
extra_headers: Send extra headers
|
|
137
159
|
|
|
138
160
|
extra_query: Add additional query parameters to the request
|
|
@@ -153,6 +175,7 @@ class SecurityGroupsResource(SyncAPIResource):
|
|
|
153
175
|
{
|
|
154
176
|
"changed_rules": changed_rules,
|
|
155
177
|
"name": name,
|
|
178
|
+
"tags": tags,
|
|
156
179
|
},
|
|
157
180
|
security_group_update_params.SecurityGroupUpdateParams,
|
|
158
181
|
),
|
|
@@ -179,18 +202,16 @@ class SecurityGroupsResource(SyncAPIResource):
|
|
|
179
202
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
180
203
|
) -> SyncOffsetPage[SecurityGroup]:
|
|
181
204
|
"""
|
|
182
|
-
|
|
205
|
+
List all security groups in the specified project and region.
|
|
183
206
|
|
|
184
207
|
Args:
|
|
185
|
-
limit: Limit the number of returned
|
|
208
|
+
limit: Limit the number of returned security groups
|
|
186
209
|
|
|
187
|
-
offset: Offset value is used to exclude the first set of records from the result
|
|
210
|
+
offset: Offset value is used to exclude the first set of records from the result
|
|
188
211
|
|
|
189
212
|
tag_key: Filter by tag keys.
|
|
190
213
|
|
|
191
|
-
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string.
|
|
192
|
-
--data-urlencode "tag_key_value={"key": "value"}" --url
|
|
193
|
-
"http://localhost:1111/v1/securitygroups/1/1"
|
|
214
|
+
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string.
|
|
194
215
|
|
|
195
216
|
extra_headers: Send extra headers
|
|
196
217
|
|
|
@@ -239,7 +260,7 @@ class SecurityGroupsResource(SyncAPIResource):
|
|
|
239
260
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
240
261
|
) -> None:
|
|
241
262
|
"""
|
|
242
|
-
Delete security group
|
|
263
|
+
Delete a specific security group and all its associated rules.
|
|
243
264
|
|
|
244
265
|
Args:
|
|
245
266
|
extra_headers: Send extra headers
|
|
@@ -278,9 +299,9 @@ class SecurityGroupsResource(SyncAPIResource):
|
|
|
278
299
|
extra_query: Query | None = None,
|
|
279
300
|
extra_body: Body | None = None,
|
|
280
301
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
281
|
-
) ->
|
|
302
|
+
) -> SecurityGroup:
|
|
282
303
|
"""
|
|
283
|
-
Create a deep copy of security group
|
|
304
|
+
Create a deep copy of an existing security group.
|
|
284
305
|
|
|
285
306
|
Args:
|
|
286
307
|
name: Name.
|
|
@@ -299,14 +320,13 @@ class SecurityGroupsResource(SyncAPIResource):
|
|
|
299
320
|
region_id = self._client._get_cloud_region_id_path_param()
|
|
300
321
|
if not group_id:
|
|
301
322
|
raise ValueError(f"Expected a non-empty value for `group_id` but received {group_id!r}")
|
|
302
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
303
323
|
return self._post(
|
|
304
324
|
f"/cloud/v1/securitygroups/{project_id}/{region_id}/{group_id}/copy",
|
|
305
325
|
body=maybe_transform({"name": name}, security_group_copy_params.SecurityGroupCopyParams),
|
|
306
326
|
options=make_request_options(
|
|
307
327
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
308
328
|
),
|
|
309
|
-
cast_to=
|
|
329
|
+
cast_to=SecurityGroup,
|
|
310
330
|
)
|
|
311
331
|
|
|
312
332
|
def get(
|
|
@@ -323,7 +343,7 @@ class SecurityGroupsResource(SyncAPIResource):
|
|
|
323
343
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
324
344
|
) -> SecurityGroup:
|
|
325
345
|
"""
|
|
326
|
-
Get security group
|
|
346
|
+
Get detailed information about a specific security group.
|
|
327
347
|
|
|
328
348
|
Args:
|
|
329
349
|
extra_headers: Send extra headers
|
|
@@ -362,7 +382,7 @@ class SecurityGroupsResource(SyncAPIResource):
|
|
|
362
382
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
363
383
|
) -> SecurityGroup:
|
|
364
384
|
"""
|
|
365
|
-
Revert security group
|
|
385
|
+
Revert a security group to its previous state.
|
|
366
386
|
|
|
367
387
|
Args:
|
|
368
388
|
extra_headers: Send extra headers
|
|
@@ -427,7 +447,7 @@ class AsyncSecurityGroupsResource(AsyncAPIResource):
|
|
|
427
447
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
428
448
|
) -> SecurityGroup:
|
|
429
449
|
"""
|
|
430
|
-
Create security group
|
|
450
|
+
Create a new security group with the specified configuration.
|
|
431
451
|
|
|
432
452
|
Args:
|
|
433
453
|
security_group: Security group
|
|
@@ -469,6 +489,7 @@ class AsyncSecurityGroupsResource(AsyncAPIResource):
|
|
|
469
489
|
region_id: int | None = None,
|
|
470
490
|
changed_rules: Iterable[security_group_update_params.ChangedRule] | NotGiven = NOT_GIVEN,
|
|
471
491
|
name: str | NotGiven = NOT_GIVEN,
|
|
492
|
+
tags: Optional[TagUpdateMapParam] | NotGiven = NOT_GIVEN,
|
|
472
493
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
473
494
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
474
495
|
extra_headers: Headers | None = None,
|
|
@@ -477,13 +498,33 @@ class AsyncSecurityGroupsResource(AsyncAPIResource):
|
|
|
477
498
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
478
499
|
) -> SecurityGroup:
|
|
479
500
|
"""
|
|
480
|
-
|
|
501
|
+
Update the configuration of an existing security group.
|
|
481
502
|
|
|
482
503
|
Args:
|
|
483
504
|
changed_rules: List of rules to create or delete
|
|
484
505
|
|
|
485
506
|
name: Name
|
|
486
507
|
|
|
508
|
+
tags: Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
|
|
509
|
+
key-value pairs to add or update tags. Set tag values to `null` to remove tags.
|
|
510
|
+
Unspecified tags remain unchanged. Read-only tags are always preserved and
|
|
511
|
+
cannot be modified. **Examples:**
|
|
512
|
+
|
|
513
|
+
- **Add/update tags:**
|
|
514
|
+
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
515
|
+
updates existing ones.
|
|
516
|
+
- **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
|
|
517
|
+
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
518
|
+
tags are preserved).
|
|
519
|
+
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
520
|
+
specified tags.
|
|
521
|
+
- **Mixed operations:**
|
|
522
|
+
`{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
|
|
523
|
+
adds/updates 'environment' and '`cost_center`' while removing
|
|
524
|
+
'`deprecated_tag`', preserving other existing tags.
|
|
525
|
+
- **Replace all:** first delete existing tags with null values, then add new
|
|
526
|
+
ones in the same request.
|
|
527
|
+
|
|
487
528
|
extra_headers: Send extra headers
|
|
488
529
|
|
|
489
530
|
extra_query: Add additional query parameters to the request
|
|
@@ -504,6 +545,7 @@ class AsyncSecurityGroupsResource(AsyncAPIResource):
|
|
|
504
545
|
{
|
|
505
546
|
"changed_rules": changed_rules,
|
|
506
547
|
"name": name,
|
|
548
|
+
"tags": tags,
|
|
507
549
|
},
|
|
508
550
|
security_group_update_params.SecurityGroupUpdateParams,
|
|
509
551
|
),
|
|
@@ -530,18 +572,16 @@ class AsyncSecurityGroupsResource(AsyncAPIResource):
|
|
|
530
572
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
531
573
|
) -> AsyncPaginator[SecurityGroup, AsyncOffsetPage[SecurityGroup]]:
|
|
532
574
|
"""
|
|
533
|
-
|
|
575
|
+
List all security groups in the specified project and region.
|
|
534
576
|
|
|
535
577
|
Args:
|
|
536
|
-
limit: Limit the number of returned
|
|
578
|
+
limit: Limit the number of returned security groups
|
|
537
579
|
|
|
538
|
-
offset: Offset value is used to exclude the first set of records from the result
|
|
580
|
+
offset: Offset value is used to exclude the first set of records from the result
|
|
539
581
|
|
|
540
582
|
tag_key: Filter by tag keys.
|
|
541
583
|
|
|
542
|
-
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string.
|
|
543
|
-
--data-urlencode "tag_key_value={"key": "value"}" --url
|
|
544
|
-
"http://localhost:1111/v1/securitygroups/1/1"
|
|
584
|
+
tag_key_value: Filter by tag key-value pairs. Must be a valid JSON string.
|
|
545
585
|
|
|
546
586
|
extra_headers: Send extra headers
|
|
547
587
|
|
|
@@ -590,7 +630,7 @@ class AsyncSecurityGroupsResource(AsyncAPIResource):
|
|
|
590
630
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
591
631
|
) -> None:
|
|
592
632
|
"""
|
|
593
|
-
Delete security group
|
|
633
|
+
Delete a specific security group and all its associated rules.
|
|
594
634
|
|
|
595
635
|
Args:
|
|
596
636
|
extra_headers: Send extra headers
|
|
@@ -629,9 +669,9 @@ class AsyncSecurityGroupsResource(AsyncAPIResource):
|
|
|
629
669
|
extra_query: Query | None = None,
|
|
630
670
|
extra_body: Body | None = None,
|
|
631
671
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
632
|
-
) ->
|
|
672
|
+
) -> SecurityGroup:
|
|
633
673
|
"""
|
|
634
|
-
Create a deep copy of security group
|
|
674
|
+
Create a deep copy of an existing security group.
|
|
635
675
|
|
|
636
676
|
Args:
|
|
637
677
|
name: Name.
|
|
@@ -650,14 +690,13 @@ class AsyncSecurityGroupsResource(AsyncAPIResource):
|
|
|
650
690
|
region_id = self._client._get_cloud_region_id_path_param()
|
|
651
691
|
if not group_id:
|
|
652
692
|
raise ValueError(f"Expected a non-empty value for `group_id` but received {group_id!r}")
|
|
653
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
654
693
|
return await self._post(
|
|
655
694
|
f"/cloud/v1/securitygroups/{project_id}/{region_id}/{group_id}/copy",
|
|
656
695
|
body=await async_maybe_transform({"name": name}, security_group_copy_params.SecurityGroupCopyParams),
|
|
657
696
|
options=make_request_options(
|
|
658
697
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
659
698
|
),
|
|
660
|
-
cast_to=
|
|
699
|
+
cast_to=SecurityGroup,
|
|
661
700
|
)
|
|
662
701
|
|
|
663
702
|
async def get(
|
|
@@ -674,7 +713,7 @@ class AsyncSecurityGroupsResource(AsyncAPIResource):
|
|
|
674
713
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
675
714
|
) -> SecurityGroup:
|
|
676
715
|
"""
|
|
677
|
-
Get security group
|
|
716
|
+
Get detailed information about a specific security group.
|
|
678
717
|
|
|
679
718
|
Args:
|
|
680
719
|
extra_headers: Send extra headers
|
|
@@ -713,7 +752,7 @@ class AsyncSecurityGroupsResource(AsyncAPIResource):
|
|
|
713
752
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
714
753
|
) -> SecurityGroup:
|
|
715
754
|
"""
|
|
716
|
-
Revert security group
|
|
755
|
+
Revert a security group to its previous state.
|
|
717
756
|
|
|
718
757
|
Args:
|
|
719
758
|
extra_headers: Send extra headers
|
|
@@ -60,7 +60,7 @@ class SSHKeysResource(SyncAPIResource):
|
|
|
60
60
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
61
61
|
) -> SSHKeyCreated:
|
|
62
62
|
"""
|
|
63
|
-
To generate a key, omit the public_key parameter from the request body
|
|
63
|
+
To generate a key, omit the `public_key` parameter from the request body
|
|
64
64
|
|
|
65
65
|
Args:
|
|
66
66
|
project_id: Project ID
|
|
@@ -322,7 +322,7 @@ class AsyncSSHKeysResource(AsyncAPIResource):
|
|
|
322
322
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
323
323
|
) -> SSHKeyCreated:
|
|
324
324
|
"""
|
|
325
|
-
To generate a key, omit the public_key parameter from the request body
|
|
325
|
+
To generate a key, omit the `public_key` parameter from the request body
|
|
326
326
|
|
|
327
327
|
Args:
|
|
328
328
|
project_id: Project ID
|