mv-oci-sdk 2.142.0__py3-none-any.whl → 2.142.0.2__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (248) hide show
  1. {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.2.dist-info}/METADATA +3 -3
  2. {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.2.dist-info}/RECORD +248 -6
  3. oci/file_storage/__init__.py +14 -0
  4. oci/file_storage/file_storage_client.py +8601 -0
  5. oci/file_storage/file_storage_client_composite_operations.py +2068 -0
  6. oci/file_storage/models/__init__.py +130 -0
  7. oci/file_storage/models/change_file_system_compartment_details.py +76 -0
  8. oci/file_storage/models/change_filesystem_snapshot_policy_compartment_details.py +76 -0
  9. oci/file_storage/models/change_mount_target_compartment_details.py +76 -0
  10. oci/file_storage/models/change_outbound_connector_compartment_details.py +78 -0
  11. oci/file_storage/models/change_replication_compartment_details.py +76 -0
  12. oci/file_storage/models/client_options.py +389 -0
  13. oci/file_storage/models/create_export_details.py +303 -0
  14. oci/file_storage/models/create_file_system_details.py +425 -0
  15. oci/file_storage/models/create_filesystem_snapshot_policy_details.py +337 -0
  16. oci/file_storage/models/create_kerberos_details.py +200 -0
  17. oci/file_storage/models/create_ldap_bind_account_details.py +220 -0
  18. oci/file_storage/models/create_ldap_idmap_details.py +317 -0
  19. oci/file_storage/models/create_mount_target_details.py +581 -0
  20. oci/file_storage/models/create_outbound_connector_details.py +309 -0
  21. oci/file_storage/models/create_replication_details.py +325 -0
  22. oci/file_storage/models/create_snapshot_details.py +261 -0
  23. oci/file_storage/models/endpoint.py +103 -0
  24. oci/file_storage/models/export.py +456 -0
  25. oci/file_storage/models/export_set.py +411 -0
  26. oci/file_storage/models/export_set_summary.py +316 -0
  27. oci/file_storage/models/export_summary.py +343 -0
  28. oci/file_storage/models/file_system.py +818 -0
  29. oci/file_storage/models/file_system_summary.py +659 -0
  30. oci/file_storage/models/filesystem_snapshot_policy.py +473 -0
  31. oci/file_storage/models/filesystem_snapshot_policy_summary.py +429 -0
  32. oci/file_storage/models/kerberos.py +200 -0
  33. oci/file_storage/models/kerberos_keytab_entry.py +166 -0
  34. oci/file_storage/models/key_tab_secret_details.py +138 -0
  35. oci/file_storage/models/ldap_bind_account.py +243 -0
  36. oci/file_storage/models/ldap_bind_account_summary.py +176 -0
  37. oci/file_storage/models/ldap_idmap.py +317 -0
  38. oci/file_storage/models/mount_target.py +828 -0
  39. oci/file_storage/models/mount_target_summary.py +696 -0
  40. oci/file_storage/models/outbound_connector.py +453 -0
  41. oci/file_storage/models/outbound_connector_summary.py +438 -0
  42. oci/file_storage/models/replication.py +740 -0
  43. oci/file_storage/models/replication_estimate.py +196 -0
  44. oci/file_storage/models/replication_summary.py +491 -0
  45. oci/file_storage/models/replication_target.py +679 -0
  46. oci/file_storage/models/replication_target_summary.py +425 -0
  47. oci/file_storage/models/resource_lock.py +185 -0
  48. oci/file_storage/models/schedule_downgrade_shape_mount_target_details.py +78 -0
  49. oci/file_storage/models/snapshot.py +638 -0
  50. oci/file_storage/models/snapshot_schedule.py +487 -0
  51. oci/file_storage/models/snapshot_summary.py +601 -0
  52. oci/file_storage/models/source_details.py +119 -0
  53. oci/file_storage/models/update_export_details.py +111 -0
  54. oci/file_storage/models/update_export_set_details.py +172 -0
  55. oci/file_storage/models/update_file_system_details.py +246 -0
  56. oci/file_storage/models/update_filesystem_snapshot_policy_details.py +236 -0
  57. oci/file_storage/models/update_kerberos_details.py +200 -0
  58. oci/file_storage/models/update_ldap_idmap_details.py +317 -0
  59. oci/file_storage/models/update_mount_target_details.py +286 -0
  60. oci/file_storage/models/update_outbound_connector_details.py +158 -0
  61. oci/file_storage/models/update_replication_details.py +189 -0
  62. oci/file_storage/models/update_snapshot_details.py +156 -0
  63. oci/file_storage/models/upgrade_shape_mount_target_details.py +78 -0
  64. oci/file_storage/models/validate_key_tabs_details.py +103 -0
  65. oci/file_storage/models/validate_key_tabs_response_details.py +103 -0
  66. oci/functions/__init__.py +16 -0
  67. oci/functions/functions_invoke_client.py +267 -0
  68. oci/functions/functions_invoke_client_composite_operations.py +26 -0
  69. oci/functions/functions_management_client.py +2056 -0
  70. oci/functions/functions_management_client_composite_operations.py +326 -0
  71. oci/functions/models/__init__.py +74 -0
  72. oci/functions/models/application.py +628 -0
  73. oci/functions/models/application_summary.py +512 -0
  74. oci/functions/models/application_trace_config.py +103 -0
  75. oci/functions/models/change_application_compartment_details.py +78 -0
  76. oci/functions/models/config_details.py +134 -0
  77. oci/functions/models/constant_provisioned_concurrency_config.py +82 -0
  78. oci/functions/models/create_application_details.py +446 -0
  79. oci/functions/models/create_function_details.py +437 -0
  80. oci/functions/models/function.py +734 -0
  81. oci/functions/models/function_provisioned_concurrency_config.py +109 -0
  82. oci/functions/models/function_source_details.py +101 -0
  83. oci/functions/models/function_summary.py +657 -0
  84. oci/functions/models/function_trace_config.py +72 -0
  85. oci/functions/models/image_policy_config.py +103 -0
  86. oci/functions/models/key_details.py +76 -0
  87. oci/functions/models/none_provisioned_concurrency_config.py +51 -0
  88. oci/functions/models/pbf_listing.py +408 -0
  89. oci/functions/models/pbf_listing_summary.py +386 -0
  90. oci/functions/models/pbf_listing_version.py +467 -0
  91. oci/functions/models/pbf_listing_version_summary.py +446 -0
  92. oci/functions/models/pbf_listing_versions_collection.py +73 -0
  93. oci/functions/models/pbf_listings_collection.py +72 -0
  94. oci/functions/models/policy_details.py +103 -0
  95. oci/functions/models/pre_built_function_source_details.py +88 -0
  96. oci/functions/models/publisher_details.py +72 -0
  97. oci/functions/models/requirement_details.py +106 -0
  98. oci/functions/models/trigger.py +72 -0
  99. oci/functions/models/trigger_summary.py +72 -0
  100. oci/functions/models/triggers_collection.py +72 -0
  101. oci/functions/models/update_application_details.py +290 -0
  102. oci/functions/models/update_function_details.py +346 -0
  103. oci/load_balancer/__init__.py +14 -0
  104. oci/load_balancer/load_balancer_client.py +7641 -0
  105. oci/load_balancer/load_balancer_client_composite_operations.py +1630 -0
  106. oci/load_balancer/models/__init__.py +186 -0
  107. oci/load_balancer/models/action.py +97 -0
  108. oci/load_balancer/models/add_http_request_header_rule.py +134 -0
  109. oci/load_balancer/models/add_http_response_header_rule.py +137 -0
  110. oci/load_balancer/models/allow_rule.py +123 -0
  111. oci/load_balancer/models/backend.py +350 -0
  112. oci/load_balancer/models/backend_details.py +312 -0
  113. oci/load_balancer/models/backend_health.py +143 -0
  114. oci/load_balancer/models/backend_set.py +305 -0
  115. oci/load_balancer/models/backend_set_details.py +262 -0
  116. oci/load_balancer/models/backend_set_health.py +265 -0
  117. oci/load_balancer/models/certificate.py +188 -0
  118. oci/load_balancer/models/certificate_details.py +270 -0
  119. oci/load_balancer/models/change_load_balancer_compartment_details.py +78 -0
  120. oci/load_balancer/models/connection_configuration.py +168 -0
  121. oci/load_balancer/models/control_access_using_http_methods_rule.py +162 -0
  122. oci/load_balancer/models/create_backend_details.py +316 -0
  123. oci/load_balancer/models/create_backend_set_details.py +305 -0
  124. oci/load_balancer/models/create_certificate_details.py +270 -0
  125. oci/load_balancer/models/create_hostname_details.py +121 -0
  126. oci/load_balancer/models/create_listener_details.py +387 -0
  127. oci/load_balancer/models/create_load_balancer_details.py +895 -0
  128. oci/load_balancer/models/create_path_route_set_details.py +111 -0
  129. oci/load_balancer/models/create_routing_policy_details.py +154 -0
  130. oci/load_balancer/models/create_rule_set_details.py +109 -0
  131. oci/load_balancer/models/create_ssl_cipher_suite_details.py +606 -0
  132. oci/load_balancer/models/extend_http_request_header_value_rule.py +181 -0
  133. oci/load_balancer/models/extend_http_response_header_value_rule.py +181 -0
  134. oci/load_balancer/models/forward_to_backend_set.py +86 -0
  135. oci/load_balancer/models/health_check_result.py +219 -0
  136. oci/load_balancer/models/health_checker.py +381 -0
  137. oci/load_balancer/models/health_checker_details.py +376 -0
  138. oci/load_balancer/models/hostname.py +121 -0
  139. oci/load_balancer/models/hostname_details.py +117 -0
  140. oci/load_balancer/models/http_header_rule.py +127 -0
  141. oci/load_balancer/models/ip_address.py +142 -0
  142. oci/load_balancer/models/ip_based_max_connections_rule.py +118 -0
  143. oci/load_balancer/models/ip_max_connections.py +111 -0
  144. oci/load_balancer/models/lb_cookie_session_persistence_configuration_details.py +423 -0
  145. oci/load_balancer/models/listener.py +383 -0
  146. oci/load_balancer/models/listener_details.py +344 -0
  147. oci/load_balancer/models/listener_rule_summary.py +104 -0
  148. oci/load_balancer/models/load_balancer.py +1023 -0
  149. oci/load_balancer/models/load_balancer_health.py +281 -0
  150. oci/load_balancer/models/load_balancer_health_summary.py +167 -0
  151. oci/load_balancer/models/load_balancer_policy.py +80 -0
  152. oci/load_balancer/models/load_balancer_protocol.py +76 -0
  153. oci/load_balancer/models/load_balancer_shape.py +80 -0
  154. oci/load_balancer/models/path_match_condition.py +166 -0
  155. oci/load_balancer/models/path_match_type.py +126 -0
  156. oci/load_balancer/models/path_route.py +156 -0
  157. oci/load_balancer/models/path_route_set.py +112 -0
  158. oci/load_balancer/models/path_route_set_details.py +72 -0
  159. oci/load_balancer/models/redirect_rule.py +173 -0
  160. oci/load_balancer/models/redirect_uri.py +420 -0
  161. oci/load_balancer/models/remove_http_request_header_rule.py +90 -0
  162. oci/load_balancer/models/remove_http_response_header_rule.py +92 -0
  163. oci/load_balancer/models/reserved_ip.py +90 -0
  164. oci/load_balancer/models/routing_policy.py +152 -0
  165. oci/load_balancer/models/routing_policy_details.py +73 -0
  166. oci/load_balancer/models/routing_rule.py +135 -0
  167. oci/load_balancer/models/rule.py +177 -0
  168. oci/load_balancer/models/rule_condition.py +121 -0
  169. oci/load_balancer/models/rule_set.py +113 -0
  170. oci/load_balancer/models/rule_set_details.py +72 -0
  171. oci/load_balancer/models/session_persistence_configuration_details.py +136 -0
  172. oci/load_balancer/models/shape_details.py +121 -0
  173. oci/load_balancer/models/source_ip_address_condition.py +90 -0
  174. oci/load_balancer/models/source_vcn_id_condition.py +98 -0
  175. oci/load_balancer/models/source_vcn_ip_address_condition.py +97 -0
  176. oci/load_balancer/models/ssl_cipher_suite.py +606 -0
  177. oci/load_balancer/models/ssl_cipher_suite_details.py +606 -0
  178. oci/load_balancer/models/ssl_configuration.py +478 -0
  179. oci/load_balancer/models/ssl_configuration_details.py +476 -0
  180. oci/load_balancer/models/update_backend_details.py +242 -0
  181. oci/load_balancer/models/update_backend_set_details.py +264 -0
  182. oci/load_balancer/models/update_health_checker_details.py +374 -0
  183. oci/load_balancer/models/update_hostname_details.py +86 -0
  184. oci/load_balancer/models/update_listener_details.py +344 -0
  185. oci/load_balancer/models/update_load_balancer_details.py +356 -0
  186. oci/load_balancer/models/update_load_balancer_shape_details.py +127 -0
  187. oci/load_balancer/models/update_network_security_groups_details.py +99 -0
  188. oci/load_balancer/models/update_path_route_set_details.py +72 -0
  189. oci/load_balancer/models/update_routing_policy_details.py +115 -0
  190. oci/load_balancer/models/update_rule_set_details.py +72 -0
  191. oci/load_balancer/models/update_ssl_cipher_suite_details.py +300 -0
  192. oci/load_balancer/models/work_request.py +385 -0
  193. oci/load_balancer/models/work_request_error.py +115 -0
  194. oci/network_load_balancer/__init__.py +14 -0
  195. oci/network_load_balancer/models/__init__.py +106 -0
  196. oci/network_load_balancer/models/backend.py +338 -0
  197. oci/network_load_balancer/models/backend_collection.py +72 -0
  198. oci/network_load_balancer/models/backend_details.py +337 -0
  199. oci/network_load_balancer/models/backend_health.py +145 -0
  200. oci/network_load_balancer/models/backend_set.py +347 -0
  201. oci/network_load_balancer/models/backend_set_collection.py +72 -0
  202. oci/network_load_balancer/models/backend_set_details.py +306 -0
  203. oci/network_load_balancer/models/backend_set_health.py +265 -0
  204. oci/network_load_balancer/models/backend_set_summary.py +347 -0
  205. oci/network_load_balancer/models/backend_summary.py +338 -0
  206. oci/network_load_balancer/models/change_network_load_balancer_compartment_details.py +78 -0
  207. oci/network_load_balancer/models/create_backend_details.py +336 -0
  208. oci/network_load_balancer/models/create_backend_set_details.py +347 -0
  209. oci/network_load_balancer/models/create_listener_details.py +396 -0
  210. oci/network_load_balancer/models/create_network_load_balancer_details.py +694 -0
  211. oci/network_load_balancer/models/dns_health_checker_details.py +264 -0
  212. oci/network_load_balancer/models/health_check_result.py +139 -0
  213. oci/network_load_balancer/models/health_checker.py +449 -0
  214. oci/network_load_balancer/models/health_checker_details.py +449 -0
  215. oci/network_load_balancer/models/ip_address.py +189 -0
  216. oci/network_load_balancer/models/listener.py +396 -0
  217. oci/network_load_balancer/models/listener_collection.py +72 -0
  218. oci/network_load_balancer/models/listener_details.py +396 -0
  219. oci/network_load_balancer/models/listener_summary.py +396 -0
  220. oci/network_load_balancer/models/network_load_balancer.py +847 -0
  221. oci/network_load_balancer/models/network_load_balancer_collection.py +72 -0
  222. oci/network_load_balancer/models/network_load_balancer_health.py +281 -0
  223. oci/network_load_balancer/models/network_load_balancer_health_collection.py +72 -0
  224. oci/network_load_balancer/models/network_load_balancer_health_summary.py +167 -0
  225. oci/network_load_balancer/models/network_load_balancer_summary.py +833 -0
  226. oci/network_load_balancer/models/network_load_balancers_policy_collection.py +72 -0
  227. oci/network_load_balancer/models/network_load_balancers_protocol_collection.py +73 -0
  228. oci/network_load_balancer/models/reserved_ip.py +90 -0
  229. oci/network_load_balancer/models/update_backend_details.py +199 -0
  230. oci/network_load_balancer/models/update_backend_set_details.py +288 -0
  231. oci/network_load_balancer/models/update_health_checker_details.py +444 -0
  232. oci/network_load_balancer/models/update_listener_details.py +361 -0
  233. oci/network_load_balancer/models/update_network_load_balancer_details.py +386 -0
  234. oci/network_load_balancer/models/update_network_security_groups_details.py +99 -0
  235. oci/network_load_balancer/models/work_request.py +454 -0
  236. oci/network_load_balancer/models/work_request_collection.py +72 -0
  237. oci/network_load_balancer/models/work_request_error.py +136 -0
  238. oci/network_load_balancer/models/work_request_error_collection.py +72 -0
  239. oci/network_load_balancer/models/work_request_log_entry.py +103 -0
  240. oci/network_load_balancer/models/work_request_log_entry_collection.py +72 -0
  241. oci/network_load_balancer/models/work_request_resource.py +199 -0
  242. oci/network_load_balancer/models/work_request_summary.py +454 -0
  243. oci/network_load_balancer/network_load_balancer_client.py +4392 -0
  244. oci/network_load_balancer/network_load_balancer_client_composite_operations.py +757 -0
  245. oci/version.py +1 -1
  246. {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.2.dist-info}/LICENSE.txt +0 -0
  247. {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.2.dist-info}/WHEEL +0 -0
  248. {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,4392 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
3
+ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
4
+
5
+ # NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20200501
6
+
7
+ from __future__ import absolute_import
8
+
9
+ from oci._vendor import requests # noqa: F401
10
+ from oci._vendor import six
11
+
12
+ from oci import retry, circuit_breaker # noqa: F401
13
+ from oci.base_client import BaseClient
14
+ from oci.config import get_config_value_or_default, validate_config
15
+ from oci.signer import Signer
16
+ from oci.util import Sentinel, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME
17
+ from oci.exceptions import InvalidAlloyConfig
18
+ from oci.alloy import OCI_SDK_ENABLED_SERVICES_SET
19
+ from .models import network_load_balancer_type_mapping
20
+ missing = Sentinel("Missing")
21
+
22
+
23
+ class NetworkLoadBalancerClient(object):
24
+ """
25
+ This describes the network load balancer API.
26
+ """
27
+
28
+ def __init__(self, config, **kwargs):
29
+ """
30
+ Creates a new service client
31
+
32
+ :param dict config:
33
+ Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__.
34
+ The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config
35
+ the dict using :py:meth:`~oci.config.validate_config`
36
+
37
+ :param str service_endpoint: (optional)
38
+ The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is
39
+ not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit
40
+ need to specify a service endpoint.
41
+
42
+ :param timeout: (optional)
43
+ The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided
44
+ as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If
45
+ a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
46
+ :type timeout: float or tuple(float, float)
47
+
48
+ :param signer: (optional)
49
+ The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values
50
+ provided in the config parameter.
51
+
52
+ One use case for this parameter is for `Instance Principals authentication <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__
53
+ by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument
54
+ :type signer: :py:class:`~oci.signer.AbstractBaseSigner`
55
+
56
+ :param obj retry_strategy: (optional)
57
+ A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default.
58
+ Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation.
59
+ Any value provided at the operation level will override whatever is specified at the client level.
60
+
61
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
62
+ is also available. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
63
+
64
+ :param obj circuit_breaker_strategy: (optional)
65
+ A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level).
66
+ This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided.
67
+ The specifics of circuit breaker strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__.
68
+
69
+ :param function circuit_breaker_callback: (optional)
70
+ Callback function to receive any exceptions triggerred by the circuit breaker.
71
+
72
+ :param bool client_level_realm_specific_endpoint_template_enabled: (optional)
73
+ A boolean flag to indicate whether or not this client should be created with realm specific endpoint template enabled or disable. By default, this will be set as None.
74
+
75
+ :param allow_control_chars: (optional)
76
+ allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not
77
+ allow control characters to be in the response object.
78
+ """
79
+ if not OCI_SDK_ENABLED_SERVICES_SET.is_service_enabled("network_load_balancer"):
80
+ raise InvalidAlloyConfig("The Alloy configuration has disabled this service, this behavior is controlled by OCI_SDK_ENABLED_SERVICES_SET variable. Please check if your local alloy-config file configured the service you're targeting or contact the cloud provider on the availability of this service")
81
+
82
+ validate_config(config, signer=kwargs.get('signer'))
83
+ if 'signer' in kwargs:
84
+ signer = kwargs['signer']
85
+
86
+ elif AUTHENTICATION_TYPE_FIELD_NAME in config:
87
+ signer = get_signer_from_authentication_type(config)
88
+
89
+ else:
90
+ signer = Signer(
91
+ tenancy=config["tenancy"],
92
+ user=config["user"],
93
+ fingerprint=config["fingerprint"],
94
+ private_key_file_location=config.get("key_file"),
95
+ pass_phrase=get_config_value_or_default(config, "pass_phrase"),
96
+ private_key_content=config.get("key_content")
97
+ )
98
+
99
+ base_client_init_kwargs = {
100
+ 'regional_client': True,
101
+ 'service_endpoint': kwargs.get('service_endpoint'),
102
+ 'base_path': '/20200501',
103
+ 'service_endpoint_template': 'https://network-load-balancer-api.{region}.oci.{secondLevelDomain}',
104
+ 'service_endpoint_template_per_realm': { }, # noqa: E201 E202
105
+ 'skip_deserialization': kwargs.get('skip_deserialization', False),
106
+ 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY),
107
+ 'client_level_realm_specific_endpoint_template_enabled': kwargs.get('client_level_realm_specific_endpoint_template_enabled')
108
+ }
109
+ if 'timeout' in kwargs:
110
+ base_client_init_kwargs['timeout'] = kwargs.get('timeout')
111
+ if base_client_init_kwargs.get('circuit_breaker_strategy') is None:
112
+ base_client_init_kwargs['circuit_breaker_strategy'] = circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY
113
+ if 'allow_control_chars' in kwargs:
114
+ base_client_init_kwargs['allow_control_chars'] = kwargs.get('allow_control_chars')
115
+ self.base_client = BaseClient("network_load_balancer", config, signer, network_load_balancer_type_mapping, **base_client_init_kwargs)
116
+ self.retry_strategy = kwargs.get('retry_strategy')
117
+ self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback')
118
+
119
+ def change_network_load_balancer_compartment(self, network_load_balancer_id, change_network_load_balancer_compartment_details, **kwargs):
120
+ """
121
+ Moves a network load balancer into a different compartment within the same tenancy. For information about moving resources
122
+ between compartments, see `Moving Resources to a Different Compartment`__.
123
+
124
+ __ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes
125
+
126
+
127
+ :param str network_load_balancer_id: (required)
128
+ The `OCID`__ of the network load balancer to update.
129
+
130
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
131
+
132
+ :param oci.network_load_balancer.models.ChangeNetworkLoadBalancerCompartmentDetails change_network_load_balancer_compartment_details: (required)
133
+ The configuration details for moving a network load balancer to a different compartment.
134
+
135
+ :param str opc_request_id: (optional)
136
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
137
+ particular request, then provide the request identifier.
138
+
139
+ :param str opc_retry_token: (optional)
140
+ A token that uniquely identifies a request so that it can be retried in case of a timeout or
141
+ server error without risk of rerunning that same action. Retry tokens expire after 24
142
+ hours but they can be invalidated before then due to conflicting operations. For example, if a resource
143
+ has been deleted and purged from the system, then a retry of the original creation request
144
+ might be rejected.
145
+
146
+ :param str if_match: (optional)
147
+ For optimistic concurrency control. In the PUT or DELETE call
148
+ for a resource, set the `if-match` parameter to the value of the
149
+ etag from a previous GET or POST response for that resource.
150
+ The resource will be updated or deleted only if the etag you
151
+ provide matches the current etag value of the resource.
152
+
153
+ :param obj retry_strategy: (optional)
154
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
155
+
156
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
157
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
158
+
159
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
160
+
161
+ :param bool allow_control_chars: (optional)
162
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
163
+ By default, the response will not allow control characters in strings
164
+
165
+ :return: A :class:`~oci.response.Response` object with data of type None
166
+ :rtype: :class:`~oci.response.Response`
167
+
168
+ :example:
169
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/change_network_load_balancer_compartment.py.html>`__ to see an example of how to use change_network_load_balancer_compartment API.
170
+ """
171
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
172
+ required_arguments = ['networkLoadBalancerId']
173
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/actions/changeCompartment"
174
+ method = "POST"
175
+ operation_name = "change_network_load_balancer_compartment"
176
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/NetworkLoadBalancer/ChangeNetworkLoadBalancerCompartment"
177
+
178
+ # Don't accept unknown kwargs
179
+ expected_kwargs = [
180
+ "allow_control_chars",
181
+ "retry_strategy",
182
+ "opc_request_id",
183
+ "opc_retry_token",
184
+ "if_match"
185
+ ]
186
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
187
+ if extra_kwargs:
188
+ raise ValueError(
189
+ f"change_network_load_balancer_compartment got unknown kwargs: {extra_kwargs!r}")
190
+
191
+ path_params = {
192
+ "networkLoadBalancerId": network_load_balancer_id
193
+ }
194
+
195
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
196
+
197
+ for (k, v) in six.iteritems(path_params):
198
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
199
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
200
+
201
+ header_params = {
202
+ "accept": "application/json",
203
+ "content-type": "application/json",
204
+ "opc-request-id": kwargs.get("opc_request_id", missing),
205
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
206
+ "if-match": kwargs.get("if_match", missing)
207
+ }
208
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
209
+
210
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
211
+ operation_retry_strategy=kwargs.get('retry_strategy'),
212
+ client_retry_strategy=self.retry_strategy
213
+ )
214
+ if retry_strategy is None:
215
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
216
+
217
+ if retry_strategy:
218
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
219
+ self.base_client.add_opc_retry_token_if_needed(header_params)
220
+ self.base_client.add_opc_client_retries_header(header_params)
221
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
222
+ return retry_strategy.make_retrying_call(
223
+ self.base_client.call_api,
224
+ resource_path=resource_path,
225
+ method=method,
226
+ path_params=path_params,
227
+ header_params=header_params,
228
+ body=change_network_load_balancer_compartment_details,
229
+ allow_control_chars=kwargs.get('allow_control_chars'),
230
+ operation_name=operation_name,
231
+ api_reference_link=api_reference_link,
232
+ required_arguments=required_arguments)
233
+ else:
234
+ return self.base_client.call_api(
235
+ resource_path=resource_path,
236
+ method=method,
237
+ path_params=path_params,
238
+ header_params=header_params,
239
+ body=change_network_load_balancer_compartment_details,
240
+ allow_control_chars=kwargs.get('allow_control_chars'),
241
+ operation_name=operation_name,
242
+ api_reference_link=api_reference_link,
243
+ required_arguments=required_arguments)
244
+
245
+ def create_backend(self, network_load_balancer_id, create_backend_details, backend_set_name, **kwargs):
246
+ """
247
+ Adds a backend server to a backend set.
248
+
249
+
250
+ :param str network_load_balancer_id: (required)
251
+ The `OCID`__ of the network load balancer to update.
252
+
253
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
254
+
255
+ :param oci.network_load_balancer.models.CreateBackendDetails create_backend_details: (required)
256
+ The details to add a backend server to a backend set.
257
+
258
+ :param str backend_set_name: (required)
259
+ The name of the backend set to which to add the backend server.
260
+
261
+ Example: `example_backend_set`
262
+
263
+ :param str opc_request_id: (optional)
264
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
265
+ particular request, then provide the request identifier.
266
+
267
+ :param str opc_retry_token: (optional)
268
+ A token that uniquely identifies a request so that it can be retried in case of a timeout or
269
+ server error without risk of rerunning that same action. Retry tokens expire after 24
270
+ hours but they can be invalidated before then due to conflicting operations. For example, if a resource
271
+ has been deleted and purged from the system, then a retry of the original creation request
272
+ might be rejected.
273
+
274
+ :param str if_match: (optional)
275
+ For optimistic concurrency control. In the PUT or DELETE call
276
+ for a resource, set the `if-match` parameter to the value of the
277
+ etag from a previous GET or POST response for that resource.
278
+ The resource will be updated or deleted only if the etag you
279
+ provide matches the current etag value of the resource.
280
+
281
+ :param obj retry_strategy: (optional)
282
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
283
+
284
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
285
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
286
+
287
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
288
+
289
+ :param bool allow_control_chars: (optional)
290
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
291
+ By default, the response will not allow control characters in strings
292
+
293
+ :return: A :class:`~oci.response.Response` object with data of type None
294
+ :rtype: :class:`~oci.response.Response`
295
+
296
+ :example:
297
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/create_backend.py.html>`__ to see an example of how to use create_backend API.
298
+ """
299
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
300
+ required_arguments = ['networkLoadBalancerId', 'backendSetName']
301
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/backendSets/{backendSetName}/backends"
302
+ method = "POST"
303
+ operation_name = "create_backend"
304
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/Backend/CreateBackend"
305
+
306
+ # Don't accept unknown kwargs
307
+ expected_kwargs = [
308
+ "allow_control_chars",
309
+ "retry_strategy",
310
+ "opc_request_id",
311
+ "opc_retry_token",
312
+ "if_match"
313
+ ]
314
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
315
+ if extra_kwargs:
316
+ raise ValueError(
317
+ f"create_backend got unknown kwargs: {extra_kwargs!r}")
318
+
319
+ path_params = {
320
+ "networkLoadBalancerId": network_load_balancer_id,
321
+ "backendSetName": backend_set_name
322
+ }
323
+
324
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
325
+
326
+ for (k, v) in six.iteritems(path_params):
327
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
328
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
329
+
330
+ header_params = {
331
+ "accept": "application/json",
332
+ "content-type": "application/json",
333
+ "opc-request-id": kwargs.get("opc_request_id", missing),
334
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
335
+ "if-match": kwargs.get("if_match", missing)
336
+ }
337
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
338
+
339
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
340
+ operation_retry_strategy=kwargs.get('retry_strategy'),
341
+ client_retry_strategy=self.retry_strategy
342
+ )
343
+ if retry_strategy is None:
344
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
345
+
346
+ if retry_strategy:
347
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
348
+ self.base_client.add_opc_retry_token_if_needed(header_params)
349
+ self.base_client.add_opc_client_retries_header(header_params)
350
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
351
+ return retry_strategy.make_retrying_call(
352
+ self.base_client.call_api,
353
+ resource_path=resource_path,
354
+ method=method,
355
+ path_params=path_params,
356
+ header_params=header_params,
357
+ body=create_backend_details,
358
+ allow_control_chars=kwargs.get('allow_control_chars'),
359
+ operation_name=operation_name,
360
+ api_reference_link=api_reference_link,
361
+ required_arguments=required_arguments)
362
+ else:
363
+ return self.base_client.call_api(
364
+ resource_path=resource_path,
365
+ method=method,
366
+ path_params=path_params,
367
+ header_params=header_params,
368
+ body=create_backend_details,
369
+ allow_control_chars=kwargs.get('allow_control_chars'),
370
+ operation_name=operation_name,
371
+ api_reference_link=api_reference_link,
372
+ required_arguments=required_arguments)
373
+
374
+ def create_backend_set(self, network_load_balancer_id, create_backend_set_details, **kwargs):
375
+ """
376
+ Adds a backend set to a network load balancer.
377
+
378
+
379
+ :param str network_load_balancer_id: (required)
380
+ The `OCID`__ of the network load balancer to update.
381
+
382
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
383
+
384
+ :param oci.network_load_balancer.models.CreateBackendSetDetails create_backend_set_details: (required)
385
+ The details for adding a backend set.
386
+
387
+ :param str opc_request_id: (optional)
388
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
389
+ particular request, then provide the request identifier.
390
+
391
+ :param str opc_retry_token: (optional)
392
+ A token that uniquely identifies a request so that it can be retried in case of a timeout or
393
+ server error without risk of rerunning that same action. Retry tokens expire after 24
394
+ hours but they can be invalidated before then due to conflicting operations. For example, if a resource
395
+ has been deleted and purged from the system, then a retry of the original creation request
396
+ might be rejected.
397
+
398
+ :param str if_match: (optional)
399
+ For optimistic concurrency control. In the PUT or DELETE call
400
+ for a resource, set the `if-match` parameter to the value of the
401
+ etag from a previous GET or POST response for that resource.
402
+ The resource will be updated or deleted only if the etag you
403
+ provide matches the current etag value of the resource.
404
+
405
+ :param obj retry_strategy: (optional)
406
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
407
+
408
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
409
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
410
+
411
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
412
+
413
+ :param bool allow_control_chars: (optional)
414
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
415
+ By default, the response will not allow control characters in strings
416
+
417
+ :return: A :class:`~oci.response.Response` object with data of type None
418
+ :rtype: :class:`~oci.response.Response`
419
+
420
+ :example:
421
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/create_backend_set.py.html>`__ to see an example of how to use create_backend_set API.
422
+ """
423
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
424
+ required_arguments = ['networkLoadBalancerId']
425
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/backendSets"
426
+ method = "POST"
427
+ operation_name = "create_backend_set"
428
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/BackendSet/CreateBackendSet"
429
+
430
+ # Don't accept unknown kwargs
431
+ expected_kwargs = [
432
+ "allow_control_chars",
433
+ "retry_strategy",
434
+ "opc_request_id",
435
+ "opc_retry_token",
436
+ "if_match"
437
+ ]
438
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
439
+ if extra_kwargs:
440
+ raise ValueError(
441
+ f"create_backend_set got unknown kwargs: {extra_kwargs!r}")
442
+
443
+ path_params = {
444
+ "networkLoadBalancerId": network_load_balancer_id
445
+ }
446
+
447
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
448
+
449
+ for (k, v) in six.iteritems(path_params):
450
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
451
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
452
+
453
+ header_params = {
454
+ "accept": "application/json",
455
+ "content-type": "application/json",
456
+ "opc-request-id": kwargs.get("opc_request_id", missing),
457
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
458
+ "if-match": kwargs.get("if_match", missing)
459
+ }
460
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
461
+
462
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
463
+ operation_retry_strategy=kwargs.get('retry_strategy'),
464
+ client_retry_strategy=self.retry_strategy
465
+ )
466
+ if retry_strategy is None:
467
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
468
+
469
+ if retry_strategy:
470
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
471
+ self.base_client.add_opc_retry_token_if_needed(header_params)
472
+ self.base_client.add_opc_client_retries_header(header_params)
473
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
474
+ return retry_strategy.make_retrying_call(
475
+ self.base_client.call_api,
476
+ resource_path=resource_path,
477
+ method=method,
478
+ path_params=path_params,
479
+ header_params=header_params,
480
+ body=create_backend_set_details,
481
+ allow_control_chars=kwargs.get('allow_control_chars'),
482
+ operation_name=operation_name,
483
+ api_reference_link=api_reference_link,
484
+ required_arguments=required_arguments)
485
+ else:
486
+ return self.base_client.call_api(
487
+ resource_path=resource_path,
488
+ method=method,
489
+ path_params=path_params,
490
+ header_params=header_params,
491
+ body=create_backend_set_details,
492
+ allow_control_chars=kwargs.get('allow_control_chars'),
493
+ operation_name=operation_name,
494
+ api_reference_link=api_reference_link,
495
+ required_arguments=required_arguments)
496
+
497
+ def create_listener(self, network_load_balancer_id, create_listener_details, **kwargs):
498
+ """
499
+ Adds a listener to a network load balancer.
500
+
501
+
502
+ :param str network_load_balancer_id: (required)
503
+ The `OCID`__ of the network load balancer to update.
504
+
505
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
506
+
507
+ :param oci.network_load_balancer.models.CreateListenerDetails create_listener_details: (required)
508
+ Details to add a listener.
509
+
510
+ :param str opc_request_id: (optional)
511
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
512
+ particular request, then provide the request identifier.
513
+
514
+ :param str opc_retry_token: (optional)
515
+ A token that uniquely identifies a request so that it can be retried in case of a timeout or
516
+ server error without risk of rerunning that same action. Retry tokens expire after 24
517
+ hours but they can be invalidated before then due to conflicting operations. For example, if a resource
518
+ has been deleted and purged from the system, then a retry of the original creation request
519
+ might be rejected.
520
+
521
+ :param str if_match: (optional)
522
+ For optimistic concurrency control. In the PUT or DELETE call
523
+ for a resource, set the `if-match` parameter to the value of the
524
+ etag from a previous GET or POST response for that resource.
525
+ The resource will be updated or deleted only if the etag you
526
+ provide matches the current etag value of the resource.
527
+
528
+ :param obj retry_strategy: (optional)
529
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
530
+
531
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
532
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
533
+
534
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
535
+
536
+ :param bool allow_control_chars: (optional)
537
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
538
+ By default, the response will not allow control characters in strings
539
+
540
+ :return: A :class:`~oci.response.Response` object with data of type None
541
+ :rtype: :class:`~oci.response.Response`
542
+
543
+ :example:
544
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/create_listener.py.html>`__ to see an example of how to use create_listener API.
545
+ """
546
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
547
+ required_arguments = ['networkLoadBalancerId']
548
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/listeners"
549
+ method = "POST"
550
+ operation_name = "create_listener"
551
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/Listener/CreateListener"
552
+
553
+ # Don't accept unknown kwargs
554
+ expected_kwargs = [
555
+ "allow_control_chars",
556
+ "retry_strategy",
557
+ "opc_request_id",
558
+ "opc_retry_token",
559
+ "if_match"
560
+ ]
561
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
562
+ if extra_kwargs:
563
+ raise ValueError(
564
+ f"create_listener got unknown kwargs: {extra_kwargs!r}")
565
+
566
+ path_params = {
567
+ "networkLoadBalancerId": network_load_balancer_id
568
+ }
569
+
570
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
571
+
572
+ for (k, v) in six.iteritems(path_params):
573
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
574
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
575
+
576
+ header_params = {
577
+ "accept": "application/json",
578
+ "content-type": "application/json",
579
+ "opc-request-id": kwargs.get("opc_request_id", missing),
580
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
581
+ "if-match": kwargs.get("if_match", missing)
582
+ }
583
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
584
+
585
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
586
+ operation_retry_strategy=kwargs.get('retry_strategy'),
587
+ client_retry_strategy=self.retry_strategy
588
+ )
589
+ if retry_strategy is None:
590
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
591
+
592
+ if retry_strategy:
593
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
594
+ self.base_client.add_opc_retry_token_if_needed(header_params)
595
+ self.base_client.add_opc_client_retries_header(header_params)
596
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
597
+ return retry_strategy.make_retrying_call(
598
+ self.base_client.call_api,
599
+ resource_path=resource_path,
600
+ method=method,
601
+ path_params=path_params,
602
+ header_params=header_params,
603
+ body=create_listener_details,
604
+ allow_control_chars=kwargs.get('allow_control_chars'),
605
+ operation_name=operation_name,
606
+ api_reference_link=api_reference_link,
607
+ required_arguments=required_arguments)
608
+ else:
609
+ return self.base_client.call_api(
610
+ resource_path=resource_path,
611
+ method=method,
612
+ path_params=path_params,
613
+ header_params=header_params,
614
+ body=create_listener_details,
615
+ allow_control_chars=kwargs.get('allow_control_chars'),
616
+ operation_name=operation_name,
617
+ api_reference_link=api_reference_link,
618
+ required_arguments=required_arguments)
619
+
620
+ def create_network_load_balancer(self, create_network_load_balancer_details, **kwargs):
621
+ """
622
+ Creates a network load balancer.
623
+
624
+
625
+ :param oci.network_load_balancer.models.CreateNetworkLoadBalancerDetails create_network_load_balancer_details: (required)
626
+ Details for the new network load balancer.
627
+
628
+ :param str opc_retry_token: (optional)
629
+ A token that uniquely identifies a request so that it can be retried in case of a timeout or
630
+ server error without risk of rerunning that same action. Retry tokens expire after 24
631
+ hours but they can be invalidated before then due to conflicting operations. For example, if a resource
632
+ has been deleted and purged from the system, then a retry of the original creation request
633
+ might be rejected.
634
+
635
+ :param str opc_request_id: (optional)
636
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
637
+ particular request, then provide the request identifier.
638
+
639
+ :param obj retry_strategy: (optional)
640
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
641
+
642
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
643
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
644
+
645
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
646
+
647
+ :param bool allow_control_chars: (optional)
648
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
649
+ By default, the response will not allow control characters in strings
650
+
651
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.NetworkLoadBalancer`
652
+ :rtype: :class:`~oci.response.Response`
653
+
654
+ :example:
655
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/create_network_load_balancer.py.html>`__ to see an example of how to use create_network_load_balancer API.
656
+ """
657
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
658
+ required_arguments = []
659
+ resource_path = "/networkLoadBalancers"
660
+ method = "POST"
661
+ operation_name = "create_network_load_balancer"
662
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/NetworkLoadBalancer/CreateNetworkLoadBalancer"
663
+
664
+ # Don't accept unknown kwargs
665
+ expected_kwargs = [
666
+ "allow_control_chars",
667
+ "retry_strategy",
668
+ "opc_retry_token",
669
+ "opc_request_id"
670
+ ]
671
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
672
+ if extra_kwargs:
673
+ raise ValueError(
674
+ f"create_network_load_balancer got unknown kwargs: {extra_kwargs!r}")
675
+
676
+ header_params = {
677
+ "accept": "application/json",
678
+ "content-type": "application/json",
679
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
680
+ "opc-request-id": kwargs.get("opc_request_id", missing)
681
+ }
682
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
683
+
684
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
685
+ operation_retry_strategy=kwargs.get('retry_strategy'),
686
+ client_retry_strategy=self.retry_strategy
687
+ )
688
+ if retry_strategy is None:
689
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
690
+
691
+ if retry_strategy:
692
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
693
+ self.base_client.add_opc_retry_token_if_needed(header_params)
694
+ self.base_client.add_opc_client_retries_header(header_params)
695
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
696
+ return retry_strategy.make_retrying_call(
697
+ self.base_client.call_api,
698
+ resource_path=resource_path,
699
+ method=method,
700
+ header_params=header_params,
701
+ body=create_network_load_balancer_details,
702
+ response_type="NetworkLoadBalancer",
703
+ allow_control_chars=kwargs.get('allow_control_chars'),
704
+ operation_name=operation_name,
705
+ api_reference_link=api_reference_link,
706
+ required_arguments=required_arguments)
707
+ else:
708
+ return self.base_client.call_api(
709
+ resource_path=resource_path,
710
+ method=method,
711
+ header_params=header_params,
712
+ body=create_network_load_balancer_details,
713
+ response_type="NetworkLoadBalancer",
714
+ allow_control_chars=kwargs.get('allow_control_chars'),
715
+ operation_name=operation_name,
716
+ api_reference_link=api_reference_link,
717
+ required_arguments=required_arguments)
718
+
719
+ def delete_backend(self, network_load_balancer_id, backend_set_name, backend_name, **kwargs):
720
+ """
721
+ Removes a backend server from a given network load balancer and backend set.
722
+
723
+
724
+ :param str network_load_balancer_id: (required)
725
+ The `OCID`__ of the network load balancer to update.
726
+
727
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
728
+
729
+ :param str backend_set_name: (required)
730
+ The name of the backend set associated with the backend server.
731
+
732
+ Example: `example_backend_set`
733
+
734
+ :param str backend_name: (required)
735
+ The name of the backend server to remove.
736
+ If the backend was created with an explicitly specified name, that name should be used here.
737
+ If the backend was created without explicitly specifying the name, but was created using ipAddress, this is specified as <ipAddress>:<port>.
738
+ If the backend was created without explicitly specifying the name, but was created using targetId, this is specified as <targetId>:<port>.
739
+
740
+ Example: `10.0.0.3:8080` or `ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:8080`
741
+
742
+ :param str opc_request_id: (optional)
743
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
744
+ particular request, then provide the request identifier.
745
+
746
+ :param str if_match: (optional)
747
+ For optimistic concurrency control. In the PUT or DELETE call
748
+ for a resource, set the `if-match` parameter to the value of the
749
+ etag from a previous GET or POST response for that resource.
750
+ The resource will be updated or deleted only if the etag you
751
+ provide matches the current etag value of the resource.
752
+
753
+ :param obj retry_strategy: (optional)
754
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
755
+
756
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
757
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
758
+
759
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
760
+
761
+ :param bool allow_control_chars: (optional)
762
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
763
+ By default, the response will not allow control characters in strings
764
+
765
+ :return: A :class:`~oci.response.Response` object with data of type None
766
+ :rtype: :class:`~oci.response.Response`
767
+
768
+ :example:
769
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/delete_backend.py.html>`__ to see an example of how to use delete_backend API.
770
+ """
771
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
772
+ required_arguments = ['networkLoadBalancerId', 'backendSetName', 'backendName']
773
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/backendSets/{backendSetName}/backends/{backendName}"
774
+ method = "DELETE"
775
+ operation_name = "delete_backend"
776
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/Backend/DeleteBackend"
777
+
778
+ # Don't accept unknown kwargs
779
+ expected_kwargs = [
780
+ "allow_control_chars",
781
+ "retry_strategy",
782
+ "opc_request_id",
783
+ "if_match"
784
+ ]
785
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
786
+ if extra_kwargs:
787
+ raise ValueError(
788
+ f"delete_backend got unknown kwargs: {extra_kwargs!r}")
789
+
790
+ path_params = {
791
+ "networkLoadBalancerId": network_load_balancer_id,
792
+ "backendSetName": backend_set_name,
793
+ "backendName": backend_name
794
+ }
795
+
796
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
797
+
798
+ for (k, v) in six.iteritems(path_params):
799
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
800
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
801
+
802
+ header_params = {
803
+ "accept": "application/json",
804
+ "content-type": "application/json",
805
+ "opc-request-id": kwargs.get("opc_request_id", missing),
806
+ "if-match": kwargs.get("if_match", missing)
807
+ }
808
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
809
+
810
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
811
+ operation_retry_strategy=kwargs.get('retry_strategy'),
812
+ client_retry_strategy=self.retry_strategy
813
+ )
814
+ if retry_strategy is None:
815
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
816
+
817
+ if retry_strategy:
818
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
819
+ self.base_client.add_opc_client_retries_header(header_params)
820
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
821
+ return retry_strategy.make_retrying_call(
822
+ self.base_client.call_api,
823
+ resource_path=resource_path,
824
+ method=method,
825
+ path_params=path_params,
826
+ header_params=header_params,
827
+ allow_control_chars=kwargs.get('allow_control_chars'),
828
+ operation_name=operation_name,
829
+ api_reference_link=api_reference_link,
830
+ required_arguments=required_arguments)
831
+ else:
832
+ return self.base_client.call_api(
833
+ resource_path=resource_path,
834
+ method=method,
835
+ path_params=path_params,
836
+ header_params=header_params,
837
+ allow_control_chars=kwargs.get('allow_control_chars'),
838
+ operation_name=operation_name,
839
+ api_reference_link=api_reference_link,
840
+ required_arguments=required_arguments)
841
+
842
+ def delete_backend_set(self, network_load_balancer_id, backend_set_name, **kwargs):
843
+ """
844
+ Deletes the specified backend set. Note that deleting a backend set removes its backend servers from the network load balancer.
845
+
846
+ Before you can delete a backend set, you must remove it from any active listeners.
847
+
848
+
849
+ :param str network_load_balancer_id: (required)
850
+ The `OCID`__ of the network load balancer to update.
851
+
852
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
853
+
854
+ :param str backend_set_name: (required)
855
+ The name of the backend set to delete.
856
+
857
+ Example: `example_backend_set`
858
+
859
+ :param str opc_request_id: (optional)
860
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
861
+ particular request, then provide the request identifier.
862
+
863
+ :param str if_match: (optional)
864
+ For optimistic concurrency control. In the PUT or DELETE call
865
+ for a resource, set the `if-match` parameter to the value of the
866
+ etag from a previous GET or POST response for that resource.
867
+ The resource will be updated or deleted only if the etag you
868
+ provide matches the current etag value of the resource.
869
+
870
+ :param obj retry_strategy: (optional)
871
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
872
+
873
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
874
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
875
+
876
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
877
+
878
+ :param bool allow_control_chars: (optional)
879
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
880
+ By default, the response will not allow control characters in strings
881
+
882
+ :return: A :class:`~oci.response.Response` object with data of type None
883
+ :rtype: :class:`~oci.response.Response`
884
+
885
+ :example:
886
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/delete_backend_set.py.html>`__ to see an example of how to use delete_backend_set API.
887
+ """
888
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
889
+ required_arguments = ['networkLoadBalancerId', 'backendSetName']
890
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/backendSets/{backendSetName}"
891
+ method = "DELETE"
892
+ operation_name = "delete_backend_set"
893
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/BackendSet/DeleteBackendSet"
894
+
895
+ # Don't accept unknown kwargs
896
+ expected_kwargs = [
897
+ "allow_control_chars",
898
+ "retry_strategy",
899
+ "opc_request_id",
900
+ "if_match"
901
+ ]
902
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
903
+ if extra_kwargs:
904
+ raise ValueError(
905
+ f"delete_backend_set got unknown kwargs: {extra_kwargs!r}")
906
+
907
+ path_params = {
908
+ "networkLoadBalancerId": network_load_balancer_id,
909
+ "backendSetName": backend_set_name
910
+ }
911
+
912
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
913
+
914
+ for (k, v) in six.iteritems(path_params):
915
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
916
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
917
+
918
+ header_params = {
919
+ "accept": "application/json",
920
+ "content-type": "application/json",
921
+ "opc-request-id": kwargs.get("opc_request_id", missing),
922
+ "if-match": kwargs.get("if_match", missing)
923
+ }
924
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
925
+
926
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
927
+ operation_retry_strategy=kwargs.get('retry_strategy'),
928
+ client_retry_strategy=self.retry_strategy
929
+ )
930
+ if retry_strategy is None:
931
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
932
+
933
+ if retry_strategy:
934
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
935
+ self.base_client.add_opc_client_retries_header(header_params)
936
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
937
+ return retry_strategy.make_retrying_call(
938
+ self.base_client.call_api,
939
+ resource_path=resource_path,
940
+ method=method,
941
+ path_params=path_params,
942
+ header_params=header_params,
943
+ allow_control_chars=kwargs.get('allow_control_chars'),
944
+ operation_name=operation_name,
945
+ api_reference_link=api_reference_link,
946
+ required_arguments=required_arguments)
947
+ else:
948
+ return self.base_client.call_api(
949
+ resource_path=resource_path,
950
+ method=method,
951
+ path_params=path_params,
952
+ header_params=header_params,
953
+ allow_control_chars=kwargs.get('allow_control_chars'),
954
+ operation_name=operation_name,
955
+ api_reference_link=api_reference_link,
956
+ required_arguments=required_arguments)
957
+
958
+ def delete_listener(self, network_load_balancer_id, listener_name, **kwargs):
959
+ """
960
+ Deletes a listener from a network load balancer.
961
+
962
+
963
+ :param str network_load_balancer_id: (required)
964
+ The `OCID`__ of the network load balancer to update.
965
+
966
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
967
+
968
+ :param str listener_name: (required)
969
+ The name of the listener to delete.
970
+
971
+ Example: `example_listener`
972
+
973
+ :param str opc_request_id: (optional)
974
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
975
+ particular request, then provide the request identifier.
976
+
977
+ :param str if_match: (optional)
978
+ For optimistic concurrency control. In the PUT or DELETE call
979
+ for a resource, set the `if-match` parameter to the value of the
980
+ etag from a previous GET or POST response for that resource.
981
+ The resource will be updated or deleted only if the etag you
982
+ provide matches the current etag value of the resource.
983
+
984
+ :param obj retry_strategy: (optional)
985
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
986
+
987
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
988
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
989
+
990
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
991
+
992
+ :param bool allow_control_chars: (optional)
993
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
994
+ By default, the response will not allow control characters in strings
995
+
996
+ :return: A :class:`~oci.response.Response` object with data of type None
997
+ :rtype: :class:`~oci.response.Response`
998
+
999
+ :example:
1000
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/delete_listener.py.html>`__ to see an example of how to use delete_listener API.
1001
+ """
1002
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1003
+ required_arguments = ['networkLoadBalancerId', 'listenerName']
1004
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/listeners/{listenerName}"
1005
+ method = "DELETE"
1006
+ operation_name = "delete_listener"
1007
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/Listener/DeleteListener"
1008
+
1009
+ # Don't accept unknown kwargs
1010
+ expected_kwargs = [
1011
+ "allow_control_chars",
1012
+ "retry_strategy",
1013
+ "opc_request_id",
1014
+ "if_match"
1015
+ ]
1016
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1017
+ if extra_kwargs:
1018
+ raise ValueError(
1019
+ f"delete_listener got unknown kwargs: {extra_kwargs!r}")
1020
+
1021
+ path_params = {
1022
+ "networkLoadBalancerId": network_load_balancer_id,
1023
+ "listenerName": listener_name
1024
+ }
1025
+
1026
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1027
+
1028
+ for (k, v) in six.iteritems(path_params):
1029
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1030
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1031
+
1032
+ header_params = {
1033
+ "accept": "application/json",
1034
+ "content-type": "application/json",
1035
+ "opc-request-id": kwargs.get("opc_request_id", missing),
1036
+ "if-match": kwargs.get("if_match", missing)
1037
+ }
1038
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1039
+
1040
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1041
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1042
+ client_retry_strategy=self.retry_strategy
1043
+ )
1044
+ if retry_strategy is None:
1045
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1046
+
1047
+ if retry_strategy:
1048
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1049
+ self.base_client.add_opc_client_retries_header(header_params)
1050
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1051
+ return retry_strategy.make_retrying_call(
1052
+ self.base_client.call_api,
1053
+ resource_path=resource_path,
1054
+ method=method,
1055
+ path_params=path_params,
1056
+ header_params=header_params,
1057
+ allow_control_chars=kwargs.get('allow_control_chars'),
1058
+ operation_name=operation_name,
1059
+ api_reference_link=api_reference_link,
1060
+ required_arguments=required_arguments)
1061
+ else:
1062
+ return self.base_client.call_api(
1063
+ resource_path=resource_path,
1064
+ method=method,
1065
+ path_params=path_params,
1066
+ header_params=header_params,
1067
+ allow_control_chars=kwargs.get('allow_control_chars'),
1068
+ operation_name=operation_name,
1069
+ api_reference_link=api_reference_link,
1070
+ required_arguments=required_arguments)
1071
+
1072
+ def delete_network_load_balancer(self, network_load_balancer_id, **kwargs):
1073
+ """
1074
+ Deletes a network load balancer resource by identifier.
1075
+
1076
+
1077
+ :param str network_load_balancer_id: (required)
1078
+ The `OCID`__ of the network load balancer to update.
1079
+
1080
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1081
+
1082
+ :param str if_match: (optional)
1083
+ For optimistic concurrency control. In the PUT or DELETE call
1084
+ for a resource, set the `if-match` parameter to the value of the
1085
+ etag from a previous GET or POST response for that resource.
1086
+ The resource will be updated or deleted only if the etag you
1087
+ provide matches the current etag value of the resource.
1088
+
1089
+ :param str opc_request_id: (optional)
1090
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
1091
+ particular request, then provide the request identifier.
1092
+
1093
+ :param obj retry_strategy: (optional)
1094
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1095
+
1096
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
1097
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1098
+
1099
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1100
+
1101
+ :param bool allow_control_chars: (optional)
1102
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1103
+ By default, the response will not allow control characters in strings
1104
+
1105
+ :return: A :class:`~oci.response.Response` object with data of type None
1106
+ :rtype: :class:`~oci.response.Response`
1107
+
1108
+ :example:
1109
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/delete_network_load_balancer.py.html>`__ to see an example of how to use delete_network_load_balancer API.
1110
+ """
1111
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1112
+ required_arguments = ['networkLoadBalancerId']
1113
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}"
1114
+ method = "DELETE"
1115
+ operation_name = "delete_network_load_balancer"
1116
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/NetworkLoadBalancer/DeleteNetworkLoadBalancer"
1117
+
1118
+ # Don't accept unknown kwargs
1119
+ expected_kwargs = [
1120
+ "allow_control_chars",
1121
+ "retry_strategy",
1122
+ "if_match",
1123
+ "opc_request_id"
1124
+ ]
1125
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1126
+ if extra_kwargs:
1127
+ raise ValueError(
1128
+ f"delete_network_load_balancer got unknown kwargs: {extra_kwargs!r}")
1129
+
1130
+ path_params = {
1131
+ "networkLoadBalancerId": network_load_balancer_id
1132
+ }
1133
+
1134
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1135
+
1136
+ for (k, v) in six.iteritems(path_params):
1137
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1138
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1139
+
1140
+ header_params = {
1141
+ "accept": "application/json",
1142
+ "content-type": "application/json",
1143
+ "if-match": kwargs.get("if_match", missing),
1144
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1145
+ }
1146
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1147
+
1148
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1149
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1150
+ client_retry_strategy=self.retry_strategy
1151
+ )
1152
+ if retry_strategy is None:
1153
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1154
+
1155
+ if retry_strategy:
1156
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1157
+ self.base_client.add_opc_client_retries_header(header_params)
1158
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1159
+ return retry_strategy.make_retrying_call(
1160
+ self.base_client.call_api,
1161
+ resource_path=resource_path,
1162
+ method=method,
1163
+ path_params=path_params,
1164
+ header_params=header_params,
1165
+ allow_control_chars=kwargs.get('allow_control_chars'),
1166
+ operation_name=operation_name,
1167
+ api_reference_link=api_reference_link,
1168
+ required_arguments=required_arguments)
1169
+ else:
1170
+ return self.base_client.call_api(
1171
+ resource_path=resource_path,
1172
+ method=method,
1173
+ path_params=path_params,
1174
+ header_params=header_params,
1175
+ allow_control_chars=kwargs.get('allow_control_chars'),
1176
+ operation_name=operation_name,
1177
+ api_reference_link=api_reference_link,
1178
+ required_arguments=required_arguments)
1179
+
1180
+ def get_backend(self, network_load_balancer_id, backend_set_name, backend_name, **kwargs):
1181
+ """
1182
+ Retrieves the configuration information for the specified backend server.
1183
+
1184
+
1185
+ :param str network_load_balancer_id: (required)
1186
+ The `OCID`__ of the network load balancer to update.
1187
+
1188
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1189
+
1190
+ :param str backend_set_name: (required)
1191
+ The name of the backend set that includes the backend server.
1192
+
1193
+ Example: `example_backend_set`
1194
+
1195
+ :param str backend_name: (required)
1196
+ The name of the backend server to retrieve.
1197
+ If the backend was created with an explicitly specified name, that name should be used here.
1198
+ If the backend was created without explicitly specifying the name, but was created using ipAddress, this is specified as <ipAddress>:<port>.
1199
+ If the backend was created without explicitly specifying the name, but was created using targetId, this is specified as <targetId>:<port>.
1200
+
1201
+ Example: `10.0.0.3:8080` or `ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:8080`
1202
+
1203
+ :param str opc_request_id: (optional)
1204
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
1205
+ particular request, then provide the request identifier.
1206
+
1207
+ :param str if_none_match: (optional)
1208
+ The system returns the requested resource, with a 200 status, only if the resource has no etag
1209
+ matching the one specified. If the condition fails for the GET and HEAD methods, then the system returns the
1210
+ HTTP status code `304 (Not Modified)`.
1211
+
1212
+ Example: `example-etag`
1213
+
1214
+ :param obj retry_strategy: (optional)
1215
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1216
+
1217
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
1218
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1219
+
1220
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1221
+
1222
+ :param bool allow_control_chars: (optional)
1223
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1224
+ By default, the response will not allow control characters in strings
1225
+
1226
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.Backend`
1227
+ :rtype: :class:`~oci.response.Response`
1228
+
1229
+ :example:
1230
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/get_backend.py.html>`__ to see an example of how to use get_backend API.
1231
+ """
1232
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1233
+ required_arguments = ['networkLoadBalancerId', 'backendSetName', 'backendName']
1234
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/backendSets/{backendSetName}/backends/{backendName}"
1235
+ method = "GET"
1236
+ operation_name = "get_backend"
1237
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/Backend/GetBackend"
1238
+
1239
+ # Don't accept unknown kwargs
1240
+ expected_kwargs = [
1241
+ "allow_control_chars",
1242
+ "retry_strategy",
1243
+ "opc_request_id",
1244
+ "if_none_match"
1245
+ ]
1246
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1247
+ if extra_kwargs:
1248
+ raise ValueError(
1249
+ f"get_backend got unknown kwargs: {extra_kwargs!r}")
1250
+
1251
+ path_params = {
1252
+ "networkLoadBalancerId": network_load_balancer_id,
1253
+ "backendSetName": backend_set_name,
1254
+ "backendName": backend_name
1255
+ }
1256
+
1257
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1258
+
1259
+ for (k, v) in six.iteritems(path_params):
1260
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1261
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1262
+
1263
+ header_params = {
1264
+ "accept": "application/json",
1265
+ "content-type": "application/json",
1266
+ "opc-request-id": kwargs.get("opc_request_id", missing),
1267
+ "if-none-match": kwargs.get("if_none_match", missing)
1268
+ }
1269
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1270
+
1271
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1272
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1273
+ client_retry_strategy=self.retry_strategy
1274
+ )
1275
+ if retry_strategy is None:
1276
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1277
+
1278
+ if retry_strategy:
1279
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1280
+ self.base_client.add_opc_client_retries_header(header_params)
1281
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1282
+ return retry_strategy.make_retrying_call(
1283
+ self.base_client.call_api,
1284
+ resource_path=resource_path,
1285
+ method=method,
1286
+ path_params=path_params,
1287
+ header_params=header_params,
1288
+ response_type="Backend",
1289
+ allow_control_chars=kwargs.get('allow_control_chars'),
1290
+ operation_name=operation_name,
1291
+ api_reference_link=api_reference_link,
1292
+ required_arguments=required_arguments)
1293
+ else:
1294
+ return self.base_client.call_api(
1295
+ resource_path=resource_path,
1296
+ method=method,
1297
+ path_params=path_params,
1298
+ header_params=header_params,
1299
+ response_type="Backend",
1300
+ allow_control_chars=kwargs.get('allow_control_chars'),
1301
+ operation_name=operation_name,
1302
+ api_reference_link=api_reference_link,
1303
+ required_arguments=required_arguments)
1304
+
1305
+ def get_backend_health(self, network_load_balancer_id, backend_set_name, backend_name, **kwargs):
1306
+ """
1307
+ Retrieves the current health status of the specified backend server.
1308
+
1309
+
1310
+ :param str network_load_balancer_id: (required)
1311
+ The `OCID`__ of the network load balancer to update.
1312
+
1313
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1314
+
1315
+ :param str backend_set_name: (required)
1316
+ The name of the backend set associated with the backend server for which to retrieve the health status.
1317
+
1318
+ Example: `example_backend_set`
1319
+
1320
+ :param str backend_name: (required)
1321
+ The name of the backend server to retrieve health status for.
1322
+ If the backend was created with an explicitly specified name, that name should be used here.
1323
+ If the backend was created without explicitly specifying the name, but was created using ipAddress, this is specified as <ipAddress>:<port>.
1324
+ If the backend was created without explicitly specifying the name, but was created using targetId, this is specified as <targetId>:<port>.
1325
+
1326
+ Example: `10.0.0.3:8080` or `ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:8080`
1327
+
1328
+ :param str opc_request_id: (optional)
1329
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
1330
+ particular request, then provide the request identifier.
1331
+
1332
+ :param obj retry_strategy: (optional)
1333
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1334
+
1335
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
1336
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1337
+
1338
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1339
+
1340
+ :param bool allow_control_chars: (optional)
1341
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1342
+ By default, the response will not allow control characters in strings
1343
+
1344
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.BackendHealth`
1345
+ :rtype: :class:`~oci.response.Response`
1346
+
1347
+ :example:
1348
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/get_backend_health.py.html>`__ to see an example of how to use get_backend_health API.
1349
+ """
1350
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1351
+ required_arguments = ['networkLoadBalancerId', 'backendSetName', 'backendName']
1352
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/backendSets/{backendSetName}/backends/{backendName}/health"
1353
+ method = "GET"
1354
+ operation_name = "get_backend_health"
1355
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/BackendHealth/GetBackendHealth"
1356
+
1357
+ # Don't accept unknown kwargs
1358
+ expected_kwargs = [
1359
+ "allow_control_chars",
1360
+ "retry_strategy",
1361
+ "opc_request_id"
1362
+ ]
1363
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1364
+ if extra_kwargs:
1365
+ raise ValueError(
1366
+ f"get_backend_health got unknown kwargs: {extra_kwargs!r}")
1367
+
1368
+ path_params = {
1369
+ "networkLoadBalancerId": network_load_balancer_id,
1370
+ "backendSetName": backend_set_name,
1371
+ "backendName": backend_name
1372
+ }
1373
+
1374
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1375
+
1376
+ for (k, v) in six.iteritems(path_params):
1377
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1378
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1379
+
1380
+ header_params = {
1381
+ "accept": "application/json",
1382
+ "content-type": "application/json",
1383
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1384
+ }
1385
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1386
+
1387
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1388
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1389
+ client_retry_strategy=self.retry_strategy
1390
+ )
1391
+ if retry_strategy is None:
1392
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1393
+
1394
+ if retry_strategy:
1395
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1396
+ self.base_client.add_opc_client_retries_header(header_params)
1397
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1398
+ return retry_strategy.make_retrying_call(
1399
+ self.base_client.call_api,
1400
+ resource_path=resource_path,
1401
+ method=method,
1402
+ path_params=path_params,
1403
+ header_params=header_params,
1404
+ response_type="BackendHealth",
1405
+ allow_control_chars=kwargs.get('allow_control_chars'),
1406
+ operation_name=operation_name,
1407
+ api_reference_link=api_reference_link,
1408
+ required_arguments=required_arguments)
1409
+ else:
1410
+ return self.base_client.call_api(
1411
+ resource_path=resource_path,
1412
+ method=method,
1413
+ path_params=path_params,
1414
+ header_params=header_params,
1415
+ response_type="BackendHealth",
1416
+ allow_control_chars=kwargs.get('allow_control_chars'),
1417
+ operation_name=operation_name,
1418
+ api_reference_link=api_reference_link,
1419
+ required_arguments=required_arguments)
1420
+
1421
+ def get_backend_set(self, network_load_balancer_id, backend_set_name, **kwargs):
1422
+ """
1423
+ Retrieves the configuration information for the specified backend set.
1424
+
1425
+
1426
+ :param str network_load_balancer_id: (required)
1427
+ The `OCID`__ of the network load balancer to update.
1428
+
1429
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1430
+
1431
+ :param str backend_set_name: (required)
1432
+ The name of the backend set to retrieve.
1433
+
1434
+ Example: `example_backend_set`
1435
+
1436
+ :param str opc_request_id: (optional)
1437
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
1438
+ particular request, then provide the request identifier.
1439
+
1440
+ :param str if_none_match: (optional)
1441
+ The system returns the requested resource, with a 200 status, only if the resource has no etag
1442
+ matching the one specified. If the condition fails for the GET and HEAD methods, then the system returns the
1443
+ HTTP status code `304 (Not Modified)`.
1444
+
1445
+ Example: `example-etag`
1446
+
1447
+ :param obj retry_strategy: (optional)
1448
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1449
+
1450
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
1451
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1452
+
1453
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1454
+
1455
+ :param bool allow_control_chars: (optional)
1456
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1457
+ By default, the response will not allow control characters in strings
1458
+
1459
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.BackendSet`
1460
+ :rtype: :class:`~oci.response.Response`
1461
+
1462
+ :example:
1463
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/get_backend_set.py.html>`__ to see an example of how to use get_backend_set API.
1464
+ """
1465
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1466
+ required_arguments = ['networkLoadBalancerId', 'backendSetName']
1467
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/backendSets/{backendSetName}"
1468
+ method = "GET"
1469
+ operation_name = "get_backend_set"
1470
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/BackendSet/GetBackendSet"
1471
+
1472
+ # Don't accept unknown kwargs
1473
+ expected_kwargs = [
1474
+ "allow_control_chars",
1475
+ "retry_strategy",
1476
+ "opc_request_id",
1477
+ "if_none_match"
1478
+ ]
1479
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1480
+ if extra_kwargs:
1481
+ raise ValueError(
1482
+ f"get_backend_set got unknown kwargs: {extra_kwargs!r}")
1483
+
1484
+ path_params = {
1485
+ "networkLoadBalancerId": network_load_balancer_id,
1486
+ "backendSetName": backend_set_name
1487
+ }
1488
+
1489
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1490
+
1491
+ for (k, v) in six.iteritems(path_params):
1492
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1493
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1494
+
1495
+ header_params = {
1496
+ "accept": "application/json",
1497
+ "content-type": "application/json",
1498
+ "opc-request-id": kwargs.get("opc_request_id", missing),
1499
+ "if-none-match": kwargs.get("if_none_match", missing)
1500
+ }
1501
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1502
+
1503
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1504
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1505
+ client_retry_strategy=self.retry_strategy
1506
+ )
1507
+ if retry_strategy is None:
1508
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1509
+
1510
+ if retry_strategy:
1511
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1512
+ self.base_client.add_opc_client_retries_header(header_params)
1513
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1514
+ return retry_strategy.make_retrying_call(
1515
+ self.base_client.call_api,
1516
+ resource_path=resource_path,
1517
+ method=method,
1518
+ path_params=path_params,
1519
+ header_params=header_params,
1520
+ response_type="BackendSet",
1521
+ allow_control_chars=kwargs.get('allow_control_chars'),
1522
+ operation_name=operation_name,
1523
+ api_reference_link=api_reference_link,
1524
+ required_arguments=required_arguments)
1525
+ else:
1526
+ return self.base_client.call_api(
1527
+ resource_path=resource_path,
1528
+ method=method,
1529
+ path_params=path_params,
1530
+ header_params=header_params,
1531
+ response_type="BackendSet",
1532
+ allow_control_chars=kwargs.get('allow_control_chars'),
1533
+ operation_name=operation_name,
1534
+ api_reference_link=api_reference_link,
1535
+ required_arguments=required_arguments)
1536
+
1537
+ def get_backend_set_health(self, network_load_balancer_id, backend_set_name, **kwargs):
1538
+ """
1539
+ Retrieves the health status for the specified backend set.
1540
+
1541
+
1542
+ :param str network_load_balancer_id: (required)
1543
+ The `OCID`__ of the network load balancer to update.
1544
+
1545
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1546
+
1547
+ :param str backend_set_name: (required)
1548
+ The name of the backend set for which to retrieve the health status.
1549
+
1550
+ Example: `example_backend_set`
1551
+
1552
+ :param str opc_request_id: (optional)
1553
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
1554
+ particular request, then provide the request identifier.
1555
+
1556
+ :param obj retry_strategy: (optional)
1557
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1558
+
1559
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
1560
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1561
+
1562
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1563
+
1564
+ :param bool allow_control_chars: (optional)
1565
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1566
+ By default, the response will not allow control characters in strings
1567
+
1568
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.BackendSetHealth`
1569
+ :rtype: :class:`~oci.response.Response`
1570
+
1571
+ :example:
1572
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/get_backend_set_health.py.html>`__ to see an example of how to use get_backend_set_health API.
1573
+ """
1574
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1575
+ required_arguments = ['networkLoadBalancerId', 'backendSetName']
1576
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/backendSets/{backendSetName}/health"
1577
+ method = "GET"
1578
+ operation_name = "get_backend_set_health"
1579
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/BackendSetHealth/GetBackendSetHealth"
1580
+
1581
+ # Don't accept unknown kwargs
1582
+ expected_kwargs = [
1583
+ "allow_control_chars",
1584
+ "retry_strategy",
1585
+ "opc_request_id"
1586
+ ]
1587
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1588
+ if extra_kwargs:
1589
+ raise ValueError(
1590
+ f"get_backend_set_health got unknown kwargs: {extra_kwargs!r}")
1591
+
1592
+ path_params = {
1593
+ "networkLoadBalancerId": network_load_balancer_id,
1594
+ "backendSetName": backend_set_name
1595
+ }
1596
+
1597
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1598
+
1599
+ for (k, v) in six.iteritems(path_params):
1600
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1601
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1602
+
1603
+ header_params = {
1604
+ "accept": "application/json",
1605
+ "content-type": "application/json",
1606
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1607
+ }
1608
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1609
+
1610
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1611
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1612
+ client_retry_strategy=self.retry_strategy
1613
+ )
1614
+ if retry_strategy is None:
1615
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1616
+
1617
+ if retry_strategy:
1618
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1619
+ self.base_client.add_opc_client_retries_header(header_params)
1620
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1621
+ return retry_strategy.make_retrying_call(
1622
+ self.base_client.call_api,
1623
+ resource_path=resource_path,
1624
+ method=method,
1625
+ path_params=path_params,
1626
+ header_params=header_params,
1627
+ response_type="BackendSetHealth",
1628
+ allow_control_chars=kwargs.get('allow_control_chars'),
1629
+ operation_name=operation_name,
1630
+ api_reference_link=api_reference_link,
1631
+ required_arguments=required_arguments)
1632
+ else:
1633
+ return self.base_client.call_api(
1634
+ resource_path=resource_path,
1635
+ method=method,
1636
+ path_params=path_params,
1637
+ header_params=header_params,
1638
+ response_type="BackendSetHealth",
1639
+ allow_control_chars=kwargs.get('allow_control_chars'),
1640
+ operation_name=operation_name,
1641
+ api_reference_link=api_reference_link,
1642
+ required_arguments=required_arguments)
1643
+
1644
+ def get_health_checker(self, network_load_balancer_id, backend_set_name, **kwargs):
1645
+ """
1646
+ Retrieves the health check policy information for a given network load balancer and backend set.
1647
+
1648
+
1649
+ :param str network_load_balancer_id: (required)
1650
+ The `OCID`__ of the network load balancer to update.
1651
+
1652
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1653
+
1654
+ :param str backend_set_name: (required)
1655
+ The name of the backend set associated with the health check policy to be retrieved.
1656
+
1657
+ Example: `example_backend_set`
1658
+
1659
+ :param str opc_request_id: (optional)
1660
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
1661
+ particular request, then provide the request identifier.
1662
+
1663
+ :param str opc_retry_token: (optional)
1664
+ A token that uniquely identifies a request so that it can be retried in case of a timeout or
1665
+ server error without risk of rerunning that same action. Retry tokens expire after 24
1666
+ hours but they can be invalidated before then due to conflicting operations. For example, if a resource
1667
+ has been deleted and purged from the system, then a retry of the original creation request
1668
+ might be rejected.
1669
+
1670
+ :param str if_none_match: (optional)
1671
+ The system returns the requested resource, with a 200 status, only if the resource has no etag
1672
+ matching the one specified. If the condition fails for the GET and HEAD methods, then the system returns the
1673
+ HTTP status code `304 (Not Modified)`.
1674
+
1675
+ Example: `example-etag`
1676
+
1677
+ :param obj retry_strategy: (optional)
1678
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1679
+
1680
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
1681
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1682
+
1683
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1684
+
1685
+ :param bool allow_control_chars: (optional)
1686
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1687
+ By default, the response will not allow control characters in strings
1688
+
1689
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.HealthChecker`
1690
+ :rtype: :class:`~oci.response.Response`
1691
+
1692
+ :example:
1693
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/get_health_checker.py.html>`__ to see an example of how to use get_health_checker API.
1694
+ """
1695
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1696
+ required_arguments = ['networkLoadBalancerId', 'backendSetName']
1697
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/backendSets/{backendSetName}/healthChecker"
1698
+ method = "GET"
1699
+ operation_name = "get_health_checker"
1700
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/HealthChecker/GetHealthChecker"
1701
+
1702
+ # Don't accept unknown kwargs
1703
+ expected_kwargs = [
1704
+ "allow_control_chars",
1705
+ "retry_strategy",
1706
+ "opc_request_id",
1707
+ "opc_retry_token",
1708
+ "if_none_match"
1709
+ ]
1710
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1711
+ if extra_kwargs:
1712
+ raise ValueError(
1713
+ f"get_health_checker got unknown kwargs: {extra_kwargs!r}")
1714
+
1715
+ path_params = {
1716
+ "networkLoadBalancerId": network_load_balancer_id,
1717
+ "backendSetName": backend_set_name
1718
+ }
1719
+
1720
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1721
+
1722
+ for (k, v) in six.iteritems(path_params):
1723
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1724
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1725
+
1726
+ header_params = {
1727
+ "accept": "application/json",
1728
+ "content-type": "application/json",
1729
+ "opc-request-id": kwargs.get("opc_request_id", missing),
1730
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
1731
+ "if-none-match": kwargs.get("if_none_match", missing)
1732
+ }
1733
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1734
+
1735
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1736
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1737
+ client_retry_strategy=self.retry_strategy
1738
+ )
1739
+ if retry_strategy is None:
1740
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1741
+
1742
+ if retry_strategy:
1743
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1744
+ self.base_client.add_opc_retry_token_if_needed(header_params)
1745
+ self.base_client.add_opc_client_retries_header(header_params)
1746
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1747
+ return retry_strategy.make_retrying_call(
1748
+ self.base_client.call_api,
1749
+ resource_path=resource_path,
1750
+ method=method,
1751
+ path_params=path_params,
1752
+ header_params=header_params,
1753
+ response_type="HealthChecker",
1754
+ allow_control_chars=kwargs.get('allow_control_chars'),
1755
+ operation_name=operation_name,
1756
+ api_reference_link=api_reference_link,
1757
+ required_arguments=required_arguments)
1758
+ else:
1759
+ return self.base_client.call_api(
1760
+ resource_path=resource_path,
1761
+ method=method,
1762
+ path_params=path_params,
1763
+ header_params=header_params,
1764
+ response_type="HealthChecker",
1765
+ allow_control_chars=kwargs.get('allow_control_chars'),
1766
+ operation_name=operation_name,
1767
+ api_reference_link=api_reference_link,
1768
+ required_arguments=required_arguments)
1769
+
1770
+ def get_listener(self, network_load_balancer_id, listener_name, **kwargs):
1771
+ """
1772
+ Retrieves listener properties associated with a given network load balancer and listener name.
1773
+
1774
+
1775
+ :param str network_load_balancer_id: (required)
1776
+ The `OCID`__ of the network load balancer to update.
1777
+
1778
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1779
+
1780
+ :param str listener_name: (required)
1781
+ The name of the listener to get.
1782
+
1783
+ Example: `example_listener`
1784
+
1785
+ :param str opc_request_id: (optional)
1786
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
1787
+ particular request, then provide the request identifier.
1788
+
1789
+ :param str if_none_match: (optional)
1790
+ The system returns the requested resource, with a 200 status, only if the resource has no etag
1791
+ matching the one specified. If the condition fails for the GET and HEAD methods, then the system returns the
1792
+ HTTP status code `304 (Not Modified)`.
1793
+
1794
+ Example: `example-etag`
1795
+
1796
+ :param obj retry_strategy: (optional)
1797
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1798
+
1799
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
1800
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1801
+
1802
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1803
+
1804
+ :param bool allow_control_chars: (optional)
1805
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1806
+ By default, the response will not allow control characters in strings
1807
+
1808
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.Listener`
1809
+ :rtype: :class:`~oci.response.Response`
1810
+
1811
+ :example:
1812
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/get_listener.py.html>`__ to see an example of how to use get_listener API.
1813
+ """
1814
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1815
+ required_arguments = ['networkLoadBalancerId', 'listenerName']
1816
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/listeners/{listenerName}"
1817
+ method = "GET"
1818
+ operation_name = "get_listener"
1819
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/Listener/GetListener"
1820
+
1821
+ # Don't accept unknown kwargs
1822
+ expected_kwargs = [
1823
+ "allow_control_chars",
1824
+ "retry_strategy",
1825
+ "opc_request_id",
1826
+ "if_none_match"
1827
+ ]
1828
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1829
+ if extra_kwargs:
1830
+ raise ValueError(
1831
+ f"get_listener got unknown kwargs: {extra_kwargs!r}")
1832
+
1833
+ path_params = {
1834
+ "networkLoadBalancerId": network_load_balancer_id,
1835
+ "listenerName": listener_name
1836
+ }
1837
+
1838
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1839
+
1840
+ for (k, v) in six.iteritems(path_params):
1841
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1842
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1843
+
1844
+ header_params = {
1845
+ "accept": "application/json",
1846
+ "content-type": "application/json",
1847
+ "opc-request-id": kwargs.get("opc_request_id", missing),
1848
+ "if-none-match": kwargs.get("if_none_match", missing)
1849
+ }
1850
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1851
+
1852
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1853
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1854
+ client_retry_strategy=self.retry_strategy
1855
+ )
1856
+ if retry_strategy is None:
1857
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1858
+
1859
+ if retry_strategy:
1860
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1861
+ self.base_client.add_opc_client_retries_header(header_params)
1862
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1863
+ return retry_strategy.make_retrying_call(
1864
+ self.base_client.call_api,
1865
+ resource_path=resource_path,
1866
+ method=method,
1867
+ path_params=path_params,
1868
+ header_params=header_params,
1869
+ response_type="Listener",
1870
+ allow_control_chars=kwargs.get('allow_control_chars'),
1871
+ operation_name=operation_name,
1872
+ api_reference_link=api_reference_link,
1873
+ required_arguments=required_arguments)
1874
+ else:
1875
+ return self.base_client.call_api(
1876
+ resource_path=resource_path,
1877
+ method=method,
1878
+ path_params=path_params,
1879
+ header_params=header_params,
1880
+ response_type="Listener",
1881
+ allow_control_chars=kwargs.get('allow_control_chars'),
1882
+ operation_name=operation_name,
1883
+ api_reference_link=api_reference_link,
1884
+ required_arguments=required_arguments)
1885
+
1886
+ def get_network_load_balancer(self, network_load_balancer_id, **kwargs):
1887
+ """
1888
+ Retrieves network load balancer configuration information by identifier.
1889
+
1890
+
1891
+ :param str network_load_balancer_id: (required)
1892
+ The `OCID`__ of the network load balancer to update.
1893
+
1894
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1895
+
1896
+ :param str if_none_match: (optional)
1897
+ The system returns the requested resource, with a 200 status, only if the resource has no etag
1898
+ matching the one specified. If the condition fails for the GET and HEAD methods, then the system returns the
1899
+ HTTP status code `304 (Not Modified)`.
1900
+
1901
+ Example: `example-etag`
1902
+
1903
+ :param str opc_request_id: (optional)
1904
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
1905
+ particular request, then provide the request identifier.
1906
+
1907
+ :param obj retry_strategy: (optional)
1908
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1909
+
1910
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
1911
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1912
+
1913
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1914
+
1915
+ :param bool allow_control_chars: (optional)
1916
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1917
+ By default, the response will not allow control characters in strings
1918
+
1919
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.NetworkLoadBalancer`
1920
+ :rtype: :class:`~oci.response.Response`
1921
+
1922
+ :example:
1923
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/get_network_load_balancer.py.html>`__ to see an example of how to use get_network_load_balancer API.
1924
+ """
1925
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1926
+ required_arguments = ['networkLoadBalancerId']
1927
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}"
1928
+ method = "GET"
1929
+ operation_name = "get_network_load_balancer"
1930
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/NetworkLoadBalancer/GetNetworkLoadBalancer"
1931
+
1932
+ # Don't accept unknown kwargs
1933
+ expected_kwargs = [
1934
+ "allow_control_chars",
1935
+ "retry_strategy",
1936
+ "if_none_match",
1937
+ "opc_request_id"
1938
+ ]
1939
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1940
+ if extra_kwargs:
1941
+ raise ValueError(
1942
+ f"get_network_load_balancer got unknown kwargs: {extra_kwargs!r}")
1943
+
1944
+ path_params = {
1945
+ "networkLoadBalancerId": network_load_balancer_id
1946
+ }
1947
+
1948
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1949
+
1950
+ for (k, v) in six.iteritems(path_params):
1951
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1952
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1953
+
1954
+ header_params = {
1955
+ "accept": "application/json",
1956
+ "content-type": "application/json",
1957
+ "if-none-match": kwargs.get("if_none_match", missing),
1958
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1959
+ }
1960
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1961
+
1962
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1963
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1964
+ client_retry_strategy=self.retry_strategy
1965
+ )
1966
+ if retry_strategy is None:
1967
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1968
+
1969
+ if retry_strategy:
1970
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1971
+ self.base_client.add_opc_client_retries_header(header_params)
1972
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1973
+ return retry_strategy.make_retrying_call(
1974
+ self.base_client.call_api,
1975
+ resource_path=resource_path,
1976
+ method=method,
1977
+ path_params=path_params,
1978
+ header_params=header_params,
1979
+ response_type="NetworkLoadBalancer",
1980
+ allow_control_chars=kwargs.get('allow_control_chars'),
1981
+ operation_name=operation_name,
1982
+ api_reference_link=api_reference_link,
1983
+ required_arguments=required_arguments)
1984
+ else:
1985
+ return self.base_client.call_api(
1986
+ resource_path=resource_path,
1987
+ method=method,
1988
+ path_params=path_params,
1989
+ header_params=header_params,
1990
+ response_type="NetworkLoadBalancer",
1991
+ allow_control_chars=kwargs.get('allow_control_chars'),
1992
+ operation_name=operation_name,
1993
+ api_reference_link=api_reference_link,
1994
+ required_arguments=required_arguments)
1995
+
1996
+ def get_network_load_balancer_health(self, network_load_balancer_id, **kwargs):
1997
+ """
1998
+ Retrieves the health status for the specified network load balancer.
1999
+
2000
+
2001
+ :param str network_load_balancer_id: (required)
2002
+ The `OCID`__ of the network load balancer to update.
2003
+
2004
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
2005
+
2006
+ :param str opc_request_id: (optional)
2007
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
2008
+ particular request, then provide the request identifier.
2009
+
2010
+ :param obj retry_strategy: (optional)
2011
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2012
+
2013
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
2014
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2015
+
2016
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2017
+
2018
+ :param bool allow_control_chars: (optional)
2019
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
2020
+ By default, the response will not allow control characters in strings
2021
+
2022
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.NetworkLoadBalancerHealth`
2023
+ :rtype: :class:`~oci.response.Response`
2024
+
2025
+ :example:
2026
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/get_network_load_balancer_health.py.html>`__ to see an example of how to use get_network_load_balancer_health API.
2027
+ """
2028
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
2029
+ required_arguments = ['networkLoadBalancerId']
2030
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/health"
2031
+ method = "GET"
2032
+ operation_name = "get_network_load_balancer_health"
2033
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/NetworkLoadBalancerHealth/GetNetworkLoadBalancerHealth"
2034
+
2035
+ # Don't accept unknown kwargs
2036
+ expected_kwargs = [
2037
+ "allow_control_chars",
2038
+ "retry_strategy",
2039
+ "opc_request_id"
2040
+ ]
2041
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2042
+ if extra_kwargs:
2043
+ raise ValueError(
2044
+ f"get_network_load_balancer_health got unknown kwargs: {extra_kwargs!r}")
2045
+
2046
+ path_params = {
2047
+ "networkLoadBalancerId": network_load_balancer_id
2048
+ }
2049
+
2050
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2051
+
2052
+ for (k, v) in six.iteritems(path_params):
2053
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2054
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
2055
+
2056
+ header_params = {
2057
+ "accept": "application/json",
2058
+ "content-type": "application/json",
2059
+ "opc-request-id": kwargs.get("opc_request_id", missing)
2060
+ }
2061
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2062
+
2063
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
2064
+ operation_retry_strategy=kwargs.get('retry_strategy'),
2065
+ client_retry_strategy=self.retry_strategy
2066
+ )
2067
+ if retry_strategy is None:
2068
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
2069
+
2070
+ if retry_strategy:
2071
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2072
+ self.base_client.add_opc_client_retries_header(header_params)
2073
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2074
+ return retry_strategy.make_retrying_call(
2075
+ self.base_client.call_api,
2076
+ resource_path=resource_path,
2077
+ method=method,
2078
+ path_params=path_params,
2079
+ header_params=header_params,
2080
+ response_type="NetworkLoadBalancerHealth",
2081
+ allow_control_chars=kwargs.get('allow_control_chars'),
2082
+ operation_name=operation_name,
2083
+ api_reference_link=api_reference_link,
2084
+ required_arguments=required_arguments)
2085
+ else:
2086
+ return self.base_client.call_api(
2087
+ resource_path=resource_path,
2088
+ method=method,
2089
+ path_params=path_params,
2090
+ header_params=header_params,
2091
+ response_type="NetworkLoadBalancerHealth",
2092
+ allow_control_chars=kwargs.get('allow_control_chars'),
2093
+ operation_name=operation_name,
2094
+ api_reference_link=api_reference_link,
2095
+ required_arguments=required_arguments)
2096
+
2097
+ def get_work_request(self, work_request_id, **kwargs):
2098
+ """
2099
+ Retrieves the details of the work request with the given identifier.
2100
+
2101
+
2102
+ :param str work_request_id: (required)
2103
+ The identifier of the asynchronous request.
2104
+
2105
+ :param str opc_request_id: (optional)
2106
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
2107
+ particular request, then provide the request identifier.
2108
+
2109
+ :param obj retry_strategy: (optional)
2110
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2111
+
2112
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
2113
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2114
+
2115
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2116
+
2117
+ :param bool allow_control_chars: (optional)
2118
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
2119
+ By default, the response will not allow control characters in strings
2120
+
2121
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.WorkRequest`
2122
+ :rtype: :class:`~oci.response.Response`
2123
+
2124
+ :example:
2125
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/get_work_request.py.html>`__ to see an example of how to use get_work_request API.
2126
+ """
2127
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
2128
+ required_arguments = ['workRequestId']
2129
+ resource_path = "/workRequests/{workRequestId}"
2130
+ method = "GET"
2131
+ operation_name = "get_work_request"
2132
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/WorkRequest/GetWorkRequest"
2133
+
2134
+ # Don't accept unknown kwargs
2135
+ expected_kwargs = [
2136
+ "allow_control_chars",
2137
+ "retry_strategy",
2138
+ "opc_request_id"
2139
+ ]
2140
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2141
+ if extra_kwargs:
2142
+ raise ValueError(
2143
+ f"get_work_request got unknown kwargs: {extra_kwargs!r}")
2144
+
2145
+ path_params = {
2146
+ "workRequestId": work_request_id
2147
+ }
2148
+
2149
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2150
+
2151
+ for (k, v) in six.iteritems(path_params):
2152
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2153
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
2154
+
2155
+ header_params = {
2156
+ "accept": "application/json",
2157
+ "content-type": "application/json",
2158
+ "opc-request-id": kwargs.get("opc_request_id", missing)
2159
+ }
2160
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2161
+
2162
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
2163
+ operation_retry_strategy=kwargs.get('retry_strategy'),
2164
+ client_retry_strategy=self.retry_strategy
2165
+ )
2166
+ if retry_strategy is None:
2167
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
2168
+
2169
+ if retry_strategy:
2170
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2171
+ self.base_client.add_opc_client_retries_header(header_params)
2172
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2173
+ return retry_strategy.make_retrying_call(
2174
+ self.base_client.call_api,
2175
+ resource_path=resource_path,
2176
+ method=method,
2177
+ path_params=path_params,
2178
+ header_params=header_params,
2179
+ response_type="WorkRequest",
2180
+ allow_control_chars=kwargs.get('allow_control_chars'),
2181
+ operation_name=operation_name,
2182
+ api_reference_link=api_reference_link,
2183
+ required_arguments=required_arguments)
2184
+ else:
2185
+ return self.base_client.call_api(
2186
+ resource_path=resource_path,
2187
+ method=method,
2188
+ path_params=path_params,
2189
+ header_params=header_params,
2190
+ response_type="WorkRequest",
2191
+ allow_control_chars=kwargs.get('allow_control_chars'),
2192
+ operation_name=operation_name,
2193
+ api_reference_link=api_reference_link,
2194
+ required_arguments=required_arguments)
2195
+
2196
+ def list_backend_sets(self, network_load_balancer_id, **kwargs):
2197
+ """
2198
+ Lists all backend sets associated with a given network load balancer.
2199
+
2200
+
2201
+ :param str network_load_balancer_id: (required)
2202
+ The `OCID`__ of the network load balancer to update.
2203
+
2204
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
2205
+
2206
+ :param str opc_request_id: (optional)
2207
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
2208
+ particular request, then provide the request identifier.
2209
+
2210
+ :param str if_none_match: (optional)
2211
+ The system returns the requested resource, with a 200 status, only if the resource has no etag
2212
+ matching the one specified. If the condition fails for the GET and HEAD methods, then the system returns the
2213
+ HTTP status code `304 (Not Modified)`.
2214
+
2215
+ Example: `example-etag`
2216
+
2217
+ :param int limit: (optional)
2218
+ For list pagination. The maximum number of results per page or items to return, in a paginated \"List\" call.
2219
+ For important details about how pagination works, see `List Pagination`__.
2220
+
2221
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
2222
+
2223
+ :param str page: (optional)
2224
+ The page token representing the page from which to start retrieving results.
2225
+ For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
2226
+ For important details about how pagination works, see `List Pagination`__.
2227
+
2228
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
2229
+
2230
+ :param str sort_order: (optional)
2231
+ The sort order to use, either 'asc' (ascending) or 'desc' (descending).
2232
+
2233
+ Allowed values are: "ASC", "DESC"
2234
+
2235
+ :param str sort_by: (optional)
2236
+ The field to sort by. Only one sort order can be provided. The default order for timeCreated is descending.
2237
+ The default order for displayName is ascending. If no value is specified, then timeCreated is the default.
2238
+
2239
+ Allowed values are: "timeCreated", "displayName"
2240
+
2241
+ :param obj retry_strategy: (optional)
2242
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2243
+
2244
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
2245
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2246
+
2247
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2248
+
2249
+ :param bool allow_control_chars: (optional)
2250
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
2251
+ By default, the response will not allow control characters in strings
2252
+
2253
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.BackendSetCollection`
2254
+ :rtype: :class:`~oci.response.Response`
2255
+
2256
+ :example:
2257
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/list_backend_sets.py.html>`__ to see an example of how to use list_backend_sets API.
2258
+ """
2259
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
2260
+ required_arguments = ['networkLoadBalancerId']
2261
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/backendSets"
2262
+ method = "GET"
2263
+ operation_name = "list_backend_sets"
2264
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/BackendSetSummary/ListBackendSets"
2265
+
2266
+ # Don't accept unknown kwargs
2267
+ expected_kwargs = [
2268
+ "allow_control_chars",
2269
+ "retry_strategy",
2270
+ "opc_request_id",
2271
+ "if_none_match",
2272
+ "limit",
2273
+ "page",
2274
+ "sort_order",
2275
+ "sort_by"
2276
+ ]
2277
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2278
+ if extra_kwargs:
2279
+ raise ValueError(
2280
+ f"list_backend_sets got unknown kwargs: {extra_kwargs!r}")
2281
+
2282
+ path_params = {
2283
+ "networkLoadBalancerId": network_load_balancer_id
2284
+ }
2285
+
2286
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2287
+
2288
+ for (k, v) in six.iteritems(path_params):
2289
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2290
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
2291
+
2292
+ if 'sort_order' in kwargs:
2293
+ sort_order_allowed_values = ["ASC", "DESC"]
2294
+ if kwargs['sort_order'] not in sort_order_allowed_values:
2295
+ raise ValueError(
2296
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
2297
+ )
2298
+
2299
+ if 'sort_by' in kwargs:
2300
+ sort_by_allowed_values = ["timeCreated", "displayName"]
2301
+ if kwargs['sort_by'] not in sort_by_allowed_values:
2302
+ raise ValueError(
2303
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
2304
+ )
2305
+
2306
+ query_params = {
2307
+ "limit": kwargs.get("limit", missing),
2308
+ "page": kwargs.get("page", missing),
2309
+ "sortOrder": kwargs.get("sort_order", missing),
2310
+ "sortBy": kwargs.get("sort_by", missing)
2311
+ }
2312
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
2313
+
2314
+ header_params = {
2315
+ "accept": "application/json",
2316
+ "content-type": "application/json",
2317
+ "opc-request-id": kwargs.get("opc_request_id", missing),
2318
+ "if-none-match": kwargs.get("if_none_match", missing)
2319
+ }
2320
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2321
+
2322
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
2323
+ operation_retry_strategy=kwargs.get('retry_strategy'),
2324
+ client_retry_strategy=self.retry_strategy
2325
+ )
2326
+ if retry_strategy is None:
2327
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
2328
+
2329
+ if retry_strategy:
2330
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2331
+ self.base_client.add_opc_client_retries_header(header_params)
2332
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2333
+ return retry_strategy.make_retrying_call(
2334
+ self.base_client.call_api,
2335
+ resource_path=resource_path,
2336
+ method=method,
2337
+ path_params=path_params,
2338
+ query_params=query_params,
2339
+ header_params=header_params,
2340
+ response_type="BackendSetCollection",
2341
+ allow_control_chars=kwargs.get('allow_control_chars'),
2342
+ operation_name=operation_name,
2343
+ api_reference_link=api_reference_link,
2344
+ required_arguments=required_arguments)
2345
+ else:
2346
+ return self.base_client.call_api(
2347
+ resource_path=resource_path,
2348
+ method=method,
2349
+ path_params=path_params,
2350
+ query_params=query_params,
2351
+ header_params=header_params,
2352
+ response_type="BackendSetCollection",
2353
+ allow_control_chars=kwargs.get('allow_control_chars'),
2354
+ operation_name=operation_name,
2355
+ api_reference_link=api_reference_link,
2356
+ required_arguments=required_arguments)
2357
+
2358
+ def list_backends(self, network_load_balancer_id, backend_set_name, **kwargs):
2359
+ """
2360
+ Lists the backend servers for a given network load balancer and backend set.
2361
+
2362
+
2363
+ :param str network_load_balancer_id: (required)
2364
+ The `OCID`__ of the network load balancer to update.
2365
+
2366
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
2367
+
2368
+ :param str backend_set_name: (required)
2369
+ The name of the backend set associated with the backend servers.
2370
+
2371
+ Example: `example_backend_set`
2372
+
2373
+ :param str opc_request_id: (optional)
2374
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
2375
+ particular request, then provide the request identifier.
2376
+
2377
+ :param str if_none_match: (optional)
2378
+ The system returns the requested resource, with a 200 status, only if the resource has no etag
2379
+ matching the one specified. If the condition fails for the GET and HEAD methods, then the system returns the
2380
+ HTTP status code `304 (Not Modified)`.
2381
+
2382
+ Example: `example-etag`
2383
+
2384
+ :param int limit: (optional)
2385
+ For list pagination. The maximum number of results per page or items to return, in a paginated \"List\" call.
2386
+ For important details about how pagination works, see `List Pagination`__.
2387
+
2388
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
2389
+
2390
+ :param str page: (optional)
2391
+ The page token representing the page from which to start retrieving results.
2392
+ For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
2393
+ For important details about how pagination works, see `List Pagination`__.
2394
+
2395
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
2396
+
2397
+ :param str sort_order: (optional)
2398
+ The sort order to use, either 'asc' (ascending) or 'desc' (descending).
2399
+
2400
+ Allowed values are: "ASC", "DESC"
2401
+
2402
+ :param str sort_by: (optional)
2403
+ The field to sort by. Only one sort order can be provided. The default order for timeCreated is descending.
2404
+ The default order for displayName is ascending. If no value is specified, then timeCreated is the default.
2405
+
2406
+ Allowed values are: "timeCreated", "displayName"
2407
+
2408
+ :param obj retry_strategy: (optional)
2409
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2410
+
2411
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
2412
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2413
+
2414
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2415
+
2416
+ :param bool allow_control_chars: (optional)
2417
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
2418
+ By default, the response will not allow control characters in strings
2419
+
2420
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.BackendCollection`
2421
+ :rtype: :class:`~oci.response.Response`
2422
+
2423
+ :example:
2424
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/list_backends.py.html>`__ to see an example of how to use list_backends API.
2425
+ """
2426
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
2427
+ required_arguments = ['networkLoadBalancerId', 'backendSetName']
2428
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/backendSets/{backendSetName}/backends"
2429
+ method = "GET"
2430
+ operation_name = "list_backends"
2431
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/BackendSummary/ListBackends"
2432
+
2433
+ # Don't accept unknown kwargs
2434
+ expected_kwargs = [
2435
+ "allow_control_chars",
2436
+ "retry_strategy",
2437
+ "opc_request_id",
2438
+ "if_none_match",
2439
+ "limit",
2440
+ "page",
2441
+ "sort_order",
2442
+ "sort_by"
2443
+ ]
2444
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2445
+ if extra_kwargs:
2446
+ raise ValueError(
2447
+ f"list_backends got unknown kwargs: {extra_kwargs!r}")
2448
+
2449
+ path_params = {
2450
+ "networkLoadBalancerId": network_load_balancer_id,
2451
+ "backendSetName": backend_set_name
2452
+ }
2453
+
2454
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2455
+
2456
+ for (k, v) in six.iteritems(path_params):
2457
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2458
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
2459
+
2460
+ if 'sort_order' in kwargs:
2461
+ sort_order_allowed_values = ["ASC", "DESC"]
2462
+ if kwargs['sort_order'] not in sort_order_allowed_values:
2463
+ raise ValueError(
2464
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
2465
+ )
2466
+
2467
+ if 'sort_by' in kwargs:
2468
+ sort_by_allowed_values = ["timeCreated", "displayName"]
2469
+ if kwargs['sort_by'] not in sort_by_allowed_values:
2470
+ raise ValueError(
2471
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
2472
+ )
2473
+
2474
+ query_params = {
2475
+ "limit": kwargs.get("limit", missing),
2476
+ "page": kwargs.get("page", missing),
2477
+ "sortOrder": kwargs.get("sort_order", missing),
2478
+ "sortBy": kwargs.get("sort_by", missing)
2479
+ }
2480
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
2481
+
2482
+ header_params = {
2483
+ "accept": "application/json",
2484
+ "content-type": "application/json",
2485
+ "opc-request-id": kwargs.get("opc_request_id", missing),
2486
+ "if-none-match": kwargs.get("if_none_match", missing)
2487
+ }
2488
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2489
+
2490
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
2491
+ operation_retry_strategy=kwargs.get('retry_strategy'),
2492
+ client_retry_strategy=self.retry_strategy
2493
+ )
2494
+ if retry_strategy is None:
2495
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
2496
+
2497
+ if retry_strategy:
2498
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2499
+ self.base_client.add_opc_client_retries_header(header_params)
2500
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2501
+ return retry_strategy.make_retrying_call(
2502
+ self.base_client.call_api,
2503
+ resource_path=resource_path,
2504
+ method=method,
2505
+ path_params=path_params,
2506
+ query_params=query_params,
2507
+ header_params=header_params,
2508
+ response_type="BackendCollection",
2509
+ allow_control_chars=kwargs.get('allow_control_chars'),
2510
+ operation_name=operation_name,
2511
+ api_reference_link=api_reference_link,
2512
+ required_arguments=required_arguments)
2513
+ else:
2514
+ return self.base_client.call_api(
2515
+ resource_path=resource_path,
2516
+ method=method,
2517
+ path_params=path_params,
2518
+ query_params=query_params,
2519
+ header_params=header_params,
2520
+ response_type="BackendCollection",
2521
+ allow_control_chars=kwargs.get('allow_control_chars'),
2522
+ operation_name=operation_name,
2523
+ api_reference_link=api_reference_link,
2524
+ required_arguments=required_arguments)
2525
+
2526
+ def list_listeners(self, network_load_balancer_id, **kwargs):
2527
+ """
2528
+ Lists all listeners associated with a given network load balancer.
2529
+
2530
+
2531
+ :param str network_load_balancer_id: (required)
2532
+ The `OCID`__ of the network load balancer to update.
2533
+
2534
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
2535
+
2536
+ :param str opc_request_id: (optional)
2537
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
2538
+ particular request, then provide the request identifier.
2539
+
2540
+ :param str if_none_match: (optional)
2541
+ The system returns the requested resource, with a 200 status, only if the resource has no etag
2542
+ matching the one specified. If the condition fails for the GET and HEAD methods, then the system returns the
2543
+ HTTP status code `304 (Not Modified)`.
2544
+
2545
+ Example: `example-etag`
2546
+
2547
+ :param int limit: (optional)
2548
+ For list pagination. The maximum number of results per page or items to return, in a paginated \"List\" call.
2549
+ For important details about how pagination works, see `List Pagination`__.
2550
+
2551
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
2552
+
2553
+ :param str page: (optional)
2554
+ The page token representing the page from which to start retrieving results.
2555
+ For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
2556
+ For important details about how pagination works, see `List Pagination`__.
2557
+
2558
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
2559
+
2560
+ :param str sort_order: (optional)
2561
+ The sort order to use, either 'asc' (ascending) or 'desc' (descending).
2562
+
2563
+ Allowed values are: "ASC", "DESC"
2564
+
2565
+ :param str sort_by: (optional)
2566
+ The field to sort by. Only one sort order can be provided. The default order for timeCreated is descending.
2567
+ The default order for displayName is ascending. If no value is specified, then timeCreated is the default.
2568
+
2569
+ Allowed values are: "timeCreated", "displayName"
2570
+
2571
+ :param obj retry_strategy: (optional)
2572
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2573
+
2574
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
2575
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2576
+
2577
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2578
+
2579
+ :param bool allow_control_chars: (optional)
2580
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
2581
+ By default, the response will not allow control characters in strings
2582
+
2583
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.ListenerCollection`
2584
+ :rtype: :class:`~oci.response.Response`
2585
+
2586
+ :example:
2587
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/list_listeners.py.html>`__ to see an example of how to use list_listeners API.
2588
+ """
2589
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
2590
+ required_arguments = ['networkLoadBalancerId']
2591
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/listeners"
2592
+ method = "GET"
2593
+ operation_name = "list_listeners"
2594
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/ListenerSummary/ListListeners"
2595
+
2596
+ # Don't accept unknown kwargs
2597
+ expected_kwargs = [
2598
+ "allow_control_chars",
2599
+ "retry_strategy",
2600
+ "opc_request_id",
2601
+ "if_none_match",
2602
+ "limit",
2603
+ "page",
2604
+ "sort_order",
2605
+ "sort_by"
2606
+ ]
2607
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2608
+ if extra_kwargs:
2609
+ raise ValueError(
2610
+ f"list_listeners got unknown kwargs: {extra_kwargs!r}")
2611
+
2612
+ path_params = {
2613
+ "networkLoadBalancerId": network_load_balancer_id
2614
+ }
2615
+
2616
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2617
+
2618
+ for (k, v) in six.iteritems(path_params):
2619
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2620
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
2621
+
2622
+ if 'sort_order' in kwargs:
2623
+ sort_order_allowed_values = ["ASC", "DESC"]
2624
+ if kwargs['sort_order'] not in sort_order_allowed_values:
2625
+ raise ValueError(
2626
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
2627
+ )
2628
+
2629
+ if 'sort_by' in kwargs:
2630
+ sort_by_allowed_values = ["timeCreated", "displayName"]
2631
+ if kwargs['sort_by'] not in sort_by_allowed_values:
2632
+ raise ValueError(
2633
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
2634
+ )
2635
+
2636
+ query_params = {
2637
+ "limit": kwargs.get("limit", missing),
2638
+ "page": kwargs.get("page", missing),
2639
+ "sortOrder": kwargs.get("sort_order", missing),
2640
+ "sortBy": kwargs.get("sort_by", missing)
2641
+ }
2642
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
2643
+
2644
+ header_params = {
2645
+ "accept": "application/json",
2646
+ "content-type": "application/json",
2647
+ "opc-request-id": kwargs.get("opc_request_id", missing),
2648
+ "if-none-match": kwargs.get("if_none_match", missing)
2649
+ }
2650
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2651
+
2652
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
2653
+ operation_retry_strategy=kwargs.get('retry_strategy'),
2654
+ client_retry_strategy=self.retry_strategy
2655
+ )
2656
+ if retry_strategy is None:
2657
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
2658
+
2659
+ if retry_strategy:
2660
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2661
+ self.base_client.add_opc_client_retries_header(header_params)
2662
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2663
+ return retry_strategy.make_retrying_call(
2664
+ self.base_client.call_api,
2665
+ resource_path=resource_path,
2666
+ method=method,
2667
+ path_params=path_params,
2668
+ query_params=query_params,
2669
+ header_params=header_params,
2670
+ response_type="ListenerCollection",
2671
+ allow_control_chars=kwargs.get('allow_control_chars'),
2672
+ operation_name=operation_name,
2673
+ api_reference_link=api_reference_link,
2674
+ required_arguments=required_arguments)
2675
+ else:
2676
+ return self.base_client.call_api(
2677
+ resource_path=resource_path,
2678
+ method=method,
2679
+ path_params=path_params,
2680
+ query_params=query_params,
2681
+ header_params=header_params,
2682
+ response_type="ListenerCollection",
2683
+ allow_control_chars=kwargs.get('allow_control_chars'),
2684
+ operation_name=operation_name,
2685
+ api_reference_link=api_reference_link,
2686
+ required_arguments=required_arguments)
2687
+
2688
+ def list_network_load_balancer_healths(self, compartment_id, **kwargs):
2689
+ """
2690
+ Lists the summary health statuses for all network load balancers in the specified compartment.
2691
+
2692
+
2693
+ :param str compartment_id: (required)
2694
+ The `OCID`__ of the compartment containing the network load balancers to list.
2695
+
2696
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
2697
+
2698
+ :param str sort_order: (optional)
2699
+ The sort order to use, either 'asc' (ascending) or 'desc' (descending).
2700
+
2701
+ Allowed values are: "ASC", "DESC"
2702
+
2703
+ :param str sort_by: (optional)
2704
+ The field to sort by. Only one sort order can be provided. The default order for timeCreated is descending.
2705
+ The default order for displayName is ascending. If no value is specified, then timeCreated is the default.
2706
+
2707
+ Allowed values are: "timeCreated", "displayName"
2708
+
2709
+ :param str opc_request_id: (optional)
2710
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
2711
+ particular request, then provide the request identifier.
2712
+
2713
+ :param int limit: (optional)
2714
+ For list pagination. The maximum number of results per page or items to return, in a paginated \"List\" call.
2715
+ For important details about how pagination works, see `List Pagination`__.
2716
+
2717
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
2718
+
2719
+ :param str page: (optional)
2720
+ The page token representing the page from which to start retrieving results.
2721
+ For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
2722
+ For important details about how pagination works, see `List Pagination`__.
2723
+
2724
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
2725
+
2726
+ :param obj retry_strategy: (optional)
2727
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2728
+
2729
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
2730
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2731
+
2732
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2733
+
2734
+ :param bool allow_control_chars: (optional)
2735
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
2736
+ By default, the response will not allow control characters in strings
2737
+
2738
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.NetworkLoadBalancerHealthCollection`
2739
+ :rtype: :class:`~oci.response.Response`
2740
+
2741
+ :example:
2742
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/list_network_load_balancer_healths.py.html>`__ to see an example of how to use list_network_load_balancer_healths API.
2743
+ """
2744
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
2745
+ required_arguments = ['compartmentId']
2746
+ resource_path = "/networkLoadBalancers/health"
2747
+ method = "GET"
2748
+ operation_name = "list_network_load_balancer_healths"
2749
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/NetworkLoadBalancerHealth/ListNetworkLoadBalancerHealths"
2750
+
2751
+ # Don't accept unknown kwargs
2752
+ expected_kwargs = [
2753
+ "allow_control_chars",
2754
+ "retry_strategy",
2755
+ "sort_order",
2756
+ "sort_by",
2757
+ "opc_request_id",
2758
+ "limit",
2759
+ "page"
2760
+ ]
2761
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2762
+ if extra_kwargs:
2763
+ raise ValueError(
2764
+ f"list_network_load_balancer_healths got unknown kwargs: {extra_kwargs!r}")
2765
+
2766
+ if 'sort_order' in kwargs:
2767
+ sort_order_allowed_values = ["ASC", "DESC"]
2768
+ if kwargs['sort_order'] not in sort_order_allowed_values:
2769
+ raise ValueError(
2770
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
2771
+ )
2772
+
2773
+ if 'sort_by' in kwargs:
2774
+ sort_by_allowed_values = ["timeCreated", "displayName"]
2775
+ if kwargs['sort_by'] not in sort_by_allowed_values:
2776
+ raise ValueError(
2777
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
2778
+ )
2779
+
2780
+ query_params = {
2781
+ "sortOrder": kwargs.get("sort_order", missing),
2782
+ "sortBy": kwargs.get("sort_by", missing),
2783
+ "compartmentId": compartment_id,
2784
+ "limit": kwargs.get("limit", missing),
2785
+ "page": kwargs.get("page", missing)
2786
+ }
2787
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
2788
+
2789
+ header_params = {
2790
+ "accept": "application/json",
2791
+ "content-type": "application/json",
2792
+ "opc-request-id": kwargs.get("opc_request_id", missing)
2793
+ }
2794
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2795
+
2796
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
2797
+ operation_retry_strategy=kwargs.get('retry_strategy'),
2798
+ client_retry_strategy=self.retry_strategy
2799
+ )
2800
+ if retry_strategy is None:
2801
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
2802
+
2803
+ if retry_strategy:
2804
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2805
+ self.base_client.add_opc_client_retries_header(header_params)
2806
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2807
+ return retry_strategy.make_retrying_call(
2808
+ self.base_client.call_api,
2809
+ resource_path=resource_path,
2810
+ method=method,
2811
+ query_params=query_params,
2812
+ header_params=header_params,
2813
+ response_type="NetworkLoadBalancerHealthCollection",
2814
+ allow_control_chars=kwargs.get('allow_control_chars'),
2815
+ operation_name=operation_name,
2816
+ api_reference_link=api_reference_link,
2817
+ required_arguments=required_arguments)
2818
+ else:
2819
+ return self.base_client.call_api(
2820
+ resource_path=resource_path,
2821
+ method=method,
2822
+ query_params=query_params,
2823
+ header_params=header_params,
2824
+ response_type="NetworkLoadBalancerHealthCollection",
2825
+ allow_control_chars=kwargs.get('allow_control_chars'),
2826
+ operation_name=operation_name,
2827
+ api_reference_link=api_reference_link,
2828
+ required_arguments=required_arguments)
2829
+
2830
+ def list_network_load_balancers(self, compartment_id, **kwargs):
2831
+ """
2832
+ Returns a list of network load balancers.
2833
+
2834
+
2835
+ :param str compartment_id: (required)
2836
+ The `OCID`__ of the compartment containing the network load balancers to list.
2837
+
2838
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
2839
+
2840
+ :param str lifecycle_state: (optional)
2841
+ A filter to return only resources that match the given lifecycle state.
2842
+
2843
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"
2844
+
2845
+ :param str display_name: (optional)
2846
+ A filter to return only resources that match the entire display name given.
2847
+
2848
+ :param int limit: (optional)
2849
+ For list pagination. The maximum number of results per page or items to return, in a paginated \"List\" call.
2850
+ For important details about how pagination works, see `List Pagination`__.
2851
+
2852
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
2853
+
2854
+ :param str page: (optional)
2855
+ The page token representing the page from which to start retrieving results.
2856
+ For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
2857
+ For important details about how pagination works, see `List Pagination`__.
2858
+
2859
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
2860
+
2861
+ :param str sort_order: (optional)
2862
+ The sort order to use, either 'asc' (ascending) or 'desc' (descending).
2863
+
2864
+ Allowed values are: "ASC", "DESC"
2865
+
2866
+ :param str sort_by: (optional)
2867
+ The field to sort by. Only one sort order can be provided. The default order for timeCreated is descending.
2868
+ The default order for displayName is ascending. If no value is specified, then timeCreated is the default.
2869
+
2870
+ Allowed values are: "timeCreated", "displayName"
2871
+
2872
+ :param str opc_request_id: (optional)
2873
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
2874
+ particular request, then provide the request identifier.
2875
+
2876
+ :param obj retry_strategy: (optional)
2877
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2878
+
2879
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
2880
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2881
+
2882
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2883
+
2884
+ :param bool allow_control_chars: (optional)
2885
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
2886
+ By default, the response will not allow control characters in strings
2887
+
2888
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.NetworkLoadBalancerCollection`
2889
+ :rtype: :class:`~oci.response.Response`
2890
+
2891
+ :example:
2892
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/list_network_load_balancers.py.html>`__ to see an example of how to use list_network_load_balancers API.
2893
+ """
2894
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
2895
+ required_arguments = ['compartmentId']
2896
+ resource_path = "/networkLoadBalancers"
2897
+ method = "GET"
2898
+ operation_name = "list_network_load_balancers"
2899
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/NetworkLoadBalancer/ListNetworkLoadBalancers"
2900
+
2901
+ # Don't accept unknown kwargs
2902
+ expected_kwargs = [
2903
+ "allow_control_chars",
2904
+ "retry_strategy",
2905
+ "lifecycle_state",
2906
+ "display_name",
2907
+ "limit",
2908
+ "page",
2909
+ "sort_order",
2910
+ "sort_by",
2911
+ "opc_request_id"
2912
+ ]
2913
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2914
+ if extra_kwargs:
2915
+ raise ValueError(
2916
+ f"list_network_load_balancers got unknown kwargs: {extra_kwargs!r}")
2917
+
2918
+ if 'lifecycle_state' in kwargs:
2919
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]
2920
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
2921
+ raise ValueError(
2922
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
2923
+ )
2924
+
2925
+ if 'sort_order' in kwargs:
2926
+ sort_order_allowed_values = ["ASC", "DESC"]
2927
+ if kwargs['sort_order'] not in sort_order_allowed_values:
2928
+ raise ValueError(
2929
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
2930
+ )
2931
+
2932
+ if 'sort_by' in kwargs:
2933
+ sort_by_allowed_values = ["timeCreated", "displayName"]
2934
+ if kwargs['sort_by'] not in sort_by_allowed_values:
2935
+ raise ValueError(
2936
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
2937
+ )
2938
+
2939
+ query_params = {
2940
+ "compartmentId": compartment_id,
2941
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
2942
+ "displayName": kwargs.get("display_name", missing),
2943
+ "limit": kwargs.get("limit", missing),
2944
+ "page": kwargs.get("page", missing),
2945
+ "sortOrder": kwargs.get("sort_order", missing),
2946
+ "sortBy": kwargs.get("sort_by", missing)
2947
+ }
2948
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
2949
+
2950
+ header_params = {
2951
+ "accept": "application/json",
2952
+ "content-type": "application/json",
2953
+ "opc-request-id": kwargs.get("opc_request_id", missing)
2954
+ }
2955
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2956
+
2957
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
2958
+ operation_retry_strategy=kwargs.get('retry_strategy'),
2959
+ client_retry_strategy=self.retry_strategy
2960
+ )
2961
+ if retry_strategy is None:
2962
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
2963
+
2964
+ if retry_strategy:
2965
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2966
+ self.base_client.add_opc_client_retries_header(header_params)
2967
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2968
+ return retry_strategy.make_retrying_call(
2969
+ self.base_client.call_api,
2970
+ resource_path=resource_path,
2971
+ method=method,
2972
+ query_params=query_params,
2973
+ header_params=header_params,
2974
+ response_type="NetworkLoadBalancerCollection",
2975
+ allow_control_chars=kwargs.get('allow_control_chars'),
2976
+ operation_name=operation_name,
2977
+ api_reference_link=api_reference_link,
2978
+ required_arguments=required_arguments)
2979
+ else:
2980
+ return self.base_client.call_api(
2981
+ resource_path=resource_path,
2982
+ method=method,
2983
+ query_params=query_params,
2984
+ header_params=header_params,
2985
+ response_type="NetworkLoadBalancerCollection",
2986
+ allow_control_chars=kwargs.get('allow_control_chars'),
2987
+ operation_name=operation_name,
2988
+ api_reference_link=api_reference_link,
2989
+ required_arguments=required_arguments)
2990
+
2991
+ def list_network_load_balancers_policies(self, **kwargs):
2992
+ """
2993
+ Lists the available network load balancer policies.
2994
+
2995
+
2996
+ :param str opc_request_id: (optional)
2997
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
2998
+ particular request, then provide the request identifier.
2999
+
3000
+ :param int limit: (optional)
3001
+ For list pagination. The maximum number of results per page or items to return, in a paginated \"List\" call.
3002
+ For important details about how pagination works, see `List Pagination`__.
3003
+
3004
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
3005
+
3006
+ :param str page: (optional)
3007
+ The page token representing the page from which to start retrieving results.
3008
+ For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
3009
+ For important details about how pagination works, see `List Pagination`__.
3010
+
3011
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
3012
+
3013
+ :param str sort_order: (optional)
3014
+ The sort order to use, either 'asc' (ascending) or 'desc' (descending).
3015
+
3016
+ Allowed values are: "ASC", "DESC"
3017
+
3018
+ :param str sort_by: (optional)
3019
+ The field to sort by. Only one sort order can be provided. The default order for timeCreated is descending.
3020
+ The default order for displayName is ascending. If no value is specified, then timeCreated is the default.
3021
+
3022
+ Allowed values are: "timeCreated", "displayName"
3023
+
3024
+ :param obj retry_strategy: (optional)
3025
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3026
+
3027
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
3028
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3029
+
3030
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3031
+
3032
+ :param bool allow_control_chars: (optional)
3033
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
3034
+ By default, the response will not allow control characters in strings
3035
+
3036
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.NetworkLoadBalancersPolicyCollection`
3037
+ :rtype: :class:`~oci.response.Response`
3038
+
3039
+ :example:
3040
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/list_network_load_balancers_policies.py.html>`__ to see an example of how to use list_network_load_balancers_policies API.
3041
+ """
3042
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
3043
+ required_arguments = []
3044
+ resource_path = "/networkLoadBalancersPolicies"
3045
+ method = "GET"
3046
+ operation_name = "list_network_load_balancers_policies"
3047
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/NetworkLoadBalancingPolicy/ListNetworkLoadBalancersPolicies"
3048
+
3049
+ # Don't accept unknown kwargs
3050
+ expected_kwargs = [
3051
+ "allow_control_chars",
3052
+ "retry_strategy",
3053
+ "opc_request_id",
3054
+ "limit",
3055
+ "page",
3056
+ "sort_order",
3057
+ "sort_by"
3058
+ ]
3059
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3060
+ if extra_kwargs:
3061
+ raise ValueError(
3062
+ f"list_network_load_balancers_policies got unknown kwargs: {extra_kwargs!r}")
3063
+
3064
+ if 'sort_order' in kwargs:
3065
+ sort_order_allowed_values = ["ASC", "DESC"]
3066
+ if kwargs['sort_order'] not in sort_order_allowed_values:
3067
+ raise ValueError(
3068
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
3069
+ )
3070
+
3071
+ if 'sort_by' in kwargs:
3072
+ sort_by_allowed_values = ["timeCreated", "displayName"]
3073
+ if kwargs['sort_by'] not in sort_by_allowed_values:
3074
+ raise ValueError(
3075
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
3076
+ )
3077
+
3078
+ query_params = {
3079
+ "limit": kwargs.get("limit", missing),
3080
+ "page": kwargs.get("page", missing),
3081
+ "sortOrder": kwargs.get("sort_order", missing),
3082
+ "sortBy": kwargs.get("sort_by", missing)
3083
+ }
3084
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
3085
+
3086
+ header_params = {
3087
+ "accept": "application/json",
3088
+ "content-type": "application/json",
3089
+ "opc-request-id": kwargs.get("opc_request_id", missing)
3090
+ }
3091
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
3092
+
3093
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
3094
+ operation_retry_strategy=kwargs.get('retry_strategy'),
3095
+ client_retry_strategy=self.retry_strategy
3096
+ )
3097
+ if retry_strategy is None:
3098
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
3099
+
3100
+ if retry_strategy:
3101
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3102
+ self.base_client.add_opc_client_retries_header(header_params)
3103
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3104
+ return retry_strategy.make_retrying_call(
3105
+ self.base_client.call_api,
3106
+ resource_path=resource_path,
3107
+ method=method,
3108
+ query_params=query_params,
3109
+ header_params=header_params,
3110
+ response_type="NetworkLoadBalancersPolicyCollection",
3111
+ allow_control_chars=kwargs.get('allow_control_chars'),
3112
+ operation_name=operation_name,
3113
+ api_reference_link=api_reference_link,
3114
+ required_arguments=required_arguments)
3115
+ else:
3116
+ return self.base_client.call_api(
3117
+ resource_path=resource_path,
3118
+ method=method,
3119
+ query_params=query_params,
3120
+ header_params=header_params,
3121
+ response_type="NetworkLoadBalancersPolicyCollection",
3122
+ allow_control_chars=kwargs.get('allow_control_chars'),
3123
+ operation_name=operation_name,
3124
+ api_reference_link=api_reference_link,
3125
+ required_arguments=required_arguments)
3126
+
3127
+ def list_network_load_balancers_protocols(self, **kwargs):
3128
+ """
3129
+ This API has been deprecated so it won't return the updated list of supported protocls.
3130
+ Lists all supported traffic protocols.
3131
+
3132
+
3133
+ :param str opc_request_id: (optional)
3134
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
3135
+ particular request, then provide the request identifier.
3136
+
3137
+ :param int limit: (optional)
3138
+ For list pagination. The maximum number of results per page or items to return, in a paginated \"List\" call.
3139
+ For important details about how pagination works, see `List Pagination`__.
3140
+
3141
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
3142
+
3143
+ :param str page: (optional)
3144
+ The page token representing the page from which to start retrieving results.
3145
+ For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
3146
+ For important details about how pagination works, see `List Pagination`__.
3147
+
3148
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
3149
+
3150
+ :param str sort_order: (optional)
3151
+ The sort order to use, either 'asc' (ascending) or 'desc' (descending).
3152
+
3153
+ Allowed values are: "ASC", "DESC"
3154
+
3155
+ :param str sort_by: (optional)
3156
+ The field to sort by. Only one sort order can be provided. The default order for timeCreated is descending.
3157
+ The default order for displayName is ascending. If no value is specified, then timeCreated is the default.
3158
+
3159
+ Allowed values are: "timeCreated", "displayName"
3160
+
3161
+ :param obj retry_strategy: (optional)
3162
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3163
+
3164
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
3165
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3166
+
3167
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3168
+
3169
+ :param bool allow_control_chars: (optional)
3170
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
3171
+ By default, the response will not allow control characters in strings
3172
+
3173
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.NetworkLoadBalancersProtocolCollection`
3174
+ :rtype: :class:`~oci.response.Response`
3175
+
3176
+ :example:
3177
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/list_network_load_balancers_protocols.py.html>`__ to see an example of how to use list_network_load_balancers_protocols API.
3178
+ """
3179
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
3180
+ required_arguments = []
3181
+ resource_path = "/networkLoadBalancersProtocols"
3182
+ method = "GET"
3183
+ operation_name = "list_network_load_balancers_protocols"
3184
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/ListenerProtocols/ListNetworkLoadBalancersProtocols"
3185
+
3186
+ # Don't accept unknown kwargs
3187
+ expected_kwargs = [
3188
+ "allow_control_chars",
3189
+ "retry_strategy",
3190
+ "opc_request_id",
3191
+ "limit",
3192
+ "page",
3193
+ "sort_order",
3194
+ "sort_by"
3195
+ ]
3196
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3197
+ if extra_kwargs:
3198
+ raise ValueError(
3199
+ f"list_network_load_balancers_protocols got unknown kwargs: {extra_kwargs!r}")
3200
+
3201
+ if 'sort_order' in kwargs:
3202
+ sort_order_allowed_values = ["ASC", "DESC"]
3203
+ if kwargs['sort_order'] not in sort_order_allowed_values:
3204
+ raise ValueError(
3205
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
3206
+ )
3207
+
3208
+ if 'sort_by' in kwargs:
3209
+ sort_by_allowed_values = ["timeCreated", "displayName"]
3210
+ if kwargs['sort_by'] not in sort_by_allowed_values:
3211
+ raise ValueError(
3212
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
3213
+ )
3214
+
3215
+ query_params = {
3216
+ "limit": kwargs.get("limit", missing),
3217
+ "page": kwargs.get("page", missing),
3218
+ "sortOrder": kwargs.get("sort_order", missing),
3219
+ "sortBy": kwargs.get("sort_by", missing)
3220
+ }
3221
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
3222
+
3223
+ header_params = {
3224
+ "accept": "application/json",
3225
+ "content-type": "application/json",
3226
+ "opc-request-id": kwargs.get("opc_request_id", missing)
3227
+ }
3228
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
3229
+
3230
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
3231
+ operation_retry_strategy=kwargs.get('retry_strategy'),
3232
+ client_retry_strategy=self.retry_strategy
3233
+ )
3234
+ if retry_strategy is None:
3235
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
3236
+
3237
+ if retry_strategy:
3238
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3239
+ self.base_client.add_opc_client_retries_header(header_params)
3240
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3241
+ return retry_strategy.make_retrying_call(
3242
+ self.base_client.call_api,
3243
+ resource_path=resource_path,
3244
+ method=method,
3245
+ query_params=query_params,
3246
+ header_params=header_params,
3247
+ response_type="NetworkLoadBalancersProtocolCollection",
3248
+ allow_control_chars=kwargs.get('allow_control_chars'),
3249
+ operation_name=operation_name,
3250
+ api_reference_link=api_reference_link,
3251
+ required_arguments=required_arguments)
3252
+ else:
3253
+ return self.base_client.call_api(
3254
+ resource_path=resource_path,
3255
+ method=method,
3256
+ query_params=query_params,
3257
+ header_params=header_params,
3258
+ response_type="NetworkLoadBalancersProtocolCollection",
3259
+ allow_control_chars=kwargs.get('allow_control_chars'),
3260
+ operation_name=operation_name,
3261
+ api_reference_link=api_reference_link,
3262
+ required_arguments=required_arguments)
3263
+
3264
+ def list_work_request_errors(self, work_request_id, compartment_id, **kwargs):
3265
+ """
3266
+ Return a (paginated) list of errors for a given work request.
3267
+
3268
+
3269
+ :param str work_request_id: (required)
3270
+ The identifier of the asynchronous request.
3271
+
3272
+ :param str compartment_id: (required)
3273
+ The `OCID`__ of the compartment containing the network load balancers to list.
3274
+
3275
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
3276
+
3277
+ :param str opc_request_id: (optional)
3278
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
3279
+ particular request, then provide the request identifier.
3280
+
3281
+ :param str page: (optional)
3282
+ The page token representing the page from which to start retrieving results.
3283
+ For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
3284
+ For important details about how pagination works, see `List Pagination`__.
3285
+
3286
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
3287
+
3288
+ :param int limit: (optional)
3289
+ For list pagination. The maximum number of results per page or items to return, in a paginated \"List\" call.
3290
+ For important details about how pagination works, see `List Pagination`__.
3291
+
3292
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
3293
+
3294
+ :param obj retry_strategy: (optional)
3295
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3296
+
3297
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
3298
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3299
+
3300
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3301
+
3302
+ :param bool allow_control_chars: (optional)
3303
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
3304
+ By default, the response will not allow control characters in strings
3305
+
3306
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.WorkRequestErrorCollection`
3307
+ :rtype: :class:`~oci.response.Response`
3308
+
3309
+ :example:
3310
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/list_work_request_errors.py.html>`__ to see an example of how to use list_work_request_errors API.
3311
+ """
3312
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
3313
+ required_arguments = ['workRequestId', 'compartmentId']
3314
+ resource_path = "/workRequests/{workRequestId}/errors"
3315
+ method = "GET"
3316
+ operation_name = "list_work_request_errors"
3317
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/WorkRequestError/ListWorkRequestErrors"
3318
+
3319
+ # Don't accept unknown kwargs
3320
+ expected_kwargs = [
3321
+ "allow_control_chars",
3322
+ "retry_strategy",
3323
+ "opc_request_id",
3324
+ "page",
3325
+ "limit"
3326
+ ]
3327
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3328
+ if extra_kwargs:
3329
+ raise ValueError(
3330
+ f"list_work_request_errors got unknown kwargs: {extra_kwargs!r}")
3331
+
3332
+ path_params = {
3333
+ "workRequestId": work_request_id
3334
+ }
3335
+
3336
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3337
+
3338
+ for (k, v) in six.iteritems(path_params):
3339
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3340
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
3341
+
3342
+ query_params = {
3343
+ "compartmentId": compartment_id,
3344
+ "page": kwargs.get("page", missing),
3345
+ "limit": kwargs.get("limit", missing)
3346
+ }
3347
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
3348
+
3349
+ header_params = {
3350
+ "accept": "application/json",
3351
+ "content-type": "application/json",
3352
+ "opc-request-id": kwargs.get("opc_request_id", missing)
3353
+ }
3354
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
3355
+
3356
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
3357
+ operation_retry_strategy=kwargs.get('retry_strategy'),
3358
+ client_retry_strategy=self.retry_strategy
3359
+ )
3360
+ if retry_strategy is None:
3361
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
3362
+
3363
+ if retry_strategy:
3364
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3365
+ self.base_client.add_opc_client_retries_header(header_params)
3366
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3367
+ return retry_strategy.make_retrying_call(
3368
+ self.base_client.call_api,
3369
+ resource_path=resource_path,
3370
+ method=method,
3371
+ path_params=path_params,
3372
+ query_params=query_params,
3373
+ header_params=header_params,
3374
+ response_type="WorkRequestErrorCollection",
3375
+ allow_control_chars=kwargs.get('allow_control_chars'),
3376
+ operation_name=operation_name,
3377
+ api_reference_link=api_reference_link,
3378
+ required_arguments=required_arguments)
3379
+ else:
3380
+ return self.base_client.call_api(
3381
+ resource_path=resource_path,
3382
+ method=method,
3383
+ path_params=path_params,
3384
+ query_params=query_params,
3385
+ header_params=header_params,
3386
+ response_type="WorkRequestErrorCollection",
3387
+ allow_control_chars=kwargs.get('allow_control_chars'),
3388
+ operation_name=operation_name,
3389
+ api_reference_link=api_reference_link,
3390
+ required_arguments=required_arguments)
3391
+
3392
+ def list_work_request_logs(self, work_request_id, compartment_id, **kwargs):
3393
+ """
3394
+ Returns a (paginated) list of logs for a given work request.
3395
+
3396
+
3397
+ :param str work_request_id: (required)
3398
+ The identifier of the asynchronous request.
3399
+
3400
+ :param str compartment_id: (required)
3401
+ The `OCID`__ of the compartment containing the network load balancers to list.
3402
+
3403
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
3404
+
3405
+ :param str opc_request_id: (optional)
3406
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
3407
+ particular request, then provide the request identifier.
3408
+
3409
+ :param str page: (optional)
3410
+ The page token representing the page from which to start retrieving results.
3411
+ For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
3412
+ For important details about how pagination works, see `List Pagination`__.
3413
+
3414
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
3415
+
3416
+ :param int limit: (optional)
3417
+ For list pagination. The maximum number of results per page or items to return, in a paginated \"List\" call.
3418
+ For important details about how pagination works, see `List Pagination`__.
3419
+
3420
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
3421
+
3422
+ :param obj retry_strategy: (optional)
3423
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3424
+
3425
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
3426
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3427
+
3428
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3429
+
3430
+ :param bool allow_control_chars: (optional)
3431
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
3432
+ By default, the response will not allow control characters in strings
3433
+
3434
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.WorkRequestLogEntryCollection`
3435
+ :rtype: :class:`~oci.response.Response`
3436
+
3437
+ :example:
3438
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/list_work_request_logs.py.html>`__ to see an example of how to use list_work_request_logs API.
3439
+ """
3440
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
3441
+ required_arguments = ['workRequestId', 'compartmentId']
3442
+ resource_path = "/workRequests/{workRequestId}/logs"
3443
+ method = "GET"
3444
+ operation_name = "list_work_request_logs"
3445
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/WorkRequestLogEntry/ListWorkRequestLogs"
3446
+
3447
+ # Don't accept unknown kwargs
3448
+ expected_kwargs = [
3449
+ "allow_control_chars",
3450
+ "retry_strategy",
3451
+ "opc_request_id",
3452
+ "page",
3453
+ "limit"
3454
+ ]
3455
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3456
+ if extra_kwargs:
3457
+ raise ValueError(
3458
+ f"list_work_request_logs got unknown kwargs: {extra_kwargs!r}")
3459
+
3460
+ path_params = {
3461
+ "workRequestId": work_request_id
3462
+ }
3463
+
3464
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3465
+
3466
+ for (k, v) in six.iteritems(path_params):
3467
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3468
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
3469
+
3470
+ query_params = {
3471
+ "compartmentId": compartment_id,
3472
+ "page": kwargs.get("page", missing),
3473
+ "limit": kwargs.get("limit", missing)
3474
+ }
3475
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
3476
+
3477
+ header_params = {
3478
+ "accept": "application/json",
3479
+ "content-type": "application/json",
3480
+ "opc-request-id": kwargs.get("opc_request_id", missing)
3481
+ }
3482
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
3483
+
3484
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
3485
+ operation_retry_strategy=kwargs.get('retry_strategy'),
3486
+ client_retry_strategy=self.retry_strategy
3487
+ )
3488
+ if retry_strategy is None:
3489
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
3490
+
3491
+ if retry_strategy:
3492
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3493
+ self.base_client.add_opc_client_retries_header(header_params)
3494
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3495
+ return retry_strategy.make_retrying_call(
3496
+ self.base_client.call_api,
3497
+ resource_path=resource_path,
3498
+ method=method,
3499
+ path_params=path_params,
3500
+ query_params=query_params,
3501
+ header_params=header_params,
3502
+ response_type="WorkRequestLogEntryCollection",
3503
+ allow_control_chars=kwargs.get('allow_control_chars'),
3504
+ operation_name=operation_name,
3505
+ api_reference_link=api_reference_link,
3506
+ required_arguments=required_arguments)
3507
+ else:
3508
+ return self.base_client.call_api(
3509
+ resource_path=resource_path,
3510
+ method=method,
3511
+ path_params=path_params,
3512
+ query_params=query_params,
3513
+ header_params=header_params,
3514
+ response_type="WorkRequestLogEntryCollection",
3515
+ allow_control_chars=kwargs.get('allow_control_chars'),
3516
+ operation_name=operation_name,
3517
+ api_reference_link=api_reference_link,
3518
+ required_arguments=required_arguments)
3519
+
3520
+ def list_work_requests(self, compartment_id, **kwargs):
3521
+ """
3522
+ Lists all work requests.
3523
+
3524
+
3525
+ :param str compartment_id: (required)
3526
+ The `OCID`__ of the compartment containing the network load balancers to list.
3527
+
3528
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
3529
+
3530
+ :param str opc_request_id: (optional)
3531
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
3532
+ particular request, then provide the request identifier.
3533
+
3534
+ :param int limit: (optional)
3535
+ For list pagination. The maximum number of results per page or items to return, in a paginated \"List\" call.
3536
+ For important details about how pagination works, see `List Pagination`__.
3537
+
3538
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
3539
+
3540
+ :param str page: (optional)
3541
+ The page token representing the page from which to start retrieving results.
3542
+ For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
3543
+ For important details about how pagination works, see `List Pagination`__.
3544
+
3545
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
3546
+
3547
+ :param obj retry_strategy: (optional)
3548
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3549
+
3550
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
3551
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3552
+
3553
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3554
+
3555
+ :param bool allow_control_chars: (optional)
3556
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
3557
+ By default, the response will not allow control characters in strings
3558
+
3559
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.network_load_balancer.models.WorkRequestCollection`
3560
+ :rtype: :class:`~oci.response.Response`
3561
+
3562
+ :example:
3563
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/list_work_requests.py.html>`__ to see an example of how to use list_work_requests API.
3564
+ """
3565
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
3566
+ required_arguments = ['compartmentId']
3567
+ resource_path = "/workRequests"
3568
+ method = "GET"
3569
+ operation_name = "list_work_requests"
3570
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/WorkRequest/ListWorkRequests"
3571
+
3572
+ # Don't accept unknown kwargs
3573
+ expected_kwargs = [
3574
+ "allow_control_chars",
3575
+ "retry_strategy",
3576
+ "opc_request_id",
3577
+ "limit",
3578
+ "page"
3579
+ ]
3580
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3581
+ if extra_kwargs:
3582
+ raise ValueError(
3583
+ f"list_work_requests got unknown kwargs: {extra_kwargs!r}")
3584
+
3585
+ query_params = {
3586
+ "compartmentId": compartment_id,
3587
+ "limit": kwargs.get("limit", missing),
3588
+ "page": kwargs.get("page", missing)
3589
+ }
3590
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
3591
+
3592
+ header_params = {
3593
+ "accept": "application/json",
3594
+ "content-type": "application/json",
3595
+ "opc-request-id": kwargs.get("opc_request_id", missing)
3596
+ }
3597
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
3598
+
3599
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
3600
+ operation_retry_strategy=kwargs.get('retry_strategy'),
3601
+ client_retry_strategy=self.retry_strategy
3602
+ )
3603
+ if retry_strategy is None:
3604
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
3605
+
3606
+ if retry_strategy:
3607
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3608
+ self.base_client.add_opc_client_retries_header(header_params)
3609
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3610
+ return retry_strategy.make_retrying_call(
3611
+ self.base_client.call_api,
3612
+ resource_path=resource_path,
3613
+ method=method,
3614
+ query_params=query_params,
3615
+ header_params=header_params,
3616
+ response_type="WorkRequestCollection",
3617
+ allow_control_chars=kwargs.get('allow_control_chars'),
3618
+ operation_name=operation_name,
3619
+ api_reference_link=api_reference_link,
3620
+ required_arguments=required_arguments)
3621
+ else:
3622
+ return self.base_client.call_api(
3623
+ resource_path=resource_path,
3624
+ method=method,
3625
+ query_params=query_params,
3626
+ header_params=header_params,
3627
+ response_type="WorkRequestCollection",
3628
+ allow_control_chars=kwargs.get('allow_control_chars'),
3629
+ operation_name=operation_name,
3630
+ api_reference_link=api_reference_link,
3631
+ required_arguments=required_arguments)
3632
+
3633
+ def update_backend(self, network_load_balancer_id, update_backend_details, backend_set_name, backend_name, **kwargs):
3634
+ """
3635
+ Updates the configuration of a backend server within the specified backend set.
3636
+
3637
+
3638
+ :param str network_load_balancer_id: (required)
3639
+ The `OCID`__ of the network load balancer to update.
3640
+
3641
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
3642
+
3643
+ :param oci.network_load_balancer.models.UpdateBackendDetails update_backend_details: (required)
3644
+ Details for updating a backend server.
3645
+
3646
+ :param str backend_set_name: (required)
3647
+ The name of the backend set associated with the backend server.
3648
+
3649
+ Example: `example_backend_set`
3650
+
3651
+ :param str backend_name: (required)
3652
+ The name of the backend server to update.
3653
+ If the backend was created with an explicitly specified name, that name should be used here.
3654
+ If the backend was created without explicitly specifying the name, but was created using ipAddress, this is specified as <ipAddress>:<port>.
3655
+ If the backend was created without explicitly specifying the name, but was created using targetId, this is specified as <targetId>:<port>.
3656
+
3657
+ Example: `10.0.0.3:8080` or `ocid1.privateip..oc1.<var>&lt;unique_ID&gt;</var>:8080`
3658
+
3659
+ :param str opc_request_id: (optional)
3660
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
3661
+ particular request, then provide the request identifier.
3662
+
3663
+ :param str opc_retry_token: (optional)
3664
+ A token that uniquely identifies a request so that it can be retried in case of a timeout or
3665
+ server error without risk of rerunning that same action. Retry tokens expire after 24
3666
+ hours but they can be invalidated before then due to conflicting operations. For example, if a resource
3667
+ has been deleted and purged from the system, then a retry of the original creation request
3668
+ might be rejected.
3669
+
3670
+ :param str if_match: (optional)
3671
+ For optimistic concurrency control. In the PUT or DELETE call
3672
+ for a resource, set the `if-match` parameter to the value of the
3673
+ etag from a previous GET or POST response for that resource.
3674
+ The resource will be updated or deleted only if the etag you
3675
+ provide matches the current etag value of the resource.
3676
+
3677
+ :param obj retry_strategy: (optional)
3678
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3679
+
3680
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
3681
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3682
+
3683
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3684
+
3685
+ :param bool allow_control_chars: (optional)
3686
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
3687
+ By default, the response will not allow control characters in strings
3688
+
3689
+ :return: A :class:`~oci.response.Response` object with data of type None
3690
+ :rtype: :class:`~oci.response.Response`
3691
+
3692
+ :example:
3693
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/update_backend.py.html>`__ to see an example of how to use update_backend API.
3694
+ """
3695
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
3696
+ required_arguments = ['networkLoadBalancerId', 'backendSetName', 'backendName']
3697
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/backendSets/{backendSetName}/backends/{backendName}"
3698
+ method = "PUT"
3699
+ operation_name = "update_backend"
3700
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/Backend/UpdateBackend"
3701
+
3702
+ # Don't accept unknown kwargs
3703
+ expected_kwargs = [
3704
+ "allow_control_chars",
3705
+ "retry_strategy",
3706
+ "opc_request_id",
3707
+ "opc_retry_token",
3708
+ "if_match"
3709
+ ]
3710
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3711
+ if extra_kwargs:
3712
+ raise ValueError(
3713
+ f"update_backend got unknown kwargs: {extra_kwargs!r}")
3714
+
3715
+ path_params = {
3716
+ "networkLoadBalancerId": network_load_balancer_id,
3717
+ "backendSetName": backend_set_name,
3718
+ "backendName": backend_name
3719
+ }
3720
+
3721
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3722
+
3723
+ for (k, v) in six.iteritems(path_params):
3724
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3725
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
3726
+
3727
+ header_params = {
3728
+ "accept": "application/json",
3729
+ "content-type": "application/json",
3730
+ "opc-request-id": kwargs.get("opc_request_id", missing),
3731
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
3732
+ "if-match": kwargs.get("if_match", missing)
3733
+ }
3734
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
3735
+
3736
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
3737
+ operation_retry_strategy=kwargs.get('retry_strategy'),
3738
+ client_retry_strategy=self.retry_strategy
3739
+ )
3740
+ if retry_strategy is None:
3741
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
3742
+
3743
+ if retry_strategy:
3744
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3745
+ self.base_client.add_opc_retry_token_if_needed(header_params)
3746
+ self.base_client.add_opc_client_retries_header(header_params)
3747
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3748
+ return retry_strategy.make_retrying_call(
3749
+ self.base_client.call_api,
3750
+ resource_path=resource_path,
3751
+ method=method,
3752
+ path_params=path_params,
3753
+ header_params=header_params,
3754
+ body=update_backend_details,
3755
+ allow_control_chars=kwargs.get('allow_control_chars'),
3756
+ operation_name=operation_name,
3757
+ api_reference_link=api_reference_link,
3758
+ required_arguments=required_arguments)
3759
+ else:
3760
+ return self.base_client.call_api(
3761
+ resource_path=resource_path,
3762
+ method=method,
3763
+ path_params=path_params,
3764
+ header_params=header_params,
3765
+ body=update_backend_details,
3766
+ allow_control_chars=kwargs.get('allow_control_chars'),
3767
+ operation_name=operation_name,
3768
+ api_reference_link=api_reference_link,
3769
+ required_arguments=required_arguments)
3770
+
3771
+ def update_backend_set(self, network_load_balancer_id, update_backend_set_details, backend_set_name, **kwargs):
3772
+ """
3773
+ Updates a backend set.
3774
+
3775
+
3776
+ :param str network_load_balancer_id: (required)
3777
+ The `OCID`__ of the network load balancer to update.
3778
+
3779
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
3780
+
3781
+ :param oci.network_load_balancer.models.UpdateBackendSetDetails update_backend_set_details: (required)
3782
+ The details to update a backend set.
3783
+
3784
+ :param str backend_set_name: (required)
3785
+ The name of the backend set to update.
3786
+
3787
+ Example: `example_backend_set`
3788
+
3789
+ :param str opc_request_id: (optional)
3790
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
3791
+ particular request, then provide the request identifier.
3792
+
3793
+ :param str opc_retry_token: (optional)
3794
+ A token that uniquely identifies a request so that it can be retried in case of a timeout or
3795
+ server error without risk of rerunning that same action. Retry tokens expire after 24
3796
+ hours but they can be invalidated before then due to conflicting operations. For example, if a resource
3797
+ has been deleted and purged from the system, then a retry of the original creation request
3798
+ might be rejected.
3799
+
3800
+ :param str if_match: (optional)
3801
+ For optimistic concurrency control. In the PUT or DELETE call
3802
+ for a resource, set the `if-match` parameter to the value of the
3803
+ etag from a previous GET or POST response for that resource.
3804
+ The resource will be updated or deleted only if the etag you
3805
+ provide matches the current etag value of the resource.
3806
+
3807
+ :param obj retry_strategy: (optional)
3808
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3809
+
3810
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
3811
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3812
+
3813
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3814
+
3815
+ :param bool allow_control_chars: (optional)
3816
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
3817
+ By default, the response will not allow control characters in strings
3818
+
3819
+ :return: A :class:`~oci.response.Response` object with data of type None
3820
+ :rtype: :class:`~oci.response.Response`
3821
+
3822
+ :example:
3823
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/update_backend_set.py.html>`__ to see an example of how to use update_backend_set API.
3824
+ """
3825
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
3826
+ required_arguments = ['networkLoadBalancerId', 'backendSetName']
3827
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/backendSets/{backendSetName}"
3828
+ method = "PUT"
3829
+ operation_name = "update_backend_set"
3830
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/BackendSet/UpdateBackendSet"
3831
+
3832
+ # Don't accept unknown kwargs
3833
+ expected_kwargs = [
3834
+ "allow_control_chars",
3835
+ "retry_strategy",
3836
+ "opc_request_id",
3837
+ "opc_retry_token",
3838
+ "if_match"
3839
+ ]
3840
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3841
+ if extra_kwargs:
3842
+ raise ValueError(
3843
+ f"update_backend_set got unknown kwargs: {extra_kwargs!r}")
3844
+
3845
+ path_params = {
3846
+ "networkLoadBalancerId": network_load_balancer_id,
3847
+ "backendSetName": backend_set_name
3848
+ }
3849
+
3850
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3851
+
3852
+ for (k, v) in six.iteritems(path_params):
3853
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3854
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
3855
+
3856
+ header_params = {
3857
+ "accept": "application/json",
3858
+ "content-type": "application/json",
3859
+ "opc-request-id": kwargs.get("opc_request_id", missing),
3860
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
3861
+ "if-match": kwargs.get("if_match", missing)
3862
+ }
3863
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
3864
+
3865
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
3866
+ operation_retry_strategy=kwargs.get('retry_strategy'),
3867
+ client_retry_strategy=self.retry_strategy
3868
+ )
3869
+ if retry_strategy is None:
3870
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
3871
+
3872
+ if retry_strategy:
3873
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
3874
+ self.base_client.add_opc_retry_token_if_needed(header_params)
3875
+ self.base_client.add_opc_client_retries_header(header_params)
3876
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
3877
+ return retry_strategy.make_retrying_call(
3878
+ self.base_client.call_api,
3879
+ resource_path=resource_path,
3880
+ method=method,
3881
+ path_params=path_params,
3882
+ header_params=header_params,
3883
+ body=update_backend_set_details,
3884
+ allow_control_chars=kwargs.get('allow_control_chars'),
3885
+ operation_name=operation_name,
3886
+ api_reference_link=api_reference_link,
3887
+ required_arguments=required_arguments)
3888
+ else:
3889
+ return self.base_client.call_api(
3890
+ resource_path=resource_path,
3891
+ method=method,
3892
+ path_params=path_params,
3893
+ header_params=header_params,
3894
+ body=update_backend_set_details,
3895
+ allow_control_chars=kwargs.get('allow_control_chars'),
3896
+ operation_name=operation_name,
3897
+ api_reference_link=api_reference_link,
3898
+ required_arguments=required_arguments)
3899
+
3900
+ def update_health_checker(self, network_load_balancer_id, update_health_checker_details, backend_set_name, **kwargs):
3901
+ """
3902
+ Updates the health check policy for a given network load balancer and backend set.
3903
+
3904
+
3905
+ :param str network_load_balancer_id: (required)
3906
+ The `OCID`__ of the network load balancer to update.
3907
+
3908
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
3909
+
3910
+ :param oci.network_load_balancer.models.UpdateHealthCheckerDetails update_health_checker_details: (required)
3911
+ The health check policy configuration details.
3912
+
3913
+ :param str backend_set_name: (required)
3914
+ The name of the backend set associated with the health check policy to be retrieved.
3915
+
3916
+ Example: `example_backend_set`
3917
+
3918
+ :param str opc_request_id: (optional)
3919
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
3920
+ particular request, then provide the request identifier.
3921
+
3922
+ :param str opc_retry_token: (optional)
3923
+ A token that uniquely identifies a request so that it can be retried in case of a timeout or
3924
+ server error without risk of rerunning that same action. Retry tokens expire after 24
3925
+ hours but they can be invalidated before then due to conflicting operations. For example, if a resource
3926
+ has been deleted and purged from the system, then a retry of the original creation request
3927
+ might be rejected.
3928
+
3929
+ :param str if_match: (optional)
3930
+ For optimistic concurrency control. In the PUT or DELETE call
3931
+ for a resource, set the `if-match` parameter to the value of the
3932
+ etag from a previous GET or POST response for that resource.
3933
+ The resource will be updated or deleted only if the etag you
3934
+ provide matches the current etag value of the resource.
3935
+
3936
+ :param obj retry_strategy: (optional)
3937
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
3938
+
3939
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
3940
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
3941
+
3942
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
3943
+
3944
+ :param bool allow_control_chars: (optional)
3945
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
3946
+ By default, the response will not allow control characters in strings
3947
+
3948
+ :return: A :class:`~oci.response.Response` object with data of type None
3949
+ :rtype: :class:`~oci.response.Response`
3950
+
3951
+ :example:
3952
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/update_health_checker.py.html>`__ to see an example of how to use update_health_checker API.
3953
+ """
3954
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
3955
+ required_arguments = ['networkLoadBalancerId', 'backendSetName']
3956
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/backendSets/{backendSetName}/healthChecker"
3957
+ method = "PUT"
3958
+ operation_name = "update_health_checker"
3959
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/HealthChecker/UpdateHealthChecker"
3960
+
3961
+ # Don't accept unknown kwargs
3962
+ expected_kwargs = [
3963
+ "allow_control_chars",
3964
+ "retry_strategy",
3965
+ "opc_request_id",
3966
+ "opc_retry_token",
3967
+ "if_match"
3968
+ ]
3969
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
3970
+ if extra_kwargs:
3971
+ raise ValueError(
3972
+ f"update_health_checker got unknown kwargs: {extra_kwargs!r}")
3973
+
3974
+ path_params = {
3975
+ "networkLoadBalancerId": network_load_balancer_id,
3976
+ "backendSetName": backend_set_name
3977
+ }
3978
+
3979
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
3980
+
3981
+ for (k, v) in six.iteritems(path_params):
3982
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
3983
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
3984
+
3985
+ header_params = {
3986
+ "accept": "application/json",
3987
+ "content-type": "application/json",
3988
+ "opc-request-id": kwargs.get("opc_request_id", missing),
3989
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
3990
+ "if-match": kwargs.get("if_match", missing)
3991
+ }
3992
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
3993
+
3994
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
3995
+ operation_retry_strategy=kwargs.get('retry_strategy'),
3996
+ client_retry_strategy=self.retry_strategy
3997
+ )
3998
+ if retry_strategy is None:
3999
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
4000
+
4001
+ if retry_strategy:
4002
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
4003
+ self.base_client.add_opc_retry_token_if_needed(header_params)
4004
+ self.base_client.add_opc_client_retries_header(header_params)
4005
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
4006
+ return retry_strategy.make_retrying_call(
4007
+ self.base_client.call_api,
4008
+ resource_path=resource_path,
4009
+ method=method,
4010
+ path_params=path_params,
4011
+ header_params=header_params,
4012
+ body=update_health_checker_details,
4013
+ allow_control_chars=kwargs.get('allow_control_chars'),
4014
+ operation_name=operation_name,
4015
+ api_reference_link=api_reference_link,
4016
+ required_arguments=required_arguments)
4017
+ else:
4018
+ return self.base_client.call_api(
4019
+ resource_path=resource_path,
4020
+ method=method,
4021
+ path_params=path_params,
4022
+ header_params=header_params,
4023
+ body=update_health_checker_details,
4024
+ allow_control_chars=kwargs.get('allow_control_chars'),
4025
+ operation_name=operation_name,
4026
+ api_reference_link=api_reference_link,
4027
+ required_arguments=required_arguments)
4028
+
4029
+ def update_listener(self, network_load_balancer_id, update_listener_details, listener_name, **kwargs):
4030
+ """
4031
+ Updates a listener for a given network load balancer.
4032
+
4033
+
4034
+ :param str network_load_balancer_id: (required)
4035
+ The `OCID`__ of the network load balancer to update.
4036
+
4037
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
4038
+
4039
+ :param oci.network_load_balancer.models.UpdateListenerDetails update_listener_details: (required)
4040
+ Details to update a listener.
4041
+
4042
+ :param str listener_name: (required)
4043
+ The name of the listener to update.
4044
+
4045
+ Example: `example_listener`
4046
+
4047
+ :param str opc_request_id: (optional)
4048
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
4049
+ particular request, then provide the request identifier.
4050
+
4051
+ :param str opc_retry_token: (optional)
4052
+ A token that uniquely identifies a request so that it can be retried in case of a timeout or
4053
+ server error without risk of rerunning that same action. Retry tokens expire after 24
4054
+ hours but they can be invalidated before then due to conflicting operations. For example, if a resource
4055
+ has been deleted and purged from the system, then a retry of the original creation request
4056
+ might be rejected.
4057
+
4058
+ :param str if_match: (optional)
4059
+ For optimistic concurrency control. In the PUT or DELETE call
4060
+ for a resource, set the `if-match` parameter to the value of the
4061
+ etag from a previous GET or POST response for that resource.
4062
+ The resource will be updated or deleted only if the etag you
4063
+ provide matches the current etag value of the resource.
4064
+
4065
+ :param obj retry_strategy: (optional)
4066
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
4067
+
4068
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
4069
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
4070
+
4071
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
4072
+
4073
+ :param bool allow_control_chars: (optional)
4074
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
4075
+ By default, the response will not allow control characters in strings
4076
+
4077
+ :return: A :class:`~oci.response.Response` object with data of type None
4078
+ :rtype: :class:`~oci.response.Response`
4079
+
4080
+ :example:
4081
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/update_listener.py.html>`__ to see an example of how to use update_listener API.
4082
+ """
4083
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
4084
+ required_arguments = ['networkLoadBalancerId', 'listenerName']
4085
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/listeners/{listenerName}"
4086
+ method = "PUT"
4087
+ operation_name = "update_listener"
4088
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/Listener/UpdateListener"
4089
+
4090
+ # Don't accept unknown kwargs
4091
+ expected_kwargs = [
4092
+ "allow_control_chars",
4093
+ "retry_strategy",
4094
+ "opc_request_id",
4095
+ "opc_retry_token",
4096
+ "if_match"
4097
+ ]
4098
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
4099
+ if extra_kwargs:
4100
+ raise ValueError(
4101
+ f"update_listener got unknown kwargs: {extra_kwargs!r}")
4102
+
4103
+ path_params = {
4104
+ "networkLoadBalancerId": network_load_balancer_id,
4105
+ "listenerName": listener_name
4106
+ }
4107
+
4108
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
4109
+
4110
+ for (k, v) in six.iteritems(path_params):
4111
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
4112
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
4113
+
4114
+ header_params = {
4115
+ "accept": "application/json",
4116
+ "content-type": "application/json",
4117
+ "opc-request-id": kwargs.get("opc_request_id", missing),
4118
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
4119
+ "if-match": kwargs.get("if_match", missing)
4120
+ }
4121
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
4122
+
4123
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
4124
+ operation_retry_strategy=kwargs.get('retry_strategy'),
4125
+ client_retry_strategy=self.retry_strategy
4126
+ )
4127
+ if retry_strategy is None:
4128
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
4129
+
4130
+ if retry_strategy:
4131
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
4132
+ self.base_client.add_opc_retry_token_if_needed(header_params)
4133
+ self.base_client.add_opc_client_retries_header(header_params)
4134
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
4135
+ return retry_strategy.make_retrying_call(
4136
+ self.base_client.call_api,
4137
+ resource_path=resource_path,
4138
+ method=method,
4139
+ path_params=path_params,
4140
+ header_params=header_params,
4141
+ body=update_listener_details,
4142
+ allow_control_chars=kwargs.get('allow_control_chars'),
4143
+ operation_name=operation_name,
4144
+ api_reference_link=api_reference_link,
4145
+ required_arguments=required_arguments)
4146
+ else:
4147
+ return self.base_client.call_api(
4148
+ resource_path=resource_path,
4149
+ method=method,
4150
+ path_params=path_params,
4151
+ header_params=header_params,
4152
+ body=update_listener_details,
4153
+ allow_control_chars=kwargs.get('allow_control_chars'),
4154
+ operation_name=operation_name,
4155
+ api_reference_link=api_reference_link,
4156
+ required_arguments=required_arguments)
4157
+
4158
+ def update_network_load_balancer(self, network_load_balancer_id, update_network_load_balancer_details, **kwargs):
4159
+ """
4160
+ Updates the network load balancer
4161
+
4162
+
4163
+ :param str network_load_balancer_id: (required)
4164
+ The `OCID`__ of the network load balancer to update.
4165
+
4166
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
4167
+
4168
+ :param oci.network_load_balancer.models.UpdateNetworkLoadBalancerDetails update_network_load_balancer_details: (required)
4169
+ The information to be updated.
4170
+
4171
+ :param str if_match: (optional)
4172
+ For optimistic concurrency control. In the PUT or DELETE call
4173
+ for a resource, set the `if-match` parameter to the value of the
4174
+ etag from a previous GET or POST response for that resource.
4175
+ The resource will be updated or deleted only if the etag you
4176
+ provide matches the current etag value of the resource.
4177
+
4178
+ :param str opc_request_id: (optional)
4179
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
4180
+ particular request, then provide the request identifier.
4181
+
4182
+ :param obj retry_strategy: (optional)
4183
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
4184
+
4185
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
4186
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
4187
+
4188
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
4189
+
4190
+ :param bool allow_control_chars: (optional)
4191
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
4192
+ By default, the response will not allow control characters in strings
4193
+
4194
+ :return: A :class:`~oci.response.Response` object with data of type None
4195
+ :rtype: :class:`~oci.response.Response`
4196
+
4197
+ :example:
4198
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/update_network_load_balancer.py.html>`__ to see an example of how to use update_network_load_balancer API.
4199
+ """
4200
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
4201
+ required_arguments = ['networkLoadBalancerId']
4202
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}"
4203
+ method = "PUT"
4204
+ operation_name = "update_network_load_balancer"
4205
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/NetworkLoadBalancer/UpdateNetworkLoadBalancer"
4206
+
4207
+ # Don't accept unknown kwargs
4208
+ expected_kwargs = [
4209
+ "allow_control_chars",
4210
+ "retry_strategy",
4211
+ "if_match",
4212
+ "opc_request_id"
4213
+ ]
4214
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
4215
+ if extra_kwargs:
4216
+ raise ValueError(
4217
+ f"update_network_load_balancer got unknown kwargs: {extra_kwargs!r}")
4218
+
4219
+ path_params = {
4220
+ "networkLoadBalancerId": network_load_balancer_id
4221
+ }
4222
+
4223
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
4224
+
4225
+ for (k, v) in six.iteritems(path_params):
4226
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
4227
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
4228
+
4229
+ header_params = {
4230
+ "accept": "application/json",
4231
+ "content-type": "application/json",
4232
+ "if-match": kwargs.get("if_match", missing),
4233
+ "opc-request-id": kwargs.get("opc_request_id", missing)
4234
+ }
4235
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
4236
+
4237
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
4238
+ operation_retry_strategy=kwargs.get('retry_strategy'),
4239
+ client_retry_strategy=self.retry_strategy
4240
+ )
4241
+ if retry_strategy is None:
4242
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
4243
+
4244
+ if retry_strategy:
4245
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
4246
+ self.base_client.add_opc_client_retries_header(header_params)
4247
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
4248
+ return retry_strategy.make_retrying_call(
4249
+ self.base_client.call_api,
4250
+ resource_path=resource_path,
4251
+ method=method,
4252
+ path_params=path_params,
4253
+ header_params=header_params,
4254
+ body=update_network_load_balancer_details,
4255
+ allow_control_chars=kwargs.get('allow_control_chars'),
4256
+ operation_name=operation_name,
4257
+ api_reference_link=api_reference_link,
4258
+ required_arguments=required_arguments)
4259
+ else:
4260
+ return self.base_client.call_api(
4261
+ resource_path=resource_path,
4262
+ method=method,
4263
+ path_params=path_params,
4264
+ header_params=header_params,
4265
+ body=update_network_load_balancer_details,
4266
+ allow_control_chars=kwargs.get('allow_control_chars'),
4267
+ operation_name=operation_name,
4268
+ api_reference_link=api_reference_link,
4269
+ required_arguments=required_arguments)
4270
+
4271
+ def update_network_security_groups(self, network_load_balancer_id, update_network_security_groups_details, **kwargs):
4272
+ """
4273
+ Updates the network security groups associated with the specified network load balancer.
4274
+
4275
+
4276
+ :param str network_load_balancer_id: (required)
4277
+ The `OCID`__ of the network load balancer to update.
4278
+
4279
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
4280
+
4281
+ :param oci.network_load_balancer.models.UpdateNetworkSecurityGroupsDetails update_network_security_groups_details: (required)
4282
+ The details for updating the network security groups associated with the specified network load balancer.
4283
+
4284
+ :param str opc_request_id: (optional)
4285
+ The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
4286
+ particular request, then provide the request identifier.
4287
+
4288
+ :param str opc_retry_token: (optional)
4289
+ A token that uniquely identifies a request so that it can be retried in case of a timeout or
4290
+ server error without risk of rerunning that same action. Retry tokens expire after 24
4291
+ hours but they can be invalidated before then due to conflicting operations. For example, if a resource
4292
+ has been deleted and purged from the system, then a retry of the original creation request
4293
+ might be rejected.
4294
+
4295
+ :param str if_match: (optional)
4296
+ For optimistic concurrency control. In the PUT or DELETE call
4297
+ for a resource, set the `if-match` parameter to the value of the
4298
+ etag from a previous GET or POST response for that resource.
4299
+ The resource will be updated or deleted only if the etag you
4300
+ provide matches the current etag value of the resource.
4301
+
4302
+ :param obj retry_strategy: (optional)
4303
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
4304
+
4305
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
4306
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
4307
+
4308
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
4309
+
4310
+ :param bool allow_control_chars: (optional)
4311
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
4312
+ By default, the response will not allow control characters in strings
4313
+
4314
+ :return: A :class:`~oci.response.Response` object with data of type None
4315
+ :rtype: :class:`~oci.response.Response`
4316
+
4317
+ :example:
4318
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/networkloadbalancer/update_network_security_groups.py.html>`__ to see an example of how to use update_network_security_groups API.
4319
+ """
4320
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
4321
+ required_arguments = ['networkLoadBalancerId']
4322
+ resource_path = "/networkLoadBalancers/{networkLoadBalancerId}/networkSecurityGroups"
4323
+ method = "PUT"
4324
+ operation_name = "update_network_security_groups"
4325
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/networkloadbalancer/20200501/NetworkLoadBalancer/UpdateNetworkSecurityGroups"
4326
+
4327
+ # Don't accept unknown kwargs
4328
+ expected_kwargs = [
4329
+ "allow_control_chars",
4330
+ "retry_strategy",
4331
+ "opc_request_id",
4332
+ "opc_retry_token",
4333
+ "if_match"
4334
+ ]
4335
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
4336
+ if extra_kwargs:
4337
+ raise ValueError(
4338
+ f"update_network_security_groups got unknown kwargs: {extra_kwargs!r}")
4339
+
4340
+ path_params = {
4341
+ "networkLoadBalancerId": network_load_balancer_id
4342
+ }
4343
+
4344
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
4345
+
4346
+ for (k, v) in six.iteritems(path_params):
4347
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
4348
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
4349
+
4350
+ header_params = {
4351
+ "accept": "application/json",
4352
+ "content-type": "application/json",
4353
+ "opc-request-id": kwargs.get("opc_request_id", missing),
4354
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
4355
+ "if-match": kwargs.get("if_match", missing)
4356
+ }
4357
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
4358
+
4359
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
4360
+ operation_retry_strategy=kwargs.get('retry_strategy'),
4361
+ client_retry_strategy=self.retry_strategy
4362
+ )
4363
+ if retry_strategy is None:
4364
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
4365
+
4366
+ if retry_strategy:
4367
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
4368
+ self.base_client.add_opc_retry_token_if_needed(header_params)
4369
+ self.base_client.add_opc_client_retries_header(header_params)
4370
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
4371
+ return retry_strategy.make_retrying_call(
4372
+ self.base_client.call_api,
4373
+ resource_path=resource_path,
4374
+ method=method,
4375
+ path_params=path_params,
4376
+ header_params=header_params,
4377
+ body=update_network_security_groups_details,
4378
+ allow_control_chars=kwargs.get('allow_control_chars'),
4379
+ operation_name=operation_name,
4380
+ api_reference_link=api_reference_link,
4381
+ required_arguments=required_arguments)
4382
+ else:
4383
+ return self.base_client.call_api(
4384
+ resource_path=resource_path,
4385
+ method=method,
4386
+ path_params=path_params,
4387
+ header_params=header_params,
4388
+ body=update_network_security_groups_details,
4389
+ allow_control_chars=kwargs.get('allow_control_chars'),
4390
+ operation_name=operation_name,
4391
+ api_reference_link=api_reference_link,
4392
+ required_arguments=required_arguments)