oci 2.142.0__py3-none-any.whl → 2.143.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. oci/access_governance_cp/access_governance_cp_client.py +8 -8
  2. oci/adm/application_dependency_management_client.py +36 -36
  3. oci/ai_anomaly_detection/anomaly_detection_client.py +36 -36
  4. oci/ai_document/ai_service_document_client.py +26 -26
  5. oci/ai_language/ai_service_language_client.py +44 -44
  6. oci/ai_speech/ai_service_speech_client.py +19 -19
  7. oci/ai_vision/ai_service_vision_client.py +28 -28
  8. oci/analytics/analytics_client.py +24 -24
  9. oci/announcements_service/announcement_client.py +5 -5
  10. oci/announcements_service/announcement_subscription_client.py +9 -9
  11. oci/announcements_service/announcements_preferences_client.py +4 -4
  12. oci/announcements_service/service_client.py +1 -1
  13. oci/apigateway/api_gateway_client.py +21 -21
  14. oci/apigateway/deployment_client.py +6 -6
  15. oci/apigateway/gateway_client.py +6 -6
  16. oci/apigateway/subscribers_client.py +6 -6
  17. oci/apigateway/usage_plans_client.py +6 -6
  18. oci/apigateway/work_requests_client.py +5 -5
  19. oci/apm_config/config_client.py +9 -9
  20. oci/apm_control_plane/apm_domain_client.py +14 -14
  21. oci/apm_synthetics/apm_synthetic_client.py +28 -28
  22. oci/apm_traces/attributes_client.py +8 -8
  23. oci/apm_traces/query_client.py +2 -2
  24. oci/apm_traces/trace_client.py +4 -4
  25. oci/appmgmt_control/appmgmt_control_client.py +8 -8
  26. oci/artifacts/artifacts_client.py +32 -32
  27. oci/audit/audit_client.py +3 -3
  28. oci/autoscaling/auto_scaling_client.py +11 -11
  29. oci/base_client.py +2 -2
  30. oci/bastion/bastion_client.py +15 -15
  31. oci/bds/bds_client.py +84 -84
  32. oci/blockchain/blockchain_platform_client.py +27 -27
  33. oci/budget/budget_client.py +10 -10
  34. oci/capacity_management/capacity_management_client.py +32 -32
  35. oci/certificates/certificates_client.py +5 -5
  36. oci/certificates_management/certificates_management_client.py +32 -32
  37. oci/cims/incident_client.py +6 -6
  38. oci/cloud_bridge/common_client.py +5 -5
  39. oci/cloud_bridge/discovery_client.py +15 -15
  40. oci/cloud_bridge/inventory_client.py +16 -16
  41. oci/cloud_bridge/ocb_agent_svc_client.py +23 -23
  42. oci/cloud_guard/cloud_guard_client.py +155 -155
  43. oci/cloud_migrations/migration_client.py +43 -43
  44. oci/cluster_placement_groups/cluster_placement_groups_cp_client.py +13 -13
  45. oci/compute_cloud_at_customer/compute_cloud_at_customer_client.py +12 -12
  46. oci/compute_instance_agent/compute_instance_agent_client.py +6 -6
  47. oci/compute_instance_agent/plugin_client.py +2 -2
  48. oci/compute_instance_agent/pluginconfig_client.py +1 -1
  49. oci/container_engine/container_engine_client.py +44 -44
  50. oci/container_instances/container_instance_client.py +18 -18
  51. oci/core/blockstorage_client.py +60 -60
  52. oci/core/compute_client.py +102 -102
  53. oci/core/compute_management_client.py +32 -32
  54. oci/core/models/__init__.py +18 -0
  55. oci/core/models/byoasn.py +501 -0
  56. oci/core/models/byoasn_byoip_range.py +173 -0
  57. oci/core/models/byoasn_collection.py +72 -0
  58. oci/core/models/byoasn_summary.py +360 -0
  59. oci/core/models/byoip_range.py +27 -0
  60. oci/core/models/byoip_range_origin_asn.py +138 -0
  61. oci/core/models/change_byoasn_compartment_details.py +76 -0
  62. oci/core/models/create_byoasn_details.py +222 -0
  63. oci/core/models/set_origin_asn_details.py +107 -0
  64. oci/core/models/update_byoasn_details.py +156 -0
  65. oci/core/virtual_network_client.py +1426 -379
  66. oci/core/virtual_network_client_composite_operations.py +229 -0
  67. oci/dashboard_service/dashboard_client.py +6 -6
  68. oci/dashboard_service/dashboard_group_client.py +6 -6
  69. oci/data_catalog/data_catalog_client.py +149 -149
  70. oci/data_flow/data_flow_client.py +45 -45
  71. oci/data_integration/data_integration_client.py +163 -163
  72. oci/data_labeling_service/data_labeling_management_client.py +17 -17
  73. oci/data_labeling_service_dataplane/data_labeling_client.py +15 -15
  74. oci/data_safe/data_safe_client.py +292 -292
  75. oci/data_science/data_science_client.py +92 -92
  76. oci/database/database_client.py +2127 -1266
  77. oci/database/database_client_composite_operations.py +573 -0
  78. oci/database/models/__init__.py +24 -0
  79. oci/database/models/autonomous_dw_database.py +4609 -0
  80. oci/database/models/backup.py +29 -2
  81. oci/database/models/backup_summary.py +29 -2
  82. oci/database/models/convert_to_standalone_details.py +76 -0
  83. oci/database/models/create_data_guard_association_details.py +27 -0
  84. oci/database/models/create_data_guard_association_to_existing_db_system_details.py +7 -0
  85. oci/database/models/create_data_guard_association_to_existing_vm_cluster_details.py +7 -0
  86. oci/database/models/create_data_guard_association_with_new_db_system_details.py +7 -0
  87. oci/database/models/create_database_base.py +13 -3
  88. oci/database/models/create_database_details.py +29 -2
  89. oci/database/models/create_database_from_backup.py +1 -1
  90. oci/database/models/create_database_from_backup_details.py +27 -0
  91. oci/database/models/create_new_database_details.py +1 -1
  92. oci/database/models/create_stand_by_database_details.py +108 -0
  93. oci/database/models/create_standby_details.py +396 -0
  94. oci/database/models/data_guard_group.py +132 -0
  95. oci/database/models/data_guard_group_member.py +406 -0
  96. oci/database/models/database.py +56 -2
  97. oci/database/models/database_summary.py +56 -2
  98. oci/database/models/encryption_key_location_details.py +101 -0
  99. oci/database/models/external_hsm_encryption_details.py +82 -0
  100. oci/database/models/failover_data_guard_details.py +76 -0
  101. oci/database/models/reinstate_data_guard_details.py +111 -0
  102. oci/database/models/switch_over_data_guard_details.py +76 -0
  103. oci/database/models/update_autonomous_database_details.py +37 -2
  104. oci/database/models/update_data_guard_details.py +241 -0
  105. oci/database_management/db_management_client.py +211 -211
  106. oci/database_management/diagnosability_client.py +4 -4
  107. oci/database_management/managed_my_sql_databases_client.py +7 -7
  108. oci/database_management/perfhub_client.py +1 -1
  109. oci/database_management/sql_tuning_client.py +17 -17
  110. oci/database_migration/database_migration_client.py +42 -42
  111. oci/database_tools/database_tools_client.py +23 -23
  112. oci/delegate_access_control/delegate_access_control_client.py +26 -26
  113. oci/delegate_access_control/work_request_client.py +4 -4
  114. oci/demand_signal/occ_demand_signal_client.py +7 -7
  115. oci/desktops/desktop_service_client.py +21 -21
  116. oci/devops/devops_client.py +141 -141
  117. oci/disaster_recovery/disaster_recovery_client.py +31 -31
  118. oci/dns/dns_client.py +54 -54
  119. oci/dts/appliance_export_job_client.py +6 -6
  120. oci/dts/shipping_vendors_client.py +1 -1
  121. oci/dts/transfer_appliance_client.py +8 -8
  122. oci/dts/transfer_appliance_entitlement_client.py +3 -3
  123. oci/dts/transfer_device_client.py +5 -5
  124. oci/dts/transfer_job_client.py +6 -6
  125. oci/dts/transfer_package_client.py +7 -7
  126. oci/em_warehouse/em_warehouse_client.py +13 -13
  127. oci/email/email_client.py +31 -31
  128. oci/email_data_plane/email_dp_client.py +1 -1
  129. oci/events/events_client.py +6 -6
  130. oci/file_storage/file_storage_client.py +68 -68
  131. oci/fleet_apps_management/fleet_apps_management_admin_client.py +25 -25
  132. oci/fleet_apps_management/fleet_apps_management_client.py +35 -35
  133. oci/fleet_apps_management/fleet_apps_management_maintenance_window_client.py +5 -5
  134. oci/fleet_apps_management/fleet_apps_management_operations_client.py +26 -26
  135. oci/fleet_apps_management/fleet_apps_management_runbooks_client.py +12 -12
  136. oci/fleet_software_update/fleet_software_update_client.py +46 -46
  137. oci/functions/functions_invoke_client.py +1 -1
  138. oci/functions/functions_management_client.py +16 -16
  139. oci/fusion_apps/fusion_applications_client.py +41 -41
  140. oci/generative_ai/generative_ai_client.py +22 -22
  141. oci/generative_ai_agent/generative_ai_agent_client.py +33 -33
  142. oci/generative_ai_agent_runtime/generative_ai_agent_runtime_client.py +5 -5
  143. oci/generative_ai_inference/generative_ai_inference_client.py +4 -4
  144. oci/generic_artifacts_content/generic_artifacts_content_client.py +3 -3
  145. oci/globally_distributed_database/sharded_database_service_client.py +30 -30
  146. oci/golden_gate/golden_gate_client.py +84 -84
  147. oci/governance_rules_control_plane/governance_rule_client.py +15 -15
  148. oci/governance_rules_control_plane/work_request_client.py +5 -5
  149. oci/healthchecks/health_checks_client.py +17 -17
  150. oci/identity/identity_client.py +145 -145
  151. oci/identity_data_plane/dataplane_client.py +2 -2
  152. oci/identity_domains/identity_domains_client.py +311 -311
  153. oci/integration/integration_instance_client.py +19 -19
  154. oci/jms/java_management_service_client.py +75 -75
  155. oci/jms_java_downloads/java_download_client.py +25 -25
  156. oci/key_management/ekm_client.py +5 -5
  157. oci/key_management/kms_crypto_client.py +6 -6
  158. oci/key_management/kms_hsm_cluster_client.py +12 -12
  159. oci/key_management/kms_management_client.py +21 -21
  160. oci/key_management/kms_vault_client.py +14 -14
  161. oci/license_manager/license_manager_client.py +18 -18
  162. oci/limits/limits_client.py +4 -4
  163. oci/limits/quotas_client.py +7 -7
  164. oci/load_balancer/load_balancer_client.py +61 -61
  165. oci/lockbox/lockbox_client.py +24 -24
  166. oci/log_analytics/log_analytics_client.py +193 -193
  167. oci/logging/logging_management_client.py +30 -30
  168. oci/loggingingestion/logging_client.py +1 -1
  169. oci/loggingsearch/log_search_client.py +1 -1
  170. oci/management_agent/management_agent_client.py +28 -28
  171. oci/management_dashboard/dashx_apis_client.py +14 -14
  172. oci/marketplace/account_client.py +2 -2
  173. oci/marketplace/marketplace_client.py +30 -30
  174. oci/marketplace_private_offer/attachment_client.py +5 -5
  175. oci/marketplace_private_offer/offer_client.py +6 -6
  176. oci/marketplace_publisher/attachment_client.py +5 -5
  177. oci/marketplace_publisher/marketplace_publisher_client.py +71 -71
  178. oci/marketplace_publisher/offer_client.py +6 -6
  179. oci/media_services/media_services_client.py +60 -60
  180. oci/media_services/media_stream_client.py +2 -2
  181. oci/monitoring/monitoring_client.py +18 -18
  182. oci/mysql/channels_client.py +7 -7
  183. oci/mysql/db_backups_client.py +7 -7
  184. oci/mysql/db_system_client.py +17 -17
  185. oci/mysql/mysqlaas_client.py +7 -7
  186. oci/mysql/replicas_client.py +5 -5
  187. oci/mysql/work_requests_client.py +4 -4
  188. oci/network_firewall/network_firewall_client.py +86 -86
  189. oci/network_load_balancer/models/__init__.py +2 -0
  190. oci/network_load_balancer/models/backend.py +8 -8
  191. oci/network_load_balancer/models/backend_details.py +4 -4
  192. oci/network_load_balancer/models/backend_operational_status.py +92 -0
  193. oci/network_load_balancer/models/backend_set.py +64 -2
  194. oci/network_load_balancer/models/backend_set_details.py +64 -2
  195. oci/network_load_balancer/models/backend_set_summary.py +64 -2
  196. oci/network_load_balancer/models/backend_summary.py +8 -8
  197. oci/network_load_balancer/models/create_backend_details.py +8 -8
  198. oci/network_load_balancer/models/create_backend_set_details.py +64 -2
  199. oci/network_load_balancer/models/create_listener_details.py +3 -3
  200. oci/network_load_balancer/models/create_network_load_balancer_details.py +6 -6
  201. oci/network_load_balancer/models/health_checker.py +2 -2
  202. oci/network_load_balancer/models/health_checker_details.py +2 -2
  203. oci/network_load_balancer/models/listener.py +3 -3
  204. oci/network_load_balancer/models/listener_details.py +3 -3
  205. oci/network_load_balancer/models/listener_summary.py +3 -3
  206. oci/network_load_balancer/models/network_load_balancer.py +6 -6
  207. oci/network_load_balancer/models/network_load_balancer_summary.py +4 -4
  208. oci/network_load_balancer/models/update_backend_details.py +6 -6
  209. oci/network_load_balancer/models/update_backend_set_details.py +64 -2
  210. oci/network_load_balancer/models/update_listener_details.py +3 -3
  211. oci/network_load_balancer/network_load_balancer_client.py +150 -34
  212. oci/nosql/nosql_client.py +24 -24
  213. oci/object_storage/object_storage_client.py +55 -55
  214. oci/oce/oce_instance_client.py +10 -10
  215. oci/oci_control_center/occ_metrics_client.py +3 -3
  216. oci/ocvp/cluster_client.py +5 -5
  217. oci/ocvp/esxi_host_client.py +8 -8
  218. oci/ocvp/sddc_client.py +14 -14
  219. oci/ocvp/work_request_client.py +4 -4
  220. oci/oda/management_client.py +59 -59
  221. oci/oda/oda_client.py +17 -17
  222. oci/oda/odapackage_client.py +7 -7
  223. oci/onesubscription/billing_schedule_client.py +1 -1
  224. oci/onesubscription/commitment_client.py +2 -2
  225. oci/onesubscription/computed_usage_client.py +3 -3
  226. oci/onesubscription/invoice_summary_client.py +2 -2
  227. oci/onesubscription/organization_subscription_client.py +1 -1
  228. oci/onesubscription/ratecard_client.py +1 -1
  229. oci/onesubscription/subscribed_service_client.py +2 -2
  230. oci/onesubscription/subscription_client.py +1 -1
  231. oci/ons/notification_control_plane_client.py +6 -6
  232. oci/ons/notification_data_plane_client.py +10 -10
  233. oci/opa/opa_instance_client.py +13 -13
  234. oci/opensearch/opensearch_cluster_backup_client.py +4 -4
  235. oci/opensearch/opensearch_cluster_client.py +16 -16
  236. oci/operator_access_control/access_requests_client.py +10 -10
  237. oci/operator_access_control/operator_actions_client.py +2 -2
  238. oci/operator_access_control/operator_control_assignment_client.py +8 -8
  239. oci/operator_access_control/operator_control_client.py +6 -6
  240. oci/opsi/operations_insights_client.py +180 -180
  241. oci/optimizer/optimizer_client.py +26 -26
  242. oci/os_management/event_client.py +8 -8
  243. oci/os_management/os_management_client.py +69 -69
  244. oci/os_management_hub/event_client.py +8 -8
  245. oci/os_management_hub/lifecycle_environment_client.py +12 -12
  246. oci/os_management_hub/managed_instance_client.py +31 -31
  247. oci/os_management_hub/managed_instance_group_client.py +25 -25
  248. oci/os_management_hub/management_station_client.py +10 -10
  249. oci/os_management_hub/onboarding_client.py +6 -6
  250. oci/os_management_hub/reporting_managed_instance_client.py +3 -3
  251. oci/os_management_hub/scheduled_job_client.py +7 -7
  252. oci/os_management_hub/software_source_client.py +27 -27
  253. oci/os_management_hub/work_request_client.py +4 -4
  254. oci/osp_gateway/address_rule_service_client.py +1 -1
  255. oci/osp_gateway/address_service_client.py +2 -2
  256. oci/osp_gateway/invoice_service_client.py +5 -5
  257. oci/osp_gateway/subscription_service_client.py +5 -5
  258. oci/osub_billing_schedule/billing_schedule_client.py +1 -1
  259. oci/osub_organization_subscription/organization_subscription_client.py +1 -1
  260. oci/osub_subscription/commitment_client.py +2 -2
  261. oci/osub_subscription/ratecard_client.py +1 -1
  262. oci/osub_subscription/subscription_client.py +1 -1
  263. oci/osub_usage/computed_usage_client.py +3 -3
  264. oci/psql/postgresql_client.py +33 -33
  265. oci/queue/queue_admin_client.py +11 -11
  266. oci/queue/queue_client.py +8 -8
  267. oci/recovery/database_recovery_client.py +26 -26
  268. oci/redis/redis_cluster_client.py +12 -12
  269. oci/resource_manager/resource_manager_client.py +52 -52
  270. oci/resource_scheduler/schedule_client.py +13 -13
  271. oci/resource_search/resource_search_client.py +3 -3
  272. oci/rover/rover_bundle_client.py +8 -8
  273. oci/rover/rover_cluster_client.py +8 -8
  274. oci/rover/rover_entitlement_client.py +6 -6
  275. oci/rover/rover_node_client.py +15 -15
  276. oci/rover/shape_client.py +1 -1
  277. oci/rover/work_requests_client.py +5 -5
  278. oci/sch/connector_plugins_client.py +2 -2
  279. oci/sch/service_connector_client.py +12 -12
  280. oci/secrets/secrets_client.py +3 -3
  281. oci/security_attribute/security_attribute_client.py +18 -18
  282. oci/service_catalog/service_catalog_client.py +26 -26
  283. oci/service_manager_proxy/service_manager_proxy_client.py +2 -2
  284. oci/service_mesh/service_mesh_client.py +48 -48
  285. oci/stack_monitoring/stack_monitoring_client.py +71 -71
  286. oci/streaming/stream_admin_client.py +18 -18
  287. oci/streaming/stream_client.py +8 -8
  288. oci/tenant_manager_control_plane/domain_client.py +5 -5
  289. oci/tenant_manager_control_plane/domain_governance_client.py +5 -5
  290. oci/tenant_manager_control_plane/governance_client.py +2 -2
  291. oci/tenant_manager_control_plane/link_client.py +3 -3
  292. oci/tenant_manager_control_plane/orders_client.py +2 -2
  293. oci/tenant_manager_control_plane/organization_client.py +10 -10
  294. oci/tenant_manager_control_plane/recipient_invitation_client.py +5 -5
  295. oci/tenant_manager_control_plane/sender_invitation_client.py +5 -5
  296. oci/tenant_manager_control_plane/subscription_client.py +11 -11
  297. oci/tenant_manager_control_plane/work_request_client.py +4 -4
  298. oci/threat_intelligence/threatintel_client.py +5 -5
  299. oci/usage/resources_client.py +2 -2
  300. oci/usage/rewards_client.py +6 -6
  301. oci/usage/usagelimits_client.py +1 -1
  302. oci/usage_api/usageapi_client.py +33 -33
  303. oci/vault/vaults_client.py +13 -13
  304. oci/vbs_inst/vbs_instance_client.py +10 -10
  305. oci/version.py +1 -1
  306. oci/visual_builder/vb_instance_client.py +14 -14
  307. oci/vn_monitoring/vn_monitoring_client.py +12 -12
  308. oci/vulnerability_scanning/vulnerability_scanning_client.py +58 -58
  309. oci/waa/waa_client.py +13 -13
  310. oci/waa/work_request_client.py +4 -4
  311. oci/waas/redirect_client.py +6 -6
  312. oci/waas/waas_client.py +66 -66
  313. oci/waf/waf_client.py +24 -24
  314. oci/work_requests/work_request_client.py +4 -4
  315. oci/zpr/zpr_client.py +15 -15
  316. {oci-2.142.0.dist-info → oci-2.143.0.dist-info}/METADATA +1 -1
  317. {oci-2.142.0.dist-info → oci-2.143.0.dist-info}/RECORD +321 -299
  318. {oci-2.142.0.dist-info → oci-2.143.0.dist-info}/LICENSE.txt +0 -0
  319. {oci-2.142.0.dist-info → oci-2.143.0.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  320. {oci-2.142.0.dist-info → oci-2.143.0.dist-info}/WHEEL +0 -0
  321. {oci-2.142.0.dist-info → oci-2.143.0.dist-info}/top_level.txt +0 -0
@@ -1466,6 +1466,47 @@ class DatabaseClientCompositeOperations(object):
1466
1466
  except Exception as e:
1467
1467
  raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1468
1468
 
1469
+ def change_encryption_key_location_and_wait_for_work_request(self, database_id, encryption_key_location_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
1470
+ """
1471
+ Calls :py:func:`~oci.database.DatabaseClient.change_encryption_key_location` and waits for the oci.work_requests.models.WorkRequest
1472
+ to enter the given state(s).
1473
+
1474
+ :param str database_id: (required)
1475
+ The database `OCID`__.
1476
+
1477
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
1478
+
1479
+ :param oci.database.models.EncryptionKeyLocationDetails encryption_key_location_details: (required)
1480
+ Request to change the source of the encryption key for the database.
1481
+
1482
+ :param list[str] work_request_states: (optional)
1483
+ An array of work requests states to wait on. These should be valid values for :py:attr:`~oci.work_requests.models.WorkRequest.status`
1484
+ Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
1485
+
1486
+ :param dict operation_kwargs:
1487
+ A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.change_encryption_key_location`
1488
+
1489
+ :param dict waiter_kwargs:
1490
+ 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``
1491
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
1492
+ """
1493
+ operation_result = self.client.change_encryption_key_location(database_id, encryption_key_location_details, **operation_kwargs)
1494
+ work_request_states = work_request_states if work_request_states else oci.waiter._WORK_REQUEST_TERMINATION_STATES
1495
+ lowered_work_request_states = [w.lower() for w in work_request_states]
1496
+ if 'opc-work-request-id' not in operation_result.headers:
1497
+ return operation_result
1498
+ work_request_id = operation_result.headers['opc-work-request-id']
1499
+ try:
1500
+ waiter_result = oci.wait_until(
1501
+ self._work_request_client,
1502
+ self._work_request_client.get_work_request(work_request_id),
1503
+ evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_work_request_states,
1504
+ **waiter_kwargs
1505
+ )
1506
+ return waiter_result
1507
+ except Exception as e:
1508
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
1509
+
1469
1510
  def change_exadata_infrastructure_compartment_and_wait_for_work_request(self, change_exadata_infrastructure_compartment_details, exadata_infrastructure_id, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
1470
1511
  """
1471
1512
  Calls :py:func:`~oci.database.DatabaseClient.change_exadata_infrastructure_compartment` and waits for the oci.work_requests.models.WorkRequest
@@ -2473,6 +2514,94 @@ class DatabaseClientCompositeOperations(object):
2473
2514
  except Exception as e:
2474
2515
  raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
2475
2516
 
2517
+ def convert_to_standalone_and_wait_for_work_request(self, database_id, convert_to_standalone_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
2518
+ """
2519
+ Calls :py:func:`~oci.database.DatabaseClient.convert_to_standalone` and waits for the oci.work_requests.models.WorkRequest
2520
+ to enter the given state(s).
2521
+
2522
+ :param str database_id: (required)
2523
+ The database `OCID`__.
2524
+
2525
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
2526
+
2527
+ :param oci.database.models.ConvertToStandaloneDetails convert_to_standalone_details: (required)
2528
+ A request to update an existing Data Guard member.
2529
+
2530
+ :param list[str] work_request_states: (optional)
2531
+ An array of work requests states to wait on. These should be valid values for :py:attr:`~oci.work_requests.models.WorkRequest.status`
2532
+ Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
2533
+
2534
+ :param dict operation_kwargs:
2535
+ A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.convert_to_standalone`
2536
+
2537
+ :param dict waiter_kwargs:
2538
+ 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``
2539
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
2540
+ """
2541
+ operation_result = self.client.convert_to_standalone(database_id, convert_to_standalone_details, **operation_kwargs)
2542
+ work_request_states = work_request_states if work_request_states else oci.waiter._WORK_REQUEST_TERMINATION_STATES
2543
+ lowered_work_request_states = [w.lower() for w in work_request_states]
2544
+ if 'opc-work-request-id' not in operation_result.headers:
2545
+ return operation_result
2546
+ work_request_id = operation_result.headers['opc-work-request-id']
2547
+ try:
2548
+ waiter_result = oci.wait_until(
2549
+ self._work_request_client,
2550
+ self._work_request_client.get_work_request(work_request_id),
2551
+ evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_work_request_states,
2552
+ **waiter_kwargs
2553
+ )
2554
+ return waiter_result
2555
+ except Exception as e:
2556
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
2557
+
2558
+ def convert_to_standalone_and_wait_for_state(self, database_id, convert_to_standalone_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
2559
+ """
2560
+ Calls :py:func:`~oci.database.DatabaseClient.convert_to_standalone` and waits for the :py:class:`~oci.database.models.Database` acted upon
2561
+ to enter the given state(s).
2562
+
2563
+ :param str database_id: (required)
2564
+ The database `OCID`__.
2565
+
2566
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
2567
+
2568
+ :param oci.database.models.ConvertToStandaloneDetails convert_to_standalone_details: (required)
2569
+ A request to update an existing Data Guard member.
2570
+
2571
+ :param list[str] wait_for_states:
2572
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.database.models.Database.lifecycle_state`
2573
+
2574
+ :param dict operation_kwargs:
2575
+ A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.convert_to_standalone`
2576
+
2577
+ :param dict waiter_kwargs:
2578
+ 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``
2579
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
2580
+ """
2581
+ operation_result = self.client.convert_to_standalone(database_id, convert_to_standalone_details, **operation_kwargs)
2582
+ if not wait_for_states:
2583
+ return operation_result
2584
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
2585
+ database_id = operation_result.data.id
2586
+
2587
+ try:
2588
+ waiter_result = oci.wait_until(
2589
+ self.client,
2590
+ self.client.get_database(database_id), # noqa: F821
2591
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
2592
+ **waiter_kwargs
2593
+ )
2594
+ result_to_return = waiter_result
2595
+
2596
+ return result_to_return
2597
+ except (NameError, TypeError) as e:
2598
+ if not e.args:
2599
+ e.args = ('',)
2600
+ 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"', )
2601
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
2602
+ except Exception as e:
2603
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
2604
+
2476
2605
  def create_application_vip_and_wait_for_work_request(self, create_application_vip_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
2477
2606
  """
2478
2607
  Calls :py:func:`~oci.database.DatabaseClient.create_application_vip` and waits for the oci.work_requests.models.WorkRequest
@@ -8109,6 +8238,94 @@ class DatabaseClientCompositeOperations(object):
8109
8238
  except Exception as e:
8110
8239
  raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
8111
8240
 
8241
+ def failover_data_guard_and_wait_for_work_request(self, database_id, failover_data_guard_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
8242
+ """
8243
+ Calls :py:func:`~oci.database.DatabaseClient.failover_data_guard` and waits for the oci.work_requests.models.WorkRequest
8244
+ to enter the given state(s).
8245
+
8246
+ :param str database_id: (required)
8247
+ The database `OCID`__.
8248
+
8249
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
8250
+
8251
+ :param oci.database.models.FailoverDataGuardDetails failover_data_guard_details: (required)
8252
+ A request to update an existing Data Guard member.
8253
+
8254
+ :param list[str] work_request_states: (optional)
8255
+ An array of work requests states to wait on. These should be valid values for :py:attr:`~oci.work_requests.models.WorkRequest.status`
8256
+ Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
8257
+
8258
+ :param dict operation_kwargs:
8259
+ A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.failover_data_guard`
8260
+
8261
+ :param dict waiter_kwargs:
8262
+ 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``
8263
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
8264
+ """
8265
+ operation_result = self.client.failover_data_guard(database_id, failover_data_guard_details, **operation_kwargs)
8266
+ work_request_states = work_request_states if work_request_states else oci.waiter._WORK_REQUEST_TERMINATION_STATES
8267
+ lowered_work_request_states = [w.lower() for w in work_request_states]
8268
+ if 'opc-work-request-id' not in operation_result.headers:
8269
+ return operation_result
8270
+ work_request_id = operation_result.headers['opc-work-request-id']
8271
+ try:
8272
+ waiter_result = oci.wait_until(
8273
+ self._work_request_client,
8274
+ self._work_request_client.get_work_request(work_request_id),
8275
+ evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_work_request_states,
8276
+ **waiter_kwargs
8277
+ )
8278
+ return waiter_result
8279
+ except Exception as e:
8280
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
8281
+
8282
+ def failover_data_guard_and_wait_for_state(self, database_id, failover_data_guard_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
8283
+ """
8284
+ Calls :py:func:`~oci.database.DatabaseClient.failover_data_guard` and waits for the :py:class:`~oci.database.models.Database` acted upon
8285
+ to enter the given state(s).
8286
+
8287
+ :param str database_id: (required)
8288
+ The database `OCID`__.
8289
+
8290
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
8291
+
8292
+ :param oci.database.models.FailoverDataGuardDetails failover_data_guard_details: (required)
8293
+ A request to update an existing Data Guard member.
8294
+
8295
+ :param list[str] wait_for_states:
8296
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.database.models.Database.lifecycle_state`
8297
+
8298
+ :param dict operation_kwargs:
8299
+ A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.failover_data_guard`
8300
+
8301
+ :param dict waiter_kwargs:
8302
+ 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``
8303
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
8304
+ """
8305
+ operation_result = self.client.failover_data_guard(database_id, failover_data_guard_details, **operation_kwargs)
8306
+ if not wait_for_states:
8307
+ return operation_result
8308
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
8309
+ database_id = operation_result.data.id
8310
+
8311
+ try:
8312
+ waiter_result = oci.wait_until(
8313
+ self.client,
8314
+ self.client.get_database(database_id), # noqa: F821
8315
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
8316
+ **waiter_kwargs
8317
+ )
8318
+ result_to_return = waiter_result
8319
+
8320
+ return result_to_return
8321
+ except (NameError, TypeError) as e:
8322
+ if not e.args:
8323
+ e.args = ('',)
8324
+ 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"', )
8325
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
8326
+ except Exception as e:
8327
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
8328
+
8112
8329
  def failover_data_guard_association_and_wait_for_work_request(self, database_id, data_guard_association_id, failover_data_guard_association_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
8113
8330
  """
8114
8331
  Calls :py:func:`~oci.database.DatabaseClient.failover_data_guard_association` and waits for the oci.work_requests.models.WorkRequest
@@ -8465,6 +8682,98 @@ class DatabaseClientCompositeOperations(object):
8465
8682
  except Exception as e:
8466
8683
  raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
8467
8684
 
8685
+ def migrate_data_guard_association_to_multi_data_guards_and_wait_for_work_request(self, database_id, data_guard_association_id, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
8686
+ """
8687
+ Calls :py:func:`~oci.database.DatabaseClient.migrate_data_guard_association_to_multi_data_guards` and waits for the oci.work_requests.models.WorkRequest
8688
+ to enter the given state(s).
8689
+
8690
+ :param str database_id: (required)
8691
+ The database `OCID`__.
8692
+
8693
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
8694
+
8695
+ :param str data_guard_association_id: (required)
8696
+ The Data Guard association's `OCID`__.
8697
+
8698
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
8699
+
8700
+ :param list[str] work_request_states: (optional)
8701
+ An array of work requests states to wait on. These should be valid values for :py:attr:`~oci.work_requests.models.WorkRequest.status`
8702
+ Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
8703
+
8704
+ :param dict operation_kwargs:
8705
+ A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.migrate_data_guard_association_to_multi_data_guards`
8706
+
8707
+ :param dict waiter_kwargs:
8708
+ 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``
8709
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
8710
+ """
8711
+ operation_result = self.client.migrate_data_guard_association_to_multi_data_guards(database_id, data_guard_association_id, **operation_kwargs)
8712
+ work_request_states = work_request_states if work_request_states else oci.waiter._WORK_REQUEST_TERMINATION_STATES
8713
+ lowered_work_request_states = [w.lower() for w in work_request_states]
8714
+ if 'opc-work-request-id' not in operation_result.headers:
8715
+ return operation_result
8716
+ work_request_id = operation_result.headers['opc-work-request-id']
8717
+ try:
8718
+ waiter_result = oci.wait_until(
8719
+ self._work_request_client,
8720
+ self._work_request_client.get_work_request(work_request_id),
8721
+ evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_work_request_states,
8722
+ **waiter_kwargs
8723
+ )
8724
+ return waiter_result
8725
+ except Exception as e:
8726
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
8727
+
8728
+ def migrate_data_guard_association_to_multi_data_guards_and_wait_for_state(self, database_id, data_guard_association_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
8729
+ """
8730
+ Calls :py:func:`~oci.database.DatabaseClient.migrate_data_guard_association_to_multi_data_guards` and waits for the :py:class:`~oci.database.models.Database` acted upon
8731
+ to enter the given state(s).
8732
+
8733
+ :param str database_id: (required)
8734
+ The database `OCID`__.
8735
+
8736
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
8737
+
8738
+ :param str data_guard_association_id: (required)
8739
+ The Data Guard association's `OCID`__.
8740
+
8741
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
8742
+
8743
+ :param list[str] wait_for_states:
8744
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.database.models.Database.lifecycle_state`
8745
+
8746
+ :param dict operation_kwargs:
8747
+ A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.migrate_data_guard_association_to_multi_data_guards`
8748
+
8749
+ :param dict waiter_kwargs:
8750
+ 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``
8751
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
8752
+ """
8753
+ operation_result = self.client.migrate_data_guard_association_to_multi_data_guards(database_id, data_guard_association_id, **operation_kwargs)
8754
+ if not wait_for_states:
8755
+ return operation_result
8756
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
8757
+ database_id = operation_result.data.id
8758
+
8759
+ try:
8760
+ waiter_result = oci.wait_until(
8761
+ self.client,
8762
+ self.client.get_database(database_id), # noqa: F821
8763
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
8764
+ **waiter_kwargs
8765
+ )
8766
+ result_to_return = waiter_result
8767
+
8768
+ return result_to_return
8769
+ except (NameError, TypeError) as e:
8770
+ if not e.args:
8771
+ e.args = ('',)
8772
+ 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"', )
8773
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
8774
+ except Exception as e:
8775
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
8776
+
8468
8777
  def migrate_exadata_db_system_resource_model_and_wait_for_work_request(self, db_system_id, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
8469
8778
  """
8470
8779
  Calls :py:func:`~oci.database.DatabaseClient.migrate_exadata_db_system_resource_model` and waits for the oci.work_requests.models.WorkRequest
@@ -9067,6 +9376,94 @@ class DatabaseClientCompositeOperations(object):
9067
9376
  except Exception as e:
9068
9377
  raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
9069
9378
 
9379
+ def reinstate_data_guard_and_wait_for_work_request(self, database_id, reinstate_data_guard_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
9380
+ """
9381
+ Calls :py:func:`~oci.database.DatabaseClient.reinstate_data_guard` and waits for the oci.work_requests.models.WorkRequest
9382
+ to enter the given state(s).
9383
+
9384
+ :param str database_id: (required)
9385
+ The database `OCID`__.
9386
+
9387
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
9388
+
9389
+ :param oci.database.models.ReinstateDataGuardDetails reinstate_data_guard_details: (required)
9390
+ A request to update an existing Data Guard member.
9391
+
9392
+ :param list[str] work_request_states: (optional)
9393
+ An array of work requests states to wait on. These should be valid values for :py:attr:`~oci.work_requests.models.WorkRequest.status`
9394
+ Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
9395
+
9396
+ :param dict operation_kwargs:
9397
+ A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.reinstate_data_guard`
9398
+
9399
+ :param dict waiter_kwargs:
9400
+ 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``
9401
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
9402
+ """
9403
+ operation_result = self.client.reinstate_data_guard(database_id, reinstate_data_guard_details, **operation_kwargs)
9404
+ work_request_states = work_request_states if work_request_states else oci.waiter._WORK_REQUEST_TERMINATION_STATES
9405
+ lowered_work_request_states = [w.lower() for w in work_request_states]
9406
+ if 'opc-work-request-id' not in operation_result.headers:
9407
+ return operation_result
9408
+ work_request_id = operation_result.headers['opc-work-request-id']
9409
+ try:
9410
+ waiter_result = oci.wait_until(
9411
+ self._work_request_client,
9412
+ self._work_request_client.get_work_request(work_request_id),
9413
+ evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_work_request_states,
9414
+ **waiter_kwargs
9415
+ )
9416
+ return waiter_result
9417
+ except Exception as e:
9418
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
9419
+
9420
+ def reinstate_data_guard_and_wait_for_state(self, database_id, reinstate_data_guard_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
9421
+ """
9422
+ Calls :py:func:`~oci.database.DatabaseClient.reinstate_data_guard` and waits for the :py:class:`~oci.database.models.Database` acted upon
9423
+ to enter the given state(s).
9424
+
9425
+ :param str database_id: (required)
9426
+ The database `OCID`__.
9427
+
9428
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
9429
+
9430
+ :param oci.database.models.ReinstateDataGuardDetails reinstate_data_guard_details: (required)
9431
+ A request to update an existing Data Guard member.
9432
+
9433
+ :param list[str] wait_for_states:
9434
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.database.models.Database.lifecycle_state`
9435
+
9436
+ :param dict operation_kwargs:
9437
+ A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.reinstate_data_guard`
9438
+
9439
+ :param dict waiter_kwargs:
9440
+ 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``
9441
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
9442
+ """
9443
+ operation_result = self.client.reinstate_data_guard(database_id, reinstate_data_guard_details, **operation_kwargs)
9444
+ if not wait_for_states:
9445
+ return operation_result
9446
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
9447
+ database_id = operation_result.data.id
9448
+
9449
+ try:
9450
+ waiter_result = oci.wait_until(
9451
+ self.client,
9452
+ self.client.get_database(database_id), # noqa: F821
9453
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
9454
+ **waiter_kwargs
9455
+ )
9456
+ result_to_return = waiter_result
9457
+
9458
+ return result_to_return
9459
+ except (NameError, TypeError) as e:
9460
+ if not e.args:
9461
+ e.args = ('',)
9462
+ 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"', )
9463
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
9464
+ except Exception as e:
9465
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
9466
+
9070
9467
  def reinstate_data_guard_association_and_wait_for_work_request(self, database_id, data_guard_association_id, reinstate_data_guard_association_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
9071
9468
  """
9072
9469
  Calls :py:func:`~oci.database.DatabaseClient.reinstate_data_guard_association` and waits for the oci.work_requests.models.WorkRequest
@@ -11279,6 +11676,94 @@ class DatabaseClientCompositeOperations(object):
11279
11676
  except Exception as e:
11280
11677
  raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
11281
11678
 
11679
+ def switch_over_data_guard_and_wait_for_work_request(self, database_id, switch_over_data_guard_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
11680
+ """
11681
+ Calls :py:func:`~oci.database.DatabaseClient.switch_over_data_guard` and waits for the oci.work_requests.models.WorkRequest
11682
+ to enter the given state(s).
11683
+
11684
+ :param str database_id: (required)
11685
+ The database `OCID`__.
11686
+
11687
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
11688
+
11689
+ :param oci.database.models.SwitchOverDataGuardDetails switch_over_data_guard_details: (required)
11690
+ A request to update an existing Data Guard member.
11691
+
11692
+ :param list[str] work_request_states: (optional)
11693
+ An array of work requests states to wait on. These should be valid values for :py:attr:`~oci.work_requests.models.WorkRequest.status`
11694
+ Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
11695
+
11696
+ :param dict operation_kwargs:
11697
+ A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.switch_over_data_guard`
11698
+
11699
+ :param dict waiter_kwargs:
11700
+ 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``
11701
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
11702
+ """
11703
+ operation_result = self.client.switch_over_data_guard(database_id, switch_over_data_guard_details, **operation_kwargs)
11704
+ work_request_states = work_request_states if work_request_states else oci.waiter._WORK_REQUEST_TERMINATION_STATES
11705
+ lowered_work_request_states = [w.lower() for w in work_request_states]
11706
+ if 'opc-work-request-id' not in operation_result.headers:
11707
+ return operation_result
11708
+ work_request_id = operation_result.headers['opc-work-request-id']
11709
+ try:
11710
+ waiter_result = oci.wait_until(
11711
+ self._work_request_client,
11712
+ self._work_request_client.get_work_request(work_request_id),
11713
+ evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_work_request_states,
11714
+ **waiter_kwargs
11715
+ )
11716
+ return waiter_result
11717
+ except Exception as e:
11718
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
11719
+
11720
+ def switch_over_data_guard_and_wait_for_state(self, database_id, switch_over_data_guard_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
11721
+ """
11722
+ Calls :py:func:`~oci.database.DatabaseClient.switch_over_data_guard` and waits for the :py:class:`~oci.database.models.Database` acted upon
11723
+ to enter the given state(s).
11724
+
11725
+ :param str database_id: (required)
11726
+ The database `OCID`__.
11727
+
11728
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
11729
+
11730
+ :param oci.database.models.SwitchOverDataGuardDetails switch_over_data_guard_details: (required)
11731
+ A request to update an existing Data Guard member.
11732
+
11733
+ :param list[str] wait_for_states:
11734
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.database.models.Database.lifecycle_state`
11735
+
11736
+ :param dict operation_kwargs:
11737
+ A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.switch_over_data_guard`
11738
+
11739
+ :param dict waiter_kwargs:
11740
+ 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``
11741
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
11742
+ """
11743
+ operation_result = self.client.switch_over_data_guard(database_id, switch_over_data_guard_details, **operation_kwargs)
11744
+ if not wait_for_states:
11745
+ return operation_result
11746
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
11747
+ database_id = operation_result.data.id
11748
+
11749
+ try:
11750
+ waiter_result = oci.wait_until(
11751
+ self.client,
11752
+ self.client.get_database(database_id), # noqa: F821
11753
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
11754
+ **waiter_kwargs
11755
+ )
11756
+ result_to_return = waiter_result
11757
+
11758
+ return result_to_return
11759
+ except (NameError, TypeError) as e:
11760
+ if not e.args:
11761
+ e.args = ('',)
11762
+ 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"', )
11763
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
11764
+ except Exception as e:
11765
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
11766
+
11282
11767
  def switchover_autonomous_container_database_dataguard_association_and_wait_for_work_request(self, autonomous_container_database_id, autonomous_container_database_dataguard_association_id, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
11283
11768
  """
11284
11769
  Calls :py:func:`~oci.database.DatabaseClient.switchover_autonomous_container_database_dataguard_association` and waits for the oci.work_requests.models.WorkRequest
@@ -12868,6 +13353,94 @@ class DatabaseClientCompositeOperations(object):
12868
13353
  except Exception as e:
12869
13354
  raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
12870
13355
 
13356
+ def update_data_guard_and_wait_for_work_request(self, database_id, update_data_guard_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
13357
+ """
13358
+ Calls :py:func:`~oci.database.DatabaseClient.update_data_guard` and waits for the oci.work_requests.models.WorkRequest
13359
+ to enter the given state(s).
13360
+
13361
+ :param str database_id: (required)
13362
+ The database `OCID`__.
13363
+
13364
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
13365
+
13366
+ :param oci.database.models.UpdateDataGuardDetails update_data_guard_details: (required)
13367
+ A request to update an existing Data Guard member.
13368
+
13369
+ :param list[str] work_request_states: (optional)
13370
+ An array of work requests states to wait on. These should be valid values for :py:attr:`~oci.work_requests.models.WorkRequest.status`
13371
+ Default values are termination states: [STATUS_SUCCEEDED, STATUS_FAILED, STATUS_CANCELED]
13372
+
13373
+ :param dict operation_kwargs:
13374
+ A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.update_data_guard`
13375
+
13376
+ :param dict waiter_kwargs:
13377
+ 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``
13378
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
13379
+ """
13380
+ operation_result = self.client.update_data_guard(database_id, update_data_guard_details, **operation_kwargs)
13381
+ work_request_states = work_request_states if work_request_states else oci.waiter._WORK_REQUEST_TERMINATION_STATES
13382
+ lowered_work_request_states = [w.lower() for w in work_request_states]
13383
+ if 'opc-work-request-id' not in operation_result.headers:
13384
+ return operation_result
13385
+ work_request_id = operation_result.headers['opc-work-request-id']
13386
+ try:
13387
+ waiter_result = oci.wait_until(
13388
+ self._work_request_client,
13389
+ self._work_request_client.get_work_request(work_request_id),
13390
+ evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_work_request_states,
13391
+ **waiter_kwargs
13392
+ )
13393
+ return waiter_result
13394
+ except Exception as e:
13395
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
13396
+
13397
+ def update_data_guard_and_wait_for_state(self, database_id, update_data_guard_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
13398
+ """
13399
+ Calls :py:func:`~oci.database.DatabaseClient.update_data_guard` and waits for the :py:class:`~oci.database.models.Database` acted upon
13400
+ to enter the given state(s).
13401
+
13402
+ :param str database_id: (required)
13403
+ The database `OCID`__.
13404
+
13405
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
13406
+
13407
+ :param oci.database.models.UpdateDataGuardDetails update_data_guard_details: (required)
13408
+ A request to update an existing Data Guard member.
13409
+
13410
+ :param list[str] wait_for_states:
13411
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.database.models.Database.lifecycle_state`
13412
+
13413
+ :param dict operation_kwargs:
13414
+ A dictionary of keyword arguments to pass to :py:func:`~oci.database.DatabaseClient.update_data_guard`
13415
+
13416
+ :param dict waiter_kwargs:
13417
+ 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``
13418
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
13419
+ """
13420
+ operation_result = self.client.update_data_guard(database_id, update_data_guard_details, **operation_kwargs)
13421
+ if not wait_for_states:
13422
+ return operation_result
13423
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
13424
+ database_id = operation_result.data.id
13425
+
13426
+ try:
13427
+ waiter_result = oci.wait_until(
13428
+ self.client,
13429
+ self.client.get_database(database_id), # noqa: F821
13430
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
13431
+ **waiter_kwargs
13432
+ )
13433
+ result_to_return = waiter_result
13434
+
13435
+ return result_to_return
13436
+ except (NameError, TypeError) as e:
13437
+ if not e.args:
13438
+ e.args = ('',)
13439
+ 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"', )
13440
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
13441
+ except Exception as e:
13442
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
13443
+
12871
13444
  def update_data_guard_association_and_wait_for_work_request(self, database_id, data_guard_association_id, update_data_guard_association_details, work_request_states=[], operation_kwargs={}, waiter_kwargs={}):
12872
13445
  """
12873
13446
  Calls :py:func:`~oci.database.DatabaseClient.update_data_guard_association` and waits for the oci.work_requests.models.WorkRequest