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.
- {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.2.dist-info}/METADATA +3 -3
- {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.2.dist-info}/RECORD +248 -6
- oci/file_storage/__init__.py +14 -0
- oci/file_storage/file_storage_client.py +8601 -0
- oci/file_storage/file_storage_client_composite_operations.py +2068 -0
- oci/file_storage/models/__init__.py +130 -0
- oci/file_storage/models/change_file_system_compartment_details.py +76 -0
- oci/file_storage/models/change_filesystem_snapshot_policy_compartment_details.py +76 -0
- oci/file_storage/models/change_mount_target_compartment_details.py +76 -0
- oci/file_storage/models/change_outbound_connector_compartment_details.py +78 -0
- oci/file_storage/models/change_replication_compartment_details.py +76 -0
- oci/file_storage/models/client_options.py +389 -0
- oci/file_storage/models/create_export_details.py +303 -0
- oci/file_storage/models/create_file_system_details.py +425 -0
- oci/file_storage/models/create_filesystem_snapshot_policy_details.py +337 -0
- oci/file_storage/models/create_kerberos_details.py +200 -0
- oci/file_storage/models/create_ldap_bind_account_details.py +220 -0
- oci/file_storage/models/create_ldap_idmap_details.py +317 -0
- oci/file_storage/models/create_mount_target_details.py +581 -0
- oci/file_storage/models/create_outbound_connector_details.py +309 -0
- oci/file_storage/models/create_replication_details.py +325 -0
- oci/file_storage/models/create_snapshot_details.py +261 -0
- oci/file_storage/models/endpoint.py +103 -0
- oci/file_storage/models/export.py +456 -0
- oci/file_storage/models/export_set.py +411 -0
- oci/file_storage/models/export_set_summary.py +316 -0
- oci/file_storage/models/export_summary.py +343 -0
- oci/file_storage/models/file_system.py +818 -0
- oci/file_storage/models/file_system_summary.py +659 -0
- oci/file_storage/models/filesystem_snapshot_policy.py +473 -0
- oci/file_storage/models/filesystem_snapshot_policy_summary.py +429 -0
- oci/file_storage/models/kerberos.py +200 -0
- oci/file_storage/models/kerberos_keytab_entry.py +166 -0
- oci/file_storage/models/key_tab_secret_details.py +138 -0
- oci/file_storage/models/ldap_bind_account.py +243 -0
- oci/file_storage/models/ldap_bind_account_summary.py +176 -0
- oci/file_storage/models/ldap_idmap.py +317 -0
- oci/file_storage/models/mount_target.py +828 -0
- oci/file_storage/models/mount_target_summary.py +696 -0
- oci/file_storage/models/outbound_connector.py +453 -0
- oci/file_storage/models/outbound_connector_summary.py +438 -0
- oci/file_storage/models/replication.py +740 -0
- oci/file_storage/models/replication_estimate.py +196 -0
- oci/file_storage/models/replication_summary.py +491 -0
- oci/file_storage/models/replication_target.py +679 -0
- oci/file_storage/models/replication_target_summary.py +425 -0
- oci/file_storage/models/resource_lock.py +185 -0
- oci/file_storage/models/schedule_downgrade_shape_mount_target_details.py +78 -0
- oci/file_storage/models/snapshot.py +638 -0
- oci/file_storage/models/snapshot_schedule.py +487 -0
- oci/file_storage/models/snapshot_summary.py +601 -0
- oci/file_storage/models/source_details.py +119 -0
- oci/file_storage/models/update_export_details.py +111 -0
- oci/file_storage/models/update_export_set_details.py +172 -0
- oci/file_storage/models/update_file_system_details.py +246 -0
- oci/file_storage/models/update_filesystem_snapshot_policy_details.py +236 -0
- oci/file_storage/models/update_kerberos_details.py +200 -0
- oci/file_storage/models/update_ldap_idmap_details.py +317 -0
- oci/file_storage/models/update_mount_target_details.py +286 -0
- oci/file_storage/models/update_outbound_connector_details.py +158 -0
- oci/file_storage/models/update_replication_details.py +189 -0
- oci/file_storage/models/update_snapshot_details.py +156 -0
- oci/file_storage/models/upgrade_shape_mount_target_details.py +78 -0
- oci/file_storage/models/validate_key_tabs_details.py +103 -0
- oci/file_storage/models/validate_key_tabs_response_details.py +103 -0
- oci/functions/__init__.py +16 -0
- oci/functions/functions_invoke_client.py +267 -0
- oci/functions/functions_invoke_client_composite_operations.py +26 -0
- oci/functions/functions_management_client.py +2056 -0
- oci/functions/functions_management_client_composite_operations.py +326 -0
- oci/functions/models/__init__.py +74 -0
- oci/functions/models/application.py +628 -0
- oci/functions/models/application_summary.py +512 -0
- oci/functions/models/application_trace_config.py +103 -0
- oci/functions/models/change_application_compartment_details.py +78 -0
- oci/functions/models/config_details.py +134 -0
- oci/functions/models/constant_provisioned_concurrency_config.py +82 -0
- oci/functions/models/create_application_details.py +446 -0
- oci/functions/models/create_function_details.py +437 -0
- oci/functions/models/function.py +734 -0
- oci/functions/models/function_provisioned_concurrency_config.py +109 -0
- oci/functions/models/function_source_details.py +101 -0
- oci/functions/models/function_summary.py +657 -0
- oci/functions/models/function_trace_config.py +72 -0
- oci/functions/models/image_policy_config.py +103 -0
- oci/functions/models/key_details.py +76 -0
- oci/functions/models/none_provisioned_concurrency_config.py +51 -0
- oci/functions/models/pbf_listing.py +408 -0
- oci/functions/models/pbf_listing_summary.py +386 -0
- oci/functions/models/pbf_listing_version.py +467 -0
- oci/functions/models/pbf_listing_version_summary.py +446 -0
- oci/functions/models/pbf_listing_versions_collection.py +73 -0
- oci/functions/models/pbf_listings_collection.py +72 -0
- oci/functions/models/policy_details.py +103 -0
- oci/functions/models/pre_built_function_source_details.py +88 -0
- oci/functions/models/publisher_details.py +72 -0
- oci/functions/models/requirement_details.py +106 -0
- oci/functions/models/trigger.py +72 -0
- oci/functions/models/trigger_summary.py +72 -0
- oci/functions/models/triggers_collection.py +72 -0
- oci/functions/models/update_application_details.py +290 -0
- oci/functions/models/update_function_details.py +346 -0
- oci/load_balancer/__init__.py +14 -0
- oci/load_balancer/load_balancer_client.py +7641 -0
- oci/load_balancer/load_balancer_client_composite_operations.py +1630 -0
- oci/load_balancer/models/__init__.py +186 -0
- oci/load_balancer/models/action.py +97 -0
- oci/load_balancer/models/add_http_request_header_rule.py +134 -0
- oci/load_balancer/models/add_http_response_header_rule.py +137 -0
- oci/load_balancer/models/allow_rule.py +123 -0
- oci/load_balancer/models/backend.py +350 -0
- oci/load_balancer/models/backend_details.py +312 -0
- oci/load_balancer/models/backend_health.py +143 -0
- oci/load_balancer/models/backend_set.py +305 -0
- oci/load_balancer/models/backend_set_details.py +262 -0
- oci/load_balancer/models/backend_set_health.py +265 -0
- oci/load_balancer/models/certificate.py +188 -0
- oci/load_balancer/models/certificate_details.py +270 -0
- oci/load_balancer/models/change_load_balancer_compartment_details.py +78 -0
- oci/load_balancer/models/connection_configuration.py +168 -0
- oci/load_balancer/models/control_access_using_http_methods_rule.py +162 -0
- oci/load_balancer/models/create_backend_details.py +316 -0
- oci/load_balancer/models/create_backend_set_details.py +305 -0
- oci/load_balancer/models/create_certificate_details.py +270 -0
- oci/load_balancer/models/create_hostname_details.py +121 -0
- oci/load_balancer/models/create_listener_details.py +387 -0
- oci/load_balancer/models/create_load_balancer_details.py +895 -0
- oci/load_balancer/models/create_path_route_set_details.py +111 -0
- oci/load_balancer/models/create_routing_policy_details.py +154 -0
- oci/load_balancer/models/create_rule_set_details.py +109 -0
- oci/load_balancer/models/create_ssl_cipher_suite_details.py +606 -0
- oci/load_balancer/models/extend_http_request_header_value_rule.py +181 -0
- oci/load_balancer/models/extend_http_response_header_value_rule.py +181 -0
- oci/load_balancer/models/forward_to_backend_set.py +86 -0
- oci/load_balancer/models/health_check_result.py +219 -0
- oci/load_balancer/models/health_checker.py +381 -0
- oci/load_balancer/models/health_checker_details.py +376 -0
- oci/load_balancer/models/hostname.py +121 -0
- oci/load_balancer/models/hostname_details.py +117 -0
- oci/load_balancer/models/http_header_rule.py +127 -0
- oci/load_balancer/models/ip_address.py +142 -0
- oci/load_balancer/models/ip_based_max_connections_rule.py +118 -0
- oci/load_balancer/models/ip_max_connections.py +111 -0
- oci/load_balancer/models/lb_cookie_session_persistence_configuration_details.py +423 -0
- oci/load_balancer/models/listener.py +383 -0
- oci/load_balancer/models/listener_details.py +344 -0
- oci/load_balancer/models/listener_rule_summary.py +104 -0
- oci/load_balancer/models/load_balancer.py +1023 -0
- oci/load_balancer/models/load_balancer_health.py +281 -0
- oci/load_balancer/models/load_balancer_health_summary.py +167 -0
- oci/load_balancer/models/load_balancer_policy.py +80 -0
- oci/load_balancer/models/load_balancer_protocol.py +76 -0
- oci/load_balancer/models/load_balancer_shape.py +80 -0
- oci/load_balancer/models/path_match_condition.py +166 -0
- oci/load_balancer/models/path_match_type.py +126 -0
- oci/load_balancer/models/path_route.py +156 -0
- oci/load_balancer/models/path_route_set.py +112 -0
- oci/load_balancer/models/path_route_set_details.py +72 -0
- oci/load_balancer/models/redirect_rule.py +173 -0
- oci/load_balancer/models/redirect_uri.py +420 -0
- oci/load_balancer/models/remove_http_request_header_rule.py +90 -0
- oci/load_balancer/models/remove_http_response_header_rule.py +92 -0
- oci/load_balancer/models/reserved_ip.py +90 -0
- oci/load_balancer/models/routing_policy.py +152 -0
- oci/load_balancer/models/routing_policy_details.py +73 -0
- oci/load_balancer/models/routing_rule.py +135 -0
- oci/load_balancer/models/rule.py +177 -0
- oci/load_balancer/models/rule_condition.py +121 -0
- oci/load_balancer/models/rule_set.py +113 -0
- oci/load_balancer/models/rule_set_details.py +72 -0
- oci/load_balancer/models/session_persistence_configuration_details.py +136 -0
- oci/load_balancer/models/shape_details.py +121 -0
- oci/load_balancer/models/source_ip_address_condition.py +90 -0
- oci/load_balancer/models/source_vcn_id_condition.py +98 -0
- oci/load_balancer/models/source_vcn_ip_address_condition.py +97 -0
- oci/load_balancer/models/ssl_cipher_suite.py +606 -0
- oci/load_balancer/models/ssl_cipher_suite_details.py +606 -0
- oci/load_balancer/models/ssl_configuration.py +478 -0
- oci/load_balancer/models/ssl_configuration_details.py +476 -0
- oci/load_balancer/models/update_backend_details.py +242 -0
- oci/load_balancer/models/update_backend_set_details.py +264 -0
- oci/load_balancer/models/update_health_checker_details.py +374 -0
- oci/load_balancer/models/update_hostname_details.py +86 -0
- oci/load_balancer/models/update_listener_details.py +344 -0
- oci/load_balancer/models/update_load_balancer_details.py +356 -0
- oci/load_balancer/models/update_load_balancer_shape_details.py +127 -0
- oci/load_balancer/models/update_network_security_groups_details.py +99 -0
- oci/load_balancer/models/update_path_route_set_details.py +72 -0
- oci/load_balancer/models/update_routing_policy_details.py +115 -0
- oci/load_balancer/models/update_rule_set_details.py +72 -0
- oci/load_balancer/models/update_ssl_cipher_suite_details.py +300 -0
- oci/load_balancer/models/work_request.py +385 -0
- oci/load_balancer/models/work_request_error.py +115 -0
- oci/network_load_balancer/__init__.py +14 -0
- oci/network_load_balancer/models/__init__.py +106 -0
- oci/network_load_balancer/models/backend.py +338 -0
- oci/network_load_balancer/models/backend_collection.py +72 -0
- oci/network_load_balancer/models/backend_details.py +337 -0
- oci/network_load_balancer/models/backend_health.py +145 -0
- oci/network_load_balancer/models/backend_set.py +347 -0
- oci/network_load_balancer/models/backend_set_collection.py +72 -0
- oci/network_load_balancer/models/backend_set_details.py +306 -0
- oci/network_load_balancer/models/backend_set_health.py +265 -0
- oci/network_load_balancer/models/backend_set_summary.py +347 -0
- oci/network_load_balancer/models/backend_summary.py +338 -0
- oci/network_load_balancer/models/change_network_load_balancer_compartment_details.py +78 -0
- oci/network_load_balancer/models/create_backend_details.py +336 -0
- oci/network_load_balancer/models/create_backend_set_details.py +347 -0
- oci/network_load_balancer/models/create_listener_details.py +396 -0
- oci/network_load_balancer/models/create_network_load_balancer_details.py +694 -0
- oci/network_load_balancer/models/dns_health_checker_details.py +264 -0
- oci/network_load_balancer/models/health_check_result.py +139 -0
- oci/network_load_balancer/models/health_checker.py +449 -0
- oci/network_load_balancer/models/health_checker_details.py +449 -0
- oci/network_load_balancer/models/ip_address.py +189 -0
- oci/network_load_balancer/models/listener.py +396 -0
- oci/network_load_balancer/models/listener_collection.py +72 -0
- oci/network_load_balancer/models/listener_details.py +396 -0
- oci/network_load_balancer/models/listener_summary.py +396 -0
- oci/network_load_balancer/models/network_load_balancer.py +847 -0
- oci/network_load_balancer/models/network_load_balancer_collection.py +72 -0
- oci/network_load_balancer/models/network_load_balancer_health.py +281 -0
- oci/network_load_balancer/models/network_load_balancer_health_collection.py +72 -0
- oci/network_load_balancer/models/network_load_balancer_health_summary.py +167 -0
- oci/network_load_balancer/models/network_load_balancer_summary.py +833 -0
- oci/network_load_balancer/models/network_load_balancers_policy_collection.py +72 -0
- oci/network_load_balancer/models/network_load_balancers_protocol_collection.py +73 -0
- oci/network_load_balancer/models/reserved_ip.py +90 -0
- oci/network_load_balancer/models/update_backend_details.py +199 -0
- oci/network_load_balancer/models/update_backend_set_details.py +288 -0
- oci/network_load_balancer/models/update_health_checker_details.py +444 -0
- oci/network_load_balancer/models/update_listener_details.py +361 -0
- oci/network_load_balancer/models/update_network_load_balancer_details.py +386 -0
- oci/network_load_balancer/models/update_network_security_groups_details.py +99 -0
- oci/network_load_balancer/models/work_request.py +454 -0
- oci/network_load_balancer/models/work_request_collection.py +72 -0
- oci/network_load_balancer/models/work_request_error.py +136 -0
- oci/network_load_balancer/models/work_request_error_collection.py +72 -0
- oci/network_load_balancer/models/work_request_log_entry.py +103 -0
- oci/network_load_balancer/models/work_request_log_entry_collection.py +72 -0
- oci/network_load_balancer/models/work_request_resource.py +199 -0
- oci/network_load_balancer/models/work_request_summary.py +454 -0
- oci/network_load_balancer/network_load_balancer_client.py +4392 -0
- oci/network_load_balancer/network_load_balancer_client_composite_operations.py +757 -0
- oci/version.py +1 -1
- {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.2.dist-info}/LICENSE.txt +0 -0
- {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.2.dist-info}/WHEEL +0 -0
- {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,1630 @@
|
|
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: 20170115
|
6
|
+
|
7
|
+
import oci # noqa: F401
|
8
|
+
from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401
|
9
|
+
|
10
|
+
|
11
|
+
class LoadBalancerClientCompositeOperations(object):
|
12
|
+
"""
|
13
|
+
This class provides a wrapper around :py:class:`~oci.load_balancer.LoadBalancerClient` and offers convenience methods
|
14
|
+
for operations that would otherwise need to be chained together. For example, instead of performing an action
|
15
|
+
on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource
|
16
|
+
to enter a given state, you can call a single method in this class to accomplish the same functionality
|
17
|
+
"""
|
18
|
+
|
19
|
+
def __init__(self, client, **kwargs):
|
20
|
+
"""
|
21
|
+
Creates a new LoadBalancerClientCompositeOperations object
|
22
|
+
|
23
|
+
:param LoadBalancerClient client:
|
24
|
+
The service client which will be wrapped by this object
|
25
|
+
"""
|
26
|
+
self.client = client
|
27
|
+
|
28
|
+
def change_load_balancer_compartment_and_wait_for_state(self, load_balancer_id, change_load_balancer_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
29
|
+
"""
|
30
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.change_load_balancer_compartment` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
31
|
+
to enter the given state(s).
|
32
|
+
|
33
|
+
:param str load_balancer_id: (required)
|
34
|
+
The `OCID`__ of the load balancer to move.
|
35
|
+
|
36
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
37
|
+
|
38
|
+
:param oci.load_balancer.models.ChangeLoadBalancerCompartmentDetails change_load_balancer_compartment_details: (required)
|
39
|
+
The configuration details for moving a load balancer to a different compartment.
|
40
|
+
|
41
|
+
:param list[str] wait_for_states:
|
42
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
43
|
+
|
44
|
+
:param dict operation_kwargs:
|
45
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.change_load_balancer_compartment`
|
46
|
+
|
47
|
+
:param dict waiter_kwargs:
|
48
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
49
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
50
|
+
"""
|
51
|
+
operation_result = self.client.change_load_balancer_compartment(load_balancer_id, change_load_balancer_compartment_details, **operation_kwargs)
|
52
|
+
if not wait_for_states:
|
53
|
+
return operation_result
|
54
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
55
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
56
|
+
return operation_result
|
57
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
58
|
+
|
59
|
+
try:
|
60
|
+
waiter_result = oci.wait_until(
|
61
|
+
self.client,
|
62
|
+
self.client.get_work_request(wait_for_resource_id),
|
63
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
64
|
+
**waiter_kwargs
|
65
|
+
)
|
66
|
+
result_to_return = waiter_result
|
67
|
+
|
68
|
+
return result_to_return
|
69
|
+
except Exception as e:
|
70
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
71
|
+
|
72
|
+
def create_backend_and_wait_for_state(self, create_backend_details, load_balancer_id, backend_set_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
73
|
+
"""
|
74
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.create_backend` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
75
|
+
to enter the given state(s).
|
76
|
+
|
77
|
+
:param oci.load_balancer.models.CreateBackendDetails create_backend_details: (required)
|
78
|
+
The details to add a backend server to a backend set.
|
79
|
+
|
80
|
+
:param str load_balancer_id: (required)
|
81
|
+
The `OCID`__ of the load balancer associated with the backend set and servers.
|
82
|
+
|
83
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
84
|
+
|
85
|
+
:param str backend_set_name: (required)
|
86
|
+
The name of the backend set to add the backend server to.
|
87
|
+
|
88
|
+
Example: `example_backend_set`
|
89
|
+
|
90
|
+
:param list[str] wait_for_states:
|
91
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
92
|
+
|
93
|
+
:param dict operation_kwargs:
|
94
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.create_backend`
|
95
|
+
|
96
|
+
:param dict waiter_kwargs:
|
97
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
98
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
99
|
+
"""
|
100
|
+
operation_result = self.client.create_backend(create_backend_details, load_balancer_id, backend_set_name, **operation_kwargs)
|
101
|
+
if not wait_for_states:
|
102
|
+
return operation_result
|
103
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
104
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
105
|
+
return operation_result
|
106
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
107
|
+
|
108
|
+
try:
|
109
|
+
waiter_result = oci.wait_until(
|
110
|
+
self.client,
|
111
|
+
self.client.get_work_request(wait_for_resource_id),
|
112
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
113
|
+
**waiter_kwargs
|
114
|
+
)
|
115
|
+
result_to_return = waiter_result
|
116
|
+
|
117
|
+
return result_to_return
|
118
|
+
except Exception as e:
|
119
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
120
|
+
|
121
|
+
def create_backend_set_and_wait_for_state(self, create_backend_set_details, load_balancer_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
122
|
+
"""
|
123
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.create_backend_set` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
124
|
+
to enter the given state(s).
|
125
|
+
|
126
|
+
:param oci.load_balancer.models.CreateBackendSetDetails create_backend_set_details: (required)
|
127
|
+
The details for adding a backend set.
|
128
|
+
|
129
|
+
:param str load_balancer_id: (required)
|
130
|
+
The `OCID`__ of the load balancer on which to add a backend set.
|
131
|
+
|
132
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
133
|
+
|
134
|
+
:param list[str] wait_for_states:
|
135
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
136
|
+
|
137
|
+
:param dict operation_kwargs:
|
138
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.create_backend_set`
|
139
|
+
|
140
|
+
:param dict waiter_kwargs:
|
141
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
142
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
143
|
+
"""
|
144
|
+
operation_result = self.client.create_backend_set(create_backend_set_details, load_balancer_id, **operation_kwargs)
|
145
|
+
if not wait_for_states:
|
146
|
+
return operation_result
|
147
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
148
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
149
|
+
return operation_result
|
150
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
151
|
+
|
152
|
+
try:
|
153
|
+
waiter_result = oci.wait_until(
|
154
|
+
self.client,
|
155
|
+
self.client.get_work_request(wait_for_resource_id),
|
156
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
157
|
+
**waiter_kwargs
|
158
|
+
)
|
159
|
+
result_to_return = waiter_result
|
160
|
+
|
161
|
+
return result_to_return
|
162
|
+
except Exception as e:
|
163
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
164
|
+
|
165
|
+
def create_certificate_and_wait_for_state(self, create_certificate_details, load_balancer_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
166
|
+
"""
|
167
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.create_certificate` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
168
|
+
to enter the given state(s).
|
169
|
+
|
170
|
+
:param oci.load_balancer.models.CreateCertificateDetails create_certificate_details: (required)
|
171
|
+
The details of the certificate bundle to add.
|
172
|
+
|
173
|
+
:param str load_balancer_id: (required)
|
174
|
+
The `OCID`__ of the load balancer on which to add the certificate bundle.
|
175
|
+
|
176
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
177
|
+
|
178
|
+
:param list[str] wait_for_states:
|
179
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
180
|
+
|
181
|
+
:param dict operation_kwargs:
|
182
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.create_certificate`
|
183
|
+
|
184
|
+
:param dict waiter_kwargs:
|
185
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
186
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
187
|
+
"""
|
188
|
+
operation_result = self.client.create_certificate(create_certificate_details, load_balancer_id, **operation_kwargs)
|
189
|
+
if not wait_for_states:
|
190
|
+
return operation_result
|
191
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
192
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
193
|
+
return operation_result
|
194
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
195
|
+
|
196
|
+
try:
|
197
|
+
waiter_result = oci.wait_until(
|
198
|
+
self.client,
|
199
|
+
self.client.get_work_request(wait_for_resource_id),
|
200
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
201
|
+
**waiter_kwargs
|
202
|
+
)
|
203
|
+
result_to_return = waiter_result
|
204
|
+
|
205
|
+
return result_to_return
|
206
|
+
except Exception as e:
|
207
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
208
|
+
|
209
|
+
def create_hostname_and_wait_for_state(self, create_hostname_details, load_balancer_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
210
|
+
"""
|
211
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.create_hostname` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
212
|
+
to enter the given state(s).
|
213
|
+
|
214
|
+
:param oci.load_balancer.models.CreateHostnameDetails create_hostname_details: (required)
|
215
|
+
The details of the hostname resource to add to the specified load balancer.
|
216
|
+
|
217
|
+
:param str load_balancer_id: (required)
|
218
|
+
The `OCID`__ of the load balancer to add the hostname to.
|
219
|
+
|
220
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
221
|
+
|
222
|
+
:param list[str] wait_for_states:
|
223
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
224
|
+
|
225
|
+
:param dict operation_kwargs:
|
226
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.create_hostname`
|
227
|
+
|
228
|
+
:param dict waiter_kwargs:
|
229
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
230
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
231
|
+
"""
|
232
|
+
operation_result = self.client.create_hostname(create_hostname_details, load_balancer_id, **operation_kwargs)
|
233
|
+
if not wait_for_states:
|
234
|
+
return operation_result
|
235
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
236
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
237
|
+
return operation_result
|
238
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
239
|
+
|
240
|
+
try:
|
241
|
+
waiter_result = oci.wait_until(
|
242
|
+
self.client,
|
243
|
+
self.client.get_work_request(wait_for_resource_id),
|
244
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
245
|
+
**waiter_kwargs
|
246
|
+
)
|
247
|
+
result_to_return = waiter_result
|
248
|
+
|
249
|
+
return result_to_return
|
250
|
+
except Exception as e:
|
251
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
252
|
+
|
253
|
+
def create_listener_and_wait_for_state(self, create_listener_details, load_balancer_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
254
|
+
"""
|
255
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.create_listener` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
256
|
+
to enter the given state(s).
|
257
|
+
|
258
|
+
:param oci.load_balancer.models.CreateListenerDetails create_listener_details: (required)
|
259
|
+
Details to add a listener.
|
260
|
+
|
261
|
+
:param str load_balancer_id: (required)
|
262
|
+
The `OCID`__ of the load balancer on which to add a listener.
|
263
|
+
|
264
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
265
|
+
|
266
|
+
:param list[str] wait_for_states:
|
267
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
268
|
+
|
269
|
+
:param dict operation_kwargs:
|
270
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.create_listener`
|
271
|
+
|
272
|
+
:param dict waiter_kwargs:
|
273
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
274
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
275
|
+
"""
|
276
|
+
operation_result = self.client.create_listener(create_listener_details, load_balancer_id, **operation_kwargs)
|
277
|
+
if not wait_for_states:
|
278
|
+
return operation_result
|
279
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
280
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
281
|
+
return operation_result
|
282
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
283
|
+
|
284
|
+
try:
|
285
|
+
waiter_result = oci.wait_until(
|
286
|
+
self.client,
|
287
|
+
self.client.get_work_request(wait_for_resource_id),
|
288
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
289
|
+
**waiter_kwargs
|
290
|
+
)
|
291
|
+
result_to_return = waiter_result
|
292
|
+
|
293
|
+
return result_to_return
|
294
|
+
except Exception as e:
|
295
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
296
|
+
|
297
|
+
def create_load_balancer_and_wait_for_state(self, create_load_balancer_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
298
|
+
"""
|
299
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.create_load_balancer` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
300
|
+
to enter the given state(s).
|
301
|
+
|
302
|
+
:param oci.load_balancer.models.CreateLoadBalancerDetails create_load_balancer_details: (required)
|
303
|
+
The configuration details for creating a load balancer.
|
304
|
+
|
305
|
+
:param list[str] wait_for_states:
|
306
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
307
|
+
|
308
|
+
:param dict operation_kwargs:
|
309
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.create_load_balancer`
|
310
|
+
|
311
|
+
:param dict waiter_kwargs:
|
312
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
313
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
314
|
+
"""
|
315
|
+
operation_result = self.client.create_load_balancer(create_load_balancer_details, **operation_kwargs)
|
316
|
+
if not wait_for_states:
|
317
|
+
return operation_result
|
318
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
319
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
320
|
+
return operation_result
|
321
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
322
|
+
|
323
|
+
try:
|
324
|
+
waiter_result = oci.wait_until(
|
325
|
+
self.client,
|
326
|
+
self.client.get_work_request(wait_for_resource_id),
|
327
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
328
|
+
**waiter_kwargs
|
329
|
+
)
|
330
|
+
result_to_return = self.client.get_load_balancer(waiter_result.data.load_balancer_id)
|
331
|
+
|
332
|
+
return result_to_return
|
333
|
+
except Exception as e:
|
334
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
335
|
+
|
336
|
+
def create_path_route_set_and_wait_for_state(self, create_path_route_set_details, load_balancer_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
337
|
+
"""
|
338
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.create_path_route_set` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
339
|
+
to enter the given state(s).
|
340
|
+
|
341
|
+
:param oci.load_balancer.models.CreatePathRouteSetDetails create_path_route_set_details: (required)
|
342
|
+
The details of the path route set to add.
|
343
|
+
|
344
|
+
:param str load_balancer_id: (required)
|
345
|
+
The `OCID`__ of the load balancer to add the path route set to.
|
346
|
+
|
347
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
348
|
+
|
349
|
+
:param list[str] wait_for_states:
|
350
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
351
|
+
|
352
|
+
:param dict operation_kwargs:
|
353
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.create_path_route_set`
|
354
|
+
|
355
|
+
:param dict waiter_kwargs:
|
356
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
357
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
358
|
+
"""
|
359
|
+
operation_result = self.client.create_path_route_set(create_path_route_set_details, load_balancer_id, **operation_kwargs)
|
360
|
+
if not wait_for_states:
|
361
|
+
return operation_result
|
362
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
363
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
364
|
+
return operation_result
|
365
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
366
|
+
|
367
|
+
try:
|
368
|
+
waiter_result = oci.wait_until(
|
369
|
+
self.client,
|
370
|
+
self.client.get_work_request(wait_for_resource_id),
|
371
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
372
|
+
**waiter_kwargs
|
373
|
+
)
|
374
|
+
result_to_return = waiter_result
|
375
|
+
|
376
|
+
return result_to_return
|
377
|
+
except Exception as e:
|
378
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
379
|
+
|
380
|
+
def create_routing_policy_and_wait_for_state(self, create_routing_policy_details, load_balancer_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
381
|
+
"""
|
382
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.create_routing_policy` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
383
|
+
to enter the given state(s).
|
384
|
+
|
385
|
+
:param oci.load_balancer.models.CreateRoutingPolicyDetails create_routing_policy_details: (required)
|
386
|
+
The details of the routing policy rules to add.
|
387
|
+
|
388
|
+
:param str load_balancer_id: (required)
|
389
|
+
The `OCID`__ of the load balancer to add the routing policy rule list to.
|
390
|
+
|
391
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
392
|
+
|
393
|
+
:param list[str] wait_for_states:
|
394
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
395
|
+
|
396
|
+
:param dict operation_kwargs:
|
397
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.create_routing_policy`
|
398
|
+
|
399
|
+
:param dict waiter_kwargs:
|
400
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
401
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
402
|
+
"""
|
403
|
+
operation_result = self.client.create_routing_policy(create_routing_policy_details, load_balancer_id, **operation_kwargs)
|
404
|
+
if not wait_for_states:
|
405
|
+
return operation_result
|
406
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
407
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
408
|
+
return operation_result
|
409
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
410
|
+
|
411
|
+
try:
|
412
|
+
waiter_result = oci.wait_until(
|
413
|
+
self.client,
|
414
|
+
self.client.get_work_request(wait_for_resource_id),
|
415
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
416
|
+
**waiter_kwargs
|
417
|
+
)
|
418
|
+
result_to_return = waiter_result
|
419
|
+
|
420
|
+
return result_to_return
|
421
|
+
except Exception as e:
|
422
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
423
|
+
|
424
|
+
def create_rule_set_and_wait_for_state(self, load_balancer_id, create_rule_set_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
425
|
+
"""
|
426
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.create_rule_set` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
427
|
+
to enter the given state(s).
|
428
|
+
|
429
|
+
:param str load_balancer_id: (required)
|
430
|
+
The `OCID`__ of the specified load balancer.
|
431
|
+
|
432
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
433
|
+
|
434
|
+
:param oci.load_balancer.models.CreateRuleSetDetails create_rule_set_details: (required)
|
435
|
+
The configuration details for the rule set to create.
|
436
|
+
|
437
|
+
:param list[str] wait_for_states:
|
438
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
439
|
+
|
440
|
+
:param dict operation_kwargs:
|
441
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.create_rule_set`
|
442
|
+
|
443
|
+
:param dict waiter_kwargs:
|
444
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
445
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
446
|
+
"""
|
447
|
+
operation_result = self.client.create_rule_set(load_balancer_id, create_rule_set_details, **operation_kwargs)
|
448
|
+
if not wait_for_states:
|
449
|
+
return operation_result
|
450
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
451
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
452
|
+
return operation_result
|
453
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
454
|
+
|
455
|
+
try:
|
456
|
+
waiter_result = oci.wait_until(
|
457
|
+
self.client,
|
458
|
+
self.client.get_work_request(wait_for_resource_id),
|
459
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
460
|
+
**waiter_kwargs
|
461
|
+
)
|
462
|
+
result_to_return = waiter_result
|
463
|
+
|
464
|
+
return result_to_return
|
465
|
+
except Exception as e:
|
466
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
467
|
+
|
468
|
+
def create_ssl_cipher_suite_and_wait_for_state(self, create_ssl_cipher_suite_details, load_balancer_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
469
|
+
"""
|
470
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.create_ssl_cipher_suite` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
471
|
+
to enter the given state(s).
|
472
|
+
|
473
|
+
:param oci.load_balancer.models.CreateSSLCipherSuiteDetails create_ssl_cipher_suite_details: (required)
|
474
|
+
The details of the SSL cipher suite to add.
|
475
|
+
|
476
|
+
:param str load_balancer_id: (required)
|
477
|
+
The `OCID`__ of the associated load balancer.
|
478
|
+
|
479
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
480
|
+
|
481
|
+
:param list[str] wait_for_states:
|
482
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
483
|
+
|
484
|
+
:param dict operation_kwargs:
|
485
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.create_ssl_cipher_suite`
|
486
|
+
|
487
|
+
:param dict waiter_kwargs:
|
488
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
489
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
490
|
+
"""
|
491
|
+
operation_result = self.client.create_ssl_cipher_suite(create_ssl_cipher_suite_details, load_balancer_id, **operation_kwargs)
|
492
|
+
if not wait_for_states:
|
493
|
+
return operation_result
|
494
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
495
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
496
|
+
return operation_result
|
497
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
498
|
+
|
499
|
+
try:
|
500
|
+
waiter_result = oci.wait_until(
|
501
|
+
self.client,
|
502
|
+
self.client.get_work_request(wait_for_resource_id),
|
503
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
504
|
+
**waiter_kwargs
|
505
|
+
)
|
506
|
+
result_to_return = waiter_result
|
507
|
+
|
508
|
+
return result_to_return
|
509
|
+
except Exception as e:
|
510
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
511
|
+
|
512
|
+
def delete_backend_and_wait_for_state(self, load_balancer_id, backend_set_name, backend_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
513
|
+
"""
|
514
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.delete_backend` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
515
|
+
to enter the given state(s).
|
516
|
+
|
517
|
+
:param str load_balancer_id: (required)
|
518
|
+
The `OCID`__ of the load balancer associated with the backend set and server.
|
519
|
+
|
520
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
521
|
+
|
522
|
+
:param str backend_set_name: (required)
|
523
|
+
The name of the backend set associated with the backend server.
|
524
|
+
|
525
|
+
Example: `example_backend_set`
|
526
|
+
|
527
|
+
:param str backend_name: (required)
|
528
|
+
The IP address and port of the backend server to remove.
|
529
|
+
|
530
|
+
Example: `10.0.0.3:8080`
|
531
|
+
|
532
|
+
:param list[str] wait_for_states:
|
533
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
534
|
+
|
535
|
+
:param dict operation_kwargs:
|
536
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.delete_backend`
|
537
|
+
|
538
|
+
:param dict waiter_kwargs:
|
539
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
540
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
541
|
+
"""
|
542
|
+
operation_result = None
|
543
|
+
try:
|
544
|
+
operation_result = self.client.delete_backend(load_balancer_id, backend_set_name, backend_name, **operation_kwargs)
|
545
|
+
except oci.exceptions.ServiceError as e:
|
546
|
+
if e.status == 404:
|
547
|
+
return WAIT_RESOURCE_NOT_FOUND
|
548
|
+
else:
|
549
|
+
raise e
|
550
|
+
|
551
|
+
if not wait_for_states:
|
552
|
+
return operation_result
|
553
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
554
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
555
|
+
return operation_result
|
556
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
557
|
+
|
558
|
+
try:
|
559
|
+
waiter_result = oci.wait_until(
|
560
|
+
self.client,
|
561
|
+
self.client.get_work_request(wait_for_resource_id),
|
562
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
563
|
+
**waiter_kwargs
|
564
|
+
)
|
565
|
+
result_to_return = waiter_result
|
566
|
+
|
567
|
+
return result_to_return
|
568
|
+
except Exception as e:
|
569
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
570
|
+
|
571
|
+
def delete_backend_set_and_wait_for_state(self, load_balancer_id, backend_set_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
572
|
+
"""
|
573
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.delete_backend_set` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
574
|
+
to enter the given state(s).
|
575
|
+
|
576
|
+
:param str load_balancer_id: (required)
|
577
|
+
The `OCID`__ of the load balancer associated with the backend set.
|
578
|
+
|
579
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
580
|
+
|
581
|
+
:param str backend_set_name: (required)
|
582
|
+
The name of the backend set to delete.
|
583
|
+
|
584
|
+
Example: `example_backend_set`
|
585
|
+
|
586
|
+
:param list[str] wait_for_states:
|
587
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
588
|
+
|
589
|
+
:param dict operation_kwargs:
|
590
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.delete_backend_set`
|
591
|
+
|
592
|
+
:param dict waiter_kwargs:
|
593
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
594
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
595
|
+
"""
|
596
|
+
operation_result = None
|
597
|
+
try:
|
598
|
+
operation_result = self.client.delete_backend_set(load_balancer_id, backend_set_name, **operation_kwargs)
|
599
|
+
except oci.exceptions.ServiceError as e:
|
600
|
+
if e.status == 404:
|
601
|
+
return WAIT_RESOURCE_NOT_FOUND
|
602
|
+
else:
|
603
|
+
raise e
|
604
|
+
|
605
|
+
if not wait_for_states:
|
606
|
+
return operation_result
|
607
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
608
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
609
|
+
return operation_result
|
610
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
611
|
+
|
612
|
+
try:
|
613
|
+
waiter_result = oci.wait_until(
|
614
|
+
self.client,
|
615
|
+
self.client.get_work_request(wait_for_resource_id),
|
616
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
617
|
+
**waiter_kwargs
|
618
|
+
)
|
619
|
+
result_to_return = waiter_result
|
620
|
+
|
621
|
+
return result_to_return
|
622
|
+
except Exception as e:
|
623
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
624
|
+
|
625
|
+
def delete_certificate_and_wait_for_state(self, load_balancer_id, certificate_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
626
|
+
"""
|
627
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.delete_certificate` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
628
|
+
to enter the given state(s).
|
629
|
+
|
630
|
+
:param str load_balancer_id: (required)
|
631
|
+
The `OCID`__ of the load balancer associated with the certificate bundle
|
632
|
+
to be deleted.
|
633
|
+
|
634
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
635
|
+
|
636
|
+
:param str certificate_name: (required)
|
637
|
+
The name of the certificate bundle to delete.
|
638
|
+
|
639
|
+
Example: `example_certificate_bundle`
|
640
|
+
|
641
|
+
:param list[str] wait_for_states:
|
642
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
643
|
+
|
644
|
+
:param dict operation_kwargs:
|
645
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.delete_certificate`
|
646
|
+
|
647
|
+
:param dict waiter_kwargs:
|
648
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
649
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
650
|
+
"""
|
651
|
+
operation_result = None
|
652
|
+
try:
|
653
|
+
operation_result = self.client.delete_certificate(load_balancer_id, certificate_name, **operation_kwargs)
|
654
|
+
except oci.exceptions.ServiceError as e:
|
655
|
+
if e.status == 404:
|
656
|
+
return WAIT_RESOURCE_NOT_FOUND
|
657
|
+
else:
|
658
|
+
raise e
|
659
|
+
|
660
|
+
if not wait_for_states:
|
661
|
+
return operation_result
|
662
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
663
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
664
|
+
return operation_result
|
665
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
666
|
+
|
667
|
+
try:
|
668
|
+
waiter_result = oci.wait_until(
|
669
|
+
self.client,
|
670
|
+
self.client.get_work_request(wait_for_resource_id),
|
671
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
672
|
+
**waiter_kwargs
|
673
|
+
)
|
674
|
+
result_to_return = waiter_result
|
675
|
+
|
676
|
+
return result_to_return
|
677
|
+
except Exception as e:
|
678
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
679
|
+
|
680
|
+
def delete_hostname_and_wait_for_state(self, load_balancer_id, name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
681
|
+
"""
|
682
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.delete_hostname` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
683
|
+
to enter the given state(s).
|
684
|
+
|
685
|
+
:param str load_balancer_id: (required)
|
686
|
+
The `OCID`__ of the load balancer associated with the hostname to delete.
|
687
|
+
|
688
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
689
|
+
|
690
|
+
:param str name: (required)
|
691
|
+
The name of the hostname resource to delete.
|
692
|
+
|
693
|
+
Example: `example_hostname_001`
|
694
|
+
|
695
|
+
:param list[str] wait_for_states:
|
696
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
697
|
+
|
698
|
+
:param dict operation_kwargs:
|
699
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.delete_hostname`
|
700
|
+
|
701
|
+
:param dict waiter_kwargs:
|
702
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
703
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
704
|
+
"""
|
705
|
+
operation_result = None
|
706
|
+
try:
|
707
|
+
operation_result = self.client.delete_hostname(load_balancer_id, name, **operation_kwargs)
|
708
|
+
except oci.exceptions.ServiceError as e:
|
709
|
+
if e.status == 404:
|
710
|
+
return WAIT_RESOURCE_NOT_FOUND
|
711
|
+
else:
|
712
|
+
raise e
|
713
|
+
|
714
|
+
if not wait_for_states:
|
715
|
+
return operation_result
|
716
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
717
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
718
|
+
return operation_result
|
719
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
720
|
+
|
721
|
+
try:
|
722
|
+
waiter_result = oci.wait_until(
|
723
|
+
self.client,
|
724
|
+
self.client.get_work_request(wait_for_resource_id),
|
725
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
726
|
+
**waiter_kwargs
|
727
|
+
)
|
728
|
+
result_to_return = waiter_result
|
729
|
+
|
730
|
+
return result_to_return
|
731
|
+
except Exception as e:
|
732
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
733
|
+
|
734
|
+
def delete_listener_and_wait_for_state(self, load_balancer_id, listener_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
735
|
+
"""
|
736
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.delete_listener` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
737
|
+
to enter the given state(s).
|
738
|
+
|
739
|
+
:param str load_balancer_id: (required)
|
740
|
+
The `OCID`__ of the load balancer associated with the listener to delete.
|
741
|
+
|
742
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
743
|
+
|
744
|
+
:param str listener_name: (required)
|
745
|
+
The name of the listener to delete.
|
746
|
+
|
747
|
+
Example: `example_listener`
|
748
|
+
|
749
|
+
:param list[str] wait_for_states:
|
750
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
751
|
+
|
752
|
+
:param dict operation_kwargs:
|
753
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.delete_listener`
|
754
|
+
|
755
|
+
:param dict waiter_kwargs:
|
756
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
757
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
758
|
+
"""
|
759
|
+
operation_result = None
|
760
|
+
try:
|
761
|
+
operation_result = self.client.delete_listener(load_balancer_id, listener_name, **operation_kwargs)
|
762
|
+
except oci.exceptions.ServiceError as e:
|
763
|
+
if e.status == 404:
|
764
|
+
return WAIT_RESOURCE_NOT_FOUND
|
765
|
+
else:
|
766
|
+
raise e
|
767
|
+
|
768
|
+
if not wait_for_states:
|
769
|
+
return operation_result
|
770
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
771
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
772
|
+
return operation_result
|
773
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
774
|
+
|
775
|
+
try:
|
776
|
+
waiter_result = oci.wait_until(
|
777
|
+
self.client,
|
778
|
+
self.client.get_work_request(wait_for_resource_id),
|
779
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
780
|
+
**waiter_kwargs
|
781
|
+
)
|
782
|
+
result_to_return = waiter_result
|
783
|
+
|
784
|
+
return result_to_return
|
785
|
+
except Exception as e:
|
786
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
787
|
+
|
788
|
+
def delete_load_balancer_and_wait_for_state(self, load_balancer_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
789
|
+
"""
|
790
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.delete_load_balancer` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
791
|
+
to enter the given state(s).
|
792
|
+
|
793
|
+
:param str load_balancer_id: (required)
|
794
|
+
The `OCID`__ of the load balancer to delete.
|
795
|
+
|
796
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
797
|
+
|
798
|
+
:param list[str] wait_for_states:
|
799
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
800
|
+
|
801
|
+
:param dict operation_kwargs:
|
802
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.delete_load_balancer`
|
803
|
+
|
804
|
+
:param dict waiter_kwargs:
|
805
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
806
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
807
|
+
"""
|
808
|
+
operation_result = None
|
809
|
+
try:
|
810
|
+
operation_result = self.client.delete_load_balancer(load_balancer_id, **operation_kwargs)
|
811
|
+
except oci.exceptions.ServiceError as e:
|
812
|
+
if e.status == 404:
|
813
|
+
return WAIT_RESOURCE_NOT_FOUND
|
814
|
+
else:
|
815
|
+
raise e
|
816
|
+
|
817
|
+
if not wait_for_states:
|
818
|
+
return operation_result
|
819
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
820
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
821
|
+
return operation_result
|
822
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
823
|
+
|
824
|
+
try:
|
825
|
+
waiter_result = oci.wait_until(
|
826
|
+
self.client,
|
827
|
+
self.client.get_work_request(wait_for_resource_id),
|
828
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
829
|
+
**waiter_kwargs
|
830
|
+
)
|
831
|
+
result_to_return = waiter_result
|
832
|
+
|
833
|
+
return result_to_return
|
834
|
+
except Exception as e:
|
835
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
836
|
+
|
837
|
+
def delete_path_route_set_and_wait_for_state(self, load_balancer_id, path_route_set_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
838
|
+
"""
|
839
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.delete_path_route_set` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
840
|
+
to enter the given state(s).
|
841
|
+
|
842
|
+
:param str load_balancer_id: (required)
|
843
|
+
The `OCID`__ of the load balancer associated with the path route set to delete.
|
844
|
+
|
845
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
846
|
+
|
847
|
+
:param str path_route_set_name: (required)
|
848
|
+
The name of the path route set to delete.
|
849
|
+
|
850
|
+
Example: `example_path_route_set`
|
851
|
+
|
852
|
+
:param list[str] wait_for_states:
|
853
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
854
|
+
|
855
|
+
:param dict operation_kwargs:
|
856
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.delete_path_route_set`
|
857
|
+
|
858
|
+
:param dict waiter_kwargs:
|
859
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
860
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
861
|
+
"""
|
862
|
+
operation_result = None
|
863
|
+
try:
|
864
|
+
operation_result = self.client.delete_path_route_set(load_balancer_id, path_route_set_name, **operation_kwargs)
|
865
|
+
except oci.exceptions.ServiceError as e:
|
866
|
+
if e.status == 404:
|
867
|
+
return WAIT_RESOURCE_NOT_FOUND
|
868
|
+
else:
|
869
|
+
raise e
|
870
|
+
|
871
|
+
if not wait_for_states:
|
872
|
+
return operation_result
|
873
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
874
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
875
|
+
return operation_result
|
876
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
877
|
+
|
878
|
+
try:
|
879
|
+
waiter_result = oci.wait_until(
|
880
|
+
self.client,
|
881
|
+
self.client.get_work_request(wait_for_resource_id),
|
882
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
883
|
+
**waiter_kwargs
|
884
|
+
)
|
885
|
+
result_to_return = waiter_result
|
886
|
+
|
887
|
+
return result_to_return
|
888
|
+
except Exception as e:
|
889
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
890
|
+
|
891
|
+
def delete_routing_policy_and_wait_for_state(self, load_balancer_id, routing_policy_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
892
|
+
"""
|
893
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.delete_routing_policy` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
894
|
+
to enter the given state(s).
|
895
|
+
|
896
|
+
:param str load_balancer_id: (required)
|
897
|
+
The `OCID`__ of the load balancer associated with the routing policy to delete.
|
898
|
+
|
899
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
900
|
+
|
901
|
+
:param str routing_policy_name: (required)
|
902
|
+
The name of the routing policy to delete.
|
903
|
+
|
904
|
+
Example: `example_routing_policy`
|
905
|
+
|
906
|
+
:param list[str] wait_for_states:
|
907
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
908
|
+
|
909
|
+
:param dict operation_kwargs:
|
910
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.delete_routing_policy`
|
911
|
+
|
912
|
+
:param dict waiter_kwargs:
|
913
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
914
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
915
|
+
"""
|
916
|
+
operation_result = None
|
917
|
+
try:
|
918
|
+
operation_result = self.client.delete_routing_policy(load_balancer_id, routing_policy_name, **operation_kwargs)
|
919
|
+
except oci.exceptions.ServiceError as e:
|
920
|
+
if e.status == 404:
|
921
|
+
return WAIT_RESOURCE_NOT_FOUND
|
922
|
+
else:
|
923
|
+
raise e
|
924
|
+
|
925
|
+
if not wait_for_states:
|
926
|
+
return operation_result
|
927
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
928
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
929
|
+
return operation_result
|
930
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
931
|
+
|
932
|
+
try:
|
933
|
+
waiter_result = oci.wait_until(
|
934
|
+
self.client,
|
935
|
+
self.client.get_work_request(wait_for_resource_id),
|
936
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
937
|
+
**waiter_kwargs
|
938
|
+
)
|
939
|
+
result_to_return = waiter_result
|
940
|
+
|
941
|
+
return result_to_return
|
942
|
+
except Exception as e:
|
943
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
944
|
+
|
945
|
+
def delete_rule_set_and_wait_for_state(self, load_balancer_id, rule_set_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
946
|
+
"""
|
947
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.delete_rule_set` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
948
|
+
to enter the given state(s).
|
949
|
+
|
950
|
+
:param str load_balancer_id: (required)
|
951
|
+
The `OCID`__ of the specified load balancer.
|
952
|
+
|
953
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
954
|
+
|
955
|
+
:param str rule_set_name: (required)
|
956
|
+
The name of the rule set to delete.
|
957
|
+
|
958
|
+
Example: `example_rule_set`
|
959
|
+
|
960
|
+
:param list[str] wait_for_states:
|
961
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
962
|
+
|
963
|
+
:param dict operation_kwargs:
|
964
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.delete_rule_set`
|
965
|
+
|
966
|
+
:param dict waiter_kwargs:
|
967
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
968
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
969
|
+
"""
|
970
|
+
operation_result = None
|
971
|
+
try:
|
972
|
+
operation_result = self.client.delete_rule_set(load_balancer_id, rule_set_name, **operation_kwargs)
|
973
|
+
except oci.exceptions.ServiceError as e:
|
974
|
+
if e.status == 404:
|
975
|
+
return WAIT_RESOURCE_NOT_FOUND
|
976
|
+
else:
|
977
|
+
raise e
|
978
|
+
|
979
|
+
if not wait_for_states:
|
980
|
+
return operation_result
|
981
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
982
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
983
|
+
return operation_result
|
984
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
985
|
+
|
986
|
+
try:
|
987
|
+
waiter_result = oci.wait_until(
|
988
|
+
self.client,
|
989
|
+
self.client.get_work_request(wait_for_resource_id),
|
990
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
991
|
+
**waiter_kwargs
|
992
|
+
)
|
993
|
+
result_to_return = waiter_result
|
994
|
+
|
995
|
+
return result_to_return
|
996
|
+
except Exception as e:
|
997
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
998
|
+
|
999
|
+
def delete_ssl_cipher_suite_and_wait_for_state(self, load_balancer_id, name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
1000
|
+
"""
|
1001
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.delete_ssl_cipher_suite` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
1002
|
+
to enter the given state(s).
|
1003
|
+
|
1004
|
+
:param str load_balancer_id: (required)
|
1005
|
+
The `OCID`__ of the associated load balancer.
|
1006
|
+
|
1007
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
1008
|
+
|
1009
|
+
:param str name: (required)
|
1010
|
+
The name of the SSL cipher suite to delete.
|
1011
|
+
|
1012
|
+
example: `example_cipher_suite`
|
1013
|
+
|
1014
|
+
:param list[str] wait_for_states:
|
1015
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
1016
|
+
|
1017
|
+
:param dict operation_kwargs:
|
1018
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.delete_ssl_cipher_suite`
|
1019
|
+
|
1020
|
+
:param dict waiter_kwargs:
|
1021
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
1022
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
1023
|
+
"""
|
1024
|
+
operation_result = None
|
1025
|
+
try:
|
1026
|
+
operation_result = self.client.delete_ssl_cipher_suite(load_balancer_id, name, **operation_kwargs)
|
1027
|
+
except oci.exceptions.ServiceError as e:
|
1028
|
+
if e.status == 404:
|
1029
|
+
return WAIT_RESOURCE_NOT_FOUND
|
1030
|
+
else:
|
1031
|
+
raise e
|
1032
|
+
|
1033
|
+
if not wait_for_states:
|
1034
|
+
return operation_result
|
1035
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
1036
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
1037
|
+
return operation_result
|
1038
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
1039
|
+
|
1040
|
+
try:
|
1041
|
+
waiter_result = oci.wait_until(
|
1042
|
+
self.client,
|
1043
|
+
self.client.get_work_request(wait_for_resource_id),
|
1044
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
1045
|
+
**waiter_kwargs
|
1046
|
+
)
|
1047
|
+
result_to_return = waiter_result
|
1048
|
+
|
1049
|
+
return result_to_return
|
1050
|
+
except Exception as e:
|
1051
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
1052
|
+
|
1053
|
+
def update_backend_and_wait_for_state(self, update_backend_details, load_balancer_id, backend_set_name, backend_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
1054
|
+
"""
|
1055
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.update_backend` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
1056
|
+
to enter the given state(s).
|
1057
|
+
|
1058
|
+
:param oci.load_balancer.models.UpdateBackendDetails update_backend_details: (required)
|
1059
|
+
Details for updating a backend server.
|
1060
|
+
|
1061
|
+
:param str load_balancer_id: (required)
|
1062
|
+
The `OCID`__ of the load balancer associated with the backend set and server.
|
1063
|
+
|
1064
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
1065
|
+
|
1066
|
+
:param str backend_set_name: (required)
|
1067
|
+
The name of the backend set associated with the backend server.
|
1068
|
+
|
1069
|
+
Example: `example_backend_set`
|
1070
|
+
|
1071
|
+
:param str backend_name: (required)
|
1072
|
+
The IP address and port of the backend server to update.
|
1073
|
+
|
1074
|
+
Example: `10.0.0.3:8080`
|
1075
|
+
|
1076
|
+
:param list[str] wait_for_states:
|
1077
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
1078
|
+
|
1079
|
+
:param dict operation_kwargs:
|
1080
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.update_backend`
|
1081
|
+
|
1082
|
+
:param dict waiter_kwargs:
|
1083
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
1084
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
1085
|
+
"""
|
1086
|
+
operation_result = self.client.update_backend(update_backend_details, load_balancer_id, backend_set_name, backend_name, **operation_kwargs)
|
1087
|
+
if not wait_for_states:
|
1088
|
+
return operation_result
|
1089
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
1090
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
1091
|
+
return operation_result
|
1092
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
1093
|
+
|
1094
|
+
try:
|
1095
|
+
waiter_result = oci.wait_until(
|
1096
|
+
self.client,
|
1097
|
+
self.client.get_work_request(wait_for_resource_id),
|
1098
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
1099
|
+
**waiter_kwargs
|
1100
|
+
)
|
1101
|
+
result_to_return = waiter_result
|
1102
|
+
|
1103
|
+
return result_to_return
|
1104
|
+
except Exception as e:
|
1105
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
1106
|
+
|
1107
|
+
def update_backend_set_and_wait_for_state(self, update_backend_set_details, load_balancer_id, backend_set_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
1108
|
+
"""
|
1109
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.update_backend_set` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
1110
|
+
to enter the given state(s).
|
1111
|
+
|
1112
|
+
:param oci.load_balancer.models.UpdateBackendSetDetails update_backend_set_details: (required)
|
1113
|
+
The details to update a backend set.
|
1114
|
+
|
1115
|
+
:param str load_balancer_id: (required)
|
1116
|
+
The `OCID`__ of the load balancer associated with the backend set.
|
1117
|
+
|
1118
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
1119
|
+
|
1120
|
+
:param str backend_set_name: (required)
|
1121
|
+
The name of the backend set to update.
|
1122
|
+
|
1123
|
+
Example: `example_backend_set`
|
1124
|
+
|
1125
|
+
:param list[str] wait_for_states:
|
1126
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
1127
|
+
|
1128
|
+
:param dict operation_kwargs:
|
1129
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.update_backend_set`
|
1130
|
+
|
1131
|
+
:param dict waiter_kwargs:
|
1132
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
1133
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
1134
|
+
"""
|
1135
|
+
operation_result = self.client.update_backend_set(update_backend_set_details, load_balancer_id, backend_set_name, **operation_kwargs)
|
1136
|
+
if not wait_for_states:
|
1137
|
+
return operation_result
|
1138
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
1139
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
1140
|
+
return operation_result
|
1141
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
1142
|
+
|
1143
|
+
try:
|
1144
|
+
waiter_result = oci.wait_until(
|
1145
|
+
self.client,
|
1146
|
+
self.client.get_work_request(wait_for_resource_id),
|
1147
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
1148
|
+
**waiter_kwargs
|
1149
|
+
)
|
1150
|
+
result_to_return = waiter_result
|
1151
|
+
|
1152
|
+
return result_to_return
|
1153
|
+
except Exception as e:
|
1154
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
1155
|
+
|
1156
|
+
def update_health_checker_and_wait_for_state(self, health_checker, load_balancer_id, backend_set_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
1157
|
+
"""
|
1158
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.update_health_checker` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
1159
|
+
to enter the given state(s).
|
1160
|
+
|
1161
|
+
:param oci.load_balancer.models.UpdateHealthCheckerDetails health_checker: (required)
|
1162
|
+
The health check policy configuration details.
|
1163
|
+
|
1164
|
+
:param str load_balancer_id: (required)
|
1165
|
+
The `OCID`__ of the load balancer associated with the health check policy to be updated.
|
1166
|
+
|
1167
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
1168
|
+
|
1169
|
+
:param str backend_set_name: (required)
|
1170
|
+
The name of the backend set associated with the health check policy to be retrieved.
|
1171
|
+
|
1172
|
+
Example: `example_backend_set`
|
1173
|
+
|
1174
|
+
:param list[str] wait_for_states:
|
1175
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
1176
|
+
|
1177
|
+
:param dict operation_kwargs:
|
1178
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.update_health_checker`
|
1179
|
+
|
1180
|
+
:param dict waiter_kwargs:
|
1181
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
1182
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
1183
|
+
"""
|
1184
|
+
operation_result = self.client.update_health_checker(health_checker, load_balancer_id, backend_set_name, **operation_kwargs)
|
1185
|
+
if not wait_for_states:
|
1186
|
+
return operation_result
|
1187
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
1188
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
1189
|
+
return operation_result
|
1190
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
1191
|
+
|
1192
|
+
try:
|
1193
|
+
waiter_result = oci.wait_until(
|
1194
|
+
self.client,
|
1195
|
+
self.client.get_work_request(wait_for_resource_id),
|
1196
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
1197
|
+
**waiter_kwargs
|
1198
|
+
)
|
1199
|
+
result_to_return = waiter_result
|
1200
|
+
|
1201
|
+
return result_to_return
|
1202
|
+
except Exception as e:
|
1203
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
1204
|
+
|
1205
|
+
def update_hostname_and_wait_for_state(self, update_hostname_details, load_balancer_id, name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
1206
|
+
"""
|
1207
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.update_hostname` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
1208
|
+
to enter the given state(s).
|
1209
|
+
|
1210
|
+
:param oci.load_balancer.models.UpdateHostnameDetails update_hostname_details: (required)
|
1211
|
+
The configuration details to update a virtual hostname.
|
1212
|
+
|
1213
|
+
:param str load_balancer_id: (required)
|
1214
|
+
The `OCID`__ of the load balancer associated with the virtual hostname
|
1215
|
+
to update.
|
1216
|
+
|
1217
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
1218
|
+
|
1219
|
+
:param str name: (required)
|
1220
|
+
The name of the hostname resource to update.
|
1221
|
+
|
1222
|
+
Example: `example_hostname_001`
|
1223
|
+
|
1224
|
+
:param list[str] wait_for_states:
|
1225
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
1226
|
+
|
1227
|
+
:param dict operation_kwargs:
|
1228
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.update_hostname`
|
1229
|
+
|
1230
|
+
:param dict waiter_kwargs:
|
1231
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
1232
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
1233
|
+
"""
|
1234
|
+
operation_result = self.client.update_hostname(update_hostname_details, load_balancer_id, name, **operation_kwargs)
|
1235
|
+
if not wait_for_states:
|
1236
|
+
return operation_result
|
1237
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
1238
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
1239
|
+
return operation_result
|
1240
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
1241
|
+
|
1242
|
+
try:
|
1243
|
+
waiter_result = oci.wait_until(
|
1244
|
+
self.client,
|
1245
|
+
self.client.get_work_request(wait_for_resource_id),
|
1246
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
1247
|
+
**waiter_kwargs
|
1248
|
+
)
|
1249
|
+
result_to_return = waiter_result
|
1250
|
+
|
1251
|
+
return result_to_return
|
1252
|
+
except Exception as e:
|
1253
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
1254
|
+
|
1255
|
+
def update_listener_and_wait_for_state(self, update_listener_details, load_balancer_id, listener_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
1256
|
+
"""
|
1257
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.update_listener` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
1258
|
+
to enter the given state(s).
|
1259
|
+
|
1260
|
+
:param oci.load_balancer.models.UpdateListenerDetails update_listener_details: (required)
|
1261
|
+
Details to update a listener.
|
1262
|
+
|
1263
|
+
:param str load_balancer_id: (required)
|
1264
|
+
The `OCID`__ of the load balancer associated with the listener to update.
|
1265
|
+
|
1266
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
1267
|
+
|
1268
|
+
:param str listener_name: (required)
|
1269
|
+
The name of the listener to update.
|
1270
|
+
|
1271
|
+
Example: `example_listener`
|
1272
|
+
|
1273
|
+
:param list[str] wait_for_states:
|
1274
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
1275
|
+
|
1276
|
+
:param dict operation_kwargs:
|
1277
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.update_listener`
|
1278
|
+
|
1279
|
+
:param dict waiter_kwargs:
|
1280
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
1281
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
1282
|
+
"""
|
1283
|
+
operation_result = self.client.update_listener(update_listener_details, load_balancer_id, listener_name, **operation_kwargs)
|
1284
|
+
if not wait_for_states:
|
1285
|
+
return operation_result
|
1286
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
1287
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
1288
|
+
return operation_result
|
1289
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
1290
|
+
|
1291
|
+
try:
|
1292
|
+
waiter_result = oci.wait_until(
|
1293
|
+
self.client,
|
1294
|
+
self.client.get_work_request(wait_for_resource_id),
|
1295
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
1296
|
+
**waiter_kwargs
|
1297
|
+
)
|
1298
|
+
result_to_return = waiter_result
|
1299
|
+
|
1300
|
+
return result_to_return
|
1301
|
+
except Exception as e:
|
1302
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
1303
|
+
|
1304
|
+
def update_load_balancer_and_wait_for_state(self, update_load_balancer_details, load_balancer_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
1305
|
+
"""
|
1306
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.update_load_balancer` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
1307
|
+
to enter the given state(s).
|
1308
|
+
|
1309
|
+
:param oci.load_balancer.models.UpdateLoadBalancerDetails update_load_balancer_details: (required)
|
1310
|
+
The details for updating a load balancer's configuration.
|
1311
|
+
|
1312
|
+
:param str load_balancer_id: (required)
|
1313
|
+
The `OCID`__ of the load balancer to update.
|
1314
|
+
|
1315
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
1316
|
+
|
1317
|
+
:param list[str] wait_for_states:
|
1318
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
1319
|
+
|
1320
|
+
:param dict operation_kwargs:
|
1321
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.update_load_balancer`
|
1322
|
+
|
1323
|
+
:param dict waiter_kwargs:
|
1324
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
1325
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
1326
|
+
"""
|
1327
|
+
operation_result = self.client.update_load_balancer(update_load_balancer_details, load_balancer_id, **operation_kwargs)
|
1328
|
+
if not wait_for_states:
|
1329
|
+
return operation_result
|
1330
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
1331
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
1332
|
+
return operation_result
|
1333
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
1334
|
+
|
1335
|
+
try:
|
1336
|
+
waiter_result = oci.wait_until(
|
1337
|
+
self.client,
|
1338
|
+
self.client.get_work_request(wait_for_resource_id),
|
1339
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
1340
|
+
**waiter_kwargs
|
1341
|
+
)
|
1342
|
+
result_to_return = self.client.get_load_balancer(waiter_result.data.load_balancer_id)
|
1343
|
+
|
1344
|
+
return result_to_return
|
1345
|
+
except Exception as e:
|
1346
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
1347
|
+
|
1348
|
+
def update_load_balancer_shape_and_wait_for_state(self, load_balancer_id, update_load_balancer_shape_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
1349
|
+
"""
|
1350
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.update_load_balancer_shape` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
1351
|
+
to enter the given state(s).
|
1352
|
+
|
1353
|
+
:param str load_balancer_id: (required)
|
1354
|
+
The `OCID`__ of the load balancer whose shape will be updated.
|
1355
|
+
|
1356
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1357
|
+
|
1358
|
+
:param oci.load_balancer.models.UpdateLoadBalancerShapeDetails update_load_balancer_shape_details: (required)
|
1359
|
+
The details for updating a load balancer's shape. This contains the new, desired shape.
|
1360
|
+
|
1361
|
+
:param list[str] wait_for_states:
|
1362
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
1363
|
+
|
1364
|
+
:param dict operation_kwargs:
|
1365
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.update_load_balancer_shape`
|
1366
|
+
|
1367
|
+
:param dict waiter_kwargs:
|
1368
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
1369
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
1370
|
+
"""
|
1371
|
+
operation_result = self.client.update_load_balancer_shape(load_balancer_id, update_load_balancer_shape_details, **operation_kwargs)
|
1372
|
+
if not wait_for_states:
|
1373
|
+
return operation_result
|
1374
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
1375
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
1376
|
+
return operation_result
|
1377
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
1378
|
+
|
1379
|
+
try:
|
1380
|
+
waiter_result = oci.wait_until(
|
1381
|
+
self.client,
|
1382
|
+
self.client.get_work_request(wait_for_resource_id),
|
1383
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
1384
|
+
**waiter_kwargs
|
1385
|
+
)
|
1386
|
+
result_to_return = waiter_result
|
1387
|
+
|
1388
|
+
return result_to_return
|
1389
|
+
except Exception as e:
|
1390
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
1391
|
+
|
1392
|
+
def update_network_security_groups_and_wait_for_state(self, update_network_security_groups_details, load_balancer_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
1393
|
+
"""
|
1394
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.update_network_security_groups` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
1395
|
+
to enter the given state(s).
|
1396
|
+
|
1397
|
+
:param oci.load_balancer.models.UpdateNetworkSecurityGroupsDetails update_network_security_groups_details: (required)
|
1398
|
+
The details for updating the NSGs associated with the specified load balancer.
|
1399
|
+
|
1400
|
+
:param str load_balancer_id: (required)
|
1401
|
+
The `OCID`__ of the load balancer to update the NSGs for.
|
1402
|
+
|
1403
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
1404
|
+
|
1405
|
+
:param list[str] wait_for_states:
|
1406
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
1407
|
+
|
1408
|
+
:param dict operation_kwargs:
|
1409
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.update_network_security_groups`
|
1410
|
+
|
1411
|
+
:param dict waiter_kwargs:
|
1412
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
1413
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
1414
|
+
"""
|
1415
|
+
operation_result = self.client.update_network_security_groups(update_network_security_groups_details, load_balancer_id, **operation_kwargs)
|
1416
|
+
if not wait_for_states:
|
1417
|
+
return operation_result
|
1418
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
1419
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
1420
|
+
return operation_result
|
1421
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
1422
|
+
|
1423
|
+
try:
|
1424
|
+
waiter_result = oci.wait_until(
|
1425
|
+
self.client,
|
1426
|
+
self.client.get_work_request(wait_for_resource_id),
|
1427
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
1428
|
+
**waiter_kwargs
|
1429
|
+
)
|
1430
|
+
result_to_return = waiter_result
|
1431
|
+
|
1432
|
+
return result_to_return
|
1433
|
+
except Exception as e:
|
1434
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
1435
|
+
|
1436
|
+
def update_path_route_set_and_wait_for_state(self, update_path_route_set_details, load_balancer_id, path_route_set_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
1437
|
+
"""
|
1438
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.update_path_route_set` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
1439
|
+
to enter the given state(s).
|
1440
|
+
|
1441
|
+
:param oci.load_balancer.models.UpdatePathRouteSetDetails update_path_route_set_details: (required)
|
1442
|
+
The configuration details to update a path route set.
|
1443
|
+
|
1444
|
+
:param str load_balancer_id: (required)
|
1445
|
+
The `OCID`__ of the load balancer associated with the path route set to update.
|
1446
|
+
|
1447
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
1448
|
+
|
1449
|
+
:param str path_route_set_name: (required)
|
1450
|
+
The name of the path route set to update.
|
1451
|
+
|
1452
|
+
Example: `example_path_route_set`
|
1453
|
+
|
1454
|
+
:param list[str] wait_for_states:
|
1455
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
1456
|
+
|
1457
|
+
:param dict operation_kwargs:
|
1458
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.update_path_route_set`
|
1459
|
+
|
1460
|
+
:param dict waiter_kwargs:
|
1461
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
1462
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
1463
|
+
"""
|
1464
|
+
operation_result = self.client.update_path_route_set(update_path_route_set_details, load_balancer_id, path_route_set_name, **operation_kwargs)
|
1465
|
+
if not wait_for_states:
|
1466
|
+
return operation_result
|
1467
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
1468
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
1469
|
+
return operation_result
|
1470
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
1471
|
+
|
1472
|
+
try:
|
1473
|
+
waiter_result = oci.wait_until(
|
1474
|
+
self.client,
|
1475
|
+
self.client.get_work_request(wait_for_resource_id),
|
1476
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
1477
|
+
**waiter_kwargs
|
1478
|
+
)
|
1479
|
+
result_to_return = waiter_result
|
1480
|
+
|
1481
|
+
return result_to_return
|
1482
|
+
except Exception as e:
|
1483
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
1484
|
+
|
1485
|
+
def update_routing_policy_and_wait_for_state(self, update_routing_policy_details, load_balancer_id, routing_policy_name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
1486
|
+
"""
|
1487
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.update_routing_policy` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
1488
|
+
to enter the given state(s).
|
1489
|
+
|
1490
|
+
:param oci.load_balancer.models.UpdateRoutingPolicyDetails update_routing_policy_details: (required)
|
1491
|
+
The configuration details needed to update a routing policy.
|
1492
|
+
|
1493
|
+
:param str load_balancer_id: (required)
|
1494
|
+
The `OCID`__ of the load balancer associated with the routing policy to update.
|
1495
|
+
|
1496
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
1497
|
+
|
1498
|
+
:param str routing_policy_name: (required)
|
1499
|
+
The name of the routing policy to update.
|
1500
|
+
|
1501
|
+
Example: `example_routing_policy_name`
|
1502
|
+
|
1503
|
+
:param list[str] wait_for_states:
|
1504
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
1505
|
+
|
1506
|
+
:param dict operation_kwargs:
|
1507
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.update_routing_policy`
|
1508
|
+
|
1509
|
+
:param dict waiter_kwargs:
|
1510
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
1511
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
1512
|
+
"""
|
1513
|
+
operation_result = self.client.update_routing_policy(update_routing_policy_details, load_balancer_id, routing_policy_name, **operation_kwargs)
|
1514
|
+
if not wait_for_states:
|
1515
|
+
return operation_result
|
1516
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
1517
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
1518
|
+
return operation_result
|
1519
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
1520
|
+
|
1521
|
+
try:
|
1522
|
+
waiter_result = oci.wait_until(
|
1523
|
+
self.client,
|
1524
|
+
self.client.get_work_request(wait_for_resource_id),
|
1525
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
1526
|
+
**waiter_kwargs
|
1527
|
+
)
|
1528
|
+
result_to_return = waiter_result
|
1529
|
+
|
1530
|
+
return result_to_return
|
1531
|
+
except Exception as e:
|
1532
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
1533
|
+
|
1534
|
+
def update_rule_set_and_wait_for_state(self, load_balancer_id, rule_set_name, update_rule_set_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
1535
|
+
"""
|
1536
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.update_rule_set` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
1537
|
+
to enter the given state(s).
|
1538
|
+
|
1539
|
+
:param str load_balancer_id: (required)
|
1540
|
+
The `OCID`__ of the specified load balancer.
|
1541
|
+
|
1542
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
1543
|
+
|
1544
|
+
:param str rule_set_name: (required)
|
1545
|
+
The name of the rule set to update.
|
1546
|
+
|
1547
|
+
Example: `example_rule_set`
|
1548
|
+
|
1549
|
+
:param oci.load_balancer.models.UpdateRuleSetDetails update_rule_set_details: (required)
|
1550
|
+
The configuration details to update a set of rules.
|
1551
|
+
|
1552
|
+
:param list[str] wait_for_states:
|
1553
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
1554
|
+
|
1555
|
+
:param dict operation_kwargs:
|
1556
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.update_rule_set`
|
1557
|
+
|
1558
|
+
:param dict waiter_kwargs:
|
1559
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
1560
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
1561
|
+
"""
|
1562
|
+
operation_result = self.client.update_rule_set(load_balancer_id, rule_set_name, update_rule_set_details, **operation_kwargs)
|
1563
|
+
if not wait_for_states:
|
1564
|
+
return operation_result
|
1565
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
1566
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
1567
|
+
return operation_result
|
1568
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
1569
|
+
|
1570
|
+
try:
|
1571
|
+
waiter_result = oci.wait_until(
|
1572
|
+
self.client,
|
1573
|
+
self.client.get_work_request(wait_for_resource_id),
|
1574
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
1575
|
+
**waiter_kwargs
|
1576
|
+
)
|
1577
|
+
result_to_return = waiter_result
|
1578
|
+
|
1579
|
+
return result_to_return
|
1580
|
+
except Exception as e:
|
1581
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|
1582
|
+
|
1583
|
+
def update_ssl_cipher_suite_and_wait_for_state(self, update_ssl_cipher_suite_details, load_balancer_id, name, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
|
1584
|
+
"""
|
1585
|
+
Calls :py:func:`~oci.load_balancer.LoadBalancerClient.update_ssl_cipher_suite` and waits for the :py:class:`~oci.load_balancer.models.WorkRequest`
|
1586
|
+
to enter the given state(s).
|
1587
|
+
|
1588
|
+
:param oci.load_balancer.models.UpdateSSLCipherSuiteDetails update_ssl_cipher_suite_details: (required)
|
1589
|
+
The configuration details to update an SSL cipher suite.
|
1590
|
+
|
1591
|
+
:param str load_balancer_id: (required)
|
1592
|
+
The `OCID`__ of the associated load balancer.
|
1593
|
+
|
1594
|
+
__ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
|
1595
|
+
|
1596
|
+
:param str name: (required)
|
1597
|
+
The name of the SSL cipher suite to update.
|
1598
|
+
|
1599
|
+
example: `example_cipher_suite`
|
1600
|
+
|
1601
|
+
:param list[str] wait_for_states:
|
1602
|
+
An array of states to wait on. These should be valid values for :py:attr:`~oci.load_balancer.models.WorkRequest.lifecycle_state`
|
1603
|
+
|
1604
|
+
:param dict operation_kwargs:
|
1605
|
+
A dictionary of keyword arguments to pass to :py:func:`~oci.load_balancer.LoadBalancerClient.update_ssl_cipher_suite`
|
1606
|
+
|
1607
|
+
:param dict waiter_kwargs:
|
1608
|
+
A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds``
|
1609
|
+
as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
|
1610
|
+
"""
|
1611
|
+
operation_result = self.client.update_ssl_cipher_suite(update_ssl_cipher_suite_details, load_balancer_id, name, **operation_kwargs)
|
1612
|
+
if not wait_for_states:
|
1613
|
+
return operation_result
|
1614
|
+
lowered_wait_for_states = [w.lower() for w in wait_for_states]
|
1615
|
+
if 'opc-work-request-id' not in operation_result.headers:
|
1616
|
+
return operation_result
|
1617
|
+
wait_for_resource_id = operation_result.headers['opc-work-request-id']
|
1618
|
+
|
1619
|
+
try:
|
1620
|
+
waiter_result = oci.wait_until(
|
1621
|
+
self.client,
|
1622
|
+
self.client.get_work_request(wait_for_resource_id),
|
1623
|
+
evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
|
1624
|
+
**waiter_kwargs
|
1625
|
+
)
|
1626
|
+
result_to_return = waiter_result
|
1627
|
+
|
1628
|
+
return result_to_return
|
1629
|
+
except Exception as e:
|
1630
|
+
raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
|