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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (248) hide show
  1. {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.2.dist-info}/METADATA +3 -3
  2. {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.2.dist-info}/RECORD +248 -6
  3. oci/file_storage/__init__.py +14 -0
  4. oci/file_storage/file_storage_client.py +8601 -0
  5. oci/file_storage/file_storage_client_composite_operations.py +2068 -0
  6. oci/file_storage/models/__init__.py +130 -0
  7. oci/file_storage/models/change_file_system_compartment_details.py +76 -0
  8. oci/file_storage/models/change_filesystem_snapshot_policy_compartment_details.py +76 -0
  9. oci/file_storage/models/change_mount_target_compartment_details.py +76 -0
  10. oci/file_storage/models/change_outbound_connector_compartment_details.py +78 -0
  11. oci/file_storage/models/change_replication_compartment_details.py +76 -0
  12. oci/file_storage/models/client_options.py +389 -0
  13. oci/file_storage/models/create_export_details.py +303 -0
  14. oci/file_storage/models/create_file_system_details.py +425 -0
  15. oci/file_storage/models/create_filesystem_snapshot_policy_details.py +337 -0
  16. oci/file_storage/models/create_kerberos_details.py +200 -0
  17. oci/file_storage/models/create_ldap_bind_account_details.py +220 -0
  18. oci/file_storage/models/create_ldap_idmap_details.py +317 -0
  19. oci/file_storage/models/create_mount_target_details.py +581 -0
  20. oci/file_storage/models/create_outbound_connector_details.py +309 -0
  21. oci/file_storage/models/create_replication_details.py +325 -0
  22. oci/file_storage/models/create_snapshot_details.py +261 -0
  23. oci/file_storage/models/endpoint.py +103 -0
  24. oci/file_storage/models/export.py +456 -0
  25. oci/file_storage/models/export_set.py +411 -0
  26. oci/file_storage/models/export_set_summary.py +316 -0
  27. oci/file_storage/models/export_summary.py +343 -0
  28. oci/file_storage/models/file_system.py +818 -0
  29. oci/file_storage/models/file_system_summary.py +659 -0
  30. oci/file_storage/models/filesystem_snapshot_policy.py +473 -0
  31. oci/file_storage/models/filesystem_snapshot_policy_summary.py +429 -0
  32. oci/file_storage/models/kerberos.py +200 -0
  33. oci/file_storage/models/kerberos_keytab_entry.py +166 -0
  34. oci/file_storage/models/key_tab_secret_details.py +138 -0
  35. oci/file_storage/models/ldap_bind_account.py +243 -0
  36. oci/file_storage/models/ldap_bind_account_summary.py +176 -0
  37. oci/file_storage/models/ldap_idmap.py +317 -0
  38. oci/file_storage/models/mount_target.py +828 -0
  39. oci/file_storage/models/mount_target_summary.py +696 -0
  40. oci/file_storage/models/outbound_connector.py +453 -0
  41. oci/file_storage/models/outbound_connector_summary.py +438 -0
  42. oci/file_storage/models/replication.py +740 -0
  43. oci/file_storage/models/replication_estimate.py +196 -0
  44. oci/file_storage/models/replication_summary.py +491 -0
  45. oci/file_storage/models/replication_target.py +679 -0
  46. oci/file_storage/models/replication_target_summary.py +425 -0
  47. oci/file_storage/models/resource_lock.py +185 -0
  48. oci/file_storage/models/schedule_downgrade_shape_mount_target_details.py +78 -0
  49. oci/file_storage/models/snapshot.py +638 -0
  50. oci/file_storage/models/snapshot_schedule.py +487 -0
  51. oci/file_storage/models/snapshot_summary.py +601 -0
  52. oci/file_storage/models/source_details.py +119 -0
  53. oci/file_storage/models/update_export_details.py +111 -0
  54. oci/file_storage/models/update_export_set_details.py +172 -0
  55. oci/file_storage/models/update_file_system_details.py +246 -0
  56. oci/file_storage/models/update_filesystem_snapshot_policy_details.py +236 -0
  57. oci/file_storage/models/update_kerberos_details.py +200 -0
  58. oci/file_storage/models/update_ldap_idmap_details.py +317 -0
  59. oci/file_storage/models/update_mount_target_details.py +286 -0
  60. oci/file_storage/models/update_outbound_connector_details.py +158 -0
  61. oci/file_storage/models/update_replication_details.py +189 -0
  62. oci/file_storage/models/update_snapshot_details.py +156 -0
  63. oci/file_storage/models/upgrade_shape_mount_target_details.py +78 -0
  64. oci/file_storage/models/validate_key_tabs_details.py +103 -0
  65. oci/file_storage/models/validate_key_tabs_response_details.py +103 -0
  66. oci/functions/__init__.py +16 -0
  67. oci/functions/functions_invoke_client.py +267 -0
  68. oci/functions/functions_invoke_client_composite_operations.py +26 -0
  69. oci/functions/functions_management_client.py +2056 -0
  70. oci/functions/functions_management_client_composite_operations.py +326 -0
  71. oci/functions/models/__init__.py +74 -0
  72. oci/functions/models/application.py +628 -0
  73. oci/functions/models/application_summary.py +512 -0
  74. oci/functions/models/application_trace_config.py +103 -0
  75. oci/functions/models/change_application_compartment_details.py +78 -0
  76. oci/functions/models/config_details.py +134 -0
  77. oci/functions/models/constant_provisioned_concurrency_config.py +82 -0
  78. oci/functions/models/create_application_details.py +446 -0
  79. oci/functions/models/create_function_details.py +437 -0
  80. oci/functions/models/function.py +734 -0
  81. oci/functions/models/function_provisioned_concurrency_config.py +109 -0
  82. oci/functions/models/function_source_details.py +101 -0
  83. oci/functions/models/function_summary.py +657 -0
  84. oci/functions/models/function_trace_config.py +72 -0
  85. oci/functions/models/image_policy_config.py +103 -0
  86. oci/functions/models/key_details.py +76 -0
  87. oci/functions/models/none_provisioned_concurrency_config.py +51 -0
  88. oci/functions/models/pbf_listing.py +408 -0
  89. oci/functions/models/pbf_listing_summary.py +386 -0
  90. oci/functions/models/pbf_listing_version.py +467 -0
  91. oci/functions/models/pbf_listing_version_summary.py +446 -0
  92. oci/functions/models/pbf_listing_versions_collection.py +73 -0
  93. oci/functions/models/pbf_listings_collection.py +72 -0
  94. oci/functions/models/policy_details.py +103 -0
  95. oci/functions/models/pre_built_function_source_details.py +88 -0
  96. oci/functions/models/publisher_details.py +72 -0
  97. oci/functions/models/requirement_details.py +106 -0
  98. oci/functions/models/trigger.py +72 -0
  99. oci/functions/models/trigger_summary.py +72 -0
  100. oci/functions/models/triggers_collection.py +72 -0
  101. oci/functions/models/update_application_details.py +290 -0
  102. oci/functions/models/update_function_details.py +346 -0
  103. oci/load_balancer/__init__.py +14 -0
  104. oci/load_balancer/load_balancer_client.py +7641 -0
  105. oci/load_balancer/load_balancer_client_composite_operations.py +1630 -0
  106. oci/load_balancer/models/__init__.py +186 -0
  107. oci/load_balancer/models/action.py +97 -0
  108. oci/load_balancer/models/add_http_request_header_rule.py +134 -0
  109. oci/load_balancer/models/add_http_response_header_rule.py +137 -0
  110. oci/load_balancer/models/allow_rule.py +123 -0
  111. oci/load_balancer/models/backend.py +350 -0
  112. oci/load_balancer/models/backend_details.py +312 -0
  113. oci/load_balancer/models/backend_health.py +143 -0
  114. oci/load_balancer/models/backend_set.py +305 -0
  115. oci/load_balancer/models/backend_set_details.py +262 -0
  116. oci/load_balancer/models/backend_set_health.py +265 -0
  117. oci/load_balancer/models/certificate.py +188 -0
  118. oci/load_balancer/models/certificate_details.py +270 -0
  119. oci/load_balancer/models/change_load_balancer_compartment_details.py +78 -0
  120. oci/load_balancer/models/connection_configuration.py +168 -0
  121. oci/load_balancer/models/control_access_using_http_methods_rule.py +162 -0
  122. oci/load_balancer/models/create_backend_details.py +316 -0
  123. oci/load_balancer/models/create_backend_set_details.py +305 -0
  124. oci/load_balancer/models/create_certificate_details.py +270 -0
  125. oci/load_balancer/models/create_hostname_details.py +121 -0
  126. oci/load_balancer/models/create_listener_details.py +387 -0
  127. oci/load_balancer/models/create_load_balancer_details.py +895 -0
  128. oci/load_balancer/models/create_path_route_set_details.py +111 -0
  129. oci/load_balancer/models/create_routing_policy_details.py +154 -0
  130. oci/load_balancer/models/create_rule_set_details.py +109 -0
  131. oci/load_balancer/models/create_ssl_cipher_suite_details.py +606 -0
  132. oci/load_balancer/models/extend_http_request_header_value_rule.py +181 -0
  133. oci/load_balancer/models/extend_http_response_header_value_rule.py +181 -0
  134. oci/load_balancer/models/forward_to_backend_set.py +86 -0
  135. oci/load_balancer/models/health_check_result.py +219 -0
  136. oci/load_balancer/models/health_checker.py +381 -0
  137. oci/load_balancer/models/health_checker_details.py +376 -0
  138. oci/load_balancer/models/hostname.py +121 -0
  139. oci/load_balancer/models/hostname_details.py +117 -0
  140. oci/load_balancer/models/http_header_rule.py +127 -0
  141. oci/load_balancer/models/ip_address.py +142 -0
  142. oci/load_balancer/models/ip_based_max_connections_rule.py +118 -0
  143. oci/load_balancer/models/ip_max_connections.py +111 -0
  144. oci/load_balancer/models/lb_cookie_session_persistence_configuration_details.py +423 -0
  145. oci/load_balancer/models/listener.py +383 -0
  146. oci/load_balancer/models/listener_details.py +344 -0
  147. oci/load_balancer/models/listener_rule_summary.py +104 -0
  148. oci/load_balancer/models/load_balancer.py +1023 -0
  149. oci/load_balancer/models/load_balancer_health.py +281 -0
  150. oci/load_balancer/models/load_balancer_health_summary.py +167 -0
  151. oci/load_balancer/models/load_balancer_policy.py +80 -0
  152. oci/load_balancer/models/load_balancer_protocol.py +76 -0
  153. oci/load_balancer/models/load_balancer_shape.py +80 -0
  154. oci/load_balancer/models/path_match_condition.py +166 -0
  155. oci/load_balancer/models/path_match_type.py +126 -0
  156. oci/load_balancer/models/path_route.py +156 -0
  157. oci/load_balancer/models/path_route_set.py +112 -0
  158. oci/load_balancer/models/path_route_set_details.py +72 -0
  159. oci/load_balancer/models/redirect_rule.py +173 -0
  160. oci/load_balancer/models/redirect_uri.py +420 -0
  161. oci/load_balancer/models/remove_http_request_header_rule.py +90 -0
  162. oci/load_balancer/models/remove_http_response_header_rule.py +92 -0
  163. oci/load_balancer/models/reserved_ip.py +90 -0
  164. oci/load_balancer/models/routing_policy.py +152 -0
  165. oci/load_balancer/models/routing_policy_details.py +73 -0
  166. oci/load_balancer/models/routing_rule.py +135 -0
  167. oci/load_balancer/models/rule.py +177 -0
  168. oci/load_balancer/models/rule_condition.py +121 -0
  169. oci/load_balancer/models/rule_set.py +113 -0
  170. oci/load_balancer/models/rule_set_details.py +72 -0
  171. oci/load_balancer/models/session_persistence_configuration_details.py +136 -0
  172. oci/load_balancer/models/shape_details.py +121 -0
  173. oci/load_balancer/models/source_ip_address_condition.py +90 -0
  174. oci/load_balancer/models/source_vcn_id_condition.py +98 -0
  175. oci/load_balancer/models/source_vcn_ip_address_condition.py +97 -0
  176. oci/load_balancer/models/ssl_cipher_suite.py +606 -0
  177. oci/load_balancer/models/ssl_cipher_suite_details.py +606 -0
  178. oci/load_balancer/models/ssl_configuration.py +478 -0
  179. oci/load_balancer/models/ssl_configuration_details.py +476 -0
  180. oci/load_balancer/models/update_backend_details.py +242 -0
  181. oci/load_balancer/models/update_backend_set_details.py +264 -0
  182. oci/load_balancer/models/update_health_checker_details.py +374 -0
  183. oci/load_balancer/models/update_hostname_details.py +86 -0
  184. oci/load_balancer/models/update_listener_details.py +344 -0
  185. oci/load_balancer/models/update_load_balancer_details.py +356 -0
  186. oci/load_balancer/models/update_load_balancer_shape_details.py +127 -0
  187. oci/load_balancer/models/update_network_security_groups_details.py +99 -0
  188. oci/load_balancer/models/update_path_route_set_details.py +72 -0
  189. oci/load_balancer/models/update_routing_policy_details.py +115 -0
  190. oci/load_balancer/models/update_rule_set_details.py +72 -0
  191. oci/load_balancer/models/update_ssl_cipher_suite_details.py +300 -0
  192. oci/load_balancer/models/work_request.py +385 -0
  193. oci/load_balancer/models/work_request_error.py +115 -0
  194. oci/network_load_balancer/__init__.py +14 -0
  195. oci/network_load_balancer/models/__init__.py +106 -0
  196. oci/network_load_balancer/models/backend.py +338 -0
  197. oci/network_load_balancer/models/backend_collection.py +72 -0
  198. oci/network_load_balancer/models/backend_details.py +337 -0
  199. oci/network_load_balancer/models/backend_health.py +145 -0
  200. oci/network_load_balancer/models/backend_set.py +347 -0
  201. oci/network_load_balancer/models/backend_set_collection.py +72 -0
  202. oci/network_load_balancer/models/backend_set_details.py +306 -0
  203. oci/network_load_balancer/models/backend_set_health.py +265 -0
  204. oci/network_load_balancer/models/backend_set_summary.py +347 -0
  205. oci/network_load_balancer/models/backend_summary.py +338 -0
  206. oci/network_load_balancer/models/change_network_load_balancer_compartment_details.py +78 -0
  207. oci/network_load_balancer/models/create_backend_details.py +336 -0
  208. oci/network_load_balancer/models/create_backend_set_details.py +347 -0
  209. oci/network_load_balancer/models/create_listener_details.py +396 -0
  210. oci/network_load_balancer/models/create_network_load_balancer_details.py +694 -0
  211. oci/network_load_balancer/models/dns_health_checker_details.py +264 -0
  212. oci/network_load_balancer/models/health_check_result.py +139 -0
  213. oci/network_load_balancer/models/health_checker.py +449 -0
  214. oci/network_load_balancer/models/health_checker_details.py +449 -0
  215. oci/network_load_balancer/models/ip_address.py +189 -0
  216. oci/network_load_balancer/models/listener.py +396 -0
  217. oci/network_load_balancer/models/listener_collection.py +72 -0
  218. oci/network_load_balancer/models/listener_details.py +396 -0
  219. oci/network_load_balancer/models/listener_summary.py +396 -0
  220. oci/network_load_balancer/models/network_load_balancer.py +847 -0
  221. oci/network_load_balancer/models/network_load_balancer_collection.py +72 -0
  222. oci/network_load_balancer/models/network_load_balancer_health.py +281 -0
  223. oci/network_load_balancer/models/network_load_balancer_health_collection.py +72 -0
  224. oci/network_load_balancer/models/network_load_balancer_health_summary.py +167 -0
  225. oci/network_load_balancer/models/network_load_balancer_summary.py +833 -0
  226. oci/network_load_balancer/models/network_load_balancers_policy_collection.py +72 -0
  227. oci/network_load_balancer/models/network_load_balancers_protocol_collection.py +73 -0
  228. oci/network_load_balancer/models/reserved_ip.py +90 -0
  229. oci/network_load_balancer/models/update_backend_details.py +199 -0
  230. oci/network_load_balancer/models/update_backend_set_details.py +288 -0
  231. oci/network_load_balancer/models/update_health_checker_details.py +444 -0
  232. oci/network_load_balancer/models/update_listener_details.py +361 -0
  233. oci/network_load_balancer/models/update_network_load_balancer_details.py +386 -0
  234. oci/network_load_balancer/models/update_network_security_groups_details.py +99 -0
  235. oci/network_load_balancer/models/work_request.py +454 -0
  236. oci/network_load_balancer/models/work_request_collection.py +72 -0
  237. oci/network_load_balancer/models/work_request_error.py +136 -0
  238. oci/network_load_balancer/models/work_request_error_collection.py +72 -0
  239. oci/network_load_balancer/models/work_request_log_entry.py +103 -0
  240. oci/network_load_balancer/models/work_request_log_entry_collection.py +72 -0
  241. oci/network_load_balancer/models/work_request_resource.py +199 -0
  242. oci/network_load_balancer/models/work_request_summary.py +454 -0
  243. oci/network_load_balancer/network_load_balancer_client.py +4392 -0
  244. oci/network_load_balancer/network_load_balancer_client_composite_operations.py +757 -0
  245. oci/version.py +1 -1
  246. {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.2.dist-info}/LICENSE.txt +0 -0
  247. {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.2.dist-info}/WHEEL +0 -0
  248. {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,2068 @@
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: 20171215
6
+
7
+ import oci # noqa: F401
8
+ from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401
9
+
10
+
11
+ class FileStorageClientCompositeOperations(object):
12
+ """
13
+ This class provides a wrapper around :py:class:`~oci.file_storage.FileStorageClient` 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 FileStorageClientCompositeOperations object
22
+
23
+ :param FileStorageClient client:
24
+ The service client which will be wrapped by this object
25
+ """
26
+ self.client = client
27
+
28
+ def add_export_lock_and_wait_for_state(self, export_id, add_export_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
29
+ """
30
+ Calls :py:func:`~oci.file_storage.FileStorageClient.add_export_lock` and waits for the :py:class:`~oci.file_storage.models.Export` acted upon
31
+ to enter the given state(s).
32
+
33
+ :param str export_id: (required)
34
+ The `OCID`__ of the export.
35
+
36
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
37
+
38
+ :param oci.file_storage.models.ResourceLock add_export_lock_details: (required)
39
+ The details to be updated for the AddLock.
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.file_storage.models.Export.lifecycle_state`
43
+
44
+ :param dict operation_kwargs:
45
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.add_export_lock`
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.add_export_lock(export_id, add_export_lock_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
+ export_id = operation_result.data.id
56
+
57
+ try:
58
+ waiter_result = oci.wait_until(
59
+ self.client,
60
+ self.client.get_export(export_id), # noqa: F821
61
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
62
+ **waiter_kwargs
63
+ )
64
+ result_to_return = waiter_result
65
+
66
+ return result_to_return
67
+ except (NameError, TypeError) as e:
68
+ if not e.args:
69
+ e.args = ('',)
70
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
71
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
72
+ except Exception as e:
73
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
74
+
75
+ def add_file_system_lock_and_wait_for_state(self, file_system_id, add_file_system_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
76
+ """
77
+ Calls :py:func:`~oci.file_storage.FileStorageClient.add_file_system_lock` and waits for the :py:class:`~oci.file_storage.models.FileSystem` acted upon
78
+ to enter the given state(s).
79
+
80
+ :param str file_system_id: (required)
81
+ The `OCID`__ of the file system.
82
+
83
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
84
+
85
+ :param oci.file_storage.models.ResourceLock add_file_system_lock_details: (required)
86
+ The details to be updated for the AddLock.
87
+
88
+ :param list[str] wait_for_states:
89
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.FileSystem.lifecycle_state`
90
+
91
+ :param dict operation_kwargs:
92
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.add_file_system_lock`
93
+
94
+ :param dict waiter_kwargs:
95
+ 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``
96
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
97
+ """
98
+ operation_result = self.client.add_file_system_lock(file_system_id, add_file_system_lock_details, **operation_kwargs)
99
+ if not wait_for_states:
100
+ return operation_result
101
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
102
+ file_system_id = operation_result.data.id
103
+
104
+ try:
105
+ waiter_result = oci.wait_until(
106
+ self.client,
107
+ self.client.get_file_system(file_system_id), # noqa: F821
108
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
109
+ **waiter_kwargs
110
+ )
111
+ result_to_return = waiter_result
112
+
113
+ return result_to_return
114
+ except (NameError, TypeError) as e:
115
+ if not e.args:
116
+ e.args = ('',)
117
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
118
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
119
+ except Exception as e:
120
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
121
+
122
+ def add_filesystem_snapshot_policy_lock_and_wait_for_state(self, filesystem_snapshot_policy_id, add_filesystem_snapshot_policy_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
123
+ """
124
+ Calls :py:func:`~oci.file_storage.FileStorageClient.add_filesystem_snapshot_policy_lock` and waits for the :py:class:`~oci.file_storage.models.FilesystemSnapshotPolicy` acted upon
125
+ to enter the given state(s).
126
+
127
+ :param str filesystem_snapshot_policy_id: (required)
128
+ The `OCID`__ of the file system snapshot policy.
129
+
130
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
131
+
132
+ :param oci.file_storage.models.ResourceLock add_filesystem_snapshot_policy_lock_details: (required)
133
+ The details to be updated for the AddLock.
134
+
135
+ :param list[str] wait_for_states:
136
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.FilesystemSnapshotPolicy.lifecycle_state`
137
+
138
+ :param dict operation_kwargs:
139
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.add_filesystem_snapshot_policy_lock`
140
+
141
+ :param dict waiter_kwargs:
142
+ 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``
143
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
144
+ """
145
+ operation_result = self.client.add_filesystem_snapshot_policy_lock(filesystem_snapshot_policy_id, add_filesystem_snapshot_policy_lock_details, **operation_kwargs)
146
+ if not wait_for_states:
147
+ return operation_result
148
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
149
+ filesystem_snapshot_policy_id = operation_result.data.id
150
+
151
+ try:
152
+ waiter_result = oci.wait_until(
153
+ self.client,
154
+ self.client.get_filesystem_snapshot_policy(filesystem_snapshot_policy_id), # noqa: F821
155
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
156
+ **waiter_kwargs
157
+ )
158
+ result_to_return = waiter_result
159
+
160
+ return result_to_return
161
+ except (NameError, TypeError) as e:
162
+ if not e.args:
163
+ e.args = ('',)
164
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
165
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
166
+ except Exception as e:
167
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
168
+
169
+ def add_mount_target_lock_and_wait_for_state(self, mount_target_id, add_mount_target_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
170
+ """
171
+ Calls :py:func:`~oci.file_storage.FileStorageClient.add_mount_target_lock` and waits for the :py:class:`~oci.file_storage.models.MountTarget` acted upon
172
+ to enter the given state(s).
173
+
174
+ :param str mount_target_id: (required)
175
+ The `OCID`__ of the mount target.
176
+
177
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
178
+
179
+ :param oci.file_storage.models.ResourceLock add_mount_target_lock_details: (required)
180
+ The details to be updated for the AddLock.
181
+
182
+ :param list[str] wait_for_states:
183
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.MountTarget.lifecycle_state`
184
+
185
+ :param dict operation_kwargs:
186
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.add_mount_target_lock`
187
+
188
+ :param dict waiter_kwargs:
189
+ 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``
190
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
191
+ """
192
+ operation_result = self.client.add_mount_target_lock(mount_target_id, add_mount_target_lock_details, **operation_kwargs)
193
+ if not wait_for_states:
194
+ return operation_result
195
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
196
+ mount_target_id = operation_result.data.id
197
+
198
+ try:
199
+ waiter_result = oci.wait_until(
200
+ self.client,
201
+ self.client.get_mount_target(mount_target_id), # noqa: F821
202
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
203
+ **waiter_kwargs
204
+ )
205
+ result_to_return = waiter_result
206
+
207
+ return result_to_return
208
+ except (NameError, TypeError) as e:
209
+ if not e.args:
210
+ e.args = ('',)
211
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
212
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
213
+ except Exception as e:
214
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
215
+
216
+ def add_outbound_connector_lock_and_wait_for_state(self, outbound_connector_id, add_outbound_connector_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
217
+ """
218
+ Calls :py:func:`~oci.file_storage.FileStorageClient.add_outbound_connector_lock` and waits for the :py:class:`~oci.file_storage.models.OutboundConnector` acted upon
219
+ to enter the given state(s).
220
+
221
+ :param str outbound_connector_id: (required)
222
+ The `OCID`__ of the outbound connector.
223
+
224
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
225
+
226
+ :param oci.file_storage.models.ResourceLock add_outbound_connector_lock_details: (required)
227
+ The details to be updated for the AddLock.
228
+
229
+ :param list[str] wait_for_states:
230
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.OutboundConnector.lifecycle_state`
231
+
232
+ :param dict operation_kwargs:
233
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.add_outbound_connector_lock`
234
+
235
+ :param dict waiter_kwargs:
236
+ 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``
237
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
238
+ """
239
+ operation_result = self.client.add_outbound_connector_lock(outbound_connector_id, add_outbound_connector_lock_details, **operation_kwargs)
240
+ if not wait_for_states:
241
+ return operation_result
242
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
243
+ outbound_connector_id = operation_result.data.id
244
+
245
+ try:
246
+ waiter_result = oci.wait_until(
247
+ self.client,
248
+ self.client.get_outbound_connector(outbound_connector_id), # noqa: F821
249
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
250
+ **waiter_kwargs
251
+ )
252
+ result_to_return = waiter_result
253
+
254
+ return result_to_return
255
+ except (NameError, TypeError) as e:
256
+ if not e.args:
257
+ e.args = ('',)
258
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
259
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
260
+ except Exception as e:
261
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
262
+
263
+ def add_replication_lock_and_wait_for_state(self, replication_id, add_replication_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
264
+ """
265
+ Calls :py:func:`~oci.file_storage.FileStorageClient.add_replication_lock` and waits for the :py:class:`~oci.file_storage.models.Replication` acted upon
266
+ to enter the given state(s).
267
+
268
+ :param str replication_id: (required)
269
+ The `OCID`__ of the replication.
270
+
271
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
272
+
273
+ :param oci.file_storage.models.ResourceLock add_replication_lock_details: (required)
274
+ The details to be updated for the AddLock.
275
+
276
+ :param list[str] wait_for_states:
277
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.Replication.lifecycle_state`
278
+
279
+ :param dict operation_kwargs:
280
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.add_replication_lock`
281
+
282
+ :param dict waiter_kwargs:
283
+ 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``
284
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
285
+ """
286
+ operation_result = self.client.add_replication_lock(replication_id, add_replication_lock_details, **operation_kwargs)
287
+ if not wait_for_states:
288
+ return operation_result
289
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
290
+ replication_id = operation_result.data.id
291
+
292
+ try:
293
+ waiter_result = oci.wait_until(
294
+ self.client,
295
+ self.client.get_replication(replication_id), # noqa: F821
296
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
297
+ **waiter_kwargs
298
+ )
299
+ result_to_return = waiter_result
300
+
301
+ return result_to_return
302
+ except (NameError, TypeError) as e:
303
+ if not e.args:
304
+ e.args = ('',)
305
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
306
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
307
+ except Exception as e:
308
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
309
+
310
+ def add_snapshot_lock_and_wait_for_state(self, snapshot_id, add_snapshot_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
311
+ """
312
+ Calls :py:func:`~oci.file_storage.FileStorageClient.add_snapshot_lock` and waits for the :py:class:`~oci.file_storage.models.Snapshot` acted upon
313
+ to enter the given state(s).
314
+
315
+ :param str snapshot_id: (required)
316
+ The `OCID`__ of the snapshot.
317
+
318
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
319
+
320
+ :param oci.file_storage.models.ResourceLock add_snapshot_lock_details: (required)
321
+ The details to be updated for the AddLock.
322
+
323
+ :param list[str] wait_for_states:
324
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.Snapshot.lifecycle_state`
325
+
326
+ :param dict operation_kwargs:
327
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.add_snapshot_lock`
328
+
329
+ :param dict waiter_kwargs:
330
+ 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``
331
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
332
+ """
333
+ operation_result = self.client.add_snapshot_lock(snapshot_id, add_snapshot_lock_details, **operation_kwargs)
334
+ if not wait_for_states:
335
+ return operation_result
336
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
337
+ snapshot_id = operation_result.data.id
338
+
339
+ try:
340
+ waiter_result = oci.wait_until(
341
+ self.client,
342
+ self.client.get_snapshot(snapshot_id), # noqa: F821
343
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
344
+ **waiter_kwargs
345
+ )
346
+ result_to_return = waiter_result
347
+
348
+ return result_to_return
349
+ except (NameError, TypeError) as e:
350
+ if not e.args:
351
+ e.args = ('',)
352
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
353
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
354
+ except Exception as e:
355
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
356
+
357
+ def cancel_downgrade_shape_mount_target_and_wait_for_state(self, mount_target_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
358
+ """
359
+ Calls :py:func:`~oci.file_storage.FileStorageClient.cancel_downgrade_shape_mount_target` and waits for the :py:class:`~oci.file_storage.models.MountTarget` acted upon
360
+ to enter the given state(s).
361
+
362
+ :param str mount_target_id: (required)
363
+ The `OCID`__ of the mount target.
364
+
365
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
366
+
367
+ :param list[str] wait_for_states:
368
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.MountTarget.lifecycle_state`
369
+
370
+ :param dict operation_kwargs:
371
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.cancel_downgrade_shape_mount_target`
372
+
373
+ :param dict waiter_kwargs:
374
+ 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``
375
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
376
+ """
377
+ operation_result = self.client.cancel_downgrade_shape_mount_target(mount_target_id, **operation_kwargs)
378
+ if not wait_for_states:
379
+ return operation_result
380
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
381
+ mount_target_id = operation_result.data.id
382
+
383
+ try:
384
+ waiter_result = oci.wait_until(
385
+ self.client,
386
+ self.client.get_mount_target(mount_target_id), # noqa: F821
387
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
388
+ **waiter_kwargs
389
+ )
390
+ result_to_return = waiter_result
391
+
392
+ return result_to_return
393
+ except (NameError, TypeError) as e:
394
+ if not e.args:
395
+ e.args = ('',)
396
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
397
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
398
+ except Exception as e:
399
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
400
+
401
+ def create_export_and_wait_for_state(self, create_export_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
402
+ """
403
+ Calls :py:func:`~oci.file_storage.FileStorageClient.create_export` and waits for the :py:class:`~oci.file_storage.models.Export` acted upon
404
+ to enter the given state(s).
405
+
406
+ :param oci.file_storage.models.CreateExportDetails create_export_details: (required)
407
+ Details for creating a new export.
408
+
409
+ :param list[str] wait_for_states:
410
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.Export.lifecycle_state`
411
+
412
+ :param dict operation_kwargs:
413
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.create_export`
414
+
415
+ :param dict waiter_kwargs:
416
+ 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``
417
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
418
+ """
419
+ operation_result = self.client.create_export(create_export_details, **operation_kwargs)
420
+ if not wait_for_states:
421
+ return operation_result
422
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
423
+ export_id = operation_result.data.id
424
+
425
+ try:
426
+ waiter_result = oci.wait_until(
427
+ self.client,
428
+ self.client.get_export(export_id), # noqa: F821
429
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
430
+ **waiter_kwargs
431
+ )
432
+ result_to_return = waiter_result
433
+
434
+ return result_to_return
435
+ except (NameError, TypeError) as e:
436
+ if not e.args:
437
+ e.args = ('',)
438
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
439
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
440
+ except Exception as e:
441
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
442
+
443
+ def create_file_system_and_wait_for_state(self, create_file_system_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
444
+ """
445
+ Calls :py:func:`~oci.file_storage.FileStorageClient.create_file_system` and waits for the :py:class:`~oci.file_storage.models.FileSystem` acted upon
446
+ to enter the given state(s).
447
+
448
+ :param oci.file_storage.models.CreateFileSystemDetails create_file_system_details: (required)
449
+ Details for creating a new file system.
450
+
451
+ :param list[str] wait_for_states:
452
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.FileSystem.lifecycle_state`
453
+
454
+ :param dict operation_kwargs:
455
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.create_file_system`
456
+
457
+ :param dict waiter_kwargs:
458
+ 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``
459
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
460
+ """
461
+ operation_result = self.client.create_file_system(create_file_system_details, **operation_kwargs)
462
+ if not wait_for_states:
463
+ return operation_result
464
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
465
+ file_system_id = operation_result.data.id
466
+
467
+ try:
468
+ waiter_result = oci.wait_until(
469
+ self.client,
470
+ self.client.get_file_system(file_system_id), # noqa: F821
471
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
472
+ **waiter_kwargs
473
+ )
474
+ result_to_return = waiter_result
475
+
476
+ return result_to_return
477
+ except (NameError, TypeError) as e:
478
+ if not e.args:
479
+ e.args = ('',)
480
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
481
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
482
+ except Exception as e:
483
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
484
+
485
+ def create_filesystem_snapshot_policy_and_wait_for_state(self, create_filesystem_snapshot_policy_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
486
+ """
487
+ Calls :py:func:`~oci.file_storage.FileStorageClient.create_filesystem_snapshot_policy` and waits for the :py:class:`~oci.file_storage.models.FilesystemSnapshotPolicy` acted upon
488
+ to enter the given state(s).
489
+
490
+ :param oci.file_storage.models.CreateFilesystemSnapshotPolicyDetails create_filesystem_snapshot_policy_details: (required)
491
+ Details for creating a new file system snapshot policy.
492
+
493
+ :param list[str] wait_for_states:
494
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.FilesystemSnapshotPolicy.lifecycle_state`
495
+
496
+ :param dict operation_kwargs:
497
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.create_filesystem_snapshot_policy`
498
+
499
+ :param dict waiter_kwargs:
500
+ 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``
501
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
502
+ """
503
+ operation_result = self.client.create_filesystem_snapshot_policy(create_filesystem_snapshot_policy_details, **operation_kwargs)
504
+ if not wait_for_states:
505
+ return operation_result
506
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
507
+ filesystem_snapshot_policy_id = operation_result.data.id
508
+
509
+ try:
510
+ waiter_result = oci.wait_until(
511
+ self.client,
512
+ self.client.get_filesystem_snapshot_policy(filesystem_snapshot_policy_id), # noqa: F821
513
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
514
+ **waiter_kwargs
515
+ )
516
+ result_to_return = waiter_result
517
+
518
+ return result_to_return
519
+ except (NameError, TypeError) as e:
520
+ if not e.args:
521
+ e.args = ('',)
522
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
523
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
524
+ except Exception as e:
525
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
526
+
527
+ def create_mount_target_and_wait_for_state(self, create_mount_target_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
528
+ """
529
+ Calls :py:func:`~oci.file_storage.FileStorageClient.create_mount_target` and waits for the :py:class:`~oci.file_storage.models.MountTarget` acted upon
530
+ to enter the given state(s).
531
+
532
+ :param oci.file_storage.models.CreateMountTargetDetails create_mount_target_details: (required)
533
+ Details for creating a new mount target.
534
+
535
+ :param list[str] wait_for_states:
536
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.MountTarget.lifecycle_state`
537
+
538
+ :param dict operation_kwargs:
539
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.create_mount_target`
540
+
541
+ :param dict waiter_kwargs:
542
+ 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``
543
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
544
+ """
545
+ operation_result = self.client.create_mount_target(create_mount_target_details, **operation_kwargs)
546
+ if not wait_for_states:
547
+ return operation_result
548
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
549
+ mount_target_id = operation_result.data.id
550
+
551
+ try:
552
+ waiter_result = oci.wait_until(
553
+ self.client,
554
+ self.client.get_mount_target(mount_target_id), # noqa: F821
555
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
556
+ **waiter_kwargs
557
+ )
558
+ result_to_return = waiter_result
559
+
560
+ return result_to_return
561
+ except (NameError, TypeError) as e:
562
+ if not e.args:
563
+ e.args = ('',)
564
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
565
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
566
+ except Exception as e:
567
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
568
+
569
+ def create_outbound_connector_and_wait_for_state(self, create_outbound_connector_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
570
+ """
571
+ Calls :py:func:`~oci.file_storage.FileStorageClient.create_outbound_connector` and waits for the :py:class:`~oci.file_storage.models.OutboundConnector` acted upon
572
+ to enter the given state(s).
573
+
574
+ :param oci.file_storage.models.CreateOutboundConnectorDetails create_outbound_connector_details: (required)
575
+ Details for creating a new outbound connector.
576
+
577
+ :param list[str] wait_for_states:
578
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.OutboundConnector.lifecycle_state`
579
+
580
+ :param dict operation_kwargs:
581
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.create_outbound_connector`
582
+
583
+ :param dict waiter_kwargs:
584
+ 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``
585
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
586
+ """
587
+ operation_result = self.client.create_outbound_connector(create_outbound_connector_details, **operation_kwargs)
588
+ if not wait_for_states:
589
+ return operation_result
590
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
591
+ outbound_connector_id = operation_result.data.id
592
+
593
+ try:
594
+ waiter_result = oci.wait_until(
595
+ self.client,
596
+ self.client.get_outbound_connector(outbound_connector_id), # noqa: F821
597
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
598
+ **waiter_kwargs
599
+ )
600
+ result_to_return = waiter_result
601
+
602
+ return result_to_return
603
+ except (NameError, TypeError) as e:
604
+ if not e.args:
605
+ e.args = ('',)
606
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
607
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
608
+ except Exception as e:
609
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
610
+
611
+ def create_replication_and_wait_for_state(self, create_replication_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
612
+ """
613
+ Calls :py:func:`~oci.file_storage.FileStorageClient.create_replication` and waits for the :py:class:`~oci.file_storage.models.Replication` acted upon
614
+ to enter the given state(s).
615
+
616
+ :param oci.file_storage.models.CreateReplicationDetails create_replication_details: (required)
617
+ Details for creating a new replication.
618
+
619
+ :param list[str] wait_for_states:
620
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.Replication.lifecycle_state`
621
+
622
+ :param dict operation_kwargs:
623
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.create_replication`
624
+
625
+ :param dict waiter_kwargs:
626
+ 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``
627
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
628
+ """
629
+ operation_result = self.client.create_replication(create_replication_details, **operation_kwargs)
630
+ if not wait_for_states:
631
+ return operation_result
632
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
633
+ replication_id = operation_result.data.id
634
+
635
+ try:
636
+ waiter_result = oci.wait_until(
637
+ self.client,
638
+ self.client.get_replication(replication_id), # noqa: F821
639
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
640
+ **waiter_kwargs
641
+ )
642
+ result_to_return = waiter_result
643
+
644
+ return result_to_return
645
+ except (NameError, TypeError) as e:
646
+ if not e.args:
647
+ e.args = ('',)
648
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
649
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
650
+ except Exception as e:
651
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
652
+
653
+ def create_snapshot_and_wait_for_state(self, create_snapshot_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
654
+ """
655
+ Calls :py:func:`~oci.file_storage.FileStorageClient.create_snapshot` and waits for the :py:class:`~oci.file_storage.models.Snapshot` acted upon
656
+ to enter the given state(s).
657
+
658
+ :param oci.file_storage.models.CreateSnapshotDetails create_snapshot_details: (required)
659
+ Details for creating a new snapshot.
660
+
661
+ :param list[str] wait_for_states:
662
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.Snapshot.lifecycle_state`
663
+
664
+ :param dict operation_kwargs:
665
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.create_snapshot`
666
+
667
+ :param dict waiter_kwargs:
668
+ 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``
669
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
670
+ """
671
+ operation_result = self.client.create_snapshot(create_snapshot_details, **operation_kwargs)
672
+ if not wait_for_states:
673
+ return operation_result
674
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
675
+ snapshot_id = operation_result.data.id
676
+
677
+ try:
678
+ waiter_result = oci.wait_until(
679
+ self.client,
680
+ self.client.get_snapshot(snapshot_id), # noqa: F821
681
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
682
+ **waiter_kwargs
683
+ )
684
+ result_to_return = waiter_result
685
+
686
+ return result_to_return
687
+ except (NameError, TypeError) as e:
688
+ if not e.args:
689
+ e.args = ('',)
690
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
691
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
692
+ except Exception as e:
693
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
694
+
695
+ def delete_export_and_wait_for_state(self, export_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
696
+ """
697
+ Calls :py:func:`~oci.file_storage.FileStorageClient.delete_export` and waits for the :py:class:`~oci.file_storage.models.Export` acted upon
698
+ to enter the given state(s).
699
+
700
+ :param str export_id: (required)
701
+ The `OCID`__ of the export.
702
+
703
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
704
+
705
+ :param list[str] wait_for_states:
706
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.Export.lifecycle_state`
707
+
708
+ :param dict operation_kwargs:
709
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.delete_export`
710
+
711
+ :param dict waiter_kwargs:
712
+ 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``
713
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
714
+ """
715
+ initial_get_result = self.client.get_export(export_id)
716
+ operation_result = None
717
+ try:
718
+ operation_result = self.client.delete_export(export_id, **operation_kwargs)
719
+ except oci.exceptions.ServiceError as e:
720
+ if e.status == 404:
721
+ return WAIT_RESOURCE_NOT_FOUND
722
+ else:
723
+ raise e
724
+
725
+ if not wait_for_states:
726
+ return operation_result
727
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
728
+
729
+ try:
730
+ if ("succeed_on_not_found" in waiter_kwargs) and (waiter_kwargs["succeed_on_not_found"] is False):
731
+ self.client.base_client.logger.warning("The waiter kwarg succeed_on_not_found was passed as False for the delete composite operation delete_export, this would result in the operation to fail if the resource is not found! Please, do not pass this kwarg if this was not intended")
732
+ else:
733
+ """
734
+ If the user does not send in this value, we set it to True by default.
735
+ We are doing this because during a delete resource scenario and waiting on its state, the service can
736
+ return a 404 NOT FOUND exception as the resource was deleted and a get on its state would fail
737
+ """
738
+ waiter_kwargs["succeed_on_not_found"] = True
739
+ waiter_result = oci.wait_until(
740
+ self.client,
741
+ initial_get_result, # noqa: F821
742
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
743
+ **waiter_kwargs
744
+ )
745
+ result_to_return = waiter_result
746
+
747
+ return result_to_return
748
+ except (NameError, TypeError) as e:
749
+ if not e.args:
750
+ e.args = ('',)
751
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
752
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
753
+ except Exception as e:
754
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
755
+
756
+ def delete_file_system_and_wait_for_state(self, file_system_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
757
+ """
758
+ Calls :py:func:`~oci.file_storage.FileStorageClient.delete_file_system` and waits for the :py:class:`~oci.file_storage.models.FileSystem` acted upon
759
+ to enter the given state(s).
760
+
761
+ :param str file_system_id: (required)
762
+ The `OCID`__ of the file system.
763
+
764
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
765
+
766
+ :param list[str] wait_for_states:
767
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.FileSystem.lifecycle_state`
768
+
769
+ :param dict operation_kwargs:
770
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.delete_file_system`
771
+
772
+ :param dict waiter_kwargs:
773
+ 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``
774
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
775
+ """
776
+ initial_get_result = self.client.get_file_system(file_system_id)
777
+ operation_result = None
778
+ try:
779
+ operation_result = self.client.delete_file_system(file_system_id, **operation_kwargs)
780
+ except oci.exceptions.ServiceError as e:
781
+ if e.status == 404:
782
+ return WAIT_RESOURCE_NOT_FOUND
783
+ else:
784
+ raise e
785
+
786
+ if not wait_for_states:
787
+ return operation_result
788
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
789
+
790
+ try:
791
+ if ("succeed_on_not_found" in waiter_kwargs) and (waiter_kwargs["succeed_on_not_found"] is False):
792
+ self.client.base_client.logger.warning("The waiter kwarg succeed_on_not_found was passed as False for the delete composite operation delete_file_system, this would result in the operation to fail if the resource is not found! Please, do not pass this kwarg if this was not intended")
793
+ else:
794
+ """
795
+ If the user does not send in this value, we set it to True by default.
796
+ We are doing this because during a delete resource scenario and waiting on its state, the service can
797
+ return a 404 NOT FOUND exception as the resource was deleted and a get on its state would fail
798
+ """
799
+ waiter_kwargs["succeed_on_not_found"] = True
800
+ waiter_result = oci.wait_until(
801
+ self.client,
802
+ initial_get_result, # noqa: F821
803
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
804
+ **waiter_kwargs
805
+ )
806
+ result_to_return = waiter_result
807
+
808
+ return result_to_return
809
+ except (NameError, TypeError) as e:
810
+ if not e.args:
811
+ e.args = ('',)
812
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
813
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
814
+ except Exception as e:
815
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
816
+
817
+ def delete_filesystem_snapshot_policy_and_wait_for_state(self, filesystem_snapshot_policy_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
818
+ """
819
+ Calls :py:func:`~oci.file_storage.FileStorageClient.delete_filesystem_snapshot_policy` and waits for the :py:class:`~oci.file_storage.models.FilesystemSnapshotPolicy` acted upon
820
+ to enter the given state(s).
821
+
822
+ :param str filesystem_snapshot_policy_id: (required)
823
+ The `OCID`__ of the file system snapshot policy.
824
+
825
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
826
+
827
+ :param list[str] wait_for_states:
828
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.FilesystemSnapshotPolicy.lifecycle_state`
829
+
830
+ :param dict operation_kwargs:
831
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.delete_filesystem_snapshot_policy`
832
+
833
+ :param dict waiter_kwargs:
834
+ 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``
835
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
836
+ """
837
+ initial_get_result = self.client.get_filesystem_snapshot_policy(filesystem_snapshot_policy_id)
838
+ operation_result = None
839
+ try:
840
+ operation_result = self.client.delete_filesystem_snapshot_policy(filesystem_snapshot_policy_id, **operation_kwargs)
841
+ except oci.exceptions.ServiceError as e:
842
+ if e.status == 404:
843
+ return WAIT_RESOURCE_NOT_FOUND
844
+ else:
845
+ raise e
846
+
847
+ if not wait_for_states:
848
+ return operation_result
849
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
850
+
851
+ try:
852
+ if ("succeed_on_not_found" in waiter_kwargs) and (waiter_kwargs["succeed_on_not_found"] is False):
853
+ self.client.base_client.logger.warning("The waiter kwarg succeed_on_not_found was passed as False for the delete composite operation delete_filesystem_snapshot_policy, this would result in the operation to fail if the resource is not found! Please, do not pass this kwarg if this was not intended")
854
+ else:
855
+ """
856
+ If the user does not send in this value, we set it to True by default.
857
+ We are doing this because during a delete resource scenario and waiting on its state, the service can
858
+ return a 404 NOT FOUND exception as the resource was deleted and a get on its state would fail
859
+ """
860
+ waiter_kwargs["succeed_on_not_found"] = True
861
+ waiter_result = oci.wait_until(
862
+ self.client,
863
+ initial_get_result, # noqa: F821
864
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
865
+ **waiter_kwargs
866
+ )
867
+ result_to_return = waiter_result
868
+
869
+ return result_to_return
870
+ except (NameError, TypeError) as e:
871
+ if not e.args:
872
+ e.args = ('',)
873
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
874
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
875
+ except Exception as e:
876
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
877
+
878
+ def delete_mount_target_and_wait_for_state(self, mount_target_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
879
+ """
880
+ Calls :py:func:`~oci.file_storage.FileStorageClient.delete_mount_target` and waits for the :py:class:`~oci.file_storage.models.MountTarget` acted upon
881
+ to enter the given state(s).
882
+
883
+ :param str mount_target_id: (required)
884
+ The `OCID`__ of the mount target.
885
+
886
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
887
+
888
+ :param list[str] wait_for_states:
889
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.MountTarget.lifecycle_state`
890
+
891
+ :param dict operation_kwargs:
892
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.delete_mount_target`
893
+
894
+ :param dict waiter_kwargs:
895
+ 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``
896
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
897
+ """
898
+ initial_get_result = self.client.get_mount_target(mount_target_id)
899
+ operation_result = None
900
+ try:
901
+ operation_result = self.client.delete_mount_target(mount_target_id, **operation_kwargs)
902
+ except oci.exceptions.ServiceError as e:
903
+ if e.status == 404:
904
+ return WAIT_RESOURCE_NOT_FOUND
905
+ else:
906
+ raise e
907
+
908
+ if not wait_for_states:
909
+ return operation_result
910
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
911
+
912
+ try:
913
+ if ("succeed_on_not_found" in waiter_kwargs) and (waiter_kwargs["succeed_on_not_found"] is False):
914
+ self.client.base_client.logger.warning("The waiter kwarg succeed_on_not_found was passed as False for the delete composite operation delete_mount_target, this would result in the operation to fail if the resource is not found! Please, do not pass this kwarg if this was not intended")
915
+ else:
916
+ """
917
+ If the user does not send in this value, we set it to True by default.
918
+ We are doing this because during a delete resource scenario and waiting on its state, the service can
919
+ return a 404 NOT FOUND exception as the resource was deleted and a get on its state would fail
920
+ """
921
+ waiter_kwargs["succeed_on_not_found"] = True
922
+ waiter_result = oci.wait_until(
923
+ self.client,
924
+ initial_get_result, # noqa: F821
925
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
926
+ **waiter_kwargs
927
+ )
928
+ result_to_return = waiter_result
929
+
930
+ return result_to_return
931
+ except (NameError, TypeError) as e:
932
+ if not e.args:
933
+ e.args = ('',)
934
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
935
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
936
+ except Exception as e:
937
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
938
+
939
+ def delete_outbound_connector_and_wait_for_state(self, outbound_connector_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
940
+ """
941
+ Calls :py:func:`~oci.file_storage.FileStorageClient.delete_outbound_connector` and waits for the :py:class:`~oci.file_storage.models.OutboundConnector` acted upon
942
+ to enter the given state(s).
943
+
944
+ :param str outbound_connector_id: (required)
945
+ The `OCID`__ of the outbound connector.
946
+
947
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
948
+
949
+ :param list[str] wait_for_states:
950
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.OutboundConnector.lifecycle_state`
951
+
952
+ :param dict operation_kwargs:
953
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.delete_outbound_connector`
954
+
955
+ :param dict waiter_kwargs:
956
+ 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``
957
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
958
+ """
959
+ initial_get_result = self.client.get_outbound_connector(outbound_connector_id)
960
+ operation_result = None
961
+ try:
962
+ operation_result = self.client.delete_outbound_connector(outbound_connector_id, **operation_kwargs)
963
+ except oci.exceptions.ServiceError as e:
964
+ if e.status == 404:
965
+ return WAIT_RESOURCE_NOT_FOUND
966
+ else:
967
+ raise e
968
+
969
+ if not wait_for_states:
970
+ return operation_result
971
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
972
+
973
+ try:
974
+ if ("succeed_on_not_found" in waiter_kwargs) and (waiter_kwargs["succeed_on_not_found"] is False):
975
+ self.client.base_client.logger.warning("The waiter kwarg succeed_on_not_found was passed as False for the delete composite operation delete_outbound_connector, this would result in the operation to fail if the resource is not found! Please, do not pass this kwarg if this was not intended")
976
+ else:
977
+ """
978
+ If the user does not send in this value, we set it to True by default.
979
+ We are doing this because during a delete resource scenario and waiting on its state, the service can
980
+ return a 404 NOT FOUND exception as the resource was deleted and a get on its state would fail
981
+ """
982
+ waiter_kwargs["succeed_on_not_found"] = True
983
+ waiter_result = oci.wait_until(
984
+ self.client,
985
+ initial_get_result, # noqa: F821
986
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
987
+ **waiter_kwargs
988
+ )
989
+ result_to_return = waiter_result
990
+
991
+ return result_to_return
992
+ except (NameError, TypeError) as e:
993
+ if not e.args:
994
+ e.args = ('',)
995
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
996
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
997
+ except Exception as e:
998
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
999
+
1000
+ def delete_replication_and_wait_for_state(self, replication_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1001
+ """
1002
+ Calls :py:func:`~oci.file_storage.FileStorageClient.delete_replication` and waits for the :py:class:`~oci.file_storage.models.Replication` acted upon
1003
+ to enter the given state(s).
1004
+
1005
+ :param str replication_id: (required)
1006
+ The `OCID`__ of the replication.
1007
+
1008
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1009
+
1010
+ :param list[str] wait_for_states:
1011
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.Replication.lifecycle_state`
1012
+
1013
+ :param dict operation_kwargs:
1014
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.delete_replication`
1015
+
1016
+ :param dict waiter_kwargs:
1017
+ 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``
1018
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1019
+ """
1020
+ initial_get_result = self.client.get_replication(replication_id)
1021
+ operation_result = None
1022
+ try:
1023
+ operation_result = self.client.delete_replication(replication_id, **operation_kwargs)
1024
+ except oci.exceptions.ServiceError as e:
1025
+ if e.status == 404:
1026
+ return WAIT_RESOURCE_NOT_FOUND
1027
+ else:
1028
+ raise e
1029
+
1030
+ if not wait_for_states:
1031
+ return operation_result
1032
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1033
+
1034
+ try:
1035
+ if ("succeed_on_not_found" in waiter_kwargs) and (waiter_kwargs["succeed_on_not_found"] is False):
1036
+ self.client.base_client.logger.warning("The waiter kwarg succeed_on_not_found was passed as False for the delete composite operation delete_replication, this would result in the operation to fail if the resource is not found! Please, do not pass this kwarg if this was not intended")
1037
+ else:
1038
+ """
1039
+ If the user does not send in this value, we set it to True by default.
1040
+ We are doing this because during a delete resource scenario and waiting on its state, the service can
1041
+ return a 404 NOT FOUND exception as the resource was deleted and a get on its state would fail
1042
+ """
1043
+ waiter_kwargs["succeed_on_not_found"] = True
1044
+ waiter_result = oci.wait_until(
1045
+ self.client,
1046
+ initial_get_result, # noqa: F821
1047
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1048
+ **waiter_kwargs
1049
+ )
1050
+ result_to_return = waiter_result
1051
+
1052
+ return result_to_return
1053
+ except (NameError, TypeError) as e:
1054
+ if not e.args:
1055
+ e.args = ('',)
1056
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1057
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1058
+ except Exception as e:
1059
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1060
+
1061
+ def delete_replication_target_and_wait_for_state(self, replication_target_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1062
+ """
1063
+ Calls :py:func:`~oci.file_storage.FileStorageClient.delete_replication_target` and waits for the :py:class:`~oci.file_storage.models.ReplicationTarget` acted upon
1064
+ to enter the given state(s).
1065
+
1066
+ :param str replication_target_id: (required)
1067
+ The `OCID`__ of the replication target.
1068
+
1069
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1070
+
1071
+ :param list[str] wait_for_states:
1072
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.ReplicationTarget.lifecycle_state`
1073
+
1074
+ :param dict operation_kwargs:
1075
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.delete_replication_target`
1076
+
1077
+ :param dict waiter_kwargs:
1078
+ 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``
1079
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1080
+ """
1081
+ initial_get_result = self.client.get_replication_target(replication_target_id)
1082
+ operation_result = None
1083
+ try:
1084
+ operation_result = self.client.delete_replication_target(replication_target_id, **operation_kwargs)
1085
+ except oci.exceptions.ServiceError as e:
1086
+ if e.status == 404:
1087
+ return WAIT_RESOURCE_NOT_FOUND
1088
+ else:
1089
+ raise e
1090
+
1091
+ if not wait_for_states:
1092
+ return operation_result
1093
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1094
+
1095
+ try:
1096
+ if ("succeed_on_not_found" in waiter_kwargs) and (waiter_kwargs["succeed_on_not_found"] is False):
1097
+ self.client.base_client.logger.warning("The waiter kwarg succeed_on_not_found was passed as False for the delete composite operation delete_replication_target, this would result in the operation to fail if the resource is not found! Please, do not pass this kwarg if this was not intended")
1098
+ else:
1099
+ """
1100
+ If the user does not send in this value, we set it to True by default.
1101
+ We are doing this because during a delete resource scenario and waiting on its state, the service can
1102
+ return a 404 NOT FOUND exception as the resource was deleted and a get on its state would fail
1103
+ """
1104
+ waiter_kwargs["succeed_on_not_found"] = True
1105
+ waiter_result = oci.wait_until(
1106
+ self.client,
1107
+ initial_get_result, # noqa: F821
1108
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1109
+ **waiter_kwargs
1110
+ )
1111
+ result_to_return = waiter_result
1112
+
1113
+ return result_to_return
1114
+ except (NameError, TypeError) as e:
1115
+ if not e.args:
1116
+ e.args = ('',)
1117
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1118
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1119
+ except Exception as e:
1120
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1121
+
1122
+ def delete_snapshot_and_wait_for_state(self, snapshot_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1123
+ """
1124
+ Calls :py:func:`~oci.file_storage.FileStorageClient.delete_snapshot` and waits for the :py:class:`~oci.file_storage.models.Snapshot` acted upon
1125
+ to enter the given state(s).
1126
+
1127
+ :param str snapshot_id: (required)
1128
+ The `OCID`__ of the snapshot.
1129
+
1130
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1131
+
1132
+ :param list[str] wait_for_states:
1133
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.Snapshot.lifecycle_state`
1134
+
1135
+ :param dict operation_kwargs:
1136
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.delete_snapshot`
1137
+
1138
+ :param dict waiter_kwargs:
1139
+ 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``
1140
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1141
+ """
1142
+ initial_get_result = self.client.get_snapshot(snapshot_id)
1143
+ operation_result = None
1144
+ try:
1145
+ operation_result = self.client.delete_snapshot(snapshot_id, **operation_kwargs)
1146
+ except oci.exceptions.ServiceError as e:
1147
+ if e.status == 404:
1148
+ return WAIT_RESOURCE_NOT_FOUND
1149
+ else:
1150
+ raise e
1151
+
1152
+ if not wait_for_states:
1153
+ return operation_result
1154
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1155
+
1156
+ try:
1157
+ if ("succeed_on_not_found" in waiter_kwargs) and (waiter_kwargs["succeed_on_not_found"] is False):
1158
+ self.client.base_client.logger.warning("The waiter kwarg succeed_on_not_found was passed as False for the delete composite operation delete_snapshot, this would result in the operation to fail if the resource is not found! Please, do not pass this kwarg if this was not intended")
1159
+ else:
1160
+ """
1161
+ If the user does not send in this value, we set it to True by default.
1162
+ We are doing this because during a delete resource scenario and waiting on its state, the service can
1163
+ return a 404 NOT FOUND exception as the resource was deleted and a get on its state would fail
1164
+ """
1165
+ waiter_kwargs["succeed_on_not_found"] = True
1166
+ waiter_result = oci.wait_until(
1167
+ self.client,
1168
+ initial_get_result, # noqa: F821
1169
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1170
+ **waiter_kwargs
1171
+ )
1172
+ result_to_return = waiter_result
1173
+
1174
+ return result_to_return
1175
+ except (NameError, TypeError) as e:
1176
+ if not e.args:
1177
+ e.args = ('',)
1178
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1179
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1180
+ except Exception as e:
1181
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1182
+
1183
+ def pause_filesystem_snapshot_policy_and_wait_for_state(self, filesystem_snapshot_policy_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1184
+ """
1185
+ Calls :py:func:`~oci.file_storage.FileStorageClient.pause_filesystem_snapshot_policy` and waits for the :py:class:`~oci.file_storage.models.FilesystemSnapshotPolicy` acted upon
1186
+ to enter the given state(s).
1187
+
1188
+ :param str filesystem_snapshot_policy_id: (required)
1189
+ The `OCID`__ of the file system snapshot policy.
1190
+
1191
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1192
+
1193
+ :param list[str] wait_for_states:
1194
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.FilesystemSnapshotPolicy.lifecycle_state`
1195
+
1196
+ :param dict operation_kwargs:
1197
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.pause_filesystem_snapshot_policy`
1198
+
1199
+ :param dict waiter_kwargs:
1200
+ 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``
1201
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1202
+ """
1203
+ operation_result = self.client.pause_filesystem_snapshot_policy(filesystem_snapshot_policy_id, **operation_kwargs)
1204
+ if not wait_for_states:
1205
+ return operation_result
1206
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1207
+ filesystem_snapshot_policy_id = operation_result.data.id
1208
+
1209
+ try:
1210
+ waiter_result = oci.wait_until(
1211
+ self.client,
1212
+ self.client.get_filesystem_snapshot_policy(filesystem_snapshot_policy_id), # noqa: F821
1213
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1214
+ **waiter_kwargs
1215
+ )
1216
+ result_to_return = waiter_result
1217
+
1218
+ return result_to_return
1219
+ except (NameError, TypeError) as e:
1220
+ if not e.args:
1221
+ e.args = ('',)
1222
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1223
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1224
+ except Exception as e:
1225
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1226
+
1227
+ def remove_export_lock_and_wait_for_state(self, export_id, remove_export_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1228
+ """
1229
+ Calls :py:func:`~oci.file_storage.FileStorageClient.remove_export_lock` and waits for the :py:class:`~oci.file_storage.models.Export` acted upon
1230
+ to enter the given state(s).
1231
+
1232
+ :param str export_id: (required)
1233
+ The `OCID`__ of the export.
1234
+
1235
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1236
+
1237
+ :param oci.file_storage.models.ResourceLock remove_export_lock_details: (required)
1238
+ The details to be updated for the RemoveLock.
1239
+
1240
+ :param list[str] wait_for_states:
1241
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.Export.lifecycle_state`
1242
+
1243
+ :param dict operation_kwargs:
1244
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.remove_export_lock`
1245
+
1246
+ :param dict waiter_kwargs:
1247
+ 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``
1248
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1249
+ """
1250
+ operation_result = self.client.remove_export_lock(export_id, remove_export_lock_details, **operation_kwargs)
1251
+ if not wait_for_states:
1252
+ return operation_result
1253
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1254
+ export_id = operation_result.data.id
1255
+
1256
+ try:
1257
+ waiter_result = oci.wait_until(
1258
+ self.client,
1259
+ self.client.get_export(export_id), # noqa: F821
1260
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1261
+ **waiter_kwargs
1262
+ )
1263
+ result_to_return = waiter_result
1264
+
1265
+ return result_to_return
1266
+ except (NameError, TypeError) as e:
1267
+ if not e.args:
1268
+ e.args = ('',)
1269
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1270
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1271
+ except Exception as e:
1272
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1273
+
1274
+ def remove_file_system_lock_and_wait_for_state(self, file_system_id, remove_file_system_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1275
+ """
1276
+ Calls :py:func:`~oci.file_storage.FileStorageClient.remove_file_system_lock` and waits for the :py:class:`~oci.file_storage.models.FileSystem` acted upon
1277
+ to enter the given state(s).
1278
+
1279
+ :param str file_system_id: (required)
1280
+ The `OCID`__ of the file system.
1281
+
1282
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1283
+
1284
+ :param oci.file_storage.models.ResourceLock remove_file_system_lock_details: (required)
1285
+ The details to be updated for the RemoveLock.
1286
+
1287
+ :param list[str] wait_for_states:
1288
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.FileSystem.lifecycle_state`
1289
+
1290
+ :param dict operation_kwargs:
1291
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.remove_file_system_lock`
1292
+
1293
+ :param dict waiter_kwargs:
1294
+ 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``
1295
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1296
+ """
1297
+ operation_result = self.client.remove_file_system_lock(file_system_id, remove_file_system_lock_details, **operation_kwargs)
1298
+ if not wait_for_states:
1299
+ return operation_result
1300
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1301
+ file_system_id = operation_result.data.id
1302
+
1303
+ try:
1304
+ waiter_result = oci.wait_until(
1305
+ self.client,
1306
+ self.client.get_file_system(file_system_id), # noqa: F821
1307
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1308
+ **waiter_kwargs
1309
+ )
1310
+ result_to_return = waiter_result
1311
+
1312
+ return result_to_return
1313
+ except (NameError, TypeError) as e:
1314
+ if not e.args:
1315
+ e.args = ('',)
1316
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1317
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1318
+ except Exception as e:
1319
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1320
+
1321
+ def remove_filesystem_snapshot_policy_lock_and_wait_for_state(self, filesystem_snapshot_policy_id, remove_filesystem_snapshot_policy_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1322
+ """
1323
+ Calls :py:func:`~oci.file_storage.FileStorageClient.remove_filesystem_snapshot_policy_lock` and waits for the :py:class:`~oci.file_storage.models.FilesystemSnapshotPolicy` acted upon
1324
+ to enter the given state(s).
1325
+
1326
+ :param str filesystem_snapshot_policy_id: (required)
1327
+ The `OCID`__ of the file system snapshot policy.
1328
+
1329
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1330
+
1331
+ :param oci.file_storage.models.ResourceLock remove_filesystem_snapshot_policy_lock_details: (required)
1332
+ The details to be updated for the RemoveLock.
1333
+
1334
+ :param list[str] wait_for_states:
1335
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.FilesystemSnapshotPolicy.lifecycle_state`
1336
+
1337
+ :param dict operation_kwargs:
1338
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.remove_filesystem_snapshot_policy_lock`
1339
+
1340
+ :param dict waiter_kwargs:
1341
+ 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``
1342
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1343
+ """
1344
+ operation_result = self.client.remove_filesystem_snapshot_policy_lock(filesystem_snapshot_policy_id, remove_filesystem_snapshot_policy_lock_details, **operation_kwargs)
1345
+ if not wait_for_states:
1346
+ return operation_result
1347
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1348
+ filesystem_snapshot_policy_id = operation_result.data.id
1349
+
1350
+ try:
1351
+ waiter_result = oci.wait_until(
1352
+ self.client,
1353
+ self.client.get_filesystem_snapshot_policy(filesystem_snapshot_policy_id), # noqa: F821
1354
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1355
+ **waiter_kwargs
1356
+ )
1357
+ result_to_return = waiter_result
1358
+
1359
+ return result_to_return
1360
+ except (NameError, TypeError) as e:
1361
+ if not e.args:
1362
+ e.args = ('',)
1363
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1364
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1365
+ except Exception as e:
1366
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1367
+
1368
+ def remove_mount_target_lock_and_wait_for_state(self, mount_target_id, remove_mount_target_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1369
+ """
1370
+ Calls :py:func:`~oci.file_storage.FileStorageClient.remove_mount_target_lock` and waits for the :py:class:`~oci.file_storage.models.MountTarget` acted upon
1371
+ to enter the given state(s).
1372
+
1373
+ :param str mount_target_id: (required)
1374
+ The `OCID`__ of the mount target.
1375
+
1376
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1377
+
1378
+ :param oci.file_storage.models.ResourceLock remove_mount_target_lock_details: (required)
1379
+ The details to be updated for the RemoveLock.
1380
+
1381
+ :param list[str] wait_for_states:
1382
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.MountTarget.lifecycle_state`
1383
+
1384
+ :param dict operation_kwargs:
1385
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.remove_mount_target_lock`
1386
+
1387
+ :param dict waiter_kwargs:
1388
+ 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``
1389
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1390
+ """
1391
+ operation_result = self.client.remove_mount_target_lock(mount_target_id, remove_mount_target_lock_details, **operation_kwargs)
1392
+ if not wait_for_states:
1393
+ return operation_result
1394
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1395
+ mount_target_id = operation_result.data.id
1396
+
1397
+ try:
1398
+ waiter_result = oci.wait_until(
1399
+ self.client,
1400
+ self.client.get_mount_target(mount_target_id), # noqa: F821
1401
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1402
+ **waiter_kwargs
1403
+ )
1404
+ result_to_return = waiter_result
1405
+
1406
+ return result_to_return
1407
+ except (NameError, TypeError) as e:
1408
+ if not e.args:
1409
+ e.args = ('',)
1410
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1411
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1412
+ except Exception as e:
1413
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1414
+
1415
+ def remove_outbound_connector_lock_and_wait_for_state(self, outbound_connector_id, remove_outbound_connector_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1416
+ """
1417
+ Calls :py:func:`~oci.file_storage.FileStorageClient.remove_outbound_connector_lock` and waits for the :py:class:`~oci.file_storage.models.OutboundConnector` acted upon
1418
+ to enter the given state(s).
1419
+
1420
+ :param str outbound_connector_id: (required)
1421
+ The `OCID`__ of the outbound connector.
1422
+
1423
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1424
+
1425
+ :param oci.file_storage.models.ResourceLock remove_outbound_connector_lock_details: (required)
1426
+ The details to be updated for the RemoveLock.
1427
+
1428
+ :param list[str] wait_for_states:
1429
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.OutboundConnector.lifecycle_state`
1430
+
1431
+ :param dict operation_kwargs:
1432
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.remove_outbound_connector_lock`
1433
+
1434
+ :param dict waiter_kwargs:
1435
+ 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``
1436
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1437
+ """
1438
+ operation_result = self.client.remove_outbound_connector_lock(outbound_connector_id, remove_outbound_connector_lock_details, **operation_kwargs)
1439
+ if not wait_for_states:
1440
+ return operation_result
1441
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1442
+ outbound_connector_id = operation_result.data.id
1443
+
1444
+ try:
1445
+ waiter_result = oci.wait_until(
1446
+ self.client,
1447
+ self.client.get_outbound_connector(outbound_connector_id), # noqa: F821
1448
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1449
+ **waiter_kwargs
1450
+ )
1451
+ result_to_return = waiter_result
1452
+
1453
+ return result_to_return
1454
+ except (NameError, TypeError) as e:
1455
+ if not e.args:
1456
+ e.args = ('',)
1457
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1458
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1459
+ except Exception as e:
1460
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1461
+
1462
+ def remove_replication_lock_and_wait_for_state(self, replication_id, remove_replication_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1463
+ """
1464
+ Calls :py:func:`~oci.file_storage.FileStorageClient.remove_replication_lock` and waits for the :py:class:`~oci.file_storage.models.Replication` acted upon
1465
+ to enter the given state(s).
1466
+
1467
+ :param str replication_id: (required)
1468
+ The `OCID`__ of the replication.
1469
+
1470
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1471
+
1472
+ :param oci.file_storage.models.ResourceLock remove_replication_lock_details: (required)
1473
+ The details to be updated for the RemoveLock.
1474
+
1475
+ :param list[str] wait_for_states:
1476
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.Replication.lifecycle_state`
1477
+
1478
+ :param dict operation_kwargs:
1479
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.remove_replication_lock`
1480
+
1481
+ :param dict waiter_kwargs:
1482
+ 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``
1483
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1484
+ """
1485
+ operation_result = self.client.remove_replication_lock(replication_id, remove_replication_lock_details, **operation_kwargs)
1486
+ if not wait_for_states:
1487
+ return operation_result
1488
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1489
+ replication_id = operation_result.data.id
1490
+
1491
+ try:
1492
+ waiter_result = oci.wait_until(
1493
+ self.client,
1494
+ self.client.get_replication(replication_id), # noqa: F821
1495
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1496
+ **waiter_kwargs
1497
+ )
1498
+ result_to_return = waiter_result
1499
+
1500
+ return result_to_return
1501
+ except (NameError, TypeError) as e:
1502
+ if not e.args:
1503
+ e.args = ('',)
1504
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1505
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1506
+ except Exception as e:
1507
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1508
+
1509
+ def remove_snapshot_lock_and_wait_for_state(self, snapshot_id, remove_snapshot_lock_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1510
+ """
1511
+ Calls :py:func:`~oci.file_storage.FileStorageClient.remove_snapshot_lock` and waits for the :py:class:`~oci.file_storage.models.Snapshot` acted upon
1512
+ to enter the given state(s).
1513
+
1514
+ :param str snapshot_id: (required)
1515
+ The `OCID`__ of the snapshot.
1516
+
1517
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1518
+
1519
+ :param oci.file_storage.models.ResourceLock remove_snapshot_lock_details: (required)
1520
+ The details to be updated for the RemoveLock.
1521
+
1522
+ :param list[str] wait_for_states:
1523
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.Snapshot.lifecycle_state`
1524
+
1525
+ :param dict operation_kwargs:
1526
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.remove_snapshot_lock`
1527
+
1528
+ :param dict waiter_kwargs:
1529
+ 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``
1530
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1531
+ """
1532
+ operation_result = self.client.remove_snapshot_lock(snapshot_id, remove_snapshot_lock_details, **operation_kwargs)
1533
+ if not wait_for_states:
1534
+ return operation_result
1535
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1536
+ snapshot_id = operation_result.data.id
1537
+
1538
+ try:
1539
+ waiter_result = oci.wait_until(
1540
+ self.client,
1541
+ self.client.get_snapshot(snapshot_id), # noqa: F821
1542
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1543
+ **waiter_kwargs
1544
+ )
1545
+ result_to_return = waiter_result
1546
+
1547
+ return result_to_return
1548
+ except (NameError, TypeError) as e:
1549
+ if not e.args:
1550
+ e.args = ('',)
1551
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1552
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1553
+ except Exception as e:
1554
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1555
+
1556
+ def schedule_downgrade_shape_mount_target_and_wait_for_state(self, mount_target_id, schedule_downgrade_shape_mount_target_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1557
+ """
1558
+ Calls :py:func:`~oci.file_storage.FileStorageClient.schedule_downgrade_shape_mount_target` and waits for the :py:class:`~oci.file_storage.models.MountTarget` acted upon
1559
+ to enter the given state(s).
1560
+
1561
+ :param str mount_target_id: (required)
1562
+ The `OCID`__ of the mount target.
1563
+
1564
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1565
+
1566
+ :param oci.file_storage.models.ScheduleDowngradeShapeMountTargetDetails schedule_downgrade_shape_mount_target_details: (required)
1567
+ Details for changing the shape of mount target.
1568
+
1569
+ :param list[str] wait_for_states:
1570
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.MountTarget.lifecycle_state`
1571
+
1572
+ :param dict operation_kwargs:
1573
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.schedule_downgrade_shape_mount_target`
1574
+
1575
+ :param dict waiter_kwargs:
1576
+ 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``
1577
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1578
+ """
1579
+ operation_result = self.client.schedule_downgrade_shape_mount_target(mount_target_id, schedule_downgrade_shape_mount_target_details, **operation_kwargs)
1580
+ if not wait_for_states:
1581
+ return operation_result
1582
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1583
+ mount_target_id = operation_result.data.id
1584
+
1585
+ try:
1586
+ waiter_result = oci.wait_until(
1587
+ self.client,
1588
+ self.client.get_mount_target(mount_target_id), # noqa: F821
1589
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1590
+ **waiter_kwargs
1591
+ )
1592
+ result_to_return = waiter_result
1593
+
1594
+ return result_to_return
1595
+ except (NameError, TypeError) as e:
1596
+ if not e.args:
1597
+ e.args = ('',)
1598
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1599
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1600
+ except Exception as e:
1601
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1602
+
1603
+ def unpause_filesystem_snapshot_policy_and_wait_for_state(self, filesystem_snapshot_policy_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1604
+ """
1605
+ Calls :py:func:`~oci.file_storage.FileStorageClient.unpause_filesystem_snapshot_policy` and waits for the :py:class:`~oci.file_storage.models.FilesystemSnapshotPolicy` acted upon
1606
+ to enter the given state(s).
1607
+
1608
+ :param str filesystem_snapshot_policy_id: (required)
1609
+ The `OCID`__ of the file system snapshot policy.
1610
+
1611
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1612
+
1613
+ :param list[str] wait_for_states:
1614
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.FilesystemSnapshotPolicy.lifecycle_state`
1615
+
1616
+ :param dict operation_kwargs:
1617
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.unpause_filesystem_snapshot_policy`
1618
+
1619
+ :param dict waiter_kwargs:
1620
+ 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``
1621
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1622
+ """
1623
+ operation_result = self.client.unpause_filesystem_snapshot_policy(filesystem_snapshot_policy_id, **operation_kwargs)
1624
+ if not wait_for_states:
1625
+ return operation_result
1626
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1627
+ filesystem_snapshot_policy_id = operation_result.data.id
1628
+
1629
+ try:
1630
+ waiter_result = oci.wait_until(
1631
+ self.client,
1632
+ self.client.get_filesystem_snapshot_policy(filesystem_snapshot_policy_id), # noqa: F821
1633
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1634
+ **waiter_kwargs
1635
+ )
1636
+ result_to_return = waiter_result
1637
+
1638
+ return result_to_return
1639
+ except (NameError, TypeError) as e:
1640
+ if not e.args:
1641
+ e.args = ('',)
1642
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1643
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1644
+ except Exception as e:
1645
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1646
+
1647
+ def update_export_and_wait_for_state(self, export_id, update_export_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1648
+ """
1649
+ Calls :py:func:`~oci.file_storage.FileStorageClient.update_export` and waits for the :py:class:`~oci.file_storage.models.Export` acted upon
1650
+ to enter the given state(s).
1651
+
1652
+ :param str export_id: (required)
1653
+ The `OCID`__ of the export.
1654
+
1655
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1656
+
1657
+ :param oci.file_storage.models.UpdateExportDetails update_export_details: (required)
1658
+ Details object for updating an export.
1659
+
1660
+ :param list[str] wait_for_states:
1661
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.Export.lifecycle_state`
1662
+
1663
+ :param dict operation_kwargs:
1664
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.update_export`
1665
+
1666
+ :param dict waiter_kwargs:
1667
+ 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``
1668
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1669
+ """
1670
+ operation_result = self.client.update_export(export_id, update_export_details, **operation_kwargs)
1671
+ if not wait_for_states:
1672
+ return operation_result
1673
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1674
+ export_id = operation_result.data.id
1675
+
1676
+ try:
1677
+ waiter_result = oci.wait_until(
1678
+ self.client,
1679
+ self.client.get_export(export_id), # noqa: F821
1680
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1681
+ **waiter_kwargs
1682
+ )
1683
+ result_to_return = waiter_result
1684
+
1685
+ return result_to_return
1686
+ except (NameError, TypeError) as e:
1687
+ if not e.args:
1688
+ e.args = ('',)
1689
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1690
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1691
+ except Exception as e:
1692
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1693
+
1694
+ def update_export_set_and_wait_for_state(self, export_set_id, update_export_set_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1695
+ """
1696
+ Calls :py:func:`~oci.file_storage.FileStorageClient.update_export_set` and waits for the :py:class:`~oci.file_storage.models.ExportSet` acted upon
1697
+ to enter the given state(s).
1698
+
1699
+ :param str export_set_id: (required)
1700
+ The `OCID`__ of the export set.
1701
+
1702
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1703
+
1704
+ :param oci.file_storage.models.UpdateExportSetDetails update_export_set_details: (required)
1705
+ Details object for updating an export set.
1706
+
1707
+ :param list[str] wait_for_states:
1708
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.ExportSet.lifecycle_state`
1709
+
1710
+ :param dict operation_kwargs:
1711
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.update_export_set`
1712
+
1713
+ :param dict waiter_kwargs:
1714
+ 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``
1715
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1716
+ """
1717
+ operation_result = self.client.update_export_set(export_set_id, update_export_set_details, **operation_kwargs)
1718
+ if not wait_for_states:
1719
+ return operation_result
1720
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1721
+ export_set_id = operation_result.data.id
1722
+
1723
+ try:
1724
+ waiter_result = oci.wait_until(
1725
+ self.client,
1726
+ self.client.get_export_set(export_set_id), # noqa: F821
1727
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1728
+ **waiter_kwargs
1729
+ )
1730
+ result_to_return = waiter_result
1731
+
1732
+ return result_to_return
1733
+ except (NameError, TypeError) as e:
1734
+ if not e.args:
1735
+ e.args = ('',)
1736
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1737
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1738
+ except Exception as e:
1739
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1740
+
1741
+ def update_file_system_and_wait_for_state(self, file_system_id, update_file_system_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1742
+ """
1743
+ Calls :py:func:`~oci.file_storage.FileStorageClient.update_file_system` and waits for the :py:class:`~oci.file_storage.models.FileSystem` acted upon
1744
+ to enter the given state(s).
1745
+
1746
+ :param str file_system_id: (required)
1747
+ The `OCID`__ of the file system.
1748
+
1749
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1750
+
1751
+ :param oci.file_storage.models.UpdateFileSystemDetails update_file_system_details: (required)
1752
+ Details object for updating a file system.
1753
+
1754
+ :param list[str] wait_for_states:
1755
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.FileSystem.lifecycle_state`
1756
+
1757
+ :param dict operation_kwargs:
1758
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.update_file_system`
1759
+
1760
+ :param dict waiter_kwargs:
1761
+ 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``
1762
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1763
+ """
1764
+ operation_result = self.client.update_file_system(file_system_id, update_file_system_details, **operation_kwargs)
1765
+ if not wait_for_states:
1766
+ return operation_result
1767
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1768
+ file_system_id = operation_result.data.id
1769
+
1770
+ try:
1771
+ waiter_result = oci.wait_until(
1772
+ self.client,
1773
+ self.client.get_file_system(file_system_id), # noqa: F821
1774
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1775
+ **waiter_kwargs
1776
+ )
1777
+ result_to_return = waiter_result
1778
+
1779
+ return result_to_return
1780
+ except (NameError, TypeError) as e:
1781
+ if not e.args:
1782
+ e.args = ('',)
1783
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1784
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1785
+ except Exception as e:
1786
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1787
+
1788
+ def update_filesystem_snapshot_policy_and_wait_for_state(self, filesystem_snapshot_policy_id, update_filesystem_snapshot_policy_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1789
+ """
1790
+ Calls :py:func:`~oci.file_storage.FileStorageClient.update_filesystem_snapshot_policy` and waits for the :py:class:`~oci.file_storage.models.FilesystemSnapshotPolicy` acted upon
1791
+ to enter the given state(s).
1792
+
1793
+ :param str filesystem_snapshot_policy_id: (required)
1794
+ The `OCID`__ of the file system snapshot policy.
1795
+
1796
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1797
+
1798
+ :param oci.file_storage.models.UpdateFilesystemSnapshotPolicyDetails update_filesystem_snapshot_policy_details: (required)
1799
+ Details object for updating a file system snapshot policy.
1800
+
1801
+ :param list[str] wait_for_states:
1802
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.FilesystemSnapshotPolicy.lifecycle_state`
1803
+
1804
+ :param dict operation_kwargs:
1805
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.update_filesystem_snapshot_policy`
1806
+
1807
+ :param dict waiter_kwargs:
1808
+ 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``
1809
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1810
+ """
1811
+ operation_result = self.client.update_filesystem_snapshot_policy(filesystem_snapshot_policy_id, update_filesystem_snapshot_policy_details, **operation_kwargs)
1812
+ if not wait_for_states:
1813
+ return operation_result
1814
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1815
+ filesystem_snapshot_policy_id = operation_result.data.id
1816
+
1817
+ try:
1818
+ waiter_result = oci.wait_until(
1819
+ self.client,
1820
+ self.client.get_filesystem_snapshot_policy(filesystem_snapshot_policy_id), # noqa: F821
1821
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1822
+ **waiter_kwargs
1823
+ )
1824
+ result_to_return = waiter_result
1825
+
1826
+ return result_to_return
1827
+ except (NameError, TypeError) as e:
1828
+ if not e.args:
1829
+ e.args = ('',)
1830
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1831
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1832
+ except Exception as e:
1833
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1834
+
1835
+ def update_mount_target_and_wait_for_state(self, mount_target_id, update_mount_target_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1836
+ """
1837
+ Calls :py:func:`~oci.file_storage.FileStorageClient.update_mount_target` and waits for the :py:class:`~oci.file_storage.models.MountTarget` acted upon
1838
+ to enter the given state(s).
1839
+
1840
+ :param str mount_target_id: (required)
1841
+ The `OCID`__ of the mount target.
1842
+
1843
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1844
+
1845
+ :param oci.file_storage.models.UpdateMountTargetDetails update_mount_target_details: (required)
1846
+ Details object for updating a mount target.
1847
+
1848
+ :param list[str] wait_for_states:
1849
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.MountTarget.lifecycle_state`
1850
+
1851
+ :param dict operation_kwargs:
1852
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.update_mount_target`
1853
+
1854
+ :param dict waiter_kwargs:
1855
+ 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``
1856
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1857
+ """
1858
+ operation_result = self.client.update_mount_target(mount_target_id, update_mount_target_details, **operation_kwargs)
1859
+ if not wait_for_states:
1860
+ return operation_result
1861
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1862
+ mount_target_id = operation_result.data.id
1863
+
1864
+ try:
1865
+ waiter_result = oci.wait_until(
1866
+ self.client,
1867
+ self.client.get_mount_target(mount_target_id), # noqa: F821
1868
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1869
+ **waiter_kwargs
1870
+ )
1871
+ result_to_return = waiter_result
1872
+
1873
+ return result_to_return
1874
+ except (NameError, TypeError) as e:
1875
+ if not e.args:
1876
+ e.args = ('',)
1877
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1878
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1879
+ except Exception as e:
1880
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1881
+
1882
+ def update_outbound_connector_and_wait_for_state(self, outbound_connector_id, update_outbound_connector_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1883
+ """
1884
+ Calls :py:func:`~oci.file_storage.FileStorageClient.update_outbound_connector` and waits for the :py:class:`~oci.file_storage.models.OutboundConnector` acted upon
1885
+ to enter the given state(s).
1886
+
1887
+ :param str outbound_connector_id: (required)
1888
+ The `OCID`__ of the outbound connector.
1889
+
1890
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1891
+
1892
+ :param oci.file_storage.models.UpdateOutboundConnectorDetails update_outbound_connector_details: (required)
1893
+ Details object for updating a outbound connector.
1894
+
1895
+ :param list[str] wait_for_states:
1896
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.OutboundConnector.lifecycle_state`
1897
+
1898
+ :param dict operation_kwargs:
1899
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.update_outbound_connector`
1900
+
1901
+ :param dict waiter_kwargs:
1902
+ 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``
1903
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1904
+ """
1905
+ operation_result = self.client.update_outbound_connector(outbound_connector_id, update_outbound_connector_details, **operation_kwargs)
1906
+ if not wait_for_states:
1907
+ return operation_result
1908
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1909
+ outbound_connector_id = operation_result.data.id
1910
+
1911
+ try:
1912
+ waiter_result = oci.wait_until(
1913
+ self.client,
1914
+ self.client.get_outbound_connector(outbound_connector_id), # noqa: F821
1915
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1916
+ **waiter_kwargs
1917
+ )
1918
+ result_to_return = waiter_result
1919
+
1920
+ return result_to_return
1921
+ except (NameError, TypeError) as e:
1922
+ if not e.args:
1923
+ e.args = ('',)
1924
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1925
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1926
+ except Exception as e:
1927
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1928
+
1929
+ def update_replication_and_wait_for_state(self, replication_id, update_replication_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1930
+ """
1931
+ Calls :py:func:`~oci.file_storage.FileStorageClient.update_replication` and waits for the :py:class:`~oci.file_storage.models.Replication` acted upon
1932
+ to enter the given state(s).
1933
+
1934
+ :param str replication_id: (required)
1935
+ The `OCID`__ of the replication.
1936
+
1937
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1938
+
1939
+ :param oci.file_storage.models.UpdateReplicationDetails update_replication_details: (required)
1940
+ Details object for updating a replication.
1941
+
1942
+ :param list[str] wait_for_states:
1943
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.Replication.lifecycle_state`
1944
+
1945
+ :param dict operation_kwargs:
1946
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.update_replication`
1947
+
1948
+ :param dict waiter_kwargs:
1949
+ 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``
1950
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1951
+ """
1952
+ operation_result = self.client.update_replication(replication_id, update_replication_details, **operation_kwargs)
1953
+ if not wait_for_states:
1954
+ return operation_result
1955
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
1956
+ replication_id = operation_result.data.id
1957
+
1958
+ try:
1959
+ waiter_result = oci.wait_until(
1960
+ self.client,
1961
+ self.client.get_replication(replication_id), # noqa: F821
1962
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
1963
+ **waiter_kwargs
1964
+ )
1965
+ result_to_return = waiter_result
1966
+
1967
+ return result_to_return
1968
+ except (NameError, TypeError) as e:
1969
+ if not e.args:
1970
+ e.args = ('',)
1971
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
1972
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1973
+ except Exception as e:
1974
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1975
+
1976
+ def update_snapshot_and_wait_for_state(self, snapshot_id, update_snapshot_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
1977
+ """
1978
+ Calls :py:func:`~oci.file_storage.FileStorageClient.update_snapshot` and waits for the :py:class:`~oci.file_storage.models.Snapshot` acted upon
1979
+ to enter the given state(s).
1980
+
1981
+ :param str snapshot_id: (required)
1982
+ The `OCID`__ of the snapshot.
1983
+
1984
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1985
+
1986
+ :param oci.file_storage.models.UpdateSnapshotDetails update_snapshot_details: (required)
1987
+ Details object for updating a snapshot.
1988
+
1989
+ :param list[str] wait_for_states:
1990
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.Snapshot.lifecycle_state`
1991
+
1992
+ :param dict operation_kwargs:
1993
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.update_snapshot`
1994
+
1995
+ :param dict waiter_kwargs:
1996
+ 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``
1997
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1998
+ """
1999
+ operation_result = self.client.update_snapshot(snapshot_id, update_snapshot_details, **operation_kwargs)
2000
+ if not wait_for_states:
2001
+ return operation_result
2002
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
2003
+ snapshot_id = operation_result.data.id
2004
+
2005
+ try:
2006
+ waiter_result = oci.wait_until(
2007
+ self.client,
2008
+ self.client.get_snapshot(snapshot_id), # noqa: F821
2009
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
2010
+ **waiter_kwargs
2011
+ )
2012
+ result_to_return = waiter_result
2013
+
2014
+ return result_to_return
2015
+ except (NameError, TypeError) as e:
2016
+ if not e.args:
2017
+ e.args = ('',)
2018
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
2019
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
2020
+ except Exception as e:
2021
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
2022
+
2023
+ def upgrade_shape_mount_target_and_wait_for_state(self, mount_target_id, upgrade_shape_mount_target_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
2024
+ """
2025
+ Calls :py:func:`~oci.file_storage.FileStorageClient.upgrade_shape_mount_target` and waits for the :py:class:`~oci.file_storage.models.MountTarget` acted upon
2026
+ to enter the given state(s).
2027
+
2028
+ :param str mount_target_id: (required)
2029
+ The `OCID`__ of the mount target.
2030
+
2031
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
2032
+
2033
+ :param oci.file_storage.models.UpgradeShapeMountTargetDetails upgrade_shape_mount_target_details: (required)
2034
+ Details for changing the shape of mount target.
2035
+
2036
+ :param list[str] wait_for_states:
2037
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.file_storage.models.MountTarget.lifecycle_state`
2038
+
2039
+ :param dict operation_kwargs:
2040
+ A dictionary of keyword arguments to pass to :py:func:`~oci.file_storage.FileStorageClient.upgrade_shape_mount_target`
2041
+
2042
+ :param dict waiter_kwargs:
2043
+ 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``
2044
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
2045
+ """
2046
+ operation_result = self.client.upgrade_shape_mount_target(mount_target_id, upgrade_shape_mount_target_details, **operation_kwargs)
2047
+ if not wait_for_states:
2048
+ return operation_result
2049
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
2050
+ mount_target_id = operation_result.data.id
2051
+
2052
+ try:
2053
+ waiter_result = oci.wait_until(
2054
+ self.client,
2055
+ self.client.get_mount_target(mount_target_id), # noqa: F821
2056
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
2057
+ **waiter_kwargs
2058
+ )
2059
+ result_to_return = waiter_result
2060
+
2061
+ return result_to_return
2062
+ except (NameError, TypeError) as e:
2063
+ if not e.args:
2064
+ e.args = ('',)
2065
+ e.args = e.args + ('This composite operation is currently not supported in the SDK. Please use the operation from the service client and use waiters as an alternative. For more information on waiters, visit: "https://docs.oracle.com/en-us/iaas/tools/python/latest/api/waiters.html"', )
2066
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
2067
+ except Exception as e:
2068
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)