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
|
@@ -77,18 +77,15 @@ class ServersResource(SyncAPIResource):
|
|
|
77
77
|
For Linux,
|
|
78
78
|
|
|
79
79
|
- Use the `user_data` field to provide a
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
[cloud-init script](https://cloudinit.readthedocs.io/en/latest/reference/examples.html)
|
|
81
|
+
in base64 to apply configurations to the instance.
|
|
82
82
|
- Specify the `username` and `password` to create a new user.
|
|
83
83
|
- When only `password` is provided, it is set as the password for the default
|
|
84
84
|
user of the image.
|
|
85
|
-
- The `user_data` is ignored when the `password` is specified.
|
|
86
|
-
|
|
87
|
-
For Windows,
|
|
88
|
-
|
|
85
|
+
- The `user_data` is ignored when the `password` is specified. For Windows,
|
|
89
86
|
- Use the `user_data` field to provide a
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
[cloudbase-init script](https://cloudbase-init.readthedocs.io/en/latest/userdata.html#cloud-config)
|
|
88
|
+
in base64 to create new users on Windows.
|
|
92
89
|
- Use the `password` field to set the password for the 'Admin' user on Windows.
|
|
93
90
|
- The password of the Admin user cannot be updated via `user_data`.
|
|
94
91
|
- The `username` cannot be specified in the request.
|
|
@@ -117,18 +114,18 @@ class ServersResource(SyncAPIResource):
|
|
|
117
114
|
name_template: If you want server names to be automatically generated based on IP addresses,
|
|
118
115
|
you can provide a name template instead of specifying the name manually. The
|
|
119
116
|
template should include a placeholder that will be replaced during provisioning.
|
|
120
|
-
Supported placeholders are: `{ip_octets}` (last 3 octets of the IP),
|
|
121
|
-
`{two_ip_octets}`, and `{one_ip_octet}`.
|
|
117
|
+
Supported placeholders are: `{`ip_octets`}` (last 3 octets of the IP),
|
|
118
|
+
`{`two_ip_octets`}`, and `{`one_ip_octet`}`.
|
|
122
119
|
|
|
123
120
|
password: For Linux instances, 'username' and 'password' are used to create a new user.
|
|
124
121
|
When only 'password' is provided, it is set as the password for the default user
|
|
125
122
|
of the image. For Windows instances, 'username' cannot be specified. Use the
|
|
126
123
|
'password' field to set the password for the 'Admin' user on Windows. Use the
|
|
127
|
-
'user_data' field to provide a script to create new users on Windows. The
|
|
128
|
-
password of the Admin user cannot be updated via 'user_data'.
|
|
124
|
+
'`user_data`' field to provide a script to create new users on Windows. The
|
|
125
|
+
password of the Admin user cannot be updated via '`user_data`'.
|
|
129
126
|
|
|
130
127
|
ssh_key_name: Specifies the name of the SSH keypair, created via the
|
|
131
|
-
|
|
128
|
+
[/v1/`ssh_keys` endpoint](/docs/api-reference/ssh-keys/add-or-generate-ssh-key).
|
|
132
129
|
|
|
133
130
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
134
131
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
@@ -136,10 +133,10 @@ class ServersResource(SyncAPIResource):
|
|
|
136
133
|
modified by the user. Tags are also integrated with cost reports, allowing cost
|
|
137
134
|
data to be filtered based on tag keys or values.
|
|
138
135
|
|
|
139
|
-
user_data: String in base64 format. For Linux instances, 'user_data' is ignored when
|
|
136
|
+
user_data: String in base64 format. For Linux instances, '`user_data`' is ignored when
|
|
140
137
|
'password' field is provided. For Windows instances, Admin user password is set
|
|
141
|
-
by 'password' field and cannot be updated via 'user_data'. Examples of the
|
|
142
|
-
user_data
|
|
138
|
+
by 'password' field and cannot be updated via '`user_data`'. Examples of the
|
|
139
|
+
`user_data`: https://cloudinit.readthedocs.io/en/latest/topics/examples.html
|
|
143
140
|
|
|
144
141
|
username: For Linux instances, 'username' and 'password' are used to create a new user.
|
|
145
142
|
For Windows instances, 'username' cannot be specified. Use 'password' field to
|
|
@@ -233,9 +230,9 @@ class ServersResource(SyncAPIResource):
|
|
|
233
230
|
changes_since: Filters the instances by a date and time stamp when the instances last changed
|
|
234
231
|
status.
|
|
235
232
|
|
|
236
|
-
flavor_id: Filter out instances by flavor_id
|
|
233
|
+
flavor_id: Filter out instances by `flavor_id`. Flavor id must match exactly.
|
|
237
234
|
|
|
238
|
-
flavor_prefix: Filter out instances by flavor_prefix
|
|
235
|
+
flavor_prefix: Filter out instances by `flavor_prefix`.
|
|
239
236
|
|
|
240
237
|
include_k8s: Include managed k8s worker nodes
|
|
241
238
|
|
|
@@ -258,22 +255,22 @@ class ServersResource(SyncAPIResource):
|
|
|
258
255
|
|
|
259
256
|
order_by: Order by field and direction.
|
|
260
257
|
|
|
261
|
-
profile_name: Filter result by ddos protection profile name. Effective only with with_ddos
|
|
262
|
-
to true.
|
|
258
|
+
profile_name: Filter result by ddos protection profile name. Effective only with `with_ddos`
|
|
259
|
+
set to true.
|
|
263
260
|
|
|
264
|
-
protection_status: Filter result by DDoS protection_status
|
|
265
|
-
true. (Active, Queued or Error)
|
|
261
|
+
protection_status: Filter result by DDoS `protection_status`. Effective only with `with_ddos` set
|
|
262
|
+
to true. (Active, Queued or Error)
|
|
266
263
|
|
|
267
264
|
status: Filters instances by a server status, as a string.
|
|
268
265
|
|
|
269
266
|
tag_key_value: Optional. Filter by tag key-value pairs. curl -G --data-urlencode
|
|
270
|
-
"tag_key_value
|
|
267
|
+
"`tag_key_value`={"key": "value"}" --url
|
|
271
268
|
"https://example.com/cloud/v1/resource/1/1"
|
|
272
269
|
|
|
273
|
-
tag_value: Optional. Filter by tag values.
|
|
270
|
+
tag_value: Optional. Filter by tag values. ?`tag_value`=value1&`tag_value`=value2
|
|
274
271
|
|
|
275
272
|
type_ddos_profile: Return bare metals either only with advanced or only basic DDoS protection.
|
|
276
|
-
Effective only with with_ddos set to true. (advanced or basic)
|
|
273
|
+
Effective only with `with_ddos` set to true. (advanced or basic)
|
|
277
274
|
|
|
278
275
|
uuid: Filter the server list result by the UUID of the server. Allowed UUID part
|
|
279
276
|
|
|
@@ -355,7 +352,7 @@ class ServersResource(SyncAPIResource):
|
|
|
355
352
|
image_id: Image ID
|
|
356
353
|
|
|
357
354
|
user_data: String in base64 format. Must not be passed together with 'username' or
|
|
358
|
-
'password'. Examples of the user_data
|
|
355
|
+
'password'. Examples of the `user_data`:
|
|
359
356
|
https://cloudinit.readthedocs.io/en/latest/topics/examples.html
|
|
360
357
|
|
|
361
358
|
extra_headers: Send extra headers
|
|
@@ -387,7 +384,124 @@ class ServersResource(SyncAPIResource):
|
|
|
387
384
|
cast_to=TaskIDList,
|
|
388
385
|
)
|
|
389
386
|
|
|
387
|
+
def create_and_poll(
|
|
388
|
+
self,
|
|
389
|
+
*,
|
|
390
|
+
project_id: int | None = None,
|
|
391
|
+
region_id: int | None = None,
|
|
392
|
+
flavor: str,
|
|
393
|
+
interfaces: Iterable[server_create_params.Interface],
|
|
394
|
+
app_config: Optional[object] | NotGiven = NOT_GIVEN,
|
|
395
|
+
apptemplate_id: str | NotGiven = NOT_GIVEN,
|
|
396
|
+
ddos_profile: server_create_params.DDOSProfile | NotGiven = NOT_GIVEN,
|
|
397
|
+
image_id: str | NotGiven = NOT_GIVEN,
|
|
398
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
399
|
+
name_template: str | NotGiven = NOT_GIVEN,
|
|
400
|
+
password: str | NotGiven = NOT_GIVEN,
|
|
401
|
+
ssh_key_name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
402
|
+
tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
|
|
403
|
+
user_data: str | NotGiven = NOT_GIVEN,
|
|
404
|
+
username: str | NotGiven = NOT_GIVEN,
|
|
405
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
406
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
407
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
408
|
+
extra_headers: Headers | None = None,
|
|
409
|
+
extra_query: Query | None = None,
|
|
410
|
+
extra_body: Body | None = None,
|
|
411
|
+
) -> BaremetalServer:
|
|
412
|
+
"""
|
|
413
|
+
Create a bare metal server and wait for it to be ready.
|
|
414
|
+
"""
|
|
415
|
+
response = self.create(
|
|
416
|
+
project_id=project_id,
|
|
417
|
+
region_id=region_id,
|
|
418
|
+
flavor=flavor,
|
|
419
|
+
interfaces=interfaces,
|
|
420
|
+
app_config=app_config,
|
|
421
|
+
apptemplate_id=apptemplate_id,
|
|
422
|
+
ddos_profile=ddos_profile,
|
|
423
|
+
image_id=image_id,
|
|
424
|
+
name=name,
|
|
425
|
+
name_template=name_template,
|
|
426
|
+
password=password,
|
|
427
|
+
ssh_key_name=ssh_key_name,
|
|
428
|
+
tags=tags,
|
|
429
|
+
user_data=user_data,
|
|
430
|
+
username=username,
|
|
431
|
+
extra_headers=extra_headers,
|
|
432
|
+
extra_query=extra_query,
|
|
433
|
+
extra_body=extra_body,
|
|
434
|
+
)
|
|
435
|
+
if not response.tasks or len(response.tasks) != 1:
|
|
436
|
+
raise ValueError(f"Expected exactly one task to be created")
|
|
437
|
+
task = self._client.cloud.tasks.poll(
|
|
438
|
+
response.tasks[0],
|
|
439
|
+
extra_headers=extra_headers,
|
|
440
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
441
|
+
)
|
|
442
|
+
if not task.created_resources or not task.created_resources.instances:
|
|
443
|
+
raise ValueError("No server was created")
|
|
444
|
+
server_id = task.created_resources.instances[0]
|
|
445
|
+
servers = self.list(
|
|
446
|
+
project_id=project_id,
|
|
447
|
+
region_id=region_id,
|
|
448
|
+
uuid=server_id,
|
|
449
|
+
extra_headers=extra_headers,
|
|
450
|
+
extra_query=extra_query,
|
|
451
|
+
extra_body=extra_body,
|
|
452
|
+
)
|
|
453
|
+
if len(servers.results) != 1:
|
|
454
|
+
raise ValueError(f"Server {server_id} not found")
|
|
455
|
+
return servers.results[0]
|
|
456
|
+
|
|
457
|
+
def rebuild_and_poll(
|
|
458
|
+
self,
|
|
459
|
+
server_id: str,
|
|
460
|
+
*,
|
|
461
|
+
project_id: int | None = None,
|
|
462
|
+
region_id: int | None = None,
|
|
463
|
+
image_id: str | NotGiven = NOT_GIVEN,
|
|
464
|
+
user_data: str | NotGiven = NOT_GIVEN,
|
|
465
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
466
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
467
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
468
|
+
extra_headers: Headers | None = None,
|
|
469
|
+
extra_query: Query | None = None,
|
|
470
|
+
extra_body: Body | None = None,
|
|
471
|
+
) -> BaremetalServer:
|
|
472
|
+
"""
|
|
473
|
+
Rebuild a bare metal server and wait for it to be ready. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
|
|
474
|
+
"""
|
|
475
|
+
response = self.rebuild(
|
|
476
|
+
server_id=server_id,
|
|
477
|
+
project_id=project_id,
|
|
478
|
+
region_id=region_id,
|
|
479
|
+
image_id=image_id,
|
|
480
|
+
user_data=user_data,
|
|
481
|
+
extra_headers=extra_headers,
|
|
482
|
+
extra_query=extra_query,
|
|
483
|
+
extra_body=extra_body,
|
|
484
|
+
)
|
|
485
|
+
if not response.tasks:
|
|
486
|
+
raise ValueError("Expected at least one task to be created")
|
|
487
|
+
self._client.cloud.tasks.poll(
|
|
488
|
+
response.tasks[0],
|
|
489
|
+
extra_headers=extra_headers,
|
|
490
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
491
|
+
)
|
|
492
|
+
servers = self.list(
|
|
493
|
+
project_id=project_id,
|
|
494
|
+
region_id=region_id,
|
|
495
|
+
uuid=server_id,
|
|
496
|
+
extra_headers=extra_headers,
|
|
497
|
+
extra_query=extra_query,
|
|
498
|
+
extra_body=extra_body,
|
|
499
|
+
)
|
|
500
|
+
if len(servers.results) != 1:
|
|
501
|
+
raise ValueError(f"Server {server_id} not found")
|
|
502
|
+
return servers.results[0]
|
|
390
503
|
|
|
504
|
+
|
|
391
505
|
class AsyncServersResource(AsyncAPIResource):
|
|
392
506
|
@cached_property
|
|
393
507
|
def with_raw_response(self) -> AsyncServersResourceWithRawResponse:
|
|
@@ -437,18 +551,15 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
437
551
|
For Linux,
|
|
438
552
|
|
|
439
553
|
- Use the `user_data` field to provide a
|
|
440
|
-
|
|
441
|
-
|
|
554
|
+
[cloud-init script](https://cloudinit.readthedocs.io/en/latest/reference/examples.html)
|
|
555
|
+
in base64 to apply configurations to the instance.
|
|
442
556
|
- Specify the `username` and `password` to create a new user.
|
|
443
557
|
- When only `password` is provided, it is set as the password for the default
|
|
444
558
|
user of the image.
|
|
445
|
-
- The `user_data` is ignored when the `password` is specified.
|
|
446
|
-
|
|
447
|
-
For Windows,
|
|
448
|
-
|
|
559
|
+
- The `user_data` is ignored when the `password` is specified. For Windows,
|
|
449
560
|
- Use the `user_data` field to provide a
|
|
450
|
-
|
|
451
|
-
|
|
561
|
+
[cloudbase-init script](https://cloudbase-init.readthedocs.io/en/latest/userdata.html#cloud-config)
|
|
562
|
+
in base64 to create new users on Windows.
|
|
452
563
|
- Use the `password` field to set the password for the 'Admin' user on Windows.
|
|
453
564
|
- The password of the Admin user cannot be updated via `user_data`.
|
|
454
565
|
- The `username` cannot be specified in the request.
|
|
@@ -477,18 +588,18 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
477
588
|
name_template: If you want server names to be automatically generated based on IP addresses,
|
|
478
589
|
you can provide a name template instead of specifying the name manually. The
|
|
479
590
|
template should include a placeholder that will be replaced during provisioning.
|
|
480
|
-
Supported placeholders are: `{ip_octets}` (last 3 octets of the IP),
|
|
481
|
-
`{two_ip_octets}`, and `{one_ip_octet}`.
|
|
591
|
+
Supported placeholders are: `{`ip_octets`}` (last 3 octets of the IP),
|
|
592
|
+
`{`two_ip_octets`}`, and `{`one_ip_octet`}`.
|
|
482
593
|
|
|
483
594
|
password: For Linux instances, 'username' and 'password' are used to create a new user.
|
|
484
595
|
When only 'password' is provided, it is set as the password for the default user
|
|
485
596
|
of the image. For Windows instances, 'username' cannot be specified. Use the
|
|
486
597
|
'password' field to set the password for the 'Admin' user on Windows. Use the
|
|
487
|
-
'user_data' field to provide a script to create new users on Windows. The
|
|
488
|
-
password of the Admin user cannot be updated via 'user_data'.
|
|
598
|
+
'`user_data`' field to provide a script to create new users on Windows. The
|
|
599
|
+
password of the Admin user cannot be updated via '`user_data`'.
|
|
489
600
|
|
|
490
601
|
ssh_key_name: Specifies the name of the SSH keypair, created via the
|
|
491
|
-
|
|
602
|
+
[/v1/`ssh_keys` endpoint](/docs/api-reference/ssh-keys/add-or-generate-ssh-key).
|
|
492
603
|
|
|
493
604
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
494
605
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
@@ -496,10 +607,10 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
496
607
|
modified by the user. Tags are also integrated with cost reports, allowing cost
|
|
497
608
|
data to be filtered based on tag keys or values.
|
|
498
609
|
|
|
499
|
-
user_data: String in base64 format. For Linux instances, 'user_data' is ignored when
|
|
610
|
+
user_data: String in base64 format. For Linux instances, '`user_data`' is ignored when
|
|
500
611
|
'password' field is provided. For Windows instances, Admin user password is set
|
|
501
|
-
by 'password' field and cannot be updated via 'user_data'. Examples of the
|
|
502
|
-
user_data
|
|
612
|
+
by 'password' field and cannot be updated via '`user_data`'. Examples of the
|
|
613
|
+
`user_data`: https://cloudinit.readthedocs.io/en/latest/topics/examples.html
|
|
503
614
|
|
|
504
615
|
username: For Linux instances, 'username' and 'password' are used to create a new user.
|
|
505
616
|
For Windows instances, 'username' cannot be specified. Use 'password' field to
|
|
@@ -593,9 +704,9 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
593
704
|
changes_since: Filters the instances by a date and time stamp when the instances last changed
|
|
594
705
|
status.
|
|
595
706
|
|
|
596
|
-
flavor_id: Filter out instances by flavor_id
|
|
707
|
+
flavor_id: Filter out instances by `flavor_id`. Flavor id must match exactly.
|
|
597
708
|
|
|
598
|
-
flavor_prefix: Filter out instances by flavor_prefix
|
|
709
|
+
flavor_prefix: Filter out instances by `flavor_prefix`.
|
|
599
710
|
|
|
600
711
|
include_k8s: Include managed k8s worker nodes
|
|
601
712
|
|
|
@@ -618,22 +729,22 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
618
729
|
|
|
619
730
|
order_by: Order by field and direction.
|
|
620
731
|
|
|
621
|
-
profile_name: Filter result by ddos protection profile name. Effective only with with_ddos
|
|
622
|
-
to true.
|
|
732
|
+
profile_name: Filter result by ddos protection profile name. Effective only with `with_ddos`
|
|
733
|
+
set to true.
|
|
623
734
|
|
|
624
|
-
protection_status: Filter result by DDoS protection_status
|
|
625
|
-
true. (Active, Queued or Error)
|
|
735
|
+
protection_status: Filter result by DDoS `protection_status`. Effective only with `with_ddos` set
|
|
736
|
+
to true. (Active, Queued or Error)
|
|
626
737
|
|
|
627
738
|
status: Filters instances by a server status, as a string.
|
|
628
739
|
|
|
629
740
|
tag_key_value: Optional. Filter by tag key-value pairs. curl -G --data-urlencode
|
|
630
|
-
"tag_key_value
|
|
741
|
+
"`tag_key_value`={"key": "value"}" --url
|
|
631
742
|
"https://example.com/cloud/v1/resource/1/1"
|
|
632
743
|
|
|
633
|
-
tag_value: Optional. Filter by tag values.
|
|
744
|
+
tag_value: Optional. Filter by tag values. ?`tag_value`=value1&`tag_value`=value2
|
|
634
745
|
|
|
635
746
|
type_ddos_profile: Return bare metals either only with advanced or only basic DDoS protection.
|
|
636
|
-
Effective only with with_ddos set to true. (advanced or basic)
|
|
747
|
+
Effective only with `with_ddos` set to true. (advanced or basic)
|
|
637
748
|
|
|
638
749
|
uuid: Filter the server list result by the UUID of the server. Allowed UUID part
|
|
639
750
|
|
|
@@ -715,7 +826,7 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
715
826
|
image_id: Image ID
|
|
716
827
|
|
|
717
828
|
user_data: String in base64 format. Must not be passed together with 'username' or
|
|
718
|
-
'password'. Examples of the user_data
|
|
829
|
+
'password'. Examples of the `user_data`:
|
|
719
830
|
https://cloudinit.readthedocs.io/en/latest/topics/examples.html
|
|
720
831
|
|
|
721
832
|
extra_headers: Send extra headers
|
|
@@ -747,6 +858,123 @@ class AsyncServersResource(AsyncAPIResource):
|
|
|
747
858
|
cast_to=TaskIDList,
|
|
748
859
|
)
|
|
749
860
|
|
|
861
|
+
async def create_and_poll(
|
|
862
|
+
self,
|
|
863
|
+
*,
|
|
864
|
+
project_id: int | None = None,
|
|
865
|
+
region_id: int | None = None,
|
|
866
|
+
flavor: str,
|
|
867
|
+
interfaces: Iterable[server_create_params.Interface],
|
|
868
|
+
app_config: Optional[object] | NotGiven = NOT_GIVEN,
|
|
869
|
+
apptemplate_id: str | NotGiven = NOT_GIVEN,
|
|
870
|
+
ddos_profile: server_create_params.DDOSProfile | NotGiven = NOT_GIVEN,
|
|
871
|
+
image_id: str | NotGiven = NOT_GIVEN,
|
|
872
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
873
|
+
name_template: str | NotGiven = NOT_GIVEN,
|
|
874
|
+
password: str | NotGiven = NOT_GIVEN,
|
|
875
|
+
ssh_key_name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
876
|
+
tags: TagUpdateMapParam | NotGiven = NOT_GIVEN,
|
|
877
|
+
user_data: str | NotGiven = NOT_GIVEN,
|
|
878
|
+
username: str | NotGiven = NOT_GIVEN,
|
|
879
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
880
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
881
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
882
|
+
extra_headers: Headers | None = None,
|
|
883
|
+
extra_query: Query | None = None,
|
|
884
|
+
extra_body: Body | None = None,
|
|
885
|
+
) -> BaremetalServer:
|
|
886
|
+
"""
|
|
887
|
+
Create a bare metal server and wait for it to be ready.
|
|
888
|
+
"""
|
|
889
|
+
response = await self.create(
|
|
890
|
+
project_id=project_id,
|
|
891
|
+
region_id=region_id,
|
|
892
|
+
flavor=flavor,
|
|
893
|
+
interfaces=interfaces,
|
|
894
|
+
app_config=app_config,
|
|
895
|
+
apptemplate_id=apptemplate_id,
|
|
896
|
+
ddos_profile=ddos_profile,
|
|
897
|
+
image_id=image_id,
|
|
898
|
+
name=name,
|
|
899
|
+
name_template=name_template,
|
|
900
|
+
password=password,
|
|
901
|
+
ssh_key_name=ssh_key_name,
|
|
902
|
+
tags=tags,
|
|
903
|
+
user_data=user_data,
|
|
904
|
+
username=username,
|
|
905
|
+
extra_headers=extra_headers,
|
|
906
|
+
extra_query=extra_query,
|
|
907
|
+
extra_body=extra_body,
|
|
908
|
+
)
|
|
909
|
+
if not response.tasks or len(response.tasks) != 1:
|
|
910
|
+
raise ValueError(f"Expected exactly one task to be created")
|
|
911
|
+
task =await self._client.cloud.tasks.poll(
|
|
912
|
+
response.tasks[0],
|
|
913
|
+
extra_headers=extra_headers,
|
|
914
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
915
|
+
)
|
|
916
|
+
if not task.created_resources or not task.created_resources.instances:
|
|
917
|
+
raise ValueError("No server was created")
|
|
918
|
+
server_id = task.created_resources.instances[0]
|
|
919
|
+
servers = await self.list(
|
|
920
|
+
project_id=project_id,
|
|
921
|
+
region_id=region_id,
|
|
922
|
+
uuid=server_id,
|
|
923
|
+
extra_headers=extra_headers,
|
|
924
|
+
extra_query=extra_query,
|
|
925
|
+
extra_body=extra_body,
|
|
926
|
+
)
|
|
927
|
+
if len(servers.results) != 1:
|
|
928
|
+
raise ValueError(f"Server {server_id} not found")
|
|
929
|
+
return servers.results[0]
|
|
930
|
+
|
|
931
|
+
async def rebuild_and_poll(
|
|
932
|
+
self,
|
|
933
|
+
server_id: str,
|
|
934
|
+
*,
|
|
935
|
+
project_id: int | None = None,
|
|
936
|
+
region_id: int | None = None,
|
|
937
|
+
image_id: str | NotGiven = NOT_GIVEN,
|
|
938
|
+
user_data: str | NotGiven = NOT_GIVEN,
|
|
939
|
+
polling_interval_seconds: int | NotGiven = NOT_GIVEN,
|
|
940
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
941
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
942
|
+
extra_headers: Headers | None = None,
|
|
943
|
+
extra_query: Query | None = None,
|
|
944
|
+
extra_body: Body | None = None,
|
|
945
|
+
) -> BaremetalServer:
|
|
946
|
+
"""
|
|
947
|
+
Rebuild a bare metal server and wait for it to be ready. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
|
|
948
|
+
"""
|
|
949
|
+
response = await self.rebuild(
|
|
950
|
+
server_id=server_id,
|
|
951
|
+
project_id=project_id,
|
|
952
|
+
region_id=region_id,
|
|
953
|
+
image_id=image_id,
|
|
954
|
+
user_data=user_data,
|
|
955
|
+
extra_headers=extra_headers,
|
|
956
|
+
extra_query=extra_query,
|
|
957
|
+
extra_body=extra_body,
|
|
958
|
+
)
|
|
959
|
+
if not response.tasks:
|
|
960
|
+
raise ValueError("Expected at least one task to be created")
|
|
961
|
+
await self._client.cloud.tasks.poll(
|
|
962
|
+
response.tasks[0],
|
|
963
|
+
extra_headers=extra_headers,
|
|
964
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
965
|
+
)
|
|
966
|
+
servers = await self.list(
|
|
967
|
+
project_id=project_id,
|
|
968
|
+
region_id=region_id,
|
|
969
|
+
uuid=server_id,
|
|
970
|
+
extra_headers=extra_headers,
|
|
971
|
+
extra_query=extra_query,
|
|
972
|
+
extra_body=extra_body,
|
|
973
|
+
)
|
|
974
|
+
if len(servers.results) != 1:
|
|
975
|
+
raise ValueError(f"Server {server_id} not found")
|
|
976
|
+
return servers.results[0]
|
|
977
|
+
|
|
750
978
|
|
|
751
979
|
class ServersResourceWithRawResponse:
|
|
752
980
|
def __init__(self, servers: ServersResource) -> None:
|
|
@@ -58,6 +58,15 @@ class BillingReservationsResource(SyncAPIResource):
|
|
|
58
58
|
limit: int | NotGiven = NOT_GIVEN,
|
|
59
59
|
metric_name: str | NotGiven = NOT_GIVEN,
|
|
60
60
|
offset: int | NotGiven = NOT_GIVEN,
|
|
61
|
+
order_by: Literal[
|
|
62
|
+
"active_from.asc",
|
|
63
|
+
"active_from.desc",
|
|
64
|
+
"active_to.asc",
|
|
65
|
+
"active_to.desc",
|
|
66
|
+
"created_at.asc",
|
|
67
|
+
"created_at.desc",
|
|
68
|
+
]
|
|
69
|
+
| NotGiven = NOT_GIVEN,
|
|
61
70
|
region_id: int | NotGiven = NOT_GIVEN,
|
|
62
71
|
status: List[
|
|
63
72
|
Literal[
|
|
@@ -96,6 +105,8 @@ class BillingReservationsResource(SyncAPIResource):
|
|
|
96
105
|
|
|
97
106
|
offset: Offset in reservation list
|
|
98
107
|
|
|
108
|
+
order_by: Order by field and direction.
|
|
109
|
+
|
|
99
110
|
region_id: Region for reservation
|
|
100
111
|
|
|
101
112
|
status: Field for fixed a status by reservation workflow
|
|
@@ -127,6 +138,7 @@ class BillingReservationsResource(SyncAPIResource):
|
|
|
127
138
|
"limit": limit,
|
|
128
139
|
"metric_name": metric_name,
|
|
129
140
|
"offset": offset,
|
|
141
|
+
"order_by": order_by,
|
|
130
142
|
"region_id": region_id,
|
|
131
143
|
"status": status,
|
|
132
144
|
},
|
|
@@ -202,6 +214,15 @@ class AsyncBillingReservationsResource(AsyncAPIResource):
|
|
|
202
214
|
limit: int | NotGiven = NOT_GIVEN,
|
|
203
215
|
metric_name: str | NotGiven = NOT_GIVEN,
|
|
204
216
|
offset: int | NotGiven = NOT_GIVEN,
|
|
217
|
+
order_by: Literal[
|
|
218
|
+
"active_from.asc",
|
|
219
|
+
"active_from.desc",
|
|
220
|
+
"active_to.asc",
|
|
221
|
+
"active_to.desc",
|
|
222
|
+
"created_at.asc",
|
|
223
|
+
"created_at.desc",
|
|
224
|
+
]
|
|
225
|
+
| NotGiven = NOT_GIVEN,
|
|
205
226
|
region_id: int | NotGiven = NOT_GIVEN,
|
|
206
227
|
status: List[
|
|
207
228
|
Literal[
|
|
@@ -240,6 +261,8 @@ class AsyncBillingReservationsResource(AsyncAPIResource):
|
|
|
240
261
|
|
|
241
262
|
offset: Offset in reservation list
|
|
242
263
|
|
|
264
|
+
order_by: Order by field and direction.
|
|
265
|
+
|
|
243
266
|
region_id: Region for reservation
|
|
244
267
|
|
|
245
268
|
status: Field for fixed a status by reservation workflow
|
|
@@ -271,6 +294,7 @@ class AsyncBillingReservationsResource(AsyncAPIResource):
|
|
|
271
294
|
"limit": limit,
|
|
272
295
|
"metric_name": metric_name,
|
|
273
296
|
"offset": offset,
|
|
297
|
+
"order_by": order_by,
|
|
274
298
|
"region_id": region_id,
|
|
275
299
|
"status": status,
|
|
276
300
|
},
|
|
@@ -269,7 +269,9 @@ class FileSharesResource(SyncAPIResource):
|
|
|
269
269
|
project_id: int | None = None,
|
|
270
270
|
region_id: int | None = None,
|
|
271
271
|
limit: int | NotGiven = NOT_GIVEN,
|
|
272
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
272
273
|
offset: int | NotGiven = NOT_GIVEN,
|
|
274
|
+
type_name: Literal["standard", "vast"] | NotGiven = NOT_GIVEN,
|
|
273
275
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
274
276
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
275
277
|
extra_headers: Headers | None = None,
|
|
@@ -287,9 +289,13 @@ class FileSharesResource(SyncAPIResource):
|
|
|
287
289
|
|
|
288
290
|
limit: Optional. Limit the number of returned items
|
|
289
291
|
|
|
292
|
+
name: File share name. Uses partial match.
|
|
293
|
+
|
|
290
294
|
offset: Optional. Offset value is used to exclude the first set of records from the
|
|
291
295
|
result
|
|
292
296
|
|
|
297
|
+
type_name: File share type name
|
|
298
|
+
|
|
293
299
|
extra_headers: Send extra headers
|
|
294
300
|
|
|
295
301
|
extra_query: Add additional query parameters to the request
|
|
@@ -313,7 +319,9 @@ class FileSharesResource(SyncAPIResource):
|
|
|
313
319
|
query=maybe_transform(
|
|
314
320
|
{
|
|
315
321
|
"limit": limit,
|
|
322
|
+
"name": name,
|
|
316
323
|
"offset": offset,
|
|
324
|
+
"type_name": type_name,
|
|
317
325
|
},
|
|
318
326
|
file_share_list_params.FileShareListParams,
|
|
319
327
|
),
|
|
@@ -690,7 +698,9 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
690
698
|
project_id: int | None = None,
|
|
691
699
|
region_id: int | None = None,
|
|
692
700
|
limit: int | NotGiven = NOT_GIVEN,
|
|
701
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
693
702
|
offset: int | NotGiven = NOT_GIVEN,
|
|
703
|
+
type_name: Literal["standard", "vast"] | NotGiven = NOT_GIVEN,
|
|
694
704
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
695
705
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
696
706
|
extra_headers: Headers | None = None,
|
|
@@ -708,9 +718,13 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
708
718
|
|
|
709
719
|
limit: Optional. Limit the number of returned items
|
|
710
720
|
|
|
721
|
+
name: File share name. Uses partial match.
|
|
722
|
+
|
|
711
723
|
offset: Optional. Offset value is used to exclude the first set of records from the
|
|
712
724
|
result
|
|
713
725
|
|
|
726
|
+
type_name: File share type name
|
|
727
|
+
|
|
714
728
|
extra_headers: Send extra headers
|
|
715
729
|
|
|
716
730
|
extra_query: Add additional query parameters to the request
|
|
@@ -734,7 +748,9 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
734
748
|
query=maybe_transform(
|
|
735
749
|
{
|
|
736
750
|
"limit": limit,
|
|
751
|
+
"name": name,
|
|
737
752
|
"offset": offset,
|
|
753
|
+
"type_name": type_name,
|
|
738
754
|
},
|
|
739
755
|
file_share_list_params.FileShareListParams,
|
|
740
756
|
),
|
|
@@ -139,10 +139,10 @@ class FloatingIPsResource(SyncAPIResource):
|
|
|
139
139
|
offset: Optional. Offset value is used to exclude the first set of records from the
|
|
140
140
|
result
|
|
141
141
|
|
|
142
|
-
tag_key: Optional. Filter by tag keys.
|
|
142
|
+
tag_key: Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
|
|
143
143
|
|
|
144
144
|
tag_key_value: Optional. Filter by tag key-value pairs. curl -G --data-urlencode
|
|
145
|
-
"tag_key_value
|
|
145
|
+
"`tag_key_value`={"key": "value"}" --url
|
|
146
146
|
"https://example.com/cloud/v1/resource/1/1"
|
|
147
147
|
|
|
148
148
|
extra_headers: Send extra headers
|
|
@@ -460,10 +460,10 @@ class AsyncFloatingIPsResource(AsyncAPIResource):
|
|
|
460
460
|
offset: Optional. Offset value is used to exclude the first set of records from the
|
|
461
461
|
result
|
|
462
462
|
|
|
463
|
-
tag_key: Optional. Filter by tag keys.
|
|
463
|
+
tag_key: Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
|
|
464
464
|
|
|
465
465
|
tag_key_value: Optional. Filter by tag key-value pairs. curl -G --data-urlencode
|
|
466
|
-
"tag_key_value
|
|
466
|
+
"`tag_key_value`={"key": "value"}" --url
|
|
467
467
|
"https://example.com/cloud/v1/resource/1/1"
|
|
468
468
|
|
|
469
469
|
extra_headers: Send extra headers
|