oci 2.116.0__py3-none-any.whl → 2.117.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 (352) hide show
  1. oci/access_governance_cp/access_governance_cp_client.py +8 -8
  2. oci/adm/application_dependency_management_client.py +41 -41
  3. oci/adm/models/__init__.py +4 -0
  4. oci/adm/models/create_vulnerability_audit_details.py +27 -0
  5. oci/adm/models/usage_data_details.py +92 -0
  6. oci/adm/models/usage_data_via_object_storage_tuple_details.py +143 -0
  7. oci/adm/models/vulnerability.py +33 -2
  8. oci/adm/models/vulnerability_audit.py +86 -0
  9. oci/adm/models/work_request_summary.py +35 -2
  10. oci/ai_anomaly_detection/anomaly_detection_client.py +36 -36
  11. oci/ai_document/ai_service_document_client.py +22 -22
  12. oci/ai_language/ai_service_language_client.py +36 -36
  13. oci/ai_speech/ai_service_speech_client.py +9 -9
  14. oci/ai_vision/ai_service_vision_client.py +25 -25
  15. oci/analytics/analytics_client.py +23 -23
  16. oci/announcements_service/announcement_client.py +4 -4
  17. oci/announcements_service/announcement_subscription_client.py +9 -9
  18. oci/announcements_service/announcements_preferences_client.py +4 -4
  19. oci/apigateway/api_gateway_client.py +21 -21
  20. oci/apigateway/deployment_client.py +6 -6
  21. oci/apigateway/gateway_client.py +6 -6
  22. oci/apigateway/subscribers_client.py +6 -6
  23. oci/apigateway/usage_plans_client.py +6 -6
  24. oci/apigateway/work_requests_client.py +5 -5
  25. oci/apm_config/config_client.py +8 -8
  26. oci/apm_control_plane/apm_domain_client.py +14 -14
  27. oci/apm_synthetics/apm_synthetic_client.py +18 -18
  28. oci/apm_traces/query_client.py +2 -2
  29. oci/apm_traces/trace_client.py +4 -4
  30. oci/application_migration/application_migration_client.py +19 -19
  31. oci/appmgmt_control/appmgmt_control_client.py +8 -8
  32. oci/artifacts/artifacts_client.py +32 -32
  33. oci/audit/audit_client.py +3 -3
  34. oci/autoscaling/auto_scaling_client.py +11 -11
  35. oci/bastion/bastion_client.py +15 -15
  36. oci/bds/bds_client.py +51 -51
  37. oci/blockchain/blockchain_platform_client.py +27 -27
  38. oci/budget/budget_client.py +10 -10
  39. oci/certificates/certificates_client.py +5 -5
  40. oci/certificates_management/certificates_management_client.py +32 -32
  41. oci/cims/incident_client.py +8 -8
  42. oci/cims/user_client.py +1 -1
  43. oci/cloud_bridge/common_client.py +5 -5
  44. oci/cloud_bridge/discovery_client.py +14 -14
  45. oci/cloud_bridge/inventory_client.py +16 -16
  46. oci/cloud_bridge/ocb_agent_svc_client.py +23 -23
  47. oci/cloud_guard/cloud_guard_client.py +133 -133
  48. oci/cloud_migrations/migration_client.py +43 -43
  49. oci/compute_cloud_at_customer/compute_cloud_at_customer_client.py +14 -15
  50. oci/compute_instance_agent/compute_instance_agent_client.py +6 -6
  51. oci/compute_instance_agent/plugin_client.py +2 -2
  52. oci/compute_instance_agent/pluginconfig_client.py +1 -1
  53. oci/container_engine/container_engine_client.py +44 -44
  54. oci/container_instances/container_instance_client.py +18 -18
  55. oci/core/blockstorage_client.py +60 -60
  56. oci/core/compute_client.py +99 -99
  57. oci/core/compute_management_client.py +32 -32
  58. oci/core/virtual_network_client.py +242 -242
  59. oci/dashboard_service/dashboard_client.py +6 -6
  60. oci/dashboard_service/dashboard_group_client.py +6 -6
  61. oci/data_catalog/data_catalog_client.py +141 -141
  62. oci/data_flow/data_flow_client.py +42 -42
  63. oci/data_integration/data_integration_client.py +163 -163
  64. oci/data_labeling_service/data_labeling_management_client.py +17 -17
  65. oci/data_labeling_service_dataplane/data_labeling_client.py +15 -15
  66. oci/data_safe/data_safe_client.py +252 -252
  67. oci/data_science/data_science_client.py +91 -91
  68. oci/data_science/models/fast_launch_job_config_summary.py +7 -3
  69. oci/data_science/models/job_shape_summary.py +7 -3
  70. oci/data_science/models/model_deployment_shape_summary.py +7 -3
  71. oci/data_science/models/notebook_session_shape_summary.py +7 -3
  72. oci/database/database_client.py +2092 -1268
  73. oci/database/database_client_composite_operations.py +222 -0
  74. oci/database/models/__init__.py +14 -0
  75. oci/database/models/autonomous_container_database.py +33 -2
  76. oci/database/models/autonomous_container_database_backup_config.py +2 -0
  77. oci/database/models/autonomous_container_database_summary.py +33 -2
  78. oci/database/models/autonomous_vm_cluster.py +95 -2
  79. oci/database/models/autonomous_vm_cluster_summary.py +95 -2
  80. oci/database/models/cloud_autonomous_vm_cluster.py +95 -2
  81. oci/database/models/cloud_autonomous_vm_cluster_summary.py +95 -2
  82. oci/database/models/console_history.py +368 -0
  83. oci/database/models/console_history_collection.py +72 -0
  84. oci/database/models/console_history_summary.py +368 -0
  85. oci/database/models/create_cloud_vm_cluster_details.py +33 -2
  86. oci/database/models/create_console_history_details.py +151 -0
  87. oci/database/models/create_vm_cluster_details.py +33 -2
  88. oci/database/models/db_system_upgrade_history_entry.py +64 -2
  89. oci/database/models/db_system_upgrade_history_entry_summary.py +64 -2
  90. oci/database/models/peer_autonomous_container_database_backup_config.py +2 -0
  91. oci/database/models/system_version_collection.py +72 -0
  92. oci/database/models/system_version_summary.py +134 -0
  93. oci/database/models/update_autonomous_vm_cluster_details.py +95 -2
  94. oci/database/models/update_cloud_autonomous_vm_cluster_details.py +93 -0
  95. oci/database/models/update_console_history_details.py +150 -0
  96. oci/database/models/upgrade_db_system_details.py +31 -0
  97. oci/database_management/db_management_client.py +182 -182
  98. oci/database_management/diagnosability_client.py +4 -4
  99. oci/database_management/managed_my_sql_databases_client.py +6 -6
  100. oci/database_management/perfhub_client.py +1 -1
  101. oci/database_management/sql_tuning_client.py +17 -17
  102. oci/database_migration/database_migration_client.py +41 -41
  103. oci/database_tools/database_tools_client.py +23 -23
  104. oci/devops/devops_client.py +89 -89
  105. oci/disaster_recovery/disaster_recovery_client.py +29 -29
  106. oci/dns/dns_client.py +52 -52
  107. oci/dts/appliance_export_job_client.py +6 -6
  108. oci/dts/shipping_vendors_client.py +1 -1
  109. oci/dts/transfer_appliance_client.py +8 -8
  110. oci/dts/transfer_appliance_entitlement_client.py +3 -3
  111. oci/dts/transfer_device_client.py +5 -5
  112. oci/dts/transfer_job_client.py +6 -6
  113. oci/dts/transfer_package_client.py +7 -7
  114. oci/em_warehouse/em_data_lake_client.py +13 -13
  115. oci/em_warehouse/em_warehouse_client.py +13 -13
  116. oci/email/email_client.py +25 -25
  117. oci/events/events_client.py +6 -6
  118. oci/file_storage/file_storage_client.py +50 -50
  119. oci/fleet_software_update/fleet_software_update_client.py +44 -44
  120. oci/functions/functions_invoke_client.py +1 -1
  121. oci/functions/functions_management_client.py +16 -16
  122. oci/fusion_apps/data_masking_activity_client.py +3 -3
  123. oci/fusion_apps/fusion_applications_client.py +39 -39
  124. oci/fusion_apps/fusion_environment_client.py +15 -15
  125. oci/fusion_apps/fusion_environment_family_client.py +8 -8
  126. oci/fusion_apps/refresh_activity_client.py +4 -4
  127. oci/fusion_apps/scheduled_activity_client.py +2 -2
  128. oci/fusion_apps/service_attachment_client.py +2 -2
  129. oci/generic_artifacts_content/generic_artifacts_content_client.py +3 -3
  130. oci/golden_gate/golden_gate_client.py +536 -57
  131. oci/golden_gate/golden_gate_client_composite_operations.py +90 -0
  132. oci/golden_gate/models/__init__.py +8 -0
  133. oci/golden_gate/models/certificate.py +713 -0
  134. oci/golden_gate/models/certificate_collection.py +72 -0
  135. oci/golden_gate/models/certificate_summary.py +269 -0
  136. oci/golden_gate/models/create_certificate_details.py +105 -0
  137. oci/golden_gate/models/create_microsoft_sqlserver_connection_details.py +2 -2
  138. oci/golden_gate/models/create_mysql_connection_details.py +10 -12
  139. oci/golden_gate/models/create_postgresql_connection_details.py +8 -6
  140. oci/golden_gate/models/microsoft_sqlserver_connection.py +2 -2
  141. oci/golden_gate/models/microsoft_sqlserver_connection_summary.py +2 -2
  142. oci/golden_gate/models/update_microsoft_sqlserver_connection_details.py +2 -2
  143. oci/golden_gate/models/update_mysql_connection_details.py +10 -12
  144. oci/golden_gate/models/update_postgresql_connection_details.py +8 -6
  145. oci/golden_gate/models/work_request.py +11 -3
  146. oci/governance_rules_control_plane/governance_rule_client.py +15 -15
  147. oci/governance_rules_control_plane/work_request_client.py +5 -5
  148. oci/healthchecks/health_checks_client.py +17 -17
  149. oci/identity/identity_client.py +145 -145
  150. oci/identity_data_plane/dataplane_client.py +2 -2
  151. oci/identity_domains/identity_domains_client.py +294 -294
  152. oci/integration/integration_instance_client.py +15 -15
  153. oci/jms/java_management_service_client.py +66 -66
  154. oci/jms_java_downloads/java_download_client.py +25 -25
  155. oci/key_management/ekm_client.py +5 -5
  156. oci/key_management/kms_crypto_client.py +6 -6
  157. oci/key_management/kms_management_client.py +21 -21
  158. oci/key_management/kms_vault_client.py +14 -14
  159. oci/license_manager/license_manager_client.py +18 -18
  160. oci/limits/limits_client.py +4 -4
  161. oci/limits/quotas_client.py +7 -7
  162. oci/load_balancer/load_balancer_client.py +61 -61
  163. oci/lockbox/lockbox_client.py +23 -23
  164. oci/log_analytics/log_analytics_client.py +388 -192
  165. oci/log_analytics/models/export_details.py +15 -17
  166. oci/logging/logging_management_client.py +30 -30
  167. oci/loggingingestion/logging_client.py +1 -1
  168. oci/loggingsearch/log_search_client.py +1 -1
  169. oci/management_agent/management_agent_client.py +23 -23
  170. oci/management_dashboard/dashx_apis_client.py +14 -14
  171. oci/marketplace/account_client.py +2 -2
  172. oci/marketplace/marketplace_client.py +30 -30
  173. oci/marketplace_publisher/marketplace_publisher_client.py +71 -71
  174. oci/media_services/media_services_client.py +48 -48
  175. oci/media_services/media_stream_client.py +2 -2
  176. oci/monitoring/monitoring_client.py +13 -13
  177. oci/mysql/channels_client.py +7 -7
  178. oci/mysql/db_backups_client.py +6 -6
  179. oci/mysql/db_system_client.py +17 -17
  180. oci/mysql/mysqlaas_client.py +7 -7
  181. oci/mysql/replicas_client.py +5 -5
  182. oci/mysql/work_requests_client.py +4 -4
  183. oci/network_firewall/network_firewall_client.py +80 -80
  184. oci/network_load_balancer/network_load_balancer_client.py +34 -34
  185. oci/nosql/nosql_client.py +24 -24
  186. oci/object_storage/object_storage_client.py +50 -50
  187. oci/oce/oce_instance_client.py +10 -10
  188. oci/oci_control_center/occ_metrics_client.py +3 -3
  189. oci/ocvp/__init__.py +4 -2
  190. oci/ocvp/cluster_client.py +732 -0
  191. oci/ocvp/cluster_client_composite_operations.py +160 -0
  192. oci/ocvp/esxi_host_client.py +262 -14
  193. oci/ocvp/esxi_host_client_composite_operations.py +84 -1
  194. oci/ocvp/models/__init__.py +29 -7
  195. oci/ocvp/models/change_sddc_compartment_details.py +1 -1
  196. oci/ocvp/models/cluster.py +1026 -0
  197. oci/ocvp/models/cluster_collection.py +72 -0
  198. oci/ocvp/models/cluster_summary.py +671 -0
  199. oci/ocvp/models/create_cluster_details.py +658 -0
  200. oci/ocvp/models/create_esxi_host_details.py +112 -161
  201. oci/ocvp/models/create_sddc_details.py +86 -814
  202. oci/ocvp/models/datastore_details.py +154 -0
  203. oci/ocvp/models/datastore_info.py +6 -6
  204. oci/ocvp/models/downgrade_hcx_details.py +1 -1
  205. oci/ocvp/models/esxi_host.py +132 -64
  206. oci/ocvp/models/esxi_host_collection.py +1 -1
  207. oci/ocvp/models/esxi_host_summary.py +100 -63
  208. oci/ocvp/models/hcx_license_summary.py +1 -1
  209. oci/ocvp/models/initial_cluster_configuration.py +518 -0
  210. oci/ocvp/models/initial_configuration.py +72 -0
  211. oci/ocvp/models/network_configuration.py +635 -0
  212. oci/ocvp/models/replace_host_details.py +78 -0
  213. oci/ocvp/models/sddc.py +176 -1269
  214. oci/ocvp/models/sddc_collection.py +1 -1
  215. oci/ocvp/models/sddc_password.py +123 -0
  216. oci/ocvp/models/sddc_summary.py +55 -161
  217. oci/ocvp/models/supported_commitment_summary.py +96 -0
  218. oci/ocvp/models/supported_commitment_summary_collection.py +72 -0
  219. oci/ocvp/models/supported_esxi_software_version_summary.py +135 -0
  220. oci/ocvp/models/supported_host_shape_collection.py +1 -1
  221. oci/ocvp/models/supported_host_shape_summary.py +54 -54
  222. oci/ocvp/models/supported_vmware_software_version_collection.py +1 -1
  223. oci/ocvp/models/supported_vmware_software_version_summary.py +34 -3
  224. oci/ocvp/models/update_cluster_details.py +265 -0
  225. oci/ocvp/models/update_esxi_host_details.py +32 -32
  226. oci/ocvp/models/update_sddc_details.py +42 -377
  227. oci/ocvp/models/vsphere_license.py +1 -1
  228. oci/ocvp/models/vsphere_upgrade_object.py +1 -1
  229. oci/ocvp/models/work_request.py +20 -4
  230. oci/ocvp/models/work_request_collection.py +1 -1
  231. oci/ocvp/models/work_request_error.py +1 -1
  232. oci/ocvp/models/work_request_error_collection.py +1 -1
  233. oci/ocvp/models/work_request_log_entry.py +1 -1
  234. oci/ocvp/models/work_request_log_entry_collection.py +1 -1
  235. oci/ocvp/models/work_request_resource.py +1 -1
  236. oci/ocvp/sddc_client.py +212 -68
  237. oci/ocvp/sddc_client_composite_operations.py +1 -1
  238. oci/ocvp/work_request_client.py +10 -10
  239. oci/ocvp/work_request_client_composite_operations.py +1 -1
  240. oci/oda/management_client.py +56 -56
  241. oci/oda/oda_client.py +17 -17
  242. oci/oda/odapackage_client.py +7 -7
  243. oci/onesubscription/billing_schedule_client.py +1 -1
  244. oci/onesubscription/commitment_client.py +2 -2
  245. oci/onesubscription/computed_usage_client.py +3 -3
  246. oci/onesubscription/invoice_summary_client.py +2 -2
  247. oci/onesubscription/organization_subscription_client.py +1 -1
  248. oci/onesubscription/ratecard_client.py +1 -1
  249. oci/onesubscription/subscribed_service_client.py +2 -2
  250. oci/onesubscription/subscription_client.py +1 -1
  251. oci/ons/notification_control_plane_client.py +6 -6
  252. oci/ons/notification_data_plane_client.py +10 -10
  253. oci/opa/opa_instance_client.py +11 -11
  254. oci/opensearch/opensearch_cluster_backup_client.py +4 -4
  255. oci/opensearch/opensearch_cluster_client.py +14 -14
  256. oci/operator_access_control/access_requests_client.py +9 -9
  257. oci/operator_access_control/operator_actions_client.py +2 -2
  258. oci/operator_access_control/operator_control_assignment_client.py +6 -6
  259. oci/operator_access_control/operator_control_client.py +6 -6
  260. oci/opsi/models/__init__.py +22 -0
  261. oci/opsi/models/awr_hub_objects.py +72 -0
  262. oci/opsi/models/awr_hub_source.py +904 -0
  263. oci/opsi/models/awr_hub_source_summary.py +904 -0
  264. oci/opsi/models/awr_hub_source_summary_collection.py +72 -0
  265. oci/opsi/models/awr_hub_sources.py +72 -0
  266. oci/opsi/models/change_awr_hub_source_compartment_details.py +72 -0
  267. oci/opsi/models/change_operations_insights_warehouse_compartment_details.py +76 -0
  268. oci/opsi/models/create_awr_hub_details.py +1 -1
  269. oci/opsi/models/create_awr_hub_source_details.py +377 -0
  270. oci/opsi/models/list_objects.py +134 -0
  271. oci/opsi/models/object_summary.py +329 -0
  272. oci/opsi/models/update_awr_hub_source_details.py +210 -0
  273. oci/opsi/models/work_request.py +27 -3
  274. oci/opsi/operations_insights_client.py +3221 -1507
  275. oci/opsi/operations_insights_client_composite_operations.py +283 -0
  276. oci/optimizer/optimizer_client.py +26 -26
  277. oci/os_management/event_client.py +8 -8
  278. oci/os_management/os_management_client.py +69 -69
  279. oci/os_management_hub/lifecycle_environment_client.py +11 -11
  280. oci/os_management_hub/managed_instance_client.py +22 -22
  281. oci/os_management_hub/managed_instance_group_client.py +22 -22
  282. oci/os_management_hub/management_station_client.py +8 -8
  283. oci/os_management_hub/onboarding_client.py +5 -5
  284. oci/os_management_hub/reporting_managed_instance_client.py +3 -3
  285. oci/os_management_hub/scheduled_job_client.py +6 -6
  286. oci/os_management_hub/software_source_client.py +22 -22
  287. oci/os_management_hub/work_request_client.py +4 -4
  288. oci/osp_gateway/address_rule_service_client.py +1 -1
  289. oci/osp_gateway/address_service_client.py +2 -2
  290. oci/osp_gateway/invoice_service_client.py +5 -5
  291. oci/osp_gateway/subscription_service_client.py +5 -5
  292. oci/osub_billing_schedule/billing_schedule_client.py +1 -1
  293. oci/osub_organization_subscription/organization_subscription_client.py +1 -1
  294. oci/osub_subscription/commitment_client.py +2 -2
  295. oci/osub_subscription/ratecard_client.py +1 -1
  296. oci/osub_subscription/subscription_client.py +1 -1
  297. oci/osub_usage/computed_usage_client.py +3 -3
  298. oci/psql/postgresql_client.py +66 -66
  299. oci/queue/queue_admin_client.py +11 -11
  300. oci/queue/queue_client.py +8 -8
  301. oci/recovery/database_recovery_client.py +23 -23
  302. oci/redis/redis_cluster_client.py +11 -11
  303. oci/regions_definitions.py +12 -4
  304. oci/resource_manager/resource_manager_client.py +52 -52
  305. oci/resource_search/resource_search_client.py +3 -3
  306. oci/rover/rover_bundle_client.py +8 -8
  307. oci/rover/rover_cluster_client.py +8 -8
  308. oci/rover/rover_entitlement_client.py +6 -6
  309. oci/rover/rover_node_client.py +15 -15
  310. oci/rover/shape_client.py +1 -1
  311. oci/rover/work_requests_client.py +5 -5
  312. oci/sch/service_connector_client.py +12 -12
  313. oci/secrets/secrets_client.py +3 -3
  314. oci/service_catalog/service_catalog_client.py +26 -26
  315. oci/service_manager_proxy/service_manager_proxy_client.py +2 -2
  316. oci/service_mesh/service_mesh_client.py +48 -48
  317. oci/stack_monitoring/stack_monitoring_client.py +58 -58
  318. oci/streaming/stream_admin_client.py +18 -18
  319. oci/streaming/stream_client.py +8 -8
  320. oci/tenant_manager_control_plane/domain_client.py +5 -5
  321. oci/tenant_manager_control_plane/domain_governance_client.py +5 -5
  322. oci/tenant_manager_control_plane/governance_client.py +2 -2
  323. oci/tenant_manager_control_plane/link_client.py +3 -3
  324. oci/tenant_manager_control_plane/orders_client.py +2 -2
  325. oci/tenant_manager_control_plane/organization_client.py +10 -10
  326. oci/tenant_manager_control_plane/recipient_invitation_client.py +5 -5
  327. oci/tenant_manager_control_plane/sender_invitation_client.py +5 -5
  328. oci/tenant_manager_control_plane/subscription_client.py +11 -11
  329. oci/tenant_manager_control_plane/work_request_client.py +4 -4
  330. oci/threat_intelligence/threatintel_client.py +5 -5
  331. oci/usage/resources_client.py +2 -2
  332. oci/usage/rewards_client.py +6 -6
  333. oci/usage/usagelimits_client.py +1 -1
  334. oci/usage_api/usageapi_client.py +19 -19
  335. oci/vault/vaults_client.py +11 -11
  336. oci/vbs_inst/vbs_instance_client.py +10 -10
  337. oci/version.py +1 -1
  338. oci/visual_builder/vb_instance_client.py +13 -13
  339. oci/vn_monitoring/vn_monitoring_client.py +12 -12
  340. oci/vulnerability_scanning/vulnerability_scanning_client.py +58 -58
  341. oci/waa/waa_client.py +13 -13
  342. oci/waa/work_request_client.py +4 -4
  343. oci/waas/redirect_client.py +6 -6
  344. oci/waas/waas_client.py +66 -66
  345. oci/waf/waf_client.py +24 -24
  346. oci/work_requests/work_request_client.py +4 -4
  347. {oci-2.116.0.dist-info → oci-2.117.0.dist-info}/METADATA +1 -1
  348. {oci-2.116.0.dist-info → oci-2.117.0.dist-info}/RECORD +352 -312
  349. {oci-2.116.0.dist-info → oci-2.117.0.dist-info}/LICENSE.txt +0 -0
  350. {oci-2.116.0.dist-info → oci-2.117.0.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  351. {oci-2.116.0.dist-info → oci-2.117.0.dist-info}/WHEEL +0 -0
  352. {oci-2.116.0.dist-info → oci-2.117.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,732 @@
1
+ # coding: utf-8
2
+ # Copyright (c) 2016, 2023, 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: 20230701
6
+
7
+ from __future__ import absolute_import
8
+
9
+ from oci._vendor import requests # noqa: F401
10
+ from oci._vendor import six
11
+
12
+ from oci import retry, circuit_breaker # noqa: F401
13
+ from oci.base_client import BaseClient
14
+ from oci.config import get_config_value_or_default, validate_config
15
+ from oci.signer import Signer
16
+ from oci.util import Sentinel, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME
17
+ from oci.exceptions import InvalidAlloyConfig
18
+ from oci.alloy import OCI_SDK_ENABLED_SERVICES_SET
19
+ from .models import ocvp_type_mapping
20
+ missing = Sentinel("Missing")
21
+
22
+
23
+ class ClusterClient(object):
24
+ """
25
+ Use the Oracle Cloud VMware API to create SDDCs and manage ESXi hosts and software.
26
+ For more information, see [Oracle Cloud VMware Solution](/iaas/Content/VMware/Concepts/ocvsoverview.htm).
27
+ """
28
+
29
+ def __init__(self, config, **kwargs):
30
+ """
31
+ Creates a new service client
32
+
33
+ :param dict config:
34
+ Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__.
35
+ The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config
36
+ the dict using :py:meth:`~oci.config.validate_config`
37
+
38
+ :param str service_endpoint: (optional)
39
+ The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is
40
+ not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit
41
+ need to specify a service endpoint.
42
+
43
+ :param timeout: (optional)
44
+ The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided
45
+ as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If
46
+ a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
47
+ :type timeout: float or tuple(float, float)
48
+
49
+ :param signer: (optional)
50
+ The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values
51
+ provided in the config parameter.
52
+
53
+ One use case for this parameter is for `Instance Principals authentication <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__
54
+ by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument
55
+ :type signer: :py:class:`~oci.signer.AbstractBaseSigner`
56
+
57
+ :param obj retry_strategy: (optional)
58
+ A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default.
59
+ Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation.
60
+ Any value provided at the operation level will override whatever is specified at the client level.
61
+
62
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
63
+ is also available. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
64
+
65
+ :param obj circuit_breaker_strategy: (optional)
66
+ A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level).
67
+ This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided.
68
+ The specifics of circuit breaker strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__.
69
+
70
+ :param function circuit_breaker_callback: (optional)
71
+ Callback function to receive any exceptions triggerred by the circuit breaker.
72
+
73
+ :param bool client_level_realm_specific_endpoint_template_enabled: (optional)
74
+ A boolean flag to indicate whether or not this client should be created with realm specific endpoint template enabled or disable. By default, this will be set as None.
75
+
76
+ :param allow_control_chars: (optional)
77
+ allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not
78
+ allow control characters to be in the response object.
79
+ """
80
+ if not OCI_SDK_ENABLED_SERVICES_SET.is_service_enabled("ocvp"):
81
+ raise InvalidAlloyConfig("The Alloy configuration has disabled this service, this behavior is controlled by OCI_SDK_ENABLED_SERVICES_SET variable. Please check if your local alloy-config file configured the service you're targeting or contact the cloud provider on the availability of this service")
82
+
83
+ validate_config(config, signer=kwargs.get('signer'))
84
+ if 'signer' in kwargs:
85
+ signer = kwargs['signer']
86
+
87
+ elif AUTHENTICATION_TYPE_FIELD_NAME in config:
88
+ signer = get_signer_from_authentication_type(config)
89
+
90
+ else:
91
+ signer = Signer(
92
+ tenancy=config["tenancy"],
93
+ user=config["user"],
94
+ fingerprint=config["fingerprint"],
95
+ private_key_file_location=config.get("key_file"),
96
+ pass_phrase=get_config_value_or_default(config, "pass_phrase"),
97
+ private_key_content=config.get("key_content")
98
+ )
99
+
100
+ base_client_init_kwargs = {
101
+ 'regional_client': True,
102
+ 'service_endpoint': kwargs.get('service_endpoint'),
103
+ 'base_path': '/20230701',
104
+ 'service_endpoint_template': 'https://ocvps.{region}.oci.{secondLevelDomain}',
105
+ 'service_endpoint_template_per_realm': { }, # noqa: E201 E202
106
+ 'skip_deserialization': kwargs.get('skip_deserialization', False),
107
+ 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY),
108
+ 'client_level_realm_specific_endpoint_template_enabled': kwargs.get('client_level_realm_specific_endpoint_template_enabled')
109
+ }
110
+ if 'timeout' in kwargs:
111
+ base_client_init_kwargs['timeout'] = kwargs.get('timeout')
112
+ if base_client_init_kwargs.get('circuit_breaker_strategy') is None:
113
+ base_client_init_kwargs['circuit_breaker_strategy'] = circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY
114
+ if 'allow_control_chars' in kwargs:
115
+ base_client_init_kwargs['allow_control_chars'] = kwargs.get('allow_control_chars')
116
+ self.base_client = BaseClient("cluster", config, signer, ocvp_type_mapping, **base_client_init_kwargs)
117
+ self.retry_strategy = kwargs.get('retry_strategy')
118
+ self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback')
119
+
120
+ def create_cluster(self, create_cluster_details, **kwargs):
121
+ """
122
+ Create a vSphere Cluster in software-defined data center (SDDC).
123
+
124
+ Use the :class:`WorkRequest` operations to track the
125
+ creation of the Cluster.
126
+
127
+ **Important:** You must configure the Cluster's networking resources with the security rules detailed in `Security Rules for Oracle Cloud VMware Solution SDDCs`__. Otherwise, provisioning the SDDC will fail. The rules are based on the requirements set by VMware.
128
+
129
+ __ https://docs.cloud.oracle.com/iaas/Content/VMware/Reference/ocvssecurityrules.htm
130
+
131
+
132
+ :param oci.ocvp.models.CreateClusterDetails create_cluster_details: (required)
133
+ Details for the Cluster.
134
+
135
+ :param str opc_retry_token: (optional)
136
+ A token that uniquely identifies a request so it can be retried in case of a timeout or
137
+ server error without risk of executing that same action again. Retry tokens expire after 24
138
+ hours, but can be invalidated before then due to conflicting operations (for example, if a resource
139
+ has been deleted and purged from the system, then a retry of the original creation request
140
+ may be rejected).
141
+
142
+ :param str opc_request_id: (optional)
143
+ Unique identifier for the request. If you need to contact Oracle about a particular
144
+ request, please provide the request ID.
145
+
146
+ :param obj retry_strategy: (optional)
147
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
148
+
149
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
150
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
151
+
152
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
153
+
154
+ :param bool allow_control_chars: (optional)
155
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
156
+ By default, the response will not allow control characters in strings
157
+
158
+ :return: A :class:`~oci.response.Response` object with data of type None
159
+ :rtype: :class:`~oci.response.Response`
160
+
161
+ :example:
162
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.117.0/ocvp/create_cluster.py.html>`__ to see an example of how to use create_cluster API.
163
+ """
164
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
165
+ required_arguments = []
166
+ resource_path = "/clusters"
167
+ method = "POST"
168
+ operation_name = "create_cluster"
169
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Cluster/CreateCluster"
170
+
171
+ # Don't accept unknown kwargs
172
+ expected_kwargs = [
173
+ "allow_control_chars",
174
+ "retry_strategy",
175
+ "opc_retry_token",
176
+ "opc_request_id"
177
+ ]
178
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
179
+ if extra_kwargs:
180
+ raise ValueError(
181
+ f"create_cluster got unknown kwargs: {extra_kwargs!r}")
182
+
183
+ header_params = {
184
+ "accept": "application/json",
185
+ "content-type": "application/json",
186
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
187
+ "opc-request-id": kwargs.get("opc_request_id", missing)
188
+ }
189
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
190
+
191
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
192
+ operation_retry_strategy=kwargs.get('retry_strategy'),
193
+ client_retry_strategy=self.retry_strategy
194
+ )
195
+ if retry_strategy is None:
196
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
197
+
198
+ if retry_strategy:
199
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
200
+ self.base_client.add_opc_retry_token_if_needed(header_params)
201
+ self.base_client.add_opc_client_retries_header(header_params)
202
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
203
+ return retry_strategy.make_retrying_call(
204
+ self.base_client.call_api,
205
+ resource_path=resource_path,
206
+ method=method,
207
+ header_params=header_params,
208
+ body=create_cluster_details,
209
+ allow_control_chars=kwargs.get('allow_control_chars'),
210
+ operation_name=operation_name,
211
+ api_reference_link=api_reference_link,
212
+ required_arguments=required_arguments)
213
+ else:
214
+ return self.base_client.call_api(
215
+ resource_path=resource_path,
216
+ method=method,
217
+ header_params=header_params,
218
+ body=create_cluster_details,
219
+ allow_control_chars=kwargs.get('allow_control_chars'),
220
+ operation_name=operation_name,
221
+ api_reference_link=api_reference_link,
222
+ required_arguments=required_arguments)
223
+
224
+ def delete_cluster(self, cluster_id, **kwargs):
225
+ """
226
+ Deletes the specified Cluster, along with the other resources that were
227
+ created with the Cluster. For example: the Compute instances, DNS records,
228
+ and so on.
229
+
230
+ Use the :class:`WorkRequest` operations to track the
231
+ deletion of the Cluster.
232
+
233
+
234
+ :param str cluster_id: (required)
235
+ The `OCID`__ of the Cluster.
236
+
237
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
238
+
239
+ :param str if_match: (optional)
240
+ For optimistic concurrency control. In the PUT or DELETE call
241
+ for a resource, set the `if-match` parameter to the value of the
242
+ etag from a previous GET or POST response for that resource.
243
+ The resource will be updated or deleted only if the etag you
244
+ provide matches the resource's current etag value.
245
+
246
+ :param str opc_request_id: (optional)
247
+ Unique identifier for the request. If you need to contact Oracle about a particular
248
+ request, please provide the request ID.
249
+
250
+ :param obj retry_strategy: (optional)
251
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
252
+
253
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
254
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
255
+
256
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
257
+
258
+ :param bool allow_control_chars: (optional)
259
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
260
+ By default, the response will not allow control characters in strings
261
+
262
+ :return: A :class:`~oci.response.Response` object with data of type None
263
+ :rtype: :class:`~oci.response.Response`
264
+
265
+ :example:
266
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.117.0/ocvp/delete_cluster.py.html>`__ to see an example of how to use delete_cluster API.
267
+ """
268
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
269
+ required_arguments = ['clusterId']
270
+ resource_path = "/clusters/{clusterId}"
271
+ method = "DELETE"
272
+ operation_name = "delete_cluster"
273
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Cluster/DeleteCluster"
274
+
275
+ # Don't accept unknown kwargs
276
+ expected_kwargs = [
277
+ "allow_control_chars",
278
+ "retry_strategy",
279
+ "if_match",
280
+ "opc_request_id"
281
+ ]
282
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
283
+ if extra_kwargs:
284
+ raise ValueError(
285
+ f"delete_cluster got unknown kwargs: {extra_kwargs!r}")
286
+
287
+ path_params = {
288
+ "clusterId": cluster_id
289
+ }
290
+
291
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
292
+
293
+ for (k, v) in six.iteritems(path_params):
294
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
295
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
296
+
297
+ header_params = {
298
+ "accept": "application/json",
299
+ "content-type": "application/json",
300
+ "if-match": kwargs.get("if_match", missing),
301
+ "opc-request-id": kwargs.get("opc_request_id", missing)
302
+ }
303
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
304
+
305
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
306
+ operation_retry_strategy=kwargs.get('retry_strategy'),
307
+ client_retry_strategy=self.retry_strategy
308
+ )
309
+ if retry_strategy is None:
310
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
311
+
312
+ if retry_strategy:
313
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
314
+ self.base_client.add_opc_client_retries_header(header_params)
315
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
316
+ return retry_strategy.make_retrying_call(
317
+ self.base_client.call_api,
318
+ resource_path=resource_path,
319
+ method=method,
320
+ path_params=path_params,
321
+ header_params=header_params,
322
+ allow_control_chars=kwargs.get('allow_control_chars'),
323
+ operation_name=operation_name,
324
+ api_reference_link=api_reference_link,
325
+ required_arguments=required_arguments)
326
+ else:
327
+ return self.base_client.call_api(
328
+ resource_path=resource_path,
329
+ method=method,
330
+ path_params=path_params,
331
+ header_params=header_params,
332
+ allow_control_chars=kwargs.get('allow_control_chars'),
333
+ operation_name=operation_name,
334
+ api_reference_link=api_reference_link,
335
+ required_arguments=required_arguments)
336
+
337
+ def get_cluster(self, cluster_id, **kwargs):
338
+ """
339
+ Gets the specified Cluster's information.
340
+
341
+
342
+ :param str cluster_id: (required)
343
+ The `OCID`__ of the Cluster.
344
+
345
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
346
+
347
+ :param str opc_request_id: (optional)
348
+ Unique identifier for the request. If you need to contact Oracle about a particular
349
+ request, please provide the request ID.
350
+
351
+ :param obj retry_strategy: (optional)
352
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
353
+
354
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
355
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
356
+
357
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
358
+
359
+ :param bool allow_control_chars: (optional)
360
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
361
+ By default, the response will not allow control characters in strings
362
+
363
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.ocvp.models.Cluster`
364
+ :rtype: :class:`~oci.response.Response`
365
+
366
+ :example:
367
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.117.0/ocvp/get_cluster.py.html>`__ to see an example of how to use get_cluster API.
368
+ """
369
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
370
+ required_arguments = ['clusterId']
371
+ resource_path = "/clusters/{clusterId}"
372
+ method = "GET"
373
+ operation_name = "get_cluster"
374
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Cluster/GetCluster"
375
+
376
+ # Don't accept unknown kwargs
377
+ expected_kwargs = [
378
+ "allow_control_chars",
379
+ "retry_strategy",
380
+ "opc_request_id"
381
+ ]
382
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
383
+ if extra_kwargs:
384
+ raise ValueError(
385
+ f"get_cluster got unknown kwargs: {extra_kwargs!r}")
386
+
387
+ path_params = {
388
+ "clusterId": cluster_id
389
+ }
390
+
391
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
392
+
393
+ for (k, v) in six.iteritems(path_params):
394
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
395
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
396
+
397
+ header_params = {
398
+ "accept": "application/json",
399
+ "content-type": "application/json",
400
+ "opc-request-id": kwargs.get("opc_request_id", missing)
401
+ }
402
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
403
+
404
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
405
+ operation_retry_strategy=kwargs.get('retry_strategy'),
406
+ client_retry_strategy=self.retry_strategy
407
+ )
408
+ if retry_strategy is None:
409
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
410
+
411
+ if retry_strategy:
412
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
413
+ self.base_client.add_opc_client_retries_header(header_params)
414
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
415
+ return retry_strategy.make_retrying_call(
416
+ self.base_client.call_api,
417
+ resource_path=resource_path,
418
+ method=method,
419
+ path_params=path_params,
420
+ header_params=header_params,
421
+ response_type="Cluster",
422
+ allow_control_chars=kwargs.get('allow_control_chars'),
423
+ operation_name=operation_name,
424
+ api_reference_link=api_reference_link,
425
+ required_arguments=required_arguments)
426
+ else:
427
+ return self.base_client.call_api(
428
+ resource_path=resource_path,
429
+ method=method,
430
+ path_params=path_params,
431
+ header_params=header_params,
432
+ response_type="Cluster",
433
+ allow_control_chars=kwargs.get('allow_control_chars'),
434
+ operation_name=operation_name,
435
+ api_reference_link=api_reference_link,
436
+ required_arguments=required_arguments)
437
+
438
+ def list_clusters(self, **kwargs):
439
+ """
440
+ Lists the Clusters in the specified compartment.
441
+
442
+
443
+ :param str sddc_id: (optional)
444
+ The `OCID`__ of the SDDC.
445
+
446
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
447
+
448
+ :param str display_name: (optional)
449
+ A filter to return only resources that match the given display name exactly.
450
+
451
+ :param int limit: (optional)
452
+ For list pagination. The maximum number of results per page, or items to return in a paginated
453
+ \"List\" call. For important details about how pagination works, see
454
+ `List Pagination`__.
455
+
456
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
457
+
458
+ :param str page: (optional)
459
+ For list pagination. The value of the `opc-next-page` response header from the previous \"List\"
460
+ call. For important details about how pagination works, see
461
+ `List Pagination`__.
462
+
463
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
464
+
465
+ :param str sort_order: (optional)
466
+ The sort order to use, either ascending (`ASC`) or descending (`DESC`). The DISPLAYNAME sort order
467
+ is case sensitive.
468
+
469
+ Allowed values are: "ASC", "DESC"
470
+
471
+ :param str sort_by: (optional)
472
+ The field to sort by. You can provide one sort order (`sortOrder`). Default order for
473
+ TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME
474
+ sort order is case sensitive.
475
+
476
+ **Note:** In general, some \"List\" operations (for example, `ListInstances`) let you
477
+ optionally filter by availability domain if the scope of the resource type is within a
478
+ single availability domain. If you call one of these \"List\" operations without specifying
479
+ an availability domain, the resources are grouped by availability domain, then sorted.
480
+
481
+ Allowed values are: "timeCreated", "displayName"
482
+
483
+ :param str opc_request_id: (optional)
484
+ Unique identifier for the request. If you need to contact Oracle about a particular
485
+ request, please provide the request ID.
486
+
487
+ :param str lifecycle_state: (optional)
488
+ The lifecycle state of the resource.
489
+
490
+ Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"
491
+
492
+ :param str compartment_id: (optional)
493
+ The `OCID`__ of the compartment as optional parameter.
494
+
495
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
496
+
497
+ :param obj retry_strategy: (optional)
498
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
499
+
500
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
501
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
502
+
503
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
504
+
505
+ :param bool allow_control_chars: (optional)
506
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
507
+ By default, the response will not allow control characters in strings
508
+
509
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.ocvp.models.ClusterCollection`
510
+ :rtype: :class:`~oci.response.Response`
511
+
512
+ :example:
513
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.117.0/ocvp/list_clusters.py.html>`__ to see an example of how to use list_clusters API.
514
+ """
515
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
516
+ required_arguments = []
517
+ resource_path = "/clusters"
518
+ method = "GET"
519
+ operation_name = "list_clusters"
520
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/ClusterSummary/ListClusters"
521
+
522
+ # Don't accept unknown kwargs
523
+ expected_kwargs = [
524
+ "allow_control_chars",
525
+ "retry_strategy",
526
+ "sddc_id",
527
+ "display_name",
528
+ "limit",
529
+ "page",
530
+ "sort_order",
531
+ "sort_by",
532
+ "opc_request_id",
533
+ "lifecycle_state",
534
+ "compartment_id"
535
+ ]
536
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
537
+ if extra_kwargs:
538
+ raise ValueError(
539
+ f"list_clusters got unknown kwargs: {extra_kwargs!r}")
540
+
541
+ if 'sort_order' in kwargs:
542
+ sort_order_allowed_values = ["ASC", "DESC"]
543
+ if kwargs['sort_order'] not in sort_order_allowed_values:
544
+ raise ValueError(
545
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
546
+ )
547
+
548
+ if 'sort_by' in kwargs:
549
+ sort_by_allowed_values = ["timeCreated", "displayName"]
550
+ if kwargs['sort_by'] not in sort_by_allowed_values:
551
+ raise ValueError(
552
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
553
+ )
554
+
555
+ if 'lifecycle_state' in kwargs:
556
+ lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]
557
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
558
+ raise ValueError(
559
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
560
+ )
561
+
562
+ query_params = {
563
+ "sddcId": kwargs.get("sddc_id", missing),
564
+ "displayName": kwargs.get("display_name", missing),
565
+ "limit": kwargs.get("limit", missing),
566
+ "page": kwargs.get("page", missing),
567
+ "sortOrder": kwargs.get("sort_order", missing),
568
+ "sortBy": kwargs.get("sort_by", missing),
569
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
570
+ "compartmentId": kwargs.get("compartment_id", missing)
571
+ }
572
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
573
+
574
+ header_params = {
575
+ "accept": "application/json",
576
+ "content-type": "application/json",
577
+ "opc-request-id": kwargs.get("opc_request_id", missing)
578
+ }
579
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
580
+
581
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
582
+ operation_retry_strategy=kwargs.get('retry_strategy'),
583
+ client_retry_strategy=self.retry_strategy
584
+ )
585
+ if retry_strategy is None:
586
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
587
+
588
+ if retry_strategy:
589
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
590
+ self.base_client.add_opc_client_retries_header(header_params)
591
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
592
+ return retry_strategy.make_retrying_call(
593
+ self.base_client.call_api,
594
+ resource_path=resource_path,
595
+ method=method,
596
+ query_params=query_params,
597
+ header_params=header_params,
598
+ response_type="ClusterCollection",
599
+ allow_control_chars=kwargs.get('allow_control_chars'),
600
+ operation_name=operation_name,
601
+ api_reference_link=api_reference_link,
602
+ required_arguments=required_arguments)
603
+ else:
604
+ return self.base_client.call_api(
605
+ resource_path=resource_path,
606
+ method=method,
607
+ query_params=query_params,
608
+ header_params=header_params,
609
+ response_type="ClusterCollection",
610
+ allow_control_chars=kwargs.get('allow_control_chars'),
611
+ operation_name=operation_name,
612
+ api_reference_link=api_reference_link,
613
+ required_arguments=required_arguments)
614
+
615
+ def update_cluster(self, cluster_id, update_cluster_details, **kwargs):
616
+ """
617
+ Updates the specified Cluster.
618
+
619
+ **Important:** Updating a Cluster affects only certain attributes in the `Cluster`
620
+ object and does not affect the VMware environment currently running in
621
+ the Cluster.
622
+
623
+
624
+ :param str cluster_id: (required)
625
+ The `OCID`__ of the Cluster.
626
+
627
+ __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm
628
+
629
+ :param oci.ocvp.models.UpdateClusterDetails update_cluster_details: (required)
630
+ The information to be updated.
631
+
632
+ :param str if_match: (optional)
633
+ For optimistic concurrency control. In the PUT or DELETE call
634
+ for a resource, set the `if-match` parameter to the value of the
635
+ etag from a previous GET or POST response for that resource.
636
+ The resource will be updated or deleted only if the etag you
637
+ provide matches the resource's current etag value.
638
+
639
+ :param str opc_request_id: (optional)
640
+ Unique identifier for the request. If you need to contact Oracle about a particular
641
+ request, please provide the request ID.
642
+
643
+ :param obj retry_strategy: (optional)
644
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
645
+
646
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
647
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
648
+
649
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
650
+
651
+ :param bool allow_control_chars: (optional)
652
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
653
+ By default, the response will not allow control characters in strings
654
+
655
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.ocvp.models.Cluster`
656
+ :rtype: :class:`~oci.response.Response`
657
+
658
+ :example:
659
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.117.0/ocvp/update_cluster.py.html>`__ to see an example of how to use update_cluster API.
660
+ """
661
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
662
+ required_arguments = ['clusterId']
663
+ resource_path = "/clusters/{clusterId}"
664
+ method = "PUT"
665
+ operation_name = "update_cluster"
666
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Cluster/UpdateCluster"
667
+
668
+ # Don't accept unknown kwargs
669
+ expected_kwargs = [
670
+ "allow_control_chars",
671
+ "retry_strategy",
672
+ "if_match",
673
+ "opc_request_id"
674
+ ]
675
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
676
+ if extra_kwargs:
677
+ raise ValueError(
678
+ f"update_cluster got unknown kwargs: {extra_kwargs!r}")
679
+
680
+ path_params = {
681
+ "clusterId": cluster_id
682
+ }
683
+
684
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
685
+
686
+ for (k, v) in six.iteritems(path_params):
687
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
688
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
689
+
690
+ header_params = {
691
+ "accept": "application/json",
692
+ "content-type": "application/json",
693
+ "if-match": kwargs.get("if_match", missing),
694
+ "opc-request-id": kwargs.get("opc_request_id", missing)
695
+ }
696
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
697
+
698
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
699
+ operation_retry_strategy=kwargs.get('retry_strategy'),
700
+ client_retry_strategy=self.retry_strategy
701
+ )
702
+ if retry_strategy is None:
703
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
704
+
705
+ if retry_strategy:
706
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
707
+ self.base_client.add_opc_client_retries_header(header_params)
708
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
709
+ return retry_strategy.make_retrying_call(
710
+ self.base_client.call_api,
711
+ resource_path=resource_path,
712
+ method=method,
713
+ path_params=path_params,
714
+ header_params=header_params,
715
+ body=update_cluster_details,
716
+ response_type="Cluster",
717
+ allow_control_chars=kwargs.get('allow_control_chars'),
718
+ operation_name=operation_name,
719
+ api_reference_link=api_reference_link,
720
+ required_arguments=required_arguments)
721
+ else:
722
+ return self.base_client.call_api(
723
+ resource_path=resource_path,
724
+ method=method,
725
+ path_params=path_params,
726
+ header_params=header_params,
727
+ body=update_cluster_details,
728
+ response_type="Cluster",
729
+ allow_control_chars=kwargs.get('allow_control_chars'),
730
+ operation_name=operation_name,
731
+ api_reference_link=api_reference_link,
732
+ required_arguments=required_arguments)