oci 2.121.1__py3-none-any.whl → 2.123.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 (564) 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 +68 -53
  7. oci/ai_language/models/__init__.py +0 -2
  8. oci/ai_language/models/batch_detect_dominant_language_details.py +101 -0
  9. oci/ai_language/models/batch_detect_language_key_phrases_details.py +31 -0
  10. oci/ai_language/models/batch_detect_language_pii_entities_details.py +31 -0
  11. oci/ai_language/models/batch_detect_language_sentiments_details.py +31 -0
  12. oci/ai_language/models/batch_language_translation_details.py +62 -48
  13. oci/ai_language/models/endpoint.py +4 -4
  14. oci/ai_language/models/endpoint_summary.py +4 -4
  15. oci/ai_language/models/model.py +6 -6
  16. oci/ai_language/models/model_details.py +0 -4
  17. oci/ai_language/models/model_summary.py +8 -8
  18. oci/ai_language/models/project.py +4 -4
  19. oci/ai_language/models/project_summary.py +4 -4
  20. oci/ai_language/models/translation_document_result.py +12 -100
  21. oci/ai_speech/ai_service_speech_client.py +9 -9
  22. oci/ai_vision/ai_service_vision_client.py +25 -25
  23. oci/analytics/analytics_client.py +23 -23
  24. oci/announcements_service/announcement_client.py +4 -4
  25. oci/announcements_service/announcement_subscription_client.py +9 -9
  26. oci/announcements_service/announcements_preferences_client.py +4 -4
  27. oci/apigateway/api_gateway_client.py +21 -21
  28. oci/apigateway/deployment_client.py +6 -6
  29. oci/apigateway/gateway_client.py +6 -6
  30. oci/apigateway/subscribers_client.py +6 -6
  31. oci/apigateway/usage_plans_client.py +6 -6
  32. oci/apigateway/work_requests_client.py +5 -5
  33. oci/apm_config/config_client.py +8 -8
  34. oci/apm_control_plane/apm_domain_client.py +14 -14
  35. oci/apm_synthetics/apm_synthetic_client.py +28 -28
  36. oci/apm_traces/query_client.py +2 -2
  37. oci/apm_traces/trace_client.py +4 -4
  38. oci/application_migration/application_migration_client.py +19 -19
  39. oci/appmgmt_control/appmgmt_control_client.py +8 -8
  40. oci/artifacts/artifacts_client.py +32 -32
  41. oci/audit/audit_client.py +3 -3
  42. oci/autoscaling/auto_scaling_client.py +11 -11
  43. oci/bastion/bastion_client.py +15 -15
  44. oci/bds/bds_client.py +51 -51
  45. oci/blockchain/blockchain_platform_client.py +27 -27
  46. oci/budget/budget_client.py +10 -10
  47. oci/capacity_management/capacity_management_client.py +19 -19
  48. oci/certificates/certificates_client.py +5 -5
  49. oci/certificates_management/certificates_management_client.py +32 -32
  50. oci/cims/incident_client.py +8 -8
  51. oci/cims/user_client.py +1 -1
  52. oci/cloud_bridge/common_client.py +5 -5
  53. oci/cloud_bridge/discovery_client.py +14 -14
  54. oci/cloud_bridge/inventory_client.py +16 -16
  55. oci/cloud_bridge/ocb_agent_svc_client.py +23 -23
  56. oci/cloud_guard/cloud_guard_client.py +133 -133
  57. oci/cloud_migrations/migration_client.py +43 -43
  58. oci/compute_cloud_at_customer/compute_cloud_at_customer_client.py +12 -12
  59. oci/compute_instance_agent/compute_instance_agent_client.py +6 -6
  60. oci/compute_instance_agent/plugin_client.py +2 -2
  61. oci/compute_instance_agent/pluginconfig_client.py +1 -1
  62. oci/container_engine/container_engine_client.py +44 -44
  63. oci/container_instances/container_instance_client.py +31 -19
  64. oci/core/blockstorage_client.py +60 -60
  65. oci/core/compute_client.py +111 -101
  66. oci/core/compute_management_client.py +32 -32
  67. oci/core/models/__init__.py +14 -0
  68. oci/core/models/amd_vm_launch_instance_platform_config.py +45 -2
  69. oci/core/models/amd_vm_platform_config.py +45 -2
  70. oci/core/models/amd_vm_update_instance_platform_config.py +94 -0
  71. oci/core/models/attach_volume_details.py +6 -4
  72. oci/core/models/instance_configuration_amd_vm_launch_instance_platform_config.py +45 -2
  73. oci/core/models/instance_configuration_intel_vm_launch_instance_platform_config.py +45 -2
  74. oci/core/models/intel_vm_launch_instance_platform_config.py +45 -2
  75. oci/core/models/intel_vm_platform_config.py +45 -2
  76. oci/core/models/intel_vm_update_instance_platform_config.py +94 -0
  77. oci/core/models/launch_attach_i_scsi_volume_details.py +203 -0
  78. oci/core/models/launch_attach_volume_details.py +279 -0
  79. oci/core/models/launch_create_volume_details.py +101 -0
  80. oci/core/models/launch_create_volume_from_attributes.py +240 -0
  81. oci/core/models/launch_instance_details.py +31 -0
  82. oci/core/models/update_instance_details.py +29 -2
  83. oci/core/models/update_instance_platform_config.py +109 -0
  84. oci/core/virtual_network_client.py +242 -242
  85. oci/dashboard_service/dashboard_client.py +6 -6
  86. oci/dashboard_service/dashboard_group_client.py +6 -6
  87. oci/data_catalog/data_catalog_client.py +287 -153
  88. oci/data_catalog/models/__init__.py +4 -0
  89. oci/data_catalog/models/asynchronous_export_data_asset_details.py +99 -0
  90. oci/data_catalog/models/asynchronous_export_data_asset_result.py +196 -0
  91. oci/data_catalog/models/create_job_definition_details.py +7 -3
  92. oci/data_catalog/models/create_job_execution_details.py +7 -3
  93. oci/data_catalog/models/job.py +7 -3
  94. oci/data_catalog/models/job_definition.py +7 -3
  95. oci/data_catalog/models/job_definition_summary.py +7 -3
  96. oci/data_catalog/models/job_execution.py +7 -3
  97. oci/data_catalog/models/job_execution_summary.py +7 -3
  98. oci/data_catalog/models/job_summary.py +7 -3
  99. oci/data_flow/data_flow_client.py +42 -42
  100. oci/data_integration/data_integration_client.py +163 -163
  101. oci/data_labeling_service/data_labeling_management_client.py +17 -17
  102. oci/data_labeling_service_dataplane/data_labeling_client.py +15 -15
  103. oci/data_safe/data_safe_client.py +272 -272
  104. oci/data_science/data_science_client.py +91 -91
  105. oci/data_science/models/__init__.py +4 -0
  106. oci/data_science/models/create_job_details.py +27 -0
  107. oci/data_science/models/create_job_run_details.py +27 -0
  108. oci/data_science/models/data_science_private_endpoint.py +33 -0
  109. oci/data_science/models/data_science_private_endpoint_summary.py +33 -0
  110. oci/data_science/models/job.py +27 -0
  111. oci/data_science/models/job_environment_configuration_details.py +101 -0
  112. oci/data_science/models/job_run.py +27 -0
  113. oci/data_science/models/model_version_set.py +35 -2
  114. oci/data_science/models/model_version_set_summary.py +35 -2
  115. oci/data_science/models/ocir_container_job_environment_configuration_details.py +234 -0
  116. oci/data_science/models/project.py +35 -2
  117. oci/data_science/models/project_summary.py +35 -2
  118. oci/database/database_client.py +351 -344
  119. oci/database/models/__init__.py +2 -2
  120. oci/database/models/autonomous_container_database.py +24 -30
  121. oci/database/models/autonomous_container_database_dataguard_association.py +37 -13
  122. oci/database/models/autonomous_container_database_resource_usage.py +6 -6
  123. oci/database/models/autonomous_container_database_summary.py +24 -30
  124. oci/database/models/autonomous_database.py +52 -71
  125. oci/database/models/autonomous_database_backup.py +6 -6
  126. oci/database/models/autonomous_database_backup_summary.py +6 -6
  127. oci/database/models/autonomous_database_dataguard_association.py +63 -11
  128. oci/database/models/autonomous_database_key_history_entry.py +4 -4
  129. oci/database/models/autonomous_database_summary.py +52 -71
  130. oci/database/models/autonomous_db_preview_version_summary.py +1 -1
  131. oci/database/models/autonomous_vm_cluster.py +14 -14
  132. oci/database/models/autonomous_vm_cluster_summary.py +14 -14
  133. oci/database/models/backup.py +6 -6
  134. oci/database/models/backup_summary.py +6 -6
  135. oci/database/models/cloud_autonomous_vm_cluster.py +16 -16
  136. oci/database/models/cloud_autonomous_vm_cluster_summary.py +16 -16
  137. oci/database/models/cloud_exadata_infrastructure.py +72 -0
  138. oci/database/models/cloud_exadata_infrastructure_summary.py +72 -0
  139. oci/database/models/cloud_vm_cluster.py +37 -0
  140. oci/database/models/cloud_vm_cluster_summary.py +37 -0
  141. oci/database/models/compute_performance_summary.py +2 -2
  142. oci/database/models/configure_autonomous_database_vault_key_details.py +2 -2
  143. oci/database/models/create_autonomous_container_database_dataguard_association_details.py +67 -1
  144. oci/database/models/create_autonomous_container_database_details.py +6 -6
  145. oci/database/models/create_autonomous_database_base.py +51 -68
  146. oci/database/models/create_autonomous_database_clone_details.py +0 -7
  147. oci/database/models/create_autonomous_database_details.py +0 -7
  148. oci/database/models/create_autonomous_database_from_backup_details.py +0 -7
  149. oci/database/models/create_autonomous_database_from_backup_timestamp_details.py +0 -7
  150. oci/database/models/create_autonomous_vm_cluster_details.py +2 -2
  151. oci/database/models/create_cloud_autonomous_vm_cluster_details.py +6 -6
  152. oci/database/models/create_cloud_exadata_infrastructure_details.py +35 -0
  153. oci/database/models/create_cross_region_autonomous_database_data_guard_details.py +0 -7
  154. oci/database/models/create_cross_region_disaster_recovery_details.py +0 -7
  155. oci/database/models/create_data_guard_association_with_new_db_system_details.py +4 -4
  156. oci/database/models/create_database_base.py +2 -2
  157. oci/database/models/create_database_details.py +4 -4
  158. oci/database/models/create_db_home_base.py +2 -2
  159. oci/database/models/create_refreshable_autonomous_database_clone_details.py +0 -7
  160. oci/database/models/database.py +6 -6
  161. oci/database/models/database_connection_credentials.py +4 -4
  162. oci/database/models/{database_connection_credentails_by_name.py → database_connection_credentials_by_name.py} +8 -8
  163. oci/database/models/database_summary.py +6 -6
  164. oci/database/models/key_store_type_from_oracle_key_vault_details.py +2 -2
  165. oci/database/models/launch_db_system_base.py +2 -2
  166. oci/database/models/migrate_vault_key_details.py +4 -4
  167. oci/database/models/update_autonomous_database_details.py +45 -66
  168. oci/database/models/update_autonomous_vm_cluster_details.py +6 -6
  169. oci/database/models/update_cloud_autonomous_vm_cluster_details.py +10 -10
  170. oci/database_management/db_management_client.py +832 -198
  171. oci/database_management/db_management_client_composite_operations.py +188 -0
  172. oci/database_management/diagnosability_client.py +4 -4
  173. oci/database_management/managed_my_sql_databases_client.py +6 -6
  174. oci/database_management/models/__init__.py +10 -0
  175. oci/database_management/models/child_database.py +80 -2
  176. oci/database_management/models/create_db_management_private_endpoint_details.py +80 -2
  177. oci/database_management/models/create_external_db_system_details.py +80 -2
  178. oci/database_management/models/create_external_db_system_discovery_details.py +80 -2
  179. oci/database_management/models/create_external_db_system_macs_connector_details.py +80 -2
  180. oci/database_management/models/create_external_exadata_infrastructure_details.py +80 -2
  181. oci/database_management/models/create_external_exadata_storage_connector_details.py +80 -2
  182. oci/database_management/models/create_managed_database_group_details.py +80 -2
  183. oci/database_management/models/create_named_credential_details.py +80 -2
  184. oci/database_management/models/create_sql_job_details.py +80 -2
  185. oci/database_management/models/db_management_private_endpoint.py +80 -2
  186. oci/database_management/models/db_management_private_endpoint_summary.py +80 -2
  187. oci/database_management/models/external_asm.py +80 -2
  188. oci/database_management/models/external_asm_instance.py +80 -2
  189. oci/database_management/models/external_asm_instance_summary.py +80 -2
  190. oci/database_management/models/external_asm_summary.py +80 -2
  191. oci/database_management/models/external_cluster.py +80 -2
  192. oci/database_management/models/external_cluster_instance.py +80 -2
  193. oci/database_management/models/external_cluster_instance_summary.py +80 -2
  194. oci/database_management/models/external_cluster_summary.py +80 -2
  195. oci/database_management/models/external_database_summary.py +80 -2
  196. oci/database_management/models/external_db_home.py +80 -2
  197. oci/database_management/models/external_db_home_summary.py +80 -2
  198. oci/database_management/models/external_db_node.py +80 -2
  199. oci/database_management/models/external_db_node_summary.py +80 -2
  200. oci/database_management/models/external_db_system.py +80 -2
  201. oci/database_management/models/external_db_system_connector_summary.py +80 -2
  202. oci/database_management/models/external_db_system_discovery.py +80 -2
  203. oci/database_management/models/external_db_system_discovery_summary.py +80 -2
  204. oci/database_management/models/external_db_system_macs_connector.py +80 -2
  205. oci/database_management/models/external_db_system_summary.py +80 -2
  206. oci/database_management/models/external_exadata_infrastructure.py +80 -2
  207. oci/database_management/models/external_exadata_infrastructure_summary.py +80 -2
  208. oci/database_management/models/external_exadata_storage_connector.py +80 -2
  209. oci/database_management/models/external_exadata_storage_connector_summary.py +80 -2
  210. oci/database_management/models/external_exadata_storage_grid.py +80 -2
  211. oci/database_management/models/external_exadata_storage_server.py +80 -2
  212. oci/database_management/models/external_exadata_storage_server_summary.py +80 -2
  213. oci/database_management/models/external_listener.py +80 -2
  214. oci/database_management/models/external_listener_summary.py +80 -2
  215. oci/database_management/models/job_summary.py +80 -2
  216. oci/database_management/models/managed_database.py +111 -2
  217. oci/database_management/models/managed_database_group.py +80 -2
  218. oci/database_management/models/managed_database_group_summary.py +80 -2
  219. oci/database_management/models/managed_database_summary.py +111 -2
  220. oci/database_management/models/named_credential.py +80 -2
  221. oci/database_management/models/named_credential_summary.py +80 -2
  222. oci/database_management/models/sql_job.py +80 -2
  223. oci/database_management/models/update_db_management_private_endpoint_details.py +80 -2
  224. oci/database_management/models/update_external_asm_details.py +80 -2
  225. oci/database_management/models/update_external_asm_instance_details.py +119 -0
  226. oci/database_management/models/update_external_cluster_details.py +80 -2
  227. oci/database_management/models/update_external_cluster_instance_details.py +80 -2
  228. oci/database_management/models/update_external_db_home_details.py +119 -0
  229. oci/database_management/models/update_external_db_node_details.py +80 -2
  230. oci/database_management/models/update_external_db_system_details.py +80 -2
  231. oci/database_management/models/update_external_db_system_discovery_details.py +80 -2
  232. oci/database_management/models/update_external_db_system_macs_connector_details.py +80 -2
  233. oci/database_management/models/update_external_exadata_infrastructure_details.py +80 -2
  234. oci/database_management/models/update_external_exadata_storage_connector_details.py +80 -2
  235. oci/database_management/models/update_external_exadata_storage_grid_details.py +119 -0
  236. oci/database_management/models/update_external_exadata_storage_server_details.py +119 -0
  237. oci/database_management/models/update_external_listener_details.py +80 -2
  238. oci/database_management/models/update_managed_database_details.py +119 -0
  239. oci/database_management/models/update_managed_database_group_details.py +80 -2
  240. oci/database_management/models/update_named_credential_details.py +80 -2
  241. oci/database_management/models/update_sql_job_details.py +80 -2
  242. oci/database_management/perfhub_client.py +1 -1
  243. oci/database_management/sql_tuning_client.py +17 -17
  244. oci/database_migration/database_migration_client.py +41 -41
  245. oci/database_tools/database_tools_client.py +23 -23
  246. oci/desktops/__init__.py +14 -0
  247. oci/desktops/desktop_service_client.py +2649 -0
  248. oci/desktops/desktop_service_client_composite_operations.py +441 -0
  249. oci/desktops/models/__init__.py +68 -0
  250. oci/desktops/models/change_desktop_pool_compartment_details.py +72 -0
  251. oci/desktops/models/create_desktop_pool_details.py +694 -0
  252. oci/desktops/models/desktop.py +393 -0
  253. oci/desktops/models/desktop_availability_policy.py +95 -0
  254. oci/desktops/models/desktop_collection.py +72 -0
  255. oci/desktops/models/desktop_device_policy.py +348 -0
  256. oci/desktops/models/desktop_image.py +103 -0
  257. oci/desktops/models/desktop_network_configuration.py +103 -0
  258. oci/desktops/models/desktop_pool.py +823 -0
  259. oci/desktops/models/desktop_pool_collection.py +72 -0
  260. oci/desktops/models/desktop_pool_desktop_collection.py +72 -0
  261. oci/desktops/models/desktop_pool_desktop_summary.py +339 -0
  262. oci/desktops/models/desktop_pool_summary.py +403 -0
  263. oci/desktops/models/desktop_pool_volume_collection.py +72 -0
  264. oci/desktops/models/desktop_pool_volume_summary.py +319 -0
  265. oci/desktops/models/desktop_schedule.py +103 -0
  266. oci/desktops/models/desktop_summary.py +339 -0
  267. oci/desktops/models/hosting_options.py +99 -0
  268. oci/desktops/models/update_desktop_details.py +148 -0
  269. oci/desktops/models/update_desktop_pool_details.py +392 -0
  270. oci/desktops/models/work_request.py +420 -0
  271. oci/desktops/models/work_request_error.py +136 -0
  272. oci/desktops/models/work_request_error_collection.py +72 -0
  273. oci/desktops/models/work_request_log_entry.py +103 -0
  274. oci/desktops/models/work_request_log_entry_collection.py +72 -0
  275. oci/desktops/models/work_request_resource.py +203 -0
  276. oci/desktops/models/work_request_summary.py +420 -0
  277. oci/desktops/models/work_request_summary_collection.py +72 -0
  278. oci/devops/devops_client.py +89 -89
  279. oci/disaster_recovery/disaster_recovery_client.py +29 -29
  280. oci/dns/dns_client.py +52 -52
  281. oci/dts/appliance_export_job_client.py +6 -6
  282. oci/dts/shipping_vendors_client.py +1 -1
  283. oci/dts/transfer_appliance_client.py +8 -8
  284. oci/dts/transfer_appliance_entitlement_client.py +3 -3
  285. oci/dts/transfer_device_client.py +5 -5
  286. oci/dts/transfer_job_client.py +6 -6
  287. oci/dts/transfer_package_client.py +7 -7
  288. oci/em_warehouse/em_data_lake_client.py +13 -13
  289. oci/em_warehouse/em_warehouse_client.py +13 -13
  290. oci/email/email_client.py +25 -25
  291. oci/events/events_client.py +6 -6
  292. oci/file_storage/file_storage_client.py +50 -50
  293. oci/fleet_software_update/fleet_software_update_client.py +44 -44
  294. oci/functions/functions_invoke_client.py +1 -1
  295. oci/functions/functions_management_client.py +16 -16
  296. oci/fusion_apps/data_masking_activity_client.py +3 -3
  297. oci/fusion_apps/fusion_applications_client.py +39 -39
  298. oci/fusion_apps/fusion_environment_client.py +15 -15
  299. oci/fusion_apps/fusion_environment_family_client.py +8 -8
  300. oci/fusion_apps/refresh_activity_client.py +4 -4
  301. oci/fusion_apps/scheduled_activity_client.py +2 -2
  302. oci/fusion_apps/service_attachment_client.py +2 -2
  303. oci/generative_ai/generative_ai_client.py +22 -22
  304. oci/generative_ai_inference/generative_ai_inference_client.py +3 -3
  305. oci/generic_artifacts_content/generic_artifacts_content_client.py +3 -3
  306. oci/globally_distributed_database/sharded_database_service_client.py +29 -29
  307. oci/golden_gate/golden_gate_client.py +61 -61
  308. oci/governance_rules_control_plane/governance_rule_client.py +15 -15
  309. oci/governance_rules_control_plane/work_request_client.py +5 -5
  310. oci/healthchecks/health_checks_client.py +17 -17
  311. oci/identity/identity_client.py +145 -145
  312. oci/identity_data_plane/dataplane_client.py +2 -2
  313. oci/identity_domains/identity_domains_client.py +300 -300
  314. oci/integration/integration_instance_client.py +15 -15
  315. oci/jms/java_management_service_client.py +66 -66
  316. oci/jms_java_downloads/java_download_client.py +25 -25
  317. oci/key_management/ekm_client.py +5 -5
  318. oci/key_management/kms_crypto_client.py +6 -6
  319. oci/key_management/kms_hsm_cluster_client.py +12 -12
  320. oci/key_management/kms_management_client.py +21 -21
  321. oci/key_management/kms_vault_client.py +14 -14
  322. oci/key_management/models/__init__.py +2 -0
  323. oci/key_management/models/auto_key_rotation_details.py +247 -0
  324. oci/key_management/models/create_key_details.py +58 -0
  325. oci/key_management/models/import_key_details.py +58 -0
  326. oci/key_management/models/key.py +58 -0
  327. oci/key_management/models/key_summary.py +33 -2
  328. oci/key_management/models/key_version.py +33 -2
  329. oci/key_management/models/key_version_summary.py +33 -2
  330. oci/key_management/models/update_key_details.py +58 -0
  331. oci/license_manager/license_manager_client.py +18 -18
  332. oci/limits/limits_client.py +4 -4
  333. oci/limits/quotas_client.py +7 -7
  334. oci/load_balancer/load_balancer_client.py +61 -61
  335. oci/lockbox/lockbox_client.py +23 -23
  336. oci/log_analytics/log_analytics_client.py +193 -193
  337. oci/logging/logging_management_client.py +30 -30
  338. oci/loggingingestion/logging_client.py +1 -1
  339. oci/loggingsearch/log_search_client.py +1 -1
  340. oci/management_agent/management_agent_client.py +28 -28
  341. oci/management_dashboard/dashx_apis_client.py +14 -14
  342. oci/marketplace/account_client.py +2 -2
  343. oci/marketplace/marketplace_client.py +30 -30
  344. oci/marketplace_publisher/marketplace_publisher_client.py +71 -71
  345. oci/media_services/media_services_client.py +60 -60
  346. oci/media_services/media_stream_client.py +2 -2
  347. oci/monitoring/monitoring_client.py +18 -18
  348. oci/mysql/channels_client.py +7 -7
  349. oci/mysql/db_backups_client.py +6 -6
  350. oci/mysql/db_system_client.py +17 -17
  351. oci/mysql/mysqlaas_client.py +7 -7
  352. oci/mysql/replicas_client.py +5 -5
  353. oci/mysql/work_requests_client.py +4 -4
  354. oci/network_firewall/network_firewall_client.py +80 -80
  355. oci/network_load_balancer/network_load_balancer_client.py +34 -34
  356. oci/nosql/nosql_client.py +24 -24
  357. oci/object_storage/object_storage_client.py +50 -50
  358. oci/oce/oce_instance_client.py +10 -10
  359. oci/oci_control_center/occ_metrics_client.py +3 -3
  360. oci/ocvp/cluster_client.py +5 -5
  361. oci/ocvp/esxi_host_client.py +8 -8
  362. oci/ocvp/sddc_client.py +14 -14
  363. oci/ocvp/work_request_client.py +4 -4
  364. oci/oda/management_client.py +419 -56
  365. oci/oda/management_client_composite_operations.py +132 -0
  366. oci/oda/models/__init__.py +42 -0
  367. oci/oda/models/bot.py +31 -0
  368. oci/oda/models/bulk_create_skill_entities_details.py +72 -0
  369. oci/oda/models/clone_skill_details.py +7 -0
  370. oci/oda/models/composite_entity.py +154 -0
  371. oci/oda/models/create_new_skill_details.py +7 -0
  372. oci/oda/models/create_oda_instance_attachment_details.py +7 -3
  373. oci/oda/models/create_skill_composite_entity_details.py +147 -0
  374. oci/oda/models/create_skill_details.py +31 -0
  375. oci/oda/models/create_skill_entity_details.py +140 -0
  376. oci/oda/models/create_skill_value_list_entity_details.py +89 -0
  377. oci/oda/models/create_skill_version_details.py +7 -0
  378. oci/oda/models/digital_assistant.py +31 -0
  379. oci/oda/models/entity.py +171 -0
  380. oci/oda/models/entity_action.py +161 -0
  381. oci/oda/models/entity_action_argument.py +263 -0
  382. oci/oda/models/entity_action_argument_natural_language_mapping.py +72 -0
  383. oci/oda/models/entity_action_natural_language_mapping.py +72 -0
  384. oci/oda/models/entity_attribute.py +345 -0
  385. oci/oda/models/entity_attribute_natural_language_mapping.py +72 -0
  386. oci/oda/models/entity_natural_language_mapping.py +72 -0
  387. oci/oda/models/extend_skill_details.py +7 -0
  388. oci/oda/models/language_mapping.py +134 -0
  389. oci/oda/models/name_mapping.py +72 -0
  390. oci/oda/models/oda_instance_attachment.py +7 -3
  391. oci/oda/models/oda_instance_attachment_summary.py +7 -3
  392. oci/oda/models/skill.py +31 -0
  393. oci/oda/models/static_entity_value.py +99 -0
  394. oci/oda/models/static_entity_value_natural_language_mapping.py +72 -0
  395. oci/oda/models/train_skill_details.py +72 -0
  396. oci/oda/models/train_skill_parameter.py +101 -0
  397. oci/oda/models/train_skill_query_entity_parameter.py +51 -0
  398. oci/oda/models/value_list_entity.py +96 -0
  399. oci/oda/models/work_request.py +15 -3
  400. oci/oda/oda_client.py +17 -17
  401. oci/oda/odapackage_client.py +7 -7
  402. oci/onesubscription/billing_schedule_client.py +1 -1
  403. oci/onesubscription/commitment_client.py +2 -2
  404. oci/onesubscription/computed_usage_client.py +3 -3
  405. oci/onesubscription/invoice_summary_client.py +2 -2
  406. oci/onesubscription/organization_subscription_client.py +1 -1
  407. oci/onesubscription/ratecard_client.py +1 -1
  408. oci/onesubscription/subscribed_service_client.py +2 -2
  409. oci/onesubscription/subscription_client.py +1 -1
  410. oci/ons/notification_control_plane_client.py +6 -6
  411. oci/ons/notification_data_plane_client.py +10 -10
  412. oci/opa/opa_instance_client.py +11 -11
  413. oci/opensearch/opensearch_cluster_backup_client.py +4 -4
  414. oci/opensearch/opensearch_cluster_client.py +14 -14
  415. oci/operator_access_control/access_requests_client.py +118 -9
  416. oci/operator_access_control/models/__init__.py +11 -1
  417. oci/operator_access_control/models/access_request.py +221 -0
  418. oci/operator_access_control/models/access_request_summary.py +35 -0
  419. oci/operator_access_control/models/approver_detail.py +235 -0
  420. oci/operator_access_control/models/assignment_validation_status.py +317 -0
  421. oci/operator_access_control/models/audit_log_report.py +193 -0
  422. oci/operator_access_control/models/create_operator_control_assignment_details.py +31 -0
  423. oci/operator_access_control/models/create_operator_control_details.py +31 -0
  424. oci/operator_access_control/models/operator_control.py +31 -0
  425. oci/operator_access_control/models/operator_control_assignment.py +62 -0
  426. oci/operator_access_control/models/operator_control_assignment_summary.py +93 -0
  427. oci/operator_access_control/models/operator_control_summary.py +31 -0
  428. oci/operator_access_control/models/status_detail.py +169 -0
  429. oci/operator_access_control/models/update_operator_control_assignment_details.py +31 -0
  430. oci/operator_access_control/models/update_operator_control_details.py +31 -0
  431. oci/operator_access_control/models/validate_operator_assignment_details.py +72 -0
  432. oci/operator_access_control/operator_actions_client.py +2 -2
  433. oci/operator_access_control/operator_control_assignment_client.py +224 -6
  434. oci/operator_access_control/operator_control_client.py +6 -6
  435. oci/opsi/operations_insights_client.py +175 -175
  436. oci/optimizer/optimizer_client.py +26 -26
  437. oci/os_management/event_client.py +8 -8
  438. oci/os_management/os_management_client.py +69 -69
  439. oci/os_management_hub/lifecycle_environment_client.py +11 -11
  440. oci/os_management_hub/managed_instance_client.py +22 -22
  441. oci/os_management_hub/managed_instance_group_client.py +22 -22
  442. oci/os_management_hub/management_station_client.py +8 -8
  443. oci/os_management_hub/onboarding_client.py +5 -5
  444. oci/os_management_hub/reporting_managed_instance_client.py +3 -3
  445. oci/os_management_hub/scheduled_job_client.py +6 -6
  446. oci/os_management_hub/software_source_client.py +22 -22
  447. oci/os_management_hub/work_request_client.py +4 -4
  448. oci/osp_gateway/address_rule_service_client.py +1 -1
  449. oci/osp_gateway/address_service_client.py +2 -2
  450. oci/osp_gateway/invoice_service_client.py +5 -5
  451. oci/osp_gateway/subscription_service_client.py +5 -5
  452. oci/osub_billing_schedule/billing_schedule_client.py +1 -1
  453. oci/osub_organization_subscription/organization_subscription_client.py +1 -1
  454. oci/osub_subscription/commitment_client.py +2 -2
  455. oci/osub_subscription/ratecard_client.py +1 -1
  456. oci/osub_subscription/subscription_client.py +1 -1
  457. oci/osub_usage/computed_usage_client.py +3 -3
  458. oci/psql/postgresql_client.py +33 -33
  459. oci/queue/queue_admin_client.py +11 -11
  460. oci/queue/queue_client.py +8 -8
  461. oci/recovery/database_recovery_client.py +23 -23
  462. oci/redis/redis_cluster_client.py +11 -11
  463. oci/regions_definitions.py +5 -0
  464. oci/resource_manager/resource_manager_client.py +52 -52
  465. oci/resource_search/resource_search_client.py +3 -3
  466. oci/rover/rover_bundle_client.py +8 -8
  467. oci/rover/rover_cluster_client.py +8 -8
  468. oci/rover/rover_entitlement_client.py +6 -6
  469. oci/rover/rover_node_client.py +15 -15
  470. oci/rover/shape_client.py +1 -1
  471. oci/rover/work_requests_client.py +5 -5
  472. oci/sch/__init__.py +3 -1
  473. oci/sch/connector_plugins_client.py +386 -0
  474. oci/sch/connector_plugins_client_composite_operations.py +26 -0
  475. oci/sch/models/__init__.py +16 -0
  476. oci/sch/models/change_service_connector_compartment_details.py +3 -3
  477. oci/sch/models/connector_plugin.py +355 -0
  478. oci/sch/models/connector_plugin_collection.py +72 -0
  479. oci/sch/models/connector_plugin_summary.py +322 -0
  480. oci/sch/models/create_service_connector_details.py +3 -3
  481. oci/sch/models/dimension_details.py +2 -2
  482. oci/sch/models/function_task_details.py +2 -2
  483. oci/sch/models/functions_target_details.py +98 -5
  484. oci/sch/models/latest_streaming_cursor.py +4 -2
  485. oci/sch/models/log_rule_task_details.py +5 -5
  486. oci/sch/models/log_source.py +4 -0
  487. oci/sch/models/logging_analytics_target_details.py +5 -5
  488. oci/sch/models/logging_source_details.py +3 -3
  489. oci/sch/models/monitoring_source.py +2 -2
  490. oci/sch/models/monitoring_source_details.py +5 -5
  491. oci/sch/models/monitoring_source_metric_details.py +2 -2
  492. oci/sch/models/monitoring_target_details.py +3 -3
  493. oci/sch/models/notifications_target_details.py +5 -5
  494. oci/sch/models/object_storage_target_details.py +9 -5
  495. oci/sch/models/plugin_source_details.py +123 -0
  496. oci/sch/models/service_connector.py +14 -14
  497. oci/sch/models/service_connector_collection.py +1 -1
  498. oci/sch/models/service_connector_summary.py +11 -11
  499. oci/sch/models/source_connector_plugin.py +132 -0
  500. oci/sch/models/source_connector_plugin_summary.py +125 -0
  501. oci/sch/models/source_details.py +19 -11
  502. oci/sch/models/streaming_cursor_details.py +7 -4
  503. oci/sch/models/streaming_source_details.py +5 -1
  504. oci/sch/models/streaming_target_details.py +3 -3
  505. oci/sch/models/target_connector_plugin.py +99 -0
  506. oci/sch/models/target_connector_plugin_summary.py +92 -0
  507. oci/sch/models/target_details.py +8 -8
  508. oci/sch/models/task_details.py +8 -8
  509. oci/sch/models/trim_horizon_streaming_cursor.py +4 -2
  510. oci/sch/models/update_service_connector_details.py +1 -1
  511. oci/sch/models/work_request.py +2 -2
  512. oci/sch/service_connector_client.py +138 -81
  513. oci/sch/service_connector_client_composite_operations.py +7 -7
  514. oci/secrets/secrets_client.py +3 -3
  515. oci/service_catalog/service_catalog_client.py +26 -26
  516. oci/service_manager_proxy/service_manager_proxy_client.py +2 -2
  517. oci/service_mesh/service_mesh_client.py +48 -48
  518. oci/stack_monitoring/stack_monitoring_client.py +64 -64
  519. oci/streaming/stream_admin_client.py +18 -18
  520. oci/streaming/stream_client.py +8 -8
  521. oci/tenant_manager_control_plane/domain_client.py +5 -5
  522. oci/tenant_manager_control_plane/domain_governance_client.py +5 -5
  523. oci/tenant_manager_control_plane/governance_client.py +2 -2
  524. oci/tenant_manager_control_plane/link_client.py +3 -3
  525. oci/tenant_manager_control_plane/orders_client.py +2 -2
  526. oci/tenant_manager_control_plane/organization_client.py +10 -10
  527. oci/tenant_manager_control_plane/recipient_invitation_client.py +5 -5
  528. oci/tenant_manager_control_plane/sender_invitation_client.py +5 -5
  529. oci/tenant_manager_control_plane/subscription_client.py +11 -11
  530. oci/tenant_manager_control_plane/work_request_client.py +4 -4
  531. oci/threat_intelligence/threatintel_client.py +5 -5
  532. oci/usage/resources_client.py +2 -2
  533. oci/usage/rewards_client.py +6 -6
  534. oci/usage/usagelimits_client.py +1 -1
  535. oci/usage_api/usageapi_client.py +28 -28
  536. oci/vault/models/__init__.py +8 -0
  537. oci/vault/models/bytes_generation_context.py +107 -0
  538. oci/vault/models/create_secret_details.py +61 -3
  539. oci/vault/models/passphrase_generation_context.py +138 -0
  540. oci/vault/models/secret.py +60 -2
  541. oci/vault/models/secret_generation_context.py +152 -0
  542. oci/vault/models/secret_summary.py +60 -2
  543. oci/vault/models/secret_version.py +33 -2
  544. oci/vault/models/secret_version_summary.py +33 -2
  545. oci/vault/models/ssh_key_generation_context.py +111 -0
  546. oci/vault/models/update_secret_details.py +60 -2
  547. oci/vault/vaults_client.py +13 -13
  548. oci/vbs_inst/vbs_instance_client.py +10 -10
  549. oci/version.py +1 -1
  550. oci/visual_builder/vb_instance_client.py +13 -13
  551. oci/vn_monitoring/vn_monitoring_client.py +12 -12
  552. oci/vulnerability_scanning/vulnerability_scanning_client.py +58 -58
  553. oci/waa/waa_client.py +13 -13
  554. oci/waa/work_request_client.py +4 -4
  555. oci/waas/redirect_client.py +6 -6
  556. oci/waas/waas_client.py +66 -66
  557. oci/waf/waf_client.py +24 -24
  558. oci/work_requests/work_request_client.py +4 -4
  559. {oci-2.121.1.dist-info → oci-2.123.0.dist-info}/METADATA +3 -3
  560. {oci-2.121.1.dist-info → oci-2.123.0.dist-info}/RECORD +564 -475
  561. {oci-2.121.1.dist-info → oci-2.123.0.dist-info}/THIRD_PARTY_LICENSES.txt +136 -2
  562. {oci-2.121.1.dist-info → oci-2.123.0.dist-info}/LICENSE.txt +0 -0
  563. {oci-2.121.1.dist-info → oci-2.123.0.dist-info}/WHEEL +0 -0
  564. {oci-2.121.1.dist-info → oci-2.123.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,2649 @@
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: 20220618
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 desktops_type_mapping
20
+ missing = Sentinel("Missing")
21
+
22
+
23
+ class DesktopServiceClient(object):
24
+ """
25
+ Create and manage cloud-hosted desktops which can be accessed from a web browser or installed client.
26
+ """
27
+
28
+ def __init__(self, config, **kwargs):
29
+ """
30
+ Creates a new service client
31
+
32
+ :param dict config:
33
+ Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__.
34
+ 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
35
+ the dict using :py:meth:`~oci.config.validate_config`
36
+
37
+ :param str service_endpoint: (optional)
38
+ The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is
39
+ 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
40
+ need to specify a service endpoint.
41
+
42
+ :param timeout: (optional)
43
+ 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
44
+ 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
45
+ a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
46
+ :type timeout: float or tuple(float, float)
47
+
48
+ :param signer: (optional)
49
+ 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
50
+ provided in the config parameter.
51
+
52
+ One use case for this parameter is for `Instance Principals authentication <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__
53
+ by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument
54
+ :type signer: :py:class:`~oci.signer.AbstractBaseSigner`
55
+
56
+ :param obj retry_strategy: (optional)
57
+ 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.
58
+ Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation.
59
+ Any value provided at the operation level will override whatever is specified at the client level.
60
+
61
+ This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
62
+ 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>`__.
63
+
64
+ :param obj circuit_breaker_strategy: (optional)
65
+ A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level).
66
+ This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided.
67
+ The specifics of circuit breaker strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__.
68
+
69
+ :param function circuit_breaker_callback: (optional)
70
+ Callback function to receive any exceptions triggerred by the circuit breaker.
71
+
72
+ :param bool client_level_realm_specific_endpoint_template_enabled: (optional)
73
+ 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.
74
+
75
+ :param allow_control_chars: (optional)
76
+ 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
77
+ allow control characters to be in the response object.
78
+ """
79
+ if not OCI_SDK_ENABLED_SERVICES_SET.is_service_enabled("desktops"):
80
+ 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")
81
+
82
+ validate_config(config, signer=kwargs.get('signer'))
83
+ if 'signer' in kwargs:
84
+ signer = kwargs['signer']
85
+
86
+ elif AUTHENTICATION_TYPE_FIELD_NAME in config:
87
+ signer = get_signer_from_authentication_type(config)
88
+
89
+ else:
90
+ signer = Signer(
91
+ tenancy=config["tenancy"],
92
+ user=config["user"],
93
+ fingerprint=config["fingerprint"],
94
+ private_key_file_location=config.get("key_file"),
95
+ pass_phrase=get_config_value_or_default(config, "pass_phrase"),
96
+ private_key_content=config.get("key_content")
97
+ )
98
+
99
+ base_client_init_kwargs = {
100
+ 'regional_client': True,
101
+ 'service_endpoint': kwargs.get('service_endpoint'),
102
+ 'base_path': '/20220618',
103
+ 'service_endpoint_template': 'https://api.desktops.{region}.oci.{secondLevelDomain}',
104
+ 'service_endpoint_template_per_realm': { }, # noqa: E201 E202
105
+ 'skip_deserialization': kwargs.get('skip_deserialization', False),
106
+ 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY),
107
+ 'client_level_realm_specific_endpoint_template_enabled': kwargs.get('client_level_realm_specific_endpoint_template_enabled')
108
+ }
109
+ if 'timeout' in kwargs:
110
+ base_client_init_kwargs['timeout'] = kwargs.get('timeout')
111
+ if base_client_init_kwargs.get('circuit_breaker_strategy') is None:
112
+ base_client_init_kwargs['circuit_breaker_strategy'] = circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY
113
+ if 'allow_control_chars' in kwargs:
114
+ base_client_init_kwargs['allow_control_chars'] = kwargs.get('allow_control_chars')
115
+ self.base_client = BaseClient("desktop_service", config, signer, desktops_type_mapping, **base_client_init_kwargs)
116
+ self.retry_strategy = kwargs.get('retry_strategy')
117
+ self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback')
118
+
119
+ def cancel_work_request(self, work_request_id, **kwargs):
120
+ """
121
+ Cancel work request with the given ID.
122
+
123
+
124
+ :param str work_request_id: (required)
125
+ The ID of the asynchronous request.
126
+
127
+ :param str if_match: (optional)
128
+ For optimistic concurrency control.
129
+
130
+ :param str opc_request_id: (optional)
131
+ The unique identifier of the request.
132
+
133
+ :param obj retry_strategy: (optional)
134
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
135
+
136
+ 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.
137
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
138
+
139
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
140
+
141
+ :param bool allow_control_chars: (optional)
142
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
143
+ By default, the response will not allow control characters in strings
144
+
145
+ :return: A :class:`~oci.response.Response` object with data of type None
146
+ :rtype: :class:`~oci.response.Response`
147
+
148
+ :example:
149
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/cancel_work_request.py.html>`__ to see an example of how to use cancel_work_request API.
150
+ """
151
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
152
+ required_arguments = ['workRequestId']
153
+ resource_path = "/workRequests/{workRequestId}"
154
+ method = "DELETE"
155
+ operation_name = "cancel_work_request"
156
+ api_reference_link = ""
157
+
158
+ # Don't accept unknown kwargs
159
+ expected_kwargs = [
160
+ "allow_control_chars",
161
+ "retry_strategy",
162
+ "if_match",
163
+ "opc_request_id"
164
+ ]
165
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
166
+ if extra_kwargs:
167
+ raise ValueError(
168
+ f"cancel_work_request got unknown kwargs: {extra_kwargs!r}")
169
+
170
+ path_params = {
171
+ "workRequestId": work_request_id
172
+ }
173
+
174
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
175
+
176
+ for (k, v) in six.iteritems(path_params):
177
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
178
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
179
+
180
+ header_params = {
181
+ "accept": "application/json",
182
+ "content-type": "application/json",
183
+ "if-match": kwargs.get("if_match", missing),
184
+ "opc-request-id": kwargs.get("opc_request_id", missing)
185
+ }
186
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
187
+
188
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
189
+ operation_retry_strategy=kwargs.get('retry_strategy'),
190
+ client_retry_strategy=self.retry_strategy
191
+ )
192
+ if retry_strategy is None:
193
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
194
+
195
+ if retry_strategy:
196
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
197
+ self.base_client.add_opc_client_retries_header(header_params)
198
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
199
+ return retry_strategy.make_retrying_call(
200
+ self.base_client.call_api,
201
+ resource_path=resource_path,
202
+ method=method,
203
+ path_params=path_params,
204
+ header_params=header_params,
205
+ allow_control_chars=kwargs.get('allow_control_chars'),
206
+ operation_name=operation_name,
207
+ api_reference_link=api_reference_link,
208
+ required_arguments=required_arguments)
209
+ else:
210
+ return self.base_client.call_api(
211
+ resource_path=resource_path,
212
+ method=method,
213
+ path_params=path_params,
214
+ header_params=header_params,
215
+ allow_control_chars=kwargs.get('allow_control_chars'),
216
+ operation_name=operation_name,
217
+ api_reference_link=api_reference_link,
218
+ required_arguments=required_arguments)
219
+
220
+ def change_desktop_pool_compartment(self, desktop_pool_id, change_desktop_pool_compartment_details, **kwargs):
221
+ """
222
+ Moves a desktop pool into a different compartment within the same tenancy. You must provide the OCID of the desktop pool and the OCID of the compartment that you are moving the pool to.
223
+
224
+
225
+ :param str desktop_pool_id: (required)
226
+ The OCID of the desktop pool.
227
+
228
+ :param oci.desktops.models.ChangeDesktopPoolCompartmentDetails change_desktop_pool_compartment_details: (required)
229
+ The details of the new compartment of the desktop pool.
230
+
231
+ :param str opc_request_id: (optional)
232
+ The unique identifier of the request.
233
+
234
+ :param str if_match: (optional)
235
+ For optimistic concurrency control.
236
+
237
+ :param str opc_retry_token: (optional)
238
+ A token that uniquely identifies a request.
239
+
240
+ :param obj retry_strategy: (optional)
241
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
242
+
243
+ 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.
244
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
245
+
246
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
247
+
248
+ :param bool allow_control_chars: (optional)
249
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
250
+ By default, the response will not allow control characters in strings
251
+
252
+ :return: A :class:`~oci.response.Response` object with data of type None
253
+ :rtype: :class:`~oci.response.Response`
254
+
255
+ :example:
256
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/change_desktop_pool_compartment.py.html>`__ to see an example of how to use change_desktop_pool_compartment API.
257
+ """
258
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
259
+ required_arguments = ['desktopPoolId']
260
+ resource_path = "/desktopPools/{desktopPoolId}/actions/changeCompartment"
261
+ method = "POST"
262
+ operation_name = "change_desktop_pool_compartment"
263
+ api_reference_link = ""
264
+
265
+ # Don't accept unknown kwargs
266
+ expected_kwargs = [
267
+ "allow_control_chars",
268
+ "retry_strategy",
269
+ "opc_request_id",
270
+ "if_match",
271
+ "opc_retry_token"
272
+ ]
273
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
274
+ if extra_kwargs:
275
+ raise ValueError(
276
+ f"change_desktop_pool_compartment got unknown kwargs: {extra_kwargs!r}")
277
+
278
+ path_params = {
279
+ "desktopPoolId": desktop_pool_id
280
+ }
281
+
282
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
283
+
284
+ for (k, v) in six.iteritems(path_params):
285
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
286
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
287
+
288
+ header_params = {
289
+ "accept": "application/json",
290
+ "content-type": "application/json",
291
+ "opc-request-id": kwargs.get("opc_request_id", missing),
292
+ "if-match": kwargs.get("if_match", missing),
293
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
294
+ }
295
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
296
+
297
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
298
+ operation_retry_strategy=kwargs.get('retry_strategy'),
299
+ client_retry_strategy=self.retry_strategy
300
+ )
301
+ if retry_strategy is None:
302
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
303
+
304
+ if retry_strategy:
305
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
306
+ self.base_client.add_opc_retry_token_if_needed(header_params)
307
+ self.base_client.add_opc_client_retries_header(header_params)
308
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
309
+ return retry_strategy.make_retrying_call(
310
+ self.base_client.call_api,
311
+ resource_path=resource_path,
312
+ method=method,
313
+ path_params=path_params,
314
+ header_params=header_params,
315
+ body=change_desktop_pool_compartment_details,
316
+ allow_control_chars=kwargs.get('allow_control_chars'),
317
+ operation_name=operation_name,
318
+ api_reference_link=api_reference_link,
319
+ required_arguments=required_arguments)
320
+ else:
321
+ return self.base_client.call_api(
322
+ resource_path=resource_path,
323
+ method=method,
324
+ path_params=path_params,
325
+ header_params=header_params,
326
+ body=change_desktop_pool_compartment_details,
327
+ allow_control_chars=kwargs.get('allow_control_chars'),
328
+ operation_name=operation_name,
329
+ api_reference_link=api_reference_link,
330
+ required_arguments=required_arguments)
331
+
332
+ def create_desktop_pool(self, create_desktop_pool_details, **kwargs):
333
+ """
334
+ Creates a desktop pool with the given configuration parameters.
335
+
336
+
337
+ :param oci.desktops.models.CreateDesktopPoolDetails create_desktop_pool_details: (required)
338
+ The details of the desktop pool to create.
339
+
340
+ :param str opc_retry_token: (optional)
341
+ A token that uniquely identifies a request.
342
+
343
+ :param str opc_request_id: (optional)
344
+ The unique identifier of the request.
345
+
346
+ :param obj retry_strategy: (optional)
347
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
348
+
349
+ 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.
350
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
351
+
352
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
353
+
354
+ :param bool allow_control_chars: (optional)
355
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
356
+ By default, the response will not allow control characters in strings
357
+
358
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.desktops.models.DesktopPool`
359
+ :rtype: :class:`~oci.response.Response`
360
+
361
+ :example:
362
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/create_desktop_pool.py.html>`__ to see an example of how to use create_desktop_pool API.
363
+ """
364
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
365
+ required_arguments = []
366
+ resource_path = "/desktopPools"
367
+ method = "POST"
368
+ operation_name = "create_desktop_pool"
369
+ api_reference_link = ""
370
+
371
+ # Don't accept unknown kwargs
372
+ expected_kwargs = [
373
+ "allow_control_chars",
374
+ "retry_strategy",
375
+ "opc_retry_token",
376
+ "opc_request_id"
377
+ ]
378
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
379
+ if extra_kwargs:
380
+ raise ValueError(
381
+ f"create_desktop_pool got unknown kwargs: {extra_kwargs!r}")
382
+
383
+ header_params = {
384
+ "accept": "application/json",
385
+ "content-type": "application/json",
386
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
387
+ "opc-request-id": kwargs.get("opc_request_id", missing)
388
+ }
389
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
390
+
391
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
392
+ operation_retry_strategy=kwargs.get('retry_strategy'),
393
+ client_retry_strategy=self.retry_strategy
394
+ )
395
+ if retry_strategy is None:
396
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
397
+
398
+ if retry_strategy:
399
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
400
+ self.base_client.add_opc_retry_token_if_needed(header_params)
401
+ self.base_client.add_opc_client_retries_header(header_params)
402
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
403
+ return retry_strategy.make_retrying_call(
404
+ self.base_client.call_api,
405
+ resource_path=resource_path,
406
+ method=method,
407
+ header_params=header_params,
408
+ body=create_desktop_pool_details,
409
+ response_type="DesktopPool",
410
+ allow_control_chars=kwargs.get('allow_control_chars'),
411
+ operation_name=operation_name,
412
+ api_reference_link=api_reference_link,
413
+ required_arguments=required_arguments)
414
+ else:
415
+ return self.base_client.call_api(
416
+ resource_path=resource_path,
417
+ method=method,
418
+ header_params=header_params,
419
+ body=create_desktop_pool_details,
420
+ response_type="DesktopPool",
421
+ allow_control_chars=kwargs.get('allow_control_chars'),
422
+ operation_name=operation_name,
423
+ api_reference_link=api_reference_link,
424
+ required_arguments=required_arguments)
425
+
426
+ def delete_desktop(self, desktop_id, **kwargs):
427
+ """
428
+ Deletes the desktop with the specified OCID. The service terminates the associated compute instance. The end-user loses access to the desktop instance permanently. Any associated block volume becomes inactive but is not deleted.
429
+
430
+
431
+ :param str desktop_id: (required)
432
+ The OCID of the desktop.
433
+
434
+ :param str opc_request_id: (optional)
435
+ The unique identifier of the request.
436
+
437
+ :param str if_match: (optional)
438
+ For optimistic concurrency control.
439
+
440
+ :param obj retry_strategy: (optional)
441
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
442
+
443
+ 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.
444
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
445
+
446
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
447
+
448
+ :param bool allow_control_chars: (optional)
449
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
450
+ By default, the response will not allow control characters in strings
451
+
452
+ :return: A :class:`~oci.response.Response` object with data of type None
453
+ :rtype: :class:`~oci.response.Response`
454
+
455
+ :example:
456
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/delete_desktop.py.html>`__ to see an example of how to use delete_desktop API.
457
+ """
458
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
459
+ required_arguments = ['desktopId']
460
+ resource_path = "/desktops/{desktopId}"
461
+ method = "DELETE"
462
+ operation_name = "delete_desktop"
463
+ api_reference_link = ""
464
+
465
+ # Don't accept unknown kwargs
466
+ expected_kwargs = [
467
+ "allow_control_chars",
468
+ "retry_strategy",
469
+ "opc_request_id",
470
+ "if_match"
471
+ ]
472
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
473
+ if extra_kwargs:
474
+ raise ValueError(
475
+ f"delete_desktop got unknown kwargs: {extra_kwargs!r}")
476
+
477
+ path_params = {
478
+ "desktopId": desktop_id
479
+ }
480
+
481
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
482
+
483
+ for (k, v) in six.iteritems(path_params):
484
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
485
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
486
+
487
+ header_params = {
488
+ "accept": "application/json",
489
+ "content-type": "application/json",
490
+ "opc-request-id": kwargs.get("opc_request_id", missing),
491
+ "if-match": kwargs.get("if_match", missing)
492
+ }
493
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
494
+
495
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
496
+ operation_retry_strategy=kwargs.get('retry_strategy'),
497
+ client_retry_strategy=self.retry_strategy
498
+ )
499
+ if retry_strategy is None:
500
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
501
+
502
+ if retry_strategy:
503
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
504
+ self.base_client.add_opc_client_retries_header(header_params)
505
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
506
+ return retry_strategy.make_retrying_call(
507
+ self.base_client.call_api,
508
+ resource_path=resource_path,
509
+ method=method,
510
+ path_params=path_params,
511
+ header_params=header_params,
512
+ allow_control_chars=kwargs.get('allow_control_chars'),
513
+ operation_name=operation_name,
514
+ api_reference_link=api_reference_link,
515
+ required_arguments=required_arguments)
516
+ else:
517
+ return self.base_client.call_api(
518
+ resource_path=resource_path,
519
+ method=method,
520
+ path_params=path_params,
521
+ header_params=header_params,
522
+ allow_control_chars=kwargs.get('allow_control_chars'),
523
+ operation_name=operation_name,
524
+ api_reference_link=api_reference_link,
525
+ required_arguments=required_arguments)
526
+
527
+ def delete_desktop_pool(self, desktop_pool_id, **kwargs):
528
+ """
529
+ Deletes a desktop pool with the specified OCID. The service terminates all compute instances and users immediately lose access to their desktops. You can choose to preserve the block volumes associated with the pool.
530
+
531
+
532
+ :param str desktop_pool_id: (required)
533
+ The OCID of the desktop pool.
534
+
535
+ :param str opc_request_id: (optional)
536
+ The unique identifier of the request.
537
+
538
+ :param str if_match: (optional)
539
+ For optimistic concurrency control.
540
+
541
+ :param bool are_volumes_preserved: (optional)
542
+ Whether the volumes are preserved when a desktop pool is deleted.
543
+
544
+ :param obj retry_strategy: (optional)
545
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
546
+
547
+ 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.
548
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
549
+
550
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
551
+
552
+ :param bool allow_control_chars: (optional)
553
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
554
+ By default, the response will not allow control characters in strings
555
+
556
+ :return: A :class:`~oci.response.Response` object with data of type None
557
+ :rtype: :class:`~oci.response.Response`
558
+
559
+ :example:
560
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/delete_desktop_pool.py.html>`__ to see an example of how to use delete_desktop_pool API.
561
+ """
562
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
563
+ required_arguments = ['desktopPoolId']
564
+ resource_path = "/desktopPools/{desktopPoolId}"
565
+ method = "DELETE"
566
+ operation_name = "delete_desktop_pool"
567
+ api_reference_link = ""
568
+
569
+ # Don't accept unknown kwargs
570
+ expected_kwargs = [
571
+ "allow_control_chars",
572
+ "retry_strategy",
573
+ "opc_request_id",
574
+ "if_match",
575
+ "are_volumes_preserved"
576
+ ]
577
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
578
+ if extra_kwargs:
579
+ raise ValueError(
580
+ f"delete_desktop_pool got unknown kwargs: {extra_kwargs!r}")
581
+
582
+ path_params = {
583
+ "desktopPoolId": desktop_pool_id
584
+ }
585
+
586
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
587
+
588
+ for (k, v) in six.iteritems(path_params):
589
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
590
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
591
+
592
+ query_params = {
593
+ "areVolumesPreserved": kwargs.get("are_volumes_preserved", missing)
594
+ }
595
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
596
+
597
+ header_params = {
598
+ "accept": "application/json",
599
+ "content-type": "application/json",
600
+ "opc-request-id": kwargs.get("opc_request_id", missing),
601
+ "if-match": kwargs.get("if_match", missing)
602
+ }
603
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
604
+
605
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
606
+ operation_retry_strategy=kwargs.get('retry_strategy'),
607
+ client_retry_strategy=self.retry_strategy
608
+ )
609
+ if retry_strategy is None:
610
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
611
+
612
+ if retry_strategy:
613
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
614
+ self.base_client.add_opc_client_retries_header(header_params)
615
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
616
+ return retry_strategy.make_retrying_call(
617
+ self.base_client.call_api,
618
+ resource_path=resource_path,
619
+ method=method,
620
+ path_params=path_params,
621
+ query_params=query_params,
622
+ header_params=header_params,
623
+ allow_control_chars=kwargs.get('allow_control_chars'),
624
+ operation_name=operation_name,
625
+ api_reference_link=api_reference_link,
626
+ required_arguments=required_arguments)
627
+ else:
628
+ return self.base_client.call_api(
629
+ resource_path=resource_path,
630
+ method=method,
631
+ path_params=path_params,
632
+ query_params=query_params,
633
+ header_params=header_params,
634
+ allow_control_chars=kwargs.get('allow_control_chars'),
635
+ operation_name=operation_name,
636
+ api_reference_link=api_reference_link,
637
+ required_arguments=required_arguments)
638
+
639
+ def get_desktop(self, desktop_id, **kwargs):
640
+ """
641
+ Provides information about the desktop with the specified OCID.
642
+
643
+
644
+ :param str desktop_id: (required)
645
+ The OCID of the desktop.
646
+
647
+ :param str opc_request_id: (optional)
648
+ The unique identifier of the request.
649
+
650
+ :param obj retry_strategy: (optional)
651
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
652
+
653
+ 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.
654
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
655
+
656
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
657
+
658
+ :param bool allow_control_chars: (optional)
659
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
660
+ By default, the response will not allow control characters in strings
661
+
662
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.desktops.models.Desktop`
663
+ :rtype: :class:`~oci.response.Response`
664
+
665
+ :example:
666
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/get_desktop.py.html>`__ to see an example of how to use get_desktop API.
667
+ """
668
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
669
+ required_arguments = ['desktopId']
670
+ resource_path = "/desktops/{desktopId}"
671
+ method = "GET"
672
+ operation_name = "get_desktop"
673
+ api_reference_link = ""
674
+
675
+ # Don't accept unknown kwargs
676
+ expected_kwargs = [
677
+ "allow_control_chars",
678
+ "retry_strategy",
679
+ "opc_request_id"
680
+ ]
681
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
682
+ if extra_kwargs:
683
+ raise ValueError(
684
+ f"get_desktop got unknown kwargs: {extra_kwargs!r}")
685
+
686
+ path_params = {
687
+ "desktopId": desktop_id
688
+ }
689
+
690
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
691
+
692
+ for (k, v) in six.iteritems(path_params):
693
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
694
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
695
+
696
+ header_params = {
697
+ "accept": "application/json",
698
+ "content-type": "application/json",
699
+ "opc-request-id": kwargs.get("opc_request_id", missing)
700
+ }
701
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
702
+
703
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
704
+ operation_retry_strategy=kwargs.get('retry_strategy'),
705
+ client_retry_strategy=self.retry_strategy
706
+ )
707
+ if retry_strategy is None:
708
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
709
+
710
+ if retry_strategy:
711
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
712
+ self.base_client.add_opc_client_retries_header(header_params)
713
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
714
+ return retry_strategy.make_retrying_call(
715
+ self.base_client.call_api,
716
+ resource_path=resource_path,
717
+ method=method,
718
+ path_params=path_params,
719
+ header_params=header_params,
720
+ response_type="Desktop",
721
+ allow_control_chars=kwargs.get('allow_control_chars'),
722
+ operation_name=operation_name,
723
+ api_reference_link=api_reference_link,
724
+ required_arguments=required_arguments)
725
+ else:
726
+ return self.base_client.call_api(
727
+ resource_path=resource_path,
728
+ method=method,
729
+ path_params=path_params,
730
+ header_params=header_params,
731
+ response_type="Desktop",
732
+ allow_control_chars=kwargs.get('allow_control_chars'),
733
+ operation_name=operation_name,
734
+ api_reference_link=api_reference_link,
735
+ required_arguments=required_arguments)
736
+
737
+ def get_desktop_pool(self, desktop_pool_id, **kwargs):
738
+ """
739
+ Returns information about the desktop pool including all configuration parameters and the current state.
740
+
741
+
742
+ :param str desktop_pool_id: (required)
743
+ The OCID of the desktop pool.
744
+
745
+ :param str opc_request_id: (optional)
746
+ The unique identifier of the request.
747
+
748
+ :param obj retry_strategy: (optional)
749
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
750
+
751
+ 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.
752
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
753
+
754
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
755
+
756
+ :param bool allow_control_chars: (optional)
757
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
758
+ By default, the response will not allow control characters in strings
759
+
760
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.desktops.models.DesktopPool`
761
+ :rtype: :class:`~oci.response.Response`
762
+
763
+ :example:
764
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/get_desktop_pool.py.html>`__ to see an example of how to use get_desktop_pool API.
765
+ """
766
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
767
+ required_arguments = ['desktopPoolId']
768
+ resource_path = "/desktopPools/{desktopPoolId}"
769
+ method = "GET"
770
+ operation_name = "get_desktop_pool"
771
+ api_reference_link = ""
772
+
773
+ # Don't accept unknown kwargs
774
+ expected_kwargs = [
775
+ "allow_control_chars",
776
+ "retry_strategy",
777
+ "opc_request_id"
778
+ ]
779
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
780
+ if extra_kwargs:
781
+ raise ValueError(
782
+ f"get_desktop_pool got unknown kwargs: {extra_kwargs!r}")
783
+
784
+ path_params = {
785
+ "desktopPoolId": desktop_pool_id
786
+ }
787
+
788
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
789
+
790
+ for (k, v) in six.iteritems(path_params):
791
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
792
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
793
+
794
+ header_params = {
795
+ "accept": "application/json",
796
+ "content-type": "application/json",
797
+ "opc-request-id": kwargs.get("opc_request_id", missing)
798
+ }
799
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
800
+
801
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
802
+ operation_retry_strategy=kwargs.get('retry_strategy'),
803
+ client_retry_strategy=self.retry_strategy
804
+ )
805
+ if retry_strategy is None:
806
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
807
+
808
+ if retry_strategy:
809
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
810
+ self.base_client.add_opc_client_retries_header(header_params)
811
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
812
+ return retry_strategy.make_retrying_call(
813
+ self.base_client.call_api,
814
+ resource_path=resource_path,
815
+ method=method,
816
+ path_params=path_params,
817
+ header_params=header_params,
818
+ response_type="DesktopPool",
819
+ allow_control_chars=kwargs.get('allow_control_chars'),
820
+ operation_name=operation_name,
821
+ api_reference_link=api_reference_link,
822
+ required_arguments=required_arguments)
823
+ else:
824
+ return self.base_client.call_api(
825
+ resource_path=resource_path,
826
+ method=method,
827
+ path_params=path_params,
828
+ header_params=header_params,
829
+ response_type="DesktopPool",
830
+ allow_control_chars=kwargs.get('allow_control_chars'),
831
+ operation_name=operation_name,
832
+ api_reference_link=api_reference_link,
833
+ required_arguments=required_arguments)
834
+
835
+ def get_work_request(self, work_request_id, **kwargs):
836
+ """
837
+ Gets the status of the work request with the given ID.
838
+
839
+
840
+ :param str work_request_id: (required)
841
+ The ID of the asynchronous request.
842
+
843
+ :param str opc_request_id: (optional)
844
+ The unique identifier of the request.
845
+
846
+ :param obj retry_strategy: (optional)
847
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
848
+
849
+ 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.
850
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
851
+
852
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
853
+
854
+ :param bool allow_control_chars: (optional)
855
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
856
+ By default, the response will not allow control characters in strings
857
+
858
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.desktops.models.WorkRequest`
859
+ :rtype: :class:`~oci.response.Response`
860
+
861
+ :example:
862
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/get_work_request.py.html>`__ to see an example of how to use get_work_request API.
863
+ """
864
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
865
+ required_arguments = ['workRequestId']
866
+ resource_path = "/workRequests/{workRequestId}"
867
+ method = "GET"
868
+ operation_name = "get_work_request"
869
+ api_reference_link = ""
870
+
871
+ # Don't accept unknown kwargs
872
+ expected_kwargs = [
873
+ "allow_control_chars",
874
+ "retry_strategy",
875
+ "opc_request_id"
876
+ ]
877
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
878
+ if extra_kwargs:
879
+ raise ValueError(
880
+ f"get_work_request got unknown kwargs: {extra_kwargs!r}")
881
+
882
+ path_params = {
883
+ "workRequestId": work_request_id
884
+ }
885
+
886
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
887
+
888
+ for (k, v) in six.iteritems(path_params):
889
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
890
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
891
+
892
+ header_params = {
893
+ "accept": "application/json",
894
+ "content-type": "application/json",
895
+ "opc-request-id": kwargs.get("opc_request_id", missing)
896
+ }
897
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
898
+
899
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
900
+ operation_retry_strategy=kwargs.get('retry_strategy'),
901
+ client_retry_strategy=self.retry_strategy
902
+ )
903
+ if retry_strategy is None:
904
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
905
+
906
+ if retry_strategy:
907
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
908
+ self.base_client.add_opc_client_retries_header(header_params)
909
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
910
+ return retry_strategy.make_retrying_call(
911
+ self.base_client.call_api,
912
+ resource_path=resource_path,
913
+ method=method,
914
+ path_params=path_params,
915
+ header_params=header_params,
916
+ response_type="WorkRequest",
917
+ allow_control_chars=kwargs.get('allow_control_chars'),
918
+ operation_name=operation_name,
919
+ api_reference_link=api_reference_link,
920
+ required_arguments=required_arguments)
921
+ else:
922
+ return self.base_client.call_api(
923
+ resource_path=resource_path,
924
+ method=method,
925
+ path_params=path_params,
926
+ header_params=header_params,
927
+ response_type="WorkRequest",
928
+ allow_control_chars=kwargs.get('allow_control_chars'),
929
+ operation_name=operation_name,
930
+ api_reference_link=api_reference_link,
931
+ required_arguments=required_arguments)
932
+
933
+ def list_desktop_pool_desktops(self, compartment_id, desktop_pool_id, **kwargs):
934
+ """
935
+ Returns a list of desktops within a given desktop pool. You can limit the results to an availability domain, desktop name, or desktop state. You can limit the number of results returned, sort the results by time or name, and sort in ascending or descending order.
936
+
937
+
938
+ :param str compartment_id: (required)
939
+ The OCID of the compartment of the desktop pool.
940
+
941
+ :param str desktop_pool_id: (required)
942
+ The OCID of the desktop pool.
943
+
944
+ :param str availability_domain: (optional)
945
+ The name of the availability domain.
946
+
947
+ :param str display_name: (optional)
948
+ A filter to return only results with the given displayName.
949
+
950
+ :param str id: (optional)
951
+ A filter to return only results with the given OCID.
952
+
953
+ :param str lifecycle_state: (optional)
954
+ A filter to return only results with the given lifecycleState.
955
+
956
+ :param int limit: (optional)
957
+ The maximum number of results to return.
958
+
959
+ :param str sort_by: (optional)
960
+ A field to sort by.
961
+
962
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
963
+
964
+ :param str sort_order: (optional)
965
+ A field to indicate the sort order.
966
+
967
+ Allowed values are: "ASC", "DESC"
968
+
969
+ :param str opc_request_id: (optional)
970
+ The unique identifier of the request.
971
+
972
+ :param str page: (optional)
973
+ For list pagination.
974
+
975
+ :param obj retry_strategy: (optional)
976
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
977
+
978
+ 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.
979
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
980
+
981
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
982
+
983
+ :param bool allow_control_chars: (optional)
984
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
985
+ By default, the response will not allow control characters in strings
986
+
987
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.desktops.models.DesktopPoolDesktopCollection`
988
+ :rtype: :class:`~oci.response.Response`
989
+
990
+ :example:
991
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/list_desktop_pool_desktops.py.html>`__ to see an example of how to use list_desktop_pool_desktops API.
992
+ """
993
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
994
+ required_arguments = ['desktopPoolId', 'compartmentId']
995
+ resource_path = "/desktopPools/{desktopPoolId}/desktops"
996
+ method = "GET"
997
+ operation_name = "list_desktop_pool_desktops"
998
+ api_reference_link = ""
999
+
1000
+ # Don't accept unknown kwargs
1001
+ expected_kwargs = [
1002
+ "allow_control_chars",
1003
+ "retry_strategy",
1004
+ "availability_domain",
1005
+ "display_name",
1006
+ "id",
1007
+ "lifecycle_state",
1008
+ "limit",
1009
+ "sort_by",
1010
+ "sort_order",
1011
+ "opc_request_id",
1012
+ "page"
1013
+ ]
1014
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1015
+ if extra_kwargs:
1016
+ raise ValueError(
1017
+ f"list_desktop_pool_desktops got unknown kwargs: {extra_kwargs!r}")
1018
+
1019
+ path_params = {
1020
+ "desktopPoolId": desktop_pool_id
1021
+ }
1022
+
1023
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1024
+
1025
+ for (k, v) in six.iteritems(path_params):
1026
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1027
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1028
+
1029
+ if 'sort_by' in kwargs:
1030
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
1031
+ if kwargs['sort_by'] not in sort_by_allowed_values:
1032
+ raise ValueError(
1033
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
1034
+ )
1035
+
1036
+ if 'sort_order' in kwargs:
1037
+ sort_order_allowed_values = ["ASC", "DESC"]
1038
+ if kwargs['sort_order'] not in sort_order_allowed_values:
1039
+ raise ValueError(
1040
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
1041
+ )
1042
+
1043
+ query_params = {
1044
+ "compartmentId": compartment_id,
1045
+ "availabilityDomain": kwargs.get("availability_domain", missing),
1046
+ "displayName": kwargs.get("display_name", missing),
1047
+ "id": kwargs.get("id", missing),
1048
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
1049
+ "limit": kwargs.get("limit", missing),
1050
+ "sortBy": kwargs.get("sort_by", missing),
1051
+ "sortOrder": kwargs.get("sort_order", missing),
1052
+ "page": kwargs.get("page", missing)
1053
+ }
1054
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1055
+
1056
+ header_params = {
1057
+ "accept": "application/json",
1058
+ "content-type": "application/json",
1059
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1060
+ }
1061
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1062
+
1063
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1064
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1065
+ client_retry_strategy=self.retry_strategy
1066
+ )
1067
+ if retry_strategy is None:
1068
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1069
+
1070
+ if retry_strategy:
1071
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1072
+ self.base_client.add_opc_client_retries_header(header_params)
1073
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1074
+ return retry_strategy.make_retrying_call(
1075
+ self.base_client.call_api,
1076
+ resource_path=resource_path,
1077
+ method=method,
1078
+ path_params=path_params,
1079
+ query_params=query_params,
1080
+ header_params=header_params,
1081
+ response_type="DesktopPoolDesktopCollection",
1082
+ allow_control_chars=kwargs.get('allow_control_chars'),
1083
+ operation_name=operation_name,
1084
+ api_reference_link=api_reference_link,
1085
+ required_arguments=required_arguments)
1086
+ else:
1087
+ return self.base_client.call_api(
1088
+ resource_path=resource_path,
1089
+ method=method,
1090
+ path_params=path_params,
1091
+ query_params=query_params,
1092
+ header_params=header_params,
1093
+ response_type="DesktopPoolDesktopCollection",
1094
+ allow_control_chars=kwargs.get('allow_control_chars'),
1095
+ operation_name=operation_name,
1096
+ api_reference_link=api_reference_link,
1097
+ required_arguments=required_arguments)
1098
+
1099
+ def list_desktop_pool_volumes(self, desktop_pool_id, compartment_id, **kwargs):
1100
+ """
1101
+ Returns a list of volumes within the given desktop pool. You can limit the results to an availability domain, volume name, or volume state. You can limit the number of results returned, sort the results by time or name, and sort in ascending or descending order.
1102
+
1103
+
1104
+ :param str desktop_pool_id: (required)
1105
+ The OCID of the desktop pool.
1106
+
1107
+ :param str compartment_id: (required)
1108
+ The OCID of the compartment of the desktop pool.
1109
+
1110
+ :param str availability_domain: (optional)
1111
+ The name of the availability domain.
1112
+
1113
+ :param str display_name: (optional)
1114
+ A filter to return only results with the given displayName.
1115
+
1116
+ :param str id: (optional)
1117
+ A filter to return only results with the given OCID.
1118
+
1119
+ :param str lifecycle_state: (optional)
1120
+ A filter to return only results with the given lifecycleState.
1121
+
1122
+ :param int limit: (optional)
1123
+ The maximum number of results to return.
1124
+
1125
+ :param str sort_by: (optional)
1126
+ A field to sort by.
1127
+
1128
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
1129
+
1130
+ :param str sort_order: (optional)
1131
+ A field to indicate the sort order.
1132
+
1133
+ Allowed values are: "ASC", "DESC"
1134
+
1135
+ :param str opc_request_id: (optional)
1136
+ The unique identifier of the request.
1137
+
1138
+ :param str page: (optional)
1139
+ For list pagination.
1140
+
1141
+ :param obj retry_strategy: (optional)
1142
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1143
+
1144
+ 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.
1145
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1146
+
1147
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1148
+
1149
+ :param bool allow_control_chars: (optional)
1150
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1151
+ By default, the response will not allow control characters in strings
1152
+
1153
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.desktops.models.DesktopPoolVolumeCollection`
1154
+ :rtype: :class:`~oci.response.Response`
1155
+
1156
+ :example:
1157
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/list_desktop_pool_volumes.py.html>`__ to see an example of how to use list_desktop_pool_volumes API.
1158
+ """
1159
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1160
+ required_arguments = ['desktopPoolId', 'compartmentId']
1161
+ resource_path = "/desktopPools/{desktopPoolId}/volumes"
1162
+ method = "GET"
1163
+ operation_name = "list_desktop_pool_volumes"
1164
+ api_reference_link = ""
1165
+
1166
+ # Don't accept unknown kwargs
1167
+ expected_kwargs = [
1168
+ "allow_control_chars",
1169
+ "retry_strategy",
1170
+ "availability_domain",
1171
+ "display_name",
1172
+ "id",
1173
+ "lifecycle_state",
1174
+ "limit",
1175
+ "sort_by",
1176
+ "sort_order",
1177
+ "opc_request_id",
1178
+ "page"
1179
+ ]
1180
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1181
+ if extra_kwargs:
1182
+ raise ValueError(
1183
+ f"list_desktop_pool_volumes got unknown kwargs: {extra_kwargs!r}")
1184
+
1185
+ path_params = {
1186
+ "desktopPoolId": desktop_pool_id
1187
+ }
1188
+
1189
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1190
+
1191
+ for (k, v) in six.iteritems(path_params):
1192
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1193
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1194
+
1195
+ if 'sort_by' in kwargs:
1196
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
1197
+ if kwargs['sort_by'] not in sort_by_allowed_values:
1198
+ raise ValueError(
1199
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
1200
+ )
1201
+
1202
+ if 'sort_order' in kwargs:
1203
+ sort_order_allowed_values = ["ASC", "DESC"]
1204
+ if kwargs['sort_order'] not in sort_order_allowed_values:
1205
+ raise ValueError(
1206
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
1207
+ )
1208
+
1209
+ query_params = {
1210
+ "compartmentId": compartment_id,
1211
+ "availabilityDomain": kwargs.get("availability_domain", missing),
1212
+ "displayName": kwargs.get("display_name", missing),
1213
+ "id": kwargs.get("id", missing),
1214
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
1215
+ "limit": kwargs.get("limit", missing),
1216
+ "sortBy": kwargs.get("sort_by", missing),
1217
+ "sortOrder": kwargs.get("sort_order", missing),
1218
+ "page": kwargs.get("page", missing)
1219
+ }
1220
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1221
+
1222
+ header_params = {
1223
+ "accept": "application/json",
1224
+ "content-type": "application/json",
1225
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1226
+ }
1227
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1228
+
1229
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1230
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1231
+ client_retry_strategy=self.retry_strategy
1232
+ )
1233
+ if retry_strategy is None:
1234
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1235
+
1236
+ if retry_strategy:
1237
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1238
+ self.base_client.add_opc_client_retries_header(header_params)
1239
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1240
+ return retry_strategy.make_retrying_call(
1241
+ self.base_client.call_api,
1242
+ resource_path=resource_path,
1243
+ method=method,
1244
+ path_params=path_params,
1245
+ query_params=query_params,
1246
+ header_params=header_params,
1247
+ response_type="DesktopPoolVolumeCollection",
1248
+ allow_control_chars=kwargs.get('allow_control_chars'),
1249
+ operation_name=operation_name,
1250
+ api_reference_link=api_reference_link,
1251
+ required_arguments=required_arguments)
1252
+ else:
1253
+ return self.base_client.call_api(
1254
+ resource_path=resource_path,
1255
+ method=method,
1256
+ path_params=path_params,
1257
+ query_params=query_params,
1258
+ header_params=header_params,
1259
+ response_type="DesktopPoolVolumeCollection",
1260
+ allow_control_chars=kwargs.get('allow_control_chars'),
1261
+ operation_name=operation_name,
1262
+ api_reference_link=api_reference_link,
1263
+ required_arguments=required_arguments)
1264
+
1265
+ def list_desktop_pools(self, compartment_id, **kwargs):
1266
+ """
1267
+ Returns a list of desktop pools within the given compartment. You can limit the results to an availability domain, pool name, or pool state. You can limit the number of results returned, sort the results by time or name, and sort in ascending or descending order.
1268
+
1269
+
1270
+ :param str compartment_id: (required)
1271
+ The OCID of the compartment of the desktop pool.
1272
+
1273
+ :param str availability_domain: (optional)
1274
+ The name of the availability domain.
1275
+
1276
+ :param str display_name: (optional)
1277
+ A filter to return only results with the given displayName.
1278
+
1279
+ :param str id: (optional)
1280
+ A filter to return only results with the given OCID.
1281
+
1282
+ :param str lifecycle_state: (optional)
1283
+ A filter to return only results with the given lifecycleState.
1284
+
1285
+ :param int limit: (optional)
1286
+ The maximum number of results to return.
1287
+
1288
+ :param str sort_by: (optional)
1289
+ A field to sort by.
1290
+
1291
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
1292
+
1293
+ :param str sort_order: (optional)
1294
+ A field to indicate the sort order.
1295
+
1296
+ Allowed values are: "ASC", "DESC"
1297
+
1298
+ :param str opc_request_id: (optional)
1299
+ The unique identifier of the request.
1300
+
1301
+ :param str page: (optional)
1302
+ For list pagination.
1303
+
1304
+ :param obj retry_strategy: (optional)
1305
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1306
+
1307
+ 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.
1308
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1309
+
1310
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1311
+
1312
+ :param bool allow_control_chars: (optional)
1313
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1314
+ By default, the response will not allow control characters in strings
1315
+
1316
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.desktops.models.DesktopPoolCollection`
1317
+ :rtype: :class:`~oci.response.Response`
1318
+
1319
+ :example:
1320
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/list_desktop_pools.py.html>`__ to see an example of how to use list_desktop_pools API.
1321
+ """
1322
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1323
+ required_arguments = ['compartmentId']
1324
+ resource_path = "/desktopPools"
1325
+ method = "GET"
1326
+ operation_name = "list_desktop_pools"
1327
+ api_reference_link = ""
1328
+
1329
+ # Don't accept unknown kwargs
1330
+ expected_kwargs = [
1331
+ "allow_control_chars",
1332
+ "retry_strategy",
1333
+ "availability_domain",
1334
+ "display_name",
1335
+ "id",
1336
+ "lifecycle_state",
1337
+ "limit",
1338
+ "sort_by",
1339
+ "sort_order",
1340
+ "opc_request_id",
1341
+ "page"
1342
+ ]
1343
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1344
+ if extra_kwargs:
1345
+ raise ValueError(
1346
+ f"list_desktop_pools got unknown kwargs: {extra_kwargs!r}")
1347
+
1348
+ if 'sort_by' in kwargs:
1349
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
1350
+ if kwargs['sort_by'] not in sort_by_allowed_values:
1351
+ raise ValueError(
1352
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
1353
+ )
1354
+
1355
+ if 'sort_order' in kwargs:
1356
+ sort_order_allowed_values = ["ASC", "DESC"]
1357
+ if kwargs['sort_order'] not in sort_order_allowed_values:
1358
+ raise ValueError(
1359
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
1360
+ )
1361
+
1362
+ query_params = {
1363
+ "compartmentId": compartment_id,
1364
+ "availabilityDomain": kwargs.get("availability_domain", missing),
1365
+ "displayName": kwargs.get("display_name", missing),
1366
+ "id": kwargs.get("id", missing),
1367
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
1368
+ "limit": kwargs.get("limit", missing),
1369
+ "sortBy": kwargs.get("sort_by", missing),
1370
+ "sortOrder": kwargs.get("sort_order", missing),
1371
+ "page": kwargs.get("page", missing)
1372
+ }
1373
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1374
+
1375
+ header_params = {
1376
+ "accept": "application/json",
1377
+ "content-type": "application/json",
1378
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1379
+ }
1380
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1381
+
1382
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1383
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1384
+ client_retry_strategy=self.retry_strategy
1385
+ )
1386
+ if retry_strategy is None:
1387
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1388
+
1389
+ if retry_strategy:
1390
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1391
+ self.base_client.add_opc_client_retries_header(header_params)
1392
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1393
+ return retry_strategy.make_retrying_call(
1394
+ self.base_client.call_api,
1395
+ resource_path=resource_path,
1396
+ method=method,
1397
+ query_params=query_params,
1398
+ header_params=header_params,
1399
+ response_type="DesktopPoolCollection",
1400
+ allow_control_chars=kwargs.get('allow_control_chars'),
1401
+ operation_name=operation_name,
1402
+ api_reference_link=api_reference_link,
1403
+ required_arguments=required_arguments)
1404
+ else:
1405
+ return self.base_client.call_api(
1406
+ resource_path=resource_path,
1407
+ method=method,
1408
+ query_params=query_params,
1409
+ header_params=header_params,
1410
+ response_type="DesktopPoolCollection",
1411
+ allow_control_chars=kwargs.get('allow_control_chars'),
1412
+ operation_name=operation_name,
1413
+ api_reference_link=api_reference_link,
1414
+ required_arguments=required_arguments)
1415
+
1416
+ def list_desktops(self, compartment_id, **kwargs):
1417
+ """
1418
+ Returns a list of desktops filtered by the specified parameters. You can limit the results to an availability domain, desktop name, desktop OCID, desktop state, pool OCID, or compartment OCID. You can limit the number of results returned, sort the results by time or name, and sort in ascending or descending order.
1419
+
1420
+
1421
+ :param str compartment_id: (required)
1422
+ The OCID of the compartment of the desktop pool.
1423
+
1424
+ :param str availability_domain: (optional)
1425
+ The name of the availability domain.
1426
+
1427
+ :param str display_name: (optional)
1428
+ A filter to return only results with the given displayName.
1429
+
1430
+ :param str id: (optional)
1431
+ A filter to return only results with the given OCID.
1432
+
1433
+ :param str lifecycle_state: (optional)
1434
+ A filter to return only results with the given lifecycleState.
1435
+
1436
+ :param int limit: (optional)
1437
+ The maximum number of results to return.
1438
+
1439
+ :param str sort_by: (optional)
1440
+ A field to sort by.
1441
+
1442
+ Allowed values are: "TIMECREATED", "DISPLAYNAME"
1443
+
1444
+ :param str sort_order: (optional)
1445
+ A field to indicate the sort order.
1446
+
1447
+ Allowed values are: "ASC", "DESC"
1448
+
1449
+ :param str opc_request_id: (optional)
1450
+ The unique identifier of the request.
1451
+
1452
+ :param str page: (optional)
1453
+ For list pagination.
1454
+
1455
+ :param str desktop_pool_id: (optional)
1456
+ The OCID of the desktop pool.
1457
+
1458
+ :param obj retry_strategy: (optional)
1459
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1460
+
1461
+ 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.
1462
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1463
+
1464
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1465
+
1466
+ :param bool allow_control_chars: (optional)
1467
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1468
+ By default, the response will not allow control characters in strings
1469
+
1470
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.desktops.models.DesktopCollection`
1471
+ :rtype: :class:`~oci.response.Response`
1472
+
1473
+ :example:
1474
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/list_desktops.py.html>`__ to see an example of how to use list_desktops API.
1475
+ """
1476
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1477
+ required_arguments = ['compartmentId']
1478
+ resource_path = "/desktops"
1479
+ method = "GET"
1480
+ operation_name = "list_desktops"
1481
+ api_reference_link = ""
1482
+
1483
+ # Don't accept unknown kwargs
1484
+ expected_kwargs = [
1485
+ "allow_control_chars",
1486
+ "retry_strategy",
1487
+ "availability_domain",
1488
+ "display_name",
1489
+ "id",
1490
+ "lifecycle_state",
1491
+ "limit",
1492
+ "sort_by",
1493
+ "sort_order",
1494
+ "opc_request_id",
1495
+ "page",
1496
+ "desktop_pool_id"
1497
+ ]
1498
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1499
+ if extra_kwargs:
1500
+ raise ValueError(
1501
+ f"list_desktops got unknown kwargs: {extra_kwargs!r}")
1502
+
1503
+ if 'sort_by' in kwargs:
1504
+ sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
1505
+ if kwargs['sort_by'] not in sort_by_allowed_values:
1506
+ raise ValueError(
1507
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
1508
+ )
1509
+
1510
+ if 'sort_order' in kwargs:
1511
+ sort_order_allowed_values = ["ASC", "DESC"]
1512
+ if kwargs['sort_order'] not in sort_order_allowed_values:
1513
+ raise ValueError(
1514
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
1515
+ )
1516
+
1517
+ query_params = {
1518
+ "availabilityDomain": kwargs.get("availability_domain", missing),
1519
+ "displayName": kwargs.get("display_name", missing),
1520
+ "id": kwargs.get("id", missing),
1521
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
1522
+ "limit": kwargs.get("limit", missing),
1523
+ "sortBy": kwargs.get("sort_by", missing),
1524
+ "sortOrder": kwargs.get("sort_order", missing),
1525
+ "compartmentId": compartment_id,
1526
+ "page": kwargs.get("page", missing),
1527
+ "desktopPoolId": kwargs.get("desktop_pool_id", missing)
1528
+ }
1529
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1530
+
1531
+ header_params = {
1532
+ "accept": "application/json",
1533
+ "content-type": "application/json",
1534
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1535
+ }
1536
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1537
+
1538
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1539
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1540
+ client_retry_strategy=self.retry_strategy
1541
+ )
1542
+ if retry_strategy is None:
1543
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1544
+
1545
+ if retry_strategy:
1546
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1547
+ self.base_client.add_opc_client_retries_header(header_params)
1548
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1549
+ return retry_strategy.make_retrying_call(
1550
+ self.base_client.call_api,
1551
+ resource_path=resource_path,
1552
+ method=method,
1553
+ query_params=query_params,
1554
+ header_params=header_params,
1555
+ response_type="DesktopCollection",
1556
+ allow_control_chars=kwargs.get('allow_control_chars'),
1557
+ operation_name=operation_name,
1558
+ api_reference_link=api_reference_link,
1559
+ required_arguments=required_arguments)
1560
+ else:
1561
+ return self.base_client.call_api(
1562
+ resource_path=resource_path,
1563
+ method=method,
1564
+ query_params=query_params,
1565
+ header_params=header_params,
1566
+ response_type="DesktopCollection",
1567
+ allow_control_chars=kwargs.get('allow_control_chars'),
1568
+ operation_name=operation_name,
1569
+ api_reference_link=api_reference_link,
1570
+ required_arguments=required_arguments)
1571
+
1572
+ def list_work_request_errors(self, work_request_id, **kwargs):
1573
+ """
1574
+ Return a (paginated) list of errors for a given work request.
1575
+
1576
+
1577
+ :param str work_request_id: (required)
1578
+ The ID of the asynchronous request.
1579
+
1580
+ :param str opc_request_id: (optional)
1581
+ The unique identifier of the request.
1582
+
1583
+ :param str page: (optional)
1584
+ For list pagination.
1585
+
1586
+ :param int limit: (optional)
1587
+ The maximum number of results to return.
1588
+
1589
+ :param str sort_by: (optional)
1590
+ The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending.
1591
+
1592
+ Allowed values are: "timeAccepted"
1593
+
1594
+ :param str sort_order: (optional)
1595
+ A field to indicate the sort order.
1596
+
1597
+ Allowed values are: "ASC", "DESC"
1598
+
1599
+ :param obj retry_strategy: (optional)
1600
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1601
+
1602
+ 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.
1603
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1604
+
1605
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1606
+
1607
+ :param bool allow_control_chars: (optional)
1608
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1609
+ By default, the response will not allow control characters in strings
1610
+
1611
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.desktops.models.WorkRequestErrorCollection`
1612
+ :rtype: :class:`~oci.response.Response`
1613
+
1614
+ :example:
1615
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/list_work_request_errors.py.html>`__ to see an example of how to use list_work_request_errors API.
1616
+ """
1617
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1618
+ required_arguments = ['workRequestId']
1619
+ resource_path = "/workRequests/{workRequestId}/errors"
1620
+ method = "GET"
1621
+ operation_name = "list_work_request_errors"
1622
+ api_reference_link = ""
1623
+
1624
+ # Don't accept unknown kwargs
1625
+ expected_kwargs = [
1626
+ "allow_control_chars",
1627
+ "retry_strategy",
1628
+ "opc_request_id",
1629
+ "page",
1630
+ "limit",
1631
+ "sort_by",
1632
+ "sort_order"
1633
+ ]
1634
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1635
+ if extra_kwargs:
1636
+ raise ValueError(
1637
+ f"list_work_request_errors got unknown kwargs: {extra_kwargs!r}")
1638
+
1639
+ path_params = {
1640
+ "workRequestId": work_request_id
1641
+ }
1642
+
1643
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1644
+
1645
+ for (k, v) in six.iteritems(path_params):
1646
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1647
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1648
+
1649
+ if 'sort_by' in kwargs:
1650
+ sort_by_allowed_values = ["timeAccepted"]
1651
+ if kwargs['sort_by'] not in sort_by_allowed_values:
1652
+ raise ValueError(
1653
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
1654
+ )
1655
+
1656
+ if 'sort_order' in kwargs:
1657
+ sort_order_allowed_values = ["ASC", "DESC"]
1658
+ if kwargs['sort_order'] not in sort_order_allowed_values:
1659
+ raise ValueError(
1660
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
1661
+ )
1662
+
1663
+ query_params = {
1664
+ "page": kwargs.get("page", missing),
1665
+ "limit": kwargs.get("limit", missing),
1666
+ "sortBy": kwargs.get("sort_by", missing),
1667
+ "sortOrder": kwargs.get("sort_order", missing)
1668
+ }
1669
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1670
+
1671
+ header_params = {
1672
+ "accept": "application/json",
1673
+ "content-type": "application/json",
1674
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1675
+ }
1676
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1677
+
1678
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1679
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1680
+ client_retry_strategy=self.retry_strategy
1681
+ )
1682
+ if retry_strategy is None:
1683
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1684
+
1685
+ if retry_strategy:
1686
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1687
+ self.base_client.add_opc_client_retries_header(header_params)
1688
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1689
+ return retry_strategy.make_retrying_call(
1690
+ self.base_client.call_api,
1691
+ resource_path=resource_path,
1692
+ method=method,
1693
+ path_params=path_params,
1694
+ query_params=query_params,
1695
+ header_params=header_params,
1696
+ response_type="WorkRequestErrorCollection",
1697
+ allow_control_chars=kwargs.get('allow_control_chars'),
1698
+ operation_name=operation_name,
1699
+ api_reference_link=api_reference_link,
1700
+ required_arguments=required_arguments)
1701
+ else:
1702
+ return self.base_client.call_api(
1703
+ resource_path=resource_path,
1704
+ method=method,
1705
+ path_params=path_params,
1706
+ query_params=query_params,
1707
+ header_params=header_params,
1708
+ response_type="WorkRequestErrorCollection",
1709
+ allow_control_chars=kwargs.get('allow_control_chars'),
1710
+ operation_name=operation_name,
1711
+ api_reference_link=api_reference_link,
1712
+ required_arguments=required_arguments)
1713
+
1714
+ def list_work_request_logs(self, work_request_id, **kwargs):
1715
+ """
1716
+ Return a (paginated) list of logs for a given work request.
1717
+
1718
+
1719
+ :param str work_request_id: (required)
1720
+ The ID of the asynchronous request.
1721
+
1722
+ :param str opc_request_id: (optional)
1723
+ The unique identifier of the request.
1724
+
1725
+ :param str page: (optional)
1726
+ For list pagination.
1727
+
1728
+ :param int limit: (optional)
1729
+ The maximum number of results to return.
1730
+
1731
+ :param str sort_by: (optional)
1732
+ The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending.
1733
+
1734
+ Allowed values are: "timeAccepted"
1735
+
1736
+ :param str sort_order: (optional)
1737
+ A field to indicate the sort order.
1738
+
1739
+ Allowed values are: "ASC", "DESC"
1740
+
1741
+ :param obj retry_strategy: (optional)
1742
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1743
+
1744
+ 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.
1745
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1746
+
1747
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1748
+
1749
+ :param bool allow_control_chars: (optional)
1750
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1751
+ By default, the response will not allow control characters in strings
1752
+
1753
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.desktops.models.WorkRequestLogEntryCollection`
1754
+ :rtype: :class:`~oci.response.Response`
1755
+
1756
+ :example:
1757
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/list_work_request_logs.py.html>`__ to see an example of how to use list_work_request_logs API.
1758
+ """
1759
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1760
+ required_arguments = ['workRequestId']
1761
+ resource_path = "/workRequests/{workRequestId}/logs"
1762
+ method = "GET"
1763
+ operation_name = "list_work_request_logs"
1764
+ api_reference_link = ""
1765
+
1766
+ # Don't accept unknown kwargs
1767
+ expected_kwargs = [
1768
+ "allow_control_chars",
1769
+ "retry_strategy",
1770
+ "opc_request_id",
1771
+ "page",
1772
+ "limit",
1773
+ "sort_by",
1774
+ "sort_order"
1775
+ ]
1776
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1777
+ if extra_kwargs:
1778
+ raise ValueError(
1779
+ f"list_work_request_logs got unknown kwargs: {extra_kwargs!r}")
1780
+
1781
+ path_params = {
1782
+ "workRequestId": work_request_id
1783
+ }
1784
+
1785
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1786
+
1787
+ for (k, v) in six.iteritems(path_params):
1788
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1789
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1790
+
1791
+ if 'sort_by' in kwargs:
1792
+ sort_by_allowed_values = ["timeAccepted"]
1793
+ if kwargs['sort_by'] not in sort_by_allowed_values:
1794
+ raise ValueError(
1795
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
1796
+ )
1797
+
1798
+ if 'sort_order' in kwargs:
1799
+ sort_order_allowed_values = ["ASC", "DESC"]
1800
+ if kwargs['sort_order'] not in sort_order_allowed_values:
1801
+ raise ValueError(
1802
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
1803
+ )
1804
+
1805
+ query_params = {
1806
+ "page": kwargs.get("page", missing),
1807
+ "limit": kwargs.get("limit", missing),
1808
+ "sortBy": kwargs.get("sort_by", missing),
1809
+ "sortOrder": kwargs.get("sort_order", missing)
1810
+ }
1811
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1812
+
1813
+ header_params = {
1814
+ "accept": "application/json",
1815
+ "content-type": "application/json",
1816
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1817
+ }
1818
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1819
+
1820
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1821
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1822
+ client_retry_strategy=self.retry_strategy
1823
+ )
1824
+ if retry_strategy is None:
1825
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1826
+
1827
+ if retry_strategy:
1828
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1829
+ self.base_client.add_opc_client_retries_header(header_params)
1830
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1831
+ return retry_strategy.make_retrying_call(
1832
+ self.base_client.call_api,
1833
+ resource_path=resource_path,
1834
+ method=method,
1835
+ path_params=path_params,
1836
+ query_params=query_params,
1837
+ header_params=header_params,
1838
+ response_type="WorkRequestLogEntryCollection",
1839
+ allow_control_chars=kwargs.get('allow_control_chars'),
1840
+ operation_name=operation_name,
1841
+ api_reference_link=api_reference_link,
1842
+ required_arguments=required_arguments)
1843
+ else:
1844
+ return self.base_client.call_api(
1845
+ resource_path=resource_path,
1846
+ method=method,
1847
+ path_params=path_params,
1848
+ query_params=query_params,
1849
+ header_params=header_params,
1850
+ response_type="WorkRequestLogEntryCollection",
1851
+ allow_control_chars=kwargs.get('allow_control_chars'),
1852
+ operation_name=operation_name,
1853
+ api_reference_link=api_reference_link,
1854
+ required_arguments=required_arguments)
1855
+
1856
+ def list_work_requests(self, compartment_id, **kwargs):
1857
+ """
1858
+ Lists the work requests in a compartment.
1859
+
1860
+
1861
+ :param str compartment_id: (required)
1862
+ The OCID of the compartment of the desktop pool.
1863
+
1864
+ :param str work_request_id: (optional)
1865
+ The ID of the asynchronous work request.
1866
+
1867
+ :param str status: (optional)
1868
+ A filter to return only resources their lifecycleState matches the given OperationStatus.
1869
+
1870
+ Allowed values are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"
1871
+
1872
+ :param str resource_id: (optional)
1873
+ The ID of the resource affected by the work request.
1874
+
1875
+ :param str opc_request_id: (optional)
1876
+ The unique identifier of the request.
1877
+
1878
+ :param str page: (optional)
1879
+ For list pagination.
1880
+
1881
+ :param int limit: (optional)
1882
+ The maximum number of results to return.
1883
+
1884
+ :param str sort_order: (optional)
1885
+ A field to indicate the sort order.
1886
+
1887
+ Allowed values are: "ASC", "DESC"
1888
+
1889
+ :param str sort_by: (optional)
1890
+ The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending.
1891
+
1892
+ Allowed values are: "timeAccepted"
1893
+
1894
+ :param obj retry_strategy: (optional)
1895
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1896
+
1897
+ 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.
1898
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1899
+
1900
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1901
+
1902
+ :param bool allow_control_chars: (optional)
1903
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1904
+ By default, the response will not allow control characters in strings
1905
+
1906
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.desktops.models.WorkRequestSummaryCollection`
1907
+ :rtype: :class:`~oci.response.Response`
1908
+
1909
+ :example:
1910
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/list_work_requests.py.html>`__ to see an example of how to use list_work_requests API.
1911
+ """
1912
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1913
+ required_arguments = ['compartmentId']
1914
+ resource_path = "/workRequests"
1915
+ method = "GET"
1916
+ operation_name = "list_work_requests"
1917
+ api_reference_link = ""
1918
+
1919
+ # Don't accept unknown kwargs
1920
+ expected_kwargs = [
1921
+ "allow_control_chars",
1922
+ "retry_strategy",
1923
+ "work_request_id",
1924
+ "status",
1925
+ "resource_id",
1926
+ "opc_request_id",
1927
+ "page",
1928
+ "limit",
1929
+ "sort_order",
1930
+ "sort_by"
1931
+ ]
1932
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1933
+ if extra_kwargs:
1934
+ raise ValueError(
1935
+ f"list_work_requests got unknown kwargs: {extra_kwargs!r}")
1936
+
1937
+ if 'status' in kwargs:
1938
+ status_allowed_values = ["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]
1939
+ if kwargs['status'] not in status_allowed_values:
1940
+ raise ValueError(
1941
+ f"Invalid value for `status`, must be one of { status_allowed_values }"
1942
+ )
1943
+
1944
+ if 'sort_order' in kwargs:
1945
+ sort_order_allowed_values = ["ASC", "DESC"]
1946
+ if kwargs['sort_order'] not in sort_order_allowed_values:
1947
+ raise ValueError(
1948
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
1949
+ )
1950
+
1951
+ if 'sort_by' in kwargs:
1952
+ sort_by_allowed_values = ["timeAccepted"]
1953
+ if kwargs['sort_by'] not in sort_by_allowed_values:
1954
+ raise ValueError(
1955
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
1956
+ )
1957
+
1958
+ query_params = {
1959
+ "compartmentId": compartment_id,
1960
+ "workRequestId": kwargs.get("work_request_id", missing),
1961
+ "status": kwargs.get("status", missing),
1962
+ "resourceId": kwargs.get("resource_id", missing),
1963
+ "page": kwargs.get("page", missing),
1964
+ "limit": kwargs.get("limit", missing),
1965
+ "sortOrder": kwargs.get("sort_order", missing),
1966
+ "sortBy": kwargs.get("sort_by", missing)
1967
+ }
1968
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1969
+
1970
+ header_params = {
1971
+ "accept": "application/json",
1972
+ "content-type": "application/json",
1973
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1974
+ }
1975
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1976
+
1977
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1978
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1979
+ client_retry_strategy=self.retry_strategy
1980
+ )
1981
+ if retry_strategy is None:
1982
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1983
+
1984
+ if retry_strategy:
1985
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1986
+ self.base_client.add_opc_client_retries_header(header_params)
1987
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1988
+ return retry_strategy.make_retrying_call(
1989
+ self.base_client.call_api,
1990
+ resource_path=resource_path,
1991
+ method=method,
1992
+ query_params=query_params,
1993
+ header_params=header_params,
1994
+ response_type="WorkRequestSummaryCollection",
1995
+ allow_control_chars=kwargs.get('allow_control_chars'),
1996
+ operation_name=operation_name,
1997
+ api_reference_link=api_reference_link,
1998
+ required_arguments=required_arguments)
1999
+ else:
2000
+ return self.base_client.call_api(
2001
+ resource_path=resource_path,
2002
+ method=method,
2003
+ query_params=query_params,
2004
+ header_params=header_params,
2005
+ response_type="WorkRequestSummaryCollection",
2006
+ allow_control_chars=kwargs.get('allow_control_chars'),
2007
+ operation_name=operation_name,
2008
+ api_reference_link=api_reference_link,
2009
+ required_arguments=required_arguments)
2010
+
2011
+ def start_desktop(self, desktop_id, **kwargs):
2012
+ """
2013
+ Starts the desktop with the specified OCID.
2014
+
2015
+
2016
+ :param str desktop_id: (required)
2017
+ The OCID of the desktop.
2018
+
2019
+ :param str opc_request_id: (optional)
2020
+ The unique identifier of the request.
2021
+
2022
+ :param str if_match: (optional)
2023
+ For optimistic concurrency control.
2024
+
2025
+ :param str opc_retry_token: (optional)
2026
+ A token that uniquely identifies a request.
2027
+
2028
+ :param obj retry_strategy: (optional)
2029
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2030
+
2031
+ 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.
2032
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2033
+
2034
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2035
+
2036
+ :param bool allow_control_chars: (optional)
2037
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
2038
+ By default, the response will not allow control characters in strings
2039
+
2040
+ :return: A :class:`~oci.response.Response` object with data of type None
2041
+ :rtype: :class:`~oci.response.Response`
2042
+
2043
+ :example:
2044
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/start_desktop.py.html>`__ to see an example of how to use start_desktop API.
2045
+ """
2046
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
2047
+ required_arguments = ['desktopId']
2048
+ resource_path = "/desktops/{desktopId}/actions/start"
2049
+ method = "POST"
2050
+ operation_name = "start_desktop"
2051
+ api_reference_link = ""
2052
+
2053
+ # Don't accept unknown kwargs
2054
+ expected_kwargs = [
2055
+ "allow_control_chars",
2056
+ "retry_strategy",
2057
+ "opc_request_id",
2058
+ "if_match",
2059
+ "opc_retry_token"
2060
+ ]
2061
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2062
+ if extra_kwargs:
2063
+ raise ValueError(
2064
+ f"start_desktop got unknown kwargs: {extra_kwargs!r}")
2065
+
2066
+ path_params = {
2067
+ "desktopId": desktop_id
2068
+ }
2069
+
2070
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2071
+
2072
+ for (k, v) in six.iteritems(path_params):
2073
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2074
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
2075
+
2076
+ header_params = {
2077
+ "accept": "application/json",
2078
+ "content-type": "application/json",
2079
+ "opc-request-id": kwargs.get("opc_request_id", missing),
2080
+ "if-match": kwargs.get("if_match", missing),
2081
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
2082
+ }
2083
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2084
+
2085
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
2086
+ operation_retry_strategy=kwargs.get('retry_strategy'),
2087
+ client_retry_strategy=self.retry_strategy
2088
+ )
2089
+ if retry_strategy is None:
2090
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
2091
+
2092
+ if retry_strategy:
2093
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2094
+ self.base_client.add_opc_retry_token_if_needed(header_params)
2095
+ self.base_client.add_opc_client_retries_header(header_params)
2096
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2097
+ return retry_strategy.make_retrying_call(
2098
+ self.base_client.call_api,
2099
+ resource_path=resource_path,
2100
+ method=method,
2101
+ path_params=path_params,
2102
+ header_params=header_params,
2103
+ allow_control_chars=kwargs.get('allow_control_chars'),
2104
+ operation_name=operation_name,
2105
+ api_reference_link=api_reference_link,
2106
+ required_arguments=required_arguments)
2107
+ else:
2108
+ return self.base_client.call_api(
2109
+ resource_path=resource_path,
2110
+ method=method,
2111
+ path_params=path_params,
2112
+ header_params=header_params,
2113
+ allow_control_chars=kwargs.get('allow_control_chars'),
2114
+ operation_name=operation_name,
2115
+ api_reference_link=api_reference_link,
2116
+ required_arguments=required_arguments)
2117
+
2118
+ def start_desktop_pool(self, desktop_pool_id, **kwargs):
2119
+ """
2120
+ Starts the desktop pool with the specified OCID. Once the pool is ACTIVE, users will have access to their desktops within the pool.
2121
+
2122
+
2123
+ :param str desktop_pool_id: (required)
2124
+ The OCID of the desktop pool.
2125
+
2126
+ :param str opc_request_id: (optional)
2127
+ The unique identifier of the request.
2128
+
2129
+ :param str if_match: (optional)
2130
+ For optimistic concurrency control.
2131
+
2132
+ :param str opc_retry_token: (optional)
2133
+ A token that uniquely identifies a request.
2134
+
2135
+ :param obj retry_strategy: (optional)
2136
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2137
+
2138
+ 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.
2139
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2140
+
2141
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2142
+
2143
+ :param bool allow_control_chars: (optional)
2144
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
2145
+ By default, the response will not allow control characters in strings
2146
+
2147
+ :return: A :class:`~oci.response.Response` object with data of type None
2148
+ :rtype: :class:`~oci.response.Response`
2149
+
2150
+ :example:
2151
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/start_desktop_pool.py.html>`__ to see an example of how to use start_desktop_pool API.
2152
+ """
2153
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
2154
+ required_arguments = ['desktopPoolId']
2155
+ resource_path = "/desktopPools/{desktopPoolId}/actions/start"
2156
+ method = "POST"
2157
+ operation_name = "start_desktop_pool"
2158
+ api_reference_link = ""
2159
+
2160
+ # Don't accept unknown kwargs
2161
+ expected_kwargs = [
2162
+ "allow_control_chars",
2163
+ "retry_strategy",
2164
+ "opc_request_id",
2165
+ "if_match",
2166
+ "opc_retry_token"
2167
+ ]
2168
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2169
+ if extra_kwargs:
2170
+ raise ValueError(
2171
+ f"start_desktop_pool got unknown kwargs: {extra_kwargs!r}")
2172
+
2173
+ path_params = {
2174
+ "desktopPoolId": desktop_pool_id
2175
+ }
2176
+
2177
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2178
+
2179
+ for (k, v) in six.iteritems(path_params):
2180
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2181
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
2182
+
2183
+ header_params = {
2184
+ "accept": "application/json",
2185
+ "content-type": "application/json",
2186
+ "opc-request-id": kwargs.get("opc_request_id", missing),
2187
+ "if-match": kwargs.get("if_match", missing),
2188
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
2189
+ }
2190
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2191
+
2192
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
2193
+ operation_retry_strategy=kwargs.get('retry_strategy'),
2194
+ client_retry_strategy=self.retry_strategy
2195
+ )
2196
+ if retry_strategy is None:
2197
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
2198
+
2199
+ if retry_strategy:
2200
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2201
+ self.base_client.add_opc_retry_token_if_needed(header_params)
2202
+ self.base_client.add_opc_client_retries_header(header_params)
2203
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2204
+ return retry_strategy.make_retrying_call(
2205
+ self.base_client.call_api,
2206
+ resource_path=resource_path,
2207
+ method=method,
2208
+ path_params=path_params,
2209
+ header_params=header_params,
2210
+ allow_control_chars=kwargs.get('allow_control_chars'),
2211
+ operation_name=operation_name,
2212
+ api_reference_link=api_reference_link,
2213
+ required_arguments=required_arguments)
2214
+ else:
2215
+ return self.base_client.call_api(
2216
+ resource_path=resource_path,
2217
+ method=method,
2218
+ path_params=path_params,
2219
+ header_params=header_params,
2220
+ allow_control_chars=kwargs.get('allow_control_chars'),
2221
+ operation_name=operation_name,
2222
+ api_reference_link=api_reference_link,
2223
+ required_arguments=required_arguments)
2224
+
2225
+ def stop_desktop(self, desktop_id, **kwargs):
2226
+ """
2227
+ Stops the desktop with the specified OCID. Stopping a desktop causes the end-user to lose access to their desktop instance until the desktop is restarted.
2228
+
2229
+
2230
+ :param str desktop_id: (required)
2231
+ The OCID of the desktop.
2232
+
2233
+ :param str opc_request_id: (optional)
2234
+ The unique identifier of the request.
2235
+
2236
+ :param str if_match: (optional)
2237
+ For optimistic concurrency control.
2238
+
2239
+ :param str opc_retry_token: (optional)
2240
+ A token that uniquely identifies a request.
2241
+
2242
+ :param obj retry_strategy: (optional)
2243
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2244
+
2245
+ 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.
2246
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2247
+
2248
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2249
+
2250
+ :param bool allow_control_chars: (optional)
2251
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
2252
+ By default, the response will not allow control characters in strings
2253
+
2254
+ :return: A :class:`~oci.response.Response` object with data of type None
2255
+ :rtype: :class:`~oci.response.Response`
2256
+
2257
+ :example:
2258
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/stop_desktop.py.html>`__ to see an example of how to use stop_desktop API.
2259
+ """
2260
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
2261
+ required_arguments = ['desktopId']
2262
+ resource_path = "/desktops/{desktopId}/actions/stop"
2263
+ method = "POST"
2264
+ operation_name = "stop_desktop"
2265
+ api_reference_link = ""
2266
+
2267
+ # Don't accept unknown kwargs
2268
+ expected_kwargs = [
2269
+ "allow_control_chars",
2270
+ "retry_strategy",
2271
+ "opc_request_id",
2272
+ "if_match",
2273
+ "opc_retry_token"
2274
+ ]
2275
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2276
+ if extra_kwargs:
2277
+ raise ValueError(
2278
+ f"stop_desktop got unknown kwargs: {extra_kwargs!r}")
2279
+
2280
+ path_params = {
2281
+ "desktopId": desktop_id
2282
+ }
2283
+
2284
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2285
+
2286
+ for (k, v) in six.iteritems(path_params):
2287
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2288
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
2289
+
2290
+ header_params = {
2291
+ "accept": "application/json",
2292
+ "content-type": "application/json",
2293
+ "opc-request-id": kwargs.get("opc_request_id", missing),
2294
+ "if-match": kwargs.get("if_match", missing),
2295
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
2296
+ }
2297
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2298
+
2299
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
2300
+ operation_retry_strategy=kwargs.get('retry_strategy'),
2301
+ client_retry_strategy=self.retry_strategy
2302
+ )
2303
+ if retry_strategy is None:
2304
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
2305
+
2306
+ if retry_strategy:
2307
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2308
+ self.base_client.add_opc_retry_token_if_needed(header_params)
2309
+ self.base_client.add_opc_client_retries_header(header_params)
2310
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2311
+ return retry_strategy.make_retrying_call(
2312
+ self.base_client.call_api,
2313
+ resource_path=resource_path,
2314
+ method=method,
2315
+ path_params=path_params,
2316
+ header_params=header_params,
2317
+ allow_control_chars=kwargs.get('allow_control_chars'),
2318
+ operation_name=operation_name,
2319
+ api_reference_link=api_reference_link,
2320
+ required_arguments=required_arguments)
2321
+ else:
2322
+ return self.base_client.call_api(
2323
+ resource_path=resource_path,
2324
+ method=method,
2325
+ path_params=path_params,
2326
+ header_params=header_params,
2327
+ allow_control_chars=kwargs.get('allow_control_chars'),
2328
+ operation_name=operation_name,
2329
+ api_reference_link=api_reference_link,
2330
+ required_arguments=required_arguments)
2331
+
2332
+ def stop_desktop_pool(self, desktop_pool_id, **kwargs):
2333
+ """
2334
+ Stops the desktop pool with the specified OCID. Users will lose access to their desktops until you explicitly start the pool again.
2335
+
2336
+
2337
+ :param str desktop_pool_id: (required)
2338
+ The OCID of the desktop pool.
2339
+
2340
+ :param str opc_request_id: (optional)
2341
+ The unique identifier of the request.
2342
+
2343
+ :param str if_match: (optional)
2344
+ For optimistic concurrency control.
2345
+
2346
+ :param str opc_retry_token: (optional)
2347
+ A token that uniquely identifies a request.
2348
+
2349
+ :param obj retry_strategy: (optional)
2350
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2351
+
2352
+ 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.
2353
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2354
+
2355
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2356
+
2357
+ :param bool allow_control_chars: (optional)
2358
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
2359
+ By default, the response will not allow control characters in strings
2360
+
2361
+ :return: A :class:`~oci.response.Response` object with data of type None
2362
+ :rtype: :class:`~oci.response.Response`
2363
+
2364
+ :example:
2365
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/stop_desktop_pool.py.html>`__ to see an example of how to use stop_desktop_pool API.
2366
+ """
2367
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
2368
+ required_arguments = ['desktopPoolId']
2369
+ resource_path = "/desktopPools/{desktopPoolId}/actions/stop"
2370
+ method = "POST"
2371
+ operation_name = "stop_desktop_pool"
2372
+ api_reference_link = ""
2373
+
2374
+ # Don't accept unknown kwargs
2375
+ expected_kwargs = [
2376
+ "allow_control_chars",
2377
+ "retry_strategy",
2378
+ "opc_request_id",
2379
+ "if_match",
2380
+ "opc_retry_token"
2381
+ ]
2382
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2383
+ if extra_kwargs:
2384
+ raise ValueError(
2385
+ f"stop_desktop_pool got unknown kwargs: {extra_kwargs!r}")
2386
+
2387
+ path_params = {
2388
+ "desktopPoolId": desktop_pool_id
2389
+ }
2390
+
2391
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2392
+
2393
+ for (k, v) in six.iteritems(path_params):
2394
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2395
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
2396
+
2397
+ header_params = {
2398
+ "accept": "application/json",
2399
+ "content-type": "application/json",
2400
+ "opc-request-id": kwargs.get("opc_request_id", missing),
2401
+ "if-match": kwargs.get("if_match", missing),
2402
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
2403
+ }
2404
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2405
+
2406
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
2407
+ operation_retry_strategy=kwargs.get('retry_strategy'),
2408
+ client_retry_strategy=self.retry_strategy
2409
+ )
2410
+ if retry_strategy is None:
2411
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
2412
+
2413
+ if retry_strategy:
2414
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2415
+ self.base_client.add_opc_retry_token_if_needed(header_params)
2416
+ self.base_client.add_opc_client_retries_header(header_params)
2417
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2418
+ return retry_strategy.make_retrying_call(
2419
+ self.base_client.call_api,
2420
+ resource_path=resource_path,
2421
+ method=method,
2422
+ path_params=path_params,
2423
+ header_params=header_params,
2424
+ allow_control_chars=kwargs.get('allow_control_chars'),
2425
+ operation_name=operation_name,
2426
+ api_reference_link=api_reference_link,
2427
+ required_arguments=required_arguments)
2428
+ else:
2429
+ return self.base_client.call_api(
2430
+ resource_path=resource_path,
2431
+ method=method,
2432
+ path_params=path_params,
2433
+ header_params=header_params,
2434
+ allow_control_chars=kwargs.get('allow_control_chars'),
2435
+ operation_name=operation_name,
2436
+ api_reference_link=api_reference_link,
2437
+ required_arguments=required_arguments)
2438
+
2439
+ def update_desktop(self, desktop_id, update_desktop_details, **kwargs):
2440
+ """
2441
+ Modifies information about the desktop such as the name.
2442
+
2443
+
2444
+ :param str desktop_id: (required)
2445
+ The OCID of the desktop.
2446
+
2447
+ :param oci.desktops.models.UpdateDesktopDetails update_desktop_details: (required)
2448
+ The details of the update.
2449
+
2450
+ :param str opc_request_id: (optional)
2451
+ The unique identifier of the request.
2452
+
2453
+ :param str if_match: (optional)
2454
+ For optimistic concurrency control.
2455
+
2456
+ :param obj retry_strategy: (optional)
2457
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2458
+
2459
+ 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.
2460
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2461
+
2462
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2463
+
2464
+ :param bool allow_control_chars: (optional)
2465
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
2466
+ By default, the response will not allow control characters in strings
2467
+
2468
+ :return: A :class:`~oci.response.Response` object with data of type None
2469
+ :rtype: :class:`~oci.response.Response`
2470
+
2471
+ :example:
2472
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/update_desktop.py.html>`__ to see an example of how to use update_desktop API.
2473
+ """
2474
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
2475
+ required_arguments = ['desktopId']
2476
+ resource_path = "/desktops/{desktopId}"
2477
+ method = "PUT"
2478
+ operation_name = "update_desktop"
2479
+ api_reference_link = ""
2480
+
2481
+ # Don't accept unknown kwargs
2482
+ expected_kwargs = [
2483
+ "allow_control_chars",
2484
+ "retry_strategy",
2485
+ "opc_request_id",
2486
+ "if_match"
2487
+ ]
2488
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2489
+ if extra_kwargs:
2490
+ raise ValueError(
2491
+ f"update_desktop got unknown kwargs: {extra_kwargs!r}")
2492
+
2493
+ path_params = {
2494
+ "desktopId": desktop_id
2495
+ }
2496
+
2497
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2498
+
2499
+ for (k, v) in six.iteritems(path_params):
2500
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2501
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
2502
+
2503
+ header_params = {
2504
+ "accept": "application/json",
2505
+ "content-type": "application/json",
2506
+ "opc-request-id": kwargs.get("opc_request_id", missing),
2507
+ "if-match": kwargs.get("if_match", missing)
2508
+ }
2509
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2510
+
2511
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
2512
+ operation_retry_strategy=kwargs.get('retry_strategy'),
2513
+ client_retry_strategy=self.retry_strategy
2514
+ )
2515
+ if retry_strategy is None:
2516
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
2517
+
2518
+ if retry_strategy:
2519
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2520
+ self.base_client.add_opc_client_retries_header(header_params)
2521
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2522
+ return retry_strategy.make_retrying_call(
2523
+ self.base_client.call_api,
2524
+ resource_path=resource_path,
2525
+ method=method,
2526
+ path_params=path_params,
2527
+ header_params=header_params,
2528
+ body=update_desktop_details,
2529
+ allow_control_chars=kwargs.get('allow_control_chars'),
2530
+ operation_name=operation_name,
2531
+ api_reference_link=api_reference_link,
2532
+ required_arguments=required_arguments)
2533
+ else:
2534
+ return self.base_client.call_api(
2535
+ resource_path=resource_path,
2536
+ method=method,
2537
+ path_params=path_params,
2538
+ header_params=header_params,
2539
+ body=update_desktop_details,
2540
+ allow_control_chars=kwargs.get('allow_control_chars'),
2541
+ operation_name=operation_name,
2542
+ api_reference_link=api_reference_link,
2543
+ required_arguments=required_arguments)
2544
+
2545
+ def update_desktop_pool(self, desktop_pool_id, update_desktop_pool_details, **kwargs):
2546
+ """
2547
+ Modifies the configuration of the desktop pool such as the availability, contact information, description, name, device policy, pool size, standby size, and start or stop time.
2548
+
2549
+
2550
+ :param str desktop_pool_id: (required)
2551
+ The OCID of the desktop pool.
2552
+
2553
+ :param oci.desktops.models.UpdateDesktopPoolDetails update_desktop_pool_details: (required)
2554
+ The details of the update.
2555
+
2556
+ :param str opc_request_id: (optional)
2557
+ The unique identifier of the request.
2558
+
2559
+ :param str if_match: (optional)
2560
+ For optimistic concurrency control.
2561
+
2562
+ :param obj retry_strategy: (optional)
2563
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
2564
+
2565
+ 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.
2566
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
2567
+
2568
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
2569
+
2570
+ :param bool allow_control_chars: (optional)
2571
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
2572
+ By default, the response will not allow control characters in strings
2573
+
2574
+ :return: A :class:`~oci.response.Response` object with data of type None
2575
+ :rtype: :class:`~oci.response.Response`
2576
+
2577
+ :example:
2578
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.123.0/desktops/update_desktop_pool.py.html>`__ to see an example of how to use update_desktop_pool API.
2579
+ """
2580
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
2581
+ required_arguments = ['desktopPoolId']
2582
+ resource_path = "/desktopPools/{desktopPoolId}"
2583
+ method = "PUT"
2584
+ operation_name = "update_desktop_pool"
2585
+ api_reference_link = ""
2586
+
2587
+ # Don't accept unknown kwargs
2588
+ expected_kwargs = [
2589
+ "allow_control_chars",
2590
+ "retry_strategy",
2591
+ "opc_request_id",
2592
+ "if_match"
2593
+ ]
2594
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
2595
+ if extra_kwargs:
2596
+ raise ValueError(
2597
+ f"update_desktop_pool got unknown kwargs: {extra_kwargs!r}")
2598
+
2599
+ path_params = {
2600
+ "desktopPoolId": desktop_pool_id
2601
+ }
2602
+
2603
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
2604
+
2605
+ for (k, v) in six.iteritems(path_params):
2606
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
2607
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
2608
+
2609
+ header_params = {
2610
+ "accept": "application/json",
2611
+ "content-type": "application/json",
2612
+ "opc-request-id": kwargs.get("opc_request_id", missing),
2613
+ "if-match": kwargs.get("if_match", missing)
2614
+ }
2615
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
2616
+
2617
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
2618
+ operation_retry_strategy=kwargs.get('retry_strategy'),
2619
+ client_retry_strategy=self.retry_strategy
2620
+ )
2621
+ if retry_strategy is None:
2622
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
2623
+
2624
+ if retry_strategy:
2625
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
2626
+ self.base_client.add_opc_client_retries_header(header_params)
2627
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
2628
+ return retry_strategy.make_retrying_call(
2629
+ self.base_client.call_api,
2630
+ resource_path=resource_path,
2631
+ method=method,
2632
+ path_params=path_params,
2633
+ header_params=header_params,
2634
+ body=update_desktop_pool_details,
2635
+ allow_control_chars=kwargs.get('allow_control_chars'),
2636
+ operation_name=operation_name,
2637
+ api_reference_link=api_reference_link,
2638
+ required_arguments=required_arguments)
2639
+ else:
2640
+ return self.base_client.call_api(
2641
+ resource_path=resource_path,
2642
+ method=method,
2643
+ path_params=path_params,
2644
+ header_params=header_params,
2645
+ body=update_desktop_pool_details,
2646
+ allow_control_chars=kwargs.get('allow_control_chars'),
2647
+ operation_name=operation_name,
2648
+ api_reference_link=api_reference_link,
2649
+ required_arguments=required_arguments)