oci 2.126.2__py3-none-any.whl → 2.126.3__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 (323) hide show
  1. oci/__init__.py +2 -2
  2. oci/access_governance_cp/access_governance_cp_client.py +8 -8
  3. oci/adm/application_dependency_management_client.py +36 -36
  4. oci/ai_anomaly_detection/anomaly_detection_client.py +36 -36
  5. oci/ai_document/ai_service_document_client.py +22 -22
  6. oci/ai_language/ai_service_language_client.py +44 -44
  7. oci/ai_speech/ai_service_speech_client.py +10 -10
  8. oci/ai_vision/ai_service_vision_client.py +25 -25
  9. oci/analytics/analytics_client.py +23 -23
  10. oci/announcements_service/announcement_client.py +4 -4
  11. oci/announcements_service/announcement_subscription_client.py +9 -9
  12. oci/announcements_service/announcements_preferences_client.py +4 -4
  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 +8 -8
  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/bastion/bastion_client.py +15 -15
  30. oci/bds/bds_client.py +51 -51
  31. oci/blockchain/blockchain_platform_client.py +27 -27
  32. oci/budget/budget_client.py +10 -10
  33. oci/capacity_management/capacity_management_client.py +19 -19
  34. oci/certificates/certificates_client.py +5 -5
  35. oci/certificates_management/certificates_management_client.py +32 -32
  36. oci/cims/incident_client.py +8 -8
  37. oci/cims/user_client.py +1 -1
  38. oci/cloud_bridge/common_client.py +5 -5
  39. oci/cloud_bridge/discovery_client.py +14 -14
  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 +99 -99
  53. oci/core/compute_management_client.py +32 -32
  54. oci/core/virtual_network_client.py +247 -247
  55. oci/dashboard_service/dashboard_client.py +6 -6
  56. oci/dashboard_service/dashboard_group_client.py +6 -6
  57. oci/data_catalog/data_catalog_client.py +149 -149
  58. oci/data_flow/data_flow_client.py +42 -42
  59. oci/data_integration/data_integration_client.py +163 -163
  60. oci/data_labeling_service/data_labeling_management_client.py +17 -17
  61. oci/data_labeling_service_dataplane/data_labeling_client.py +15 -15
  62. oci/data_safe/data_safe_client.py +278 -278
  63. oci/data_science/data_science_client.py +91 -91
  64. oci/database/database_client.py +333 -333
  65. oci/database/models/create_vm_cluster_details.py +33 -2
  66. oci/database/models/exadata_infrastructure.py +31 -0
  67. oci/database/models/exadata_infrastructure_summary.py +31 -0
  68. oci/database/models/update_vm_cluster_details.py +33 -2
  69. oci/database/models/vm_cluster.py +33 -2
  70. oci/database/models/vm_cluster_summary.py +33 -2
  71. oci/database_management/db_management_client.py +206 -206
  72. oci/database_management/diagnosability_client.py +4 -4
  73. oci/database_management/managed_my_sql_databases_client.py +7 -7
  74. oci/database_management/perfhub_client.py +1 -1
  75. oci/database_management/sql_tuning_client.py +17 -17
  76. oci/database_migration/database_migration_client.py +41 -41
  77. oci/database_tools/database_tools_client.py +23 -23
  78. oci/desktops/desktop_service_client.py +21 -21
  79. oci/devops/devops_client.py +89 -89
  80. oci/disaster_recovery/disaster_recovery_client.py +29 -29
  81. oci/dns/dns_client.py +52 -52
  82. oci/dts/appliance_export_job_client.py +6 -6
  83. oci/dts/shipping_vendors_client.py +1 -1
  84. oci/dts/transfer_appliance_client.py +8 -8
  85. oci/dts/transfer_appliance_entitlement_client.py +3 -3
  86. oci/dts/transfer_device_client.py +5 -5
  87. oci/dts/transfer_job_client.py +6 -6
  88. oci/dts/transfer_package_client.py +7 -7
  89. oci/em_warehouse/em_data_lake_client.py +13 -13
  90. oci/em_warehouse/em_warehouse_client.py +13 -13
  91. oci/email/email_client.py +608 -28
  92. oci/email/email_client_composite_operations.py +132 -0
  93. oci/email/models/__init__.py +10 -0
  94. oci/email/models/create_email_domain_details.py +31 -0
  95. oci/email/models/create_email_return_path_details.py +239 -0
  96. oci/email/models/email_domain.py +82 -0
  97. oci/email/models/email_return_path.py +577 -0
  98. oci/email/models/email_return_path_collection.py +72 -0
  99. oci/email/models/email_return_path_summary.py +444 -0
  100. oci/email/models/sender.py +15 -3
  101. oci/email/models/update_email_domain_details.py +31 -0
  102. oci/email/models/update_email_return_path_details.py +156 -0
  103. oci/email/models/work_request.py +15 -3
  104. oci/email/models/work_request_summary.py +15 -3
  105. oci/email_data_plane/email_dp_client.py +1 -1
  106. oci/events/events_client.py +6 -6
  107. oci/file_storage/file_storage_client.py +50 -50
  108. oci/fleet_software_update/fleet_software_update_client.py +44 -44
  109. oci/functions/functions_invoke_client.py +1 -1
  110. oci/functions/functions_management_client.py +16 -16
  111. oci/fusion_apps/data_masking_activity_client.py +3 -3
  112. oci/fusion_apps/fusion_applications_client.py +39 -39
  113. oci/fusion_apps/fusion_environment_client.py +15 -15
  114. oci/fusion_apps/fusion_environment_family_client.py +8 -8
  115. oci/fusion_apps/refresh_activity_client.py +4 -4
  116. oci/fusion_apps/scheduled_activity_client.py +2 -2
  117. oci/fusion_apps/service_attachment_client.py +2 -2
  118. oci/generative_ai/generative_ai_client.py +22 -22
  119. oci/generative_ai_inference/generative_ai_inference_client.py +4 -4
  120. oci/generic_artifacts_content/generic_artifacts_content_client.py +3 -3
  121. oci/globally_distributed_database/sharded_database_service_client.py +29 -29
  122. oci/golden_gate/golden_gate_client.py +61 -61
  123. oci/governance_rules_control_plane/governance_rule_client.py +15 -15
  124. oci/governance_rules_control_plane/work_request_client.py +5 -5
  125. oci/healthchecks/health_checks_client.py +17 -17
  126. oci/identity/identity_client.py +145 -145
  127. oci/identity_data_plane/dataplane_client.py +2 -2
  128. oci/identity_domains/identity_domains_client.py +300 -300
  129. oci/integration/integration_instance_client.py +15 -15
  130. oci/jms/java_management_service_client.py +66 -66
  131. oci/jms_java_downloads/java_download_client.py +25 -25
  132. oci/key_management/ekm_client.py +5 -5
  133. oci/key_management/kms_crypto_client.py +6 -6
  134. oci/key_management/kms_hsm_cluster_client.py +12 -12
  135. oci/key_management/kms_management_client.py +21 -21
  136. oci/key_management/kms_vault_client.py +14 -14
  137. oci/license_manager/license_manager_client.py +18 -18
  138. oci/limits/limits_client.py +4 -4
  139. oci/limits/quotas_client.py +7 -7
  140. oci/load_balancer/load_balancer_client.py +61 -61
  141. oci/load_balancer/models/ssl_configuration.py +41 -0
  142. oci/load_balancer/models/ssl_configuration_details.py +41 -0
  143. oci/lockbox/lockbox_client.py +24 -24
  144. oci/log_analytics/log_analytics_client.py +193 -193
  145. oci/logging/logging_management_client.py +30 -30
  146. oci/loggingingestion/logging_client.py +1 -1
  147. oci/loggingsearch/log_search_client.py +1 -1
  148. oci/management_agent/management_agent_client.py +28 -28
  149. oci/management_dashboard/dashx_apis_client.py +14 -14
  150. oci/marketplace/account_client.py +2 -2
  151. oci/marketplace/marketplace_client.py +30 -30
  152. oci/marketplace_private_offer/__init__.py +16 -0
  153. oci/marketplace_private_offer/attachment_client.py +719 -0
  154. oci/marketplace_private_offer/attachment_client_composite_operations.py +71 -0
  155. oci/marketplace_private_offer/models/__init__.py +48 -0
  156. oci/marketplace_private_offer/models/attachment.py +446 -0
  157. oci/marketplace_private_offer/models/attachment_collection.py +72 -0
  158. oci/marketplace_private_offer/models/attachment_summary.py +293 -0
  159. oci/marketplace_private_offer/models/buyer_information.py +161 -0
  160. oci/marketplace_private_offer/models/contact.py +134 -0
  161. oci/marketplace_private_offer/models/create_attachment_details.py +134 -0
  162. oci/marketplace_private_offer/models/create_offer_details.py +498 -0
  163. oci/marketplace_private_offer/models/custom_field.py +103 -0
  164. oci/marketplace_private_offer/models/offer.py +787 -0
  165. oci/marketplace_private_offer/models/offer_collection.py +72 -0
  166. oci/marketplace_private_offer/models/offer_internal_detail.py +103 -0
  167. oci/marketplace_private_offer/models/offer_summary.py +591 -0
  168. oci/marketplace_private_offer/models/pricing.py +146 -0
  169. oci/marketplace_private_offer/models/publisher_summary.py +710 -0
  170. oci/marketplace_private_offer/models/resource_bundle.py +205 -0
  171. oci/marketplace_private_offer/models/seller_information.py +99 -0
  172. oci/marketplace_private_offer/models/update_offer_details.py +467 -0
  173. oci/marketplace_private_offer/models/upload_data.py +134 -0
  174. oci/marketplace_private_offer/offer_client.py +789 -0
  175. oci/marketplace_private_offer/offer_client_composite_operations.py +172 -0
  176. oci/marketplace_publisher/__init__.py +5 -1
  177. oci/marketplace_publisher/attachment_client.py +719 -0
  178. oci/marketplace_publisher/attachment_client_composite_operations.py +121 -0
  179. oci/marketplace_publisher/marketplace_publisher_client.py +71 -71
  180. oci/marketplace_publisher/models/__init__.py +32 -0
  181. oci/marketplace_publisher/models/attachment.py +446 -0
  182. oci/marketplace_publisher/models/attachment_collection.py +72 -0
  183. oci/marketplace_publisher/models/attachment_summary.py +293 -0
  184. oci/marketplace_publisher/models/buyer_information.py +161 -0
  185. oci/marketplace_publisher/models/contact.py +134 -0
  186. oci/marketplace_publisher/models/create_attachment_details.py +134 -0
  187. oci/marketplace_publisher/models/create_offer_details.py +498 -0
  188. oci/marketplace_publisher/models/custom_field.py +103 -0
  189. oci/marketplace_publisher/models/offer.py +787 -0
  190. oci/marketplace_publisher/models/offer_collection.py +72 -0
  191. oci/marketplace_publisher/models/offer_internal_detail.py +103 -0
  192. oci/marketplace_publisher/models/offer_summary.py +591 -0
  193. oci/marketplace_publisher/models/pricing.py +146 -0
  194. oci/marketplace_publisher/models/resource_bundle.py +205 -0
  195. oci/marketplace_publisher/models/seller_information.py +99 -0
  196. oci/marketplace_publisher/models/update_offer_details.py +467 -0
  197. oci/marketplace_publisher/models/work_request.py +23 -3
  198. oci/marketplace_publisher/models/work_request_summary.py +23 -3
  199. oci/marketplace_publisher/offer_client.py +789 -0
  200. oci/marketplace_publisher/offer_client_composite_operations.py +160 -0
  201. oci/media_services/media_services_client.py +60 -60
  202. oci/media_services/media_stream_client.py +2 -2
  203. oci/monitoring/monitoring_client.py +18 -18
  204. oci/mysql/channels_client.py +7 -7
  205. oci/mysql/db_backups_client.py +6 -6
  206. oci/mysql/db_system_client.py +17 -17
  207. oci/mysql/mysqlaas_client.py +7 -7
  208. oci/mysql/replicas_client.py +5 -5
  209. oci/mysql/work_requests_client.py +4 -4
  210. oci/network_firewall/network_firewall_client.py +80 -80
  211. oci/network_load_balancer/models/create_listener_details.py +33 -2
  212. oci/network_load_balancer/models/listener.py +33 -2
  213. oci/network_load_balancer/models/listener_details.py +33 -2
  214. oci/network_load_balancer/models/listener_summary.py +33 -2
  215. oci/network_load_balancer/models/update_listener_details.py +33 -2
  216. oci/network_load_balancer/network_load_balancer_client.py +34 -34
  217. oci/nosql/nosql_client.py +24 -24
  218. oci/object_storage/object_storage_client.py +50 -50
  219. oci/oce/oce_instance_client.py +10 -10
  220. oci/oci_control_center/occ_metrics_client.py +3 -3
  221. oci/ocvp/cluster_client.py +5 -5
  222. oci/ocvp/esxi_host_client.py +8 -8
  223. oci/ocvp/sddc_client.py +14 -14
  224. oci/ocvp/work_request_client.py +4 -4
  225. oci/oda/management_client.py +59 -59
  226. oci/oda/oda_client.py +17 -17
  227. oci/oda/odapackage_client.py +7 -7
  228. oci/onesubscription/billing_schedule_client.py +1 -1
  229. oci/onesubscription/commitment_client.py +2 -2
  230. oci/onesubscription/computed_usage_client.py +3 -3
  231. oci/onesubscription/invoice_summary_client.py +2 -2
  232. oci/onesubscription/organization_subscription_client.py +1 -1
  233. oci/onesubscription/ratecard_client.py +1 -1
  234. oci/onesubscription/subscribed_service_client.py +2 -2
  235. oci/onesubscription/subscription_client.py +1 -1
  236. oci/ons/notification_control_plane_client.py +6 -6
  237. oci/ons/notification_data_plane_client.py +10 -10
  238. oci/opa/opa_instance_client.py +13 -13
  239. oci/opensearch/opensearch_cluster_backup_client.py +4 -4
  240. oci/opensearch/opensearch_cluster_client.py +14 -14
  241. oci/operator_access_control/access_requests_client.py +10 -10
  242. oci/operator_access_control/operator_actions_client.py +2 -2
  243. oci/operator_access_control/operator_control_assignment_client.py +8 -8
  244. oci/operator_access_control/operator_control_client.py +6 -6
  245. oci/opsi/operations_insights_client.py +175 -175
  246. oci/optimizer/optimizer_client.py +26 -26
  247. oci/os_management/event_client.py +8 -8
  248. oci/os_management/os_management_client.py +69 -69
  249. oci/os_management_hub/event_client.py +8 -8
  250. oci/os_management_hub/lifecycle_environment_client.py +12 -12
  251. oci/os_management_hub/managed_instance_client.py +31 -31
  252. oci/os_management_hub/managed_instance_group_client.py +25 -25
  253. oci/os_management_hub/management_station_client.py +10 -10
  254. oci/os_management_hub/onboarding_client.py +6 -6
  255. oci/os_management_hub/reporting_managed_instance_client.py +3 -3
  256. oci/os_management_hub/scheduled_job_client.py +7 -7
  257. oci/os_management_hub/software_source_client.py +27 -27
  258. oci/os_management_hub/work_request_client.py +4 -4
  259. oci/osp_gateway/address_rule_service_client.py +1 -1
  260. oci/osp_gateway/address_service_client.py +2 -2
  261. oci/osp_gateway/invoice_service_client.py +5 -5
  262. oci/osp_gateway/subscription_service_client.py +5 -5
  263. oci/osub_billing_schedule/billing_schedule_client.py +1 -1
  264. oci/osub_organization_subscription/organization_subscription_client.py +1 -1
  265. oci/osub_subscription/commitment_client.py +2 -2
  266. oci/osub_subscription/ratecard_client.py +1 -1
  267. oci/osub_subscription/subscription_client.py +1 -1
  268. oci/osub_usage/computed_usage_client.py +3 -3
  269. oci/psql/postgresql_client.py +33 -33
  270. oci/queue/queue_admin_client.py +11 -11
  271. oci/queue/queue_client.py +8 -8
  272. oci/recovery/database_recovery_client.py +25 -25
  273. oci/redis/redis_cluster_client.py +11 -11
  274. oci/resource_manager/resource_manager_client.py +52 -52
  275. oci/resource_search/resource_search_client.py +3 -3
  276. oci/rover/rover_bundle_client.py +8 -8
  277. oci/rover/rover_cluster_client.py +8 -8
  278. oci/rover/rover_entitlement_client.py +6 -6
  279. oci/rover/rover_node_client.py +15 -15
  280. oci/rover/shape_client.py +1 -1
  281. oci/rover/work_requests_client.py +5 -5
  282. oci/sch/connector_plugins_client.py +2 -2
  283. oci/sch/service_connector_client.py +12 -12
  284. oci/secrets/secrets_client.py +3 -3
  285. oci/service_catalog/service_catalog_client.py +26 -26
  286. oci/service_manager_proxy/service_manager_proxy_client.py +2 -2
  287. oci/service_mesh/service_mesh_client.py +48 -48
  288. oci/stack_monitoring/stack_monitoring_client.py +64 -64
  289. oci/streaming/stream_admin_client.py +18 -18
  290. oci/streaming/stream_client.py +8 -8
  291. oci/tenant_manager_control_plane/domain_client.py +5 -5
  292. oci/tenant_manager_control_plane/domain_governance_client.py +5 -5
  293. oci/tenant_manager_control_plane/governance_client.py +2 -2
  294. oci/tenant_manager_control_plane/link_client.py +3 -3
  295. oci/tenant_manager_control_plane/orders_client.py +2 -2
  296. oci/tenant_manager_control_plane/organization_client.py +10 -10
  297. oci/tenant_manager_control_plane/recipient_invitation_client.py +5 -5
  298. oci/tenant_manager_control_plane/sender_invitation_client.py +5 -5
  299. oci/tenant_manager_control_plane/subscription_client.py +11 -11
  300. oci/tenant_manager_control_plane/work_request_client.py +4 -4
  301. oci/threat_intelligence/threatintel_client.py +5 -5
  302. oci/usage/resources_client.py +2 -2
  303. oci/usage/rewards_client.py +6 -6
  304. oci/usage/usagelimits_client.py +1 -1
  305. oci/usage_api/usageapi_client.py +33 -33
  306. oci/vault/vaults_client.py +13 -13
  307. oci/vbs_inst/vbs_instance_client.py +10 -10
  308. oci/version.py +1 -1
  309. oci/visual_builder/vb_instance_client.py +13 -13
  310. oci/vn_monitoring/vn_monitoring_client.py +12 -12
  311. oci/vulnerability_scanning/vulnerability_scanning_client.py +58 -58
  312. oci/waa/waa_client.py +13 -13
  313. oci/waa/work_request_client.py +4 -4
  314. oci/waas/redirect_client.py +6 -6
  315. oci/waas/waas_client.py +66 -66
  316. oci/waf/waf_client.py +24 -24
  317. oci/work_requests/work_request_client.py +4 -4
  318. {oci-2.126.2.dist-info → oci-2.126.3.dist-info}/METADATA +1 -1
  319. {oci-2.126.2.dist-info → oci-2.126.3.dist-info}/RECORD +323 -274
  320. {oci-2.126.2.dist-info → oci-2.126.3.dist-info}/LICENSE.txt +0 -0
  321. {oci-2.126.2.dist-info → oci-2.126.3.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  322. {oci-2.126.2.dist-info → oci-2.126.3.dist-info}/WHEEL +0 -0
  323. {oci-2.126.2.dist-info → oci-2.126.3.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,121 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2024, 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: 20220901
6
+
7
+ import oci # noqa: F401
8
+ from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401
9
+
10
+
11
+ class AttachmentClientCompositeOperations(object):
12
+ """
13
+ This class provides a wrapper around :py:class:`~oci.marketplace_publisher.AttachmentClient` 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 AttachmentClientCompositeOperations object
22
+
23
+ :param AttachmentClient client:
24
+ The service client which will be wrapped by this object
25
+ """
26
+ self.client = client
27
+
28
+ def create_attachment_and_wait_for_state(self, create_attachment_details, offer_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
29
+ """
30
+ Calls :py:func:`~oci.marketplace_publisher.AttachmentClient.create_attachment` and waits for the :py:class:`~oci.marketplace_publisher.models.Attachment` acted upon
31
+ to enter the given state(s).
32
+
33
+ :param oci.marketplace_publisher.models.CreateAttachmentDetails create_attachment_details: (required)
34
+ Details for the new Attachment.
35
+
36
+ :param str offer_id: (required)
37
+ unique Offer identifier
38
+
39
+ :param list[str] wait_for_states:
40
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.marketplace_publisher.models.Attachment.lifecycle_state`
41
+
42
+ :param dict operation_kwargs:
43
+ A dictionary of keyword arguments to pass to :py:func:`~oci.marketplace_publisher.AttachmentClient.create_attachment`
44
+
45
+ :param dict waiter_kwargs:
46
+ 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``
47
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
48
+ """
49
+ operation_result = self.client.create_attachment(create_attachment_details, offer_id, **operation_kwargs)
50
+ if not wait_for_states:
51
+ return operation_result
52
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
53
+ attachment_id = operation_result.data.id
54
+
55
+ try:
56
+ waiter_result = oci.wait_until(
57
+ self.client,
58
+ self.client.get_attachment(offer_id, attachment_id), # noqa: F821
59
+ evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states,
60
+ **waiter_kwargs
61
+ )
62
+ result_to_return = waiter_result
63
+
64
+ return result_to_return
65
+ except (NameError, TypeError) as e:
66
+ if not e.args:
67
+ e.args = ('',)
68
+ 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"', )
69
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
70
+ except Exception as e:
71
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)
72
+
73
+ def delete_attachment_and_wait_for_state(self, offer_id, attachment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}):
74
+ """
75
+ Calls :py:func:`~oci.marketplace_publisher.AttachmentClient.delete_attachment` and waits for the :py:class:`~oci.marketplace_publisher.models.WorkRequest`
76
+ to enter the given state(s).
77
+
78
+ :param str offer_id: (required)
79
+ unique Offer identifier
80
+
81
+ :param str attachment_id: (required)
82
+ unique Offer identifier
83
+
84
+ :param list[str] wait_for_states:
85
+ An array of states to wait on. These should be valid values for :py:attr:`~oci.marketplace_publisher.models.WorkRequest.status`
86
+
87
+ :param dict operation_kwargs:
88
+ A dictionary of keyword arguments to pass to :py:func:`~oci.marketplace_publisher.AttachmentClient.delete_attachment`
89
+
90
+ :param dict waiter_kwargs:
91
+ 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``
92
+ as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait
93
+ """
94
+ operation_result = None
95
+ try:
96
+ operation_result = self.client.delete_attachment(offer_id, attachment_id, **operation_kwargs)
97
+ except oci.exceptions.ServiceError as e:
98
+ if e.status == 404:
99
+ return WAIT_RESOURCE_NOT_FOUND
100
+ else:
101
+ raise e
102
+
103
+ if not wait_for_states:
104
+ return operation_result
105
+ lowered_wait_for_states = [w.lower() for w in wait_for_states]
106
+ if 'opc-work-request-id' not in operation_result.headers:
107
+ return operation_result
108
+ wait_for_resource_id = operation_result.headers['opc-work-request-id']
109
+
110
+ try:
111
+ waiter_result = oci.wait_until(
112
+ self.client,
113
+ self.client.get_work_request(wait_for_resource_id),
114
+ evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states,
115
+ **waiter_kwargs
116
+ )
117
+ result_to_return = waiter_result
118
+
119
+ return result_to_return
120
+ except Exception as e:
121
+ raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e)