oci 2.126.3__py3-none-any.whl → 2.127.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 (390) hide show
  1. oci/__init__.py +2 -2
  2. oci/access_governance_cp/access_governance_cp_client.py +8 -8
  3. oci/adm/application_dependency_management_client.py +36 -36
  4. oci/ai_anomaly_detection/anomaly_detection_client.py +36 -36
  5. oci/ai_document/ai_service_document_client.py +22 -22
  6. oci/ai_language/ai_service_language_client.py +44 -44
  7. oci/ai_speech/ai_service_speech_client.py +10 -10
  8. oci/ai_vision/ai_service_vision_client.py +25 -25
  9. oci/analytics/analytics_client.py +23 -23
  10. oci/announcements_service/announcement_client.py +4 -4
  11. oci/announcements_service/announcement_subscription_client.py +9 -9
  12. oci/announcements_service/announcements_preferences_client.py +4 -4
  13. oci/apigateway/api_gateway_client.py +21 -21
  14. oci/apigateway/deployment_client.py +6 -6
  15. oci/apigateway/gateway_client.py +6 -6
  16. oci/apigateway/subscribers_client.py +6 -6
  17. oci/apigateway/usage_plans_client.py +6 -6
  18. oci/apigateway/work_requests_client.py +5 -5
  19. oci/apm_config/config_client.py +8 -8
  20. oci/apm_control_plane/apm_domain_client.py +14 -14
  21. oci/apm_synthetics/apm_synthetic_client.py +28 -28
  22. oci/apm_traces/attributes_client.py +8 -8
  23. oci/apm_traces/query_client.py +2 -2
  24. oci/apm_traces/trace_client.py +4 -4
  25. oci/appmgmt_control/appmgmt_control_client.py +8 -8
  26. oci/artifacts/artifacts_client.py +32 -32
  27. oci/audit/audit_client.py +3 -3
  28. oci/autoscaling/auto_scaling_client.py +11 -11
  29. oci/bastion/bastion_client.py +15 -15
  30. oci/bds/bds_client.py +2338 -522
  31. oci/bds/bds_client_composite_operations.py +403 -0
  32. oci/bds/models/__init__.py +32 -0
  33. oci/bds/models/backup_node_details.py +99 -0
  34. oci/bds/models/create_node_backup_configuration_details.py +223 -0
  35. oci/bds/models/create_node_replace_configuration_details.py +192 -0
  36. oci/bds/models/level_type_details.py +109 -0
  37. oci/bds/models/node.py +64 -2
  38. oci/bds/models/node_backup.py +388 -0
  39. oci/bds/models/node_backup_configuration.py +410 -0
  40. oci/bds/models/node_backup_configuration_summary.py +254 -0
  41. oci/bds/models/node_backup_summary.py +289 -0
  42. oci/bds/models/node_level_details.py +82 -0
  43. oci/bds/models/node_replace_configuration.py +364 -0
  44. oci/bds/models/node_replace_configuration_summary.py +254 -0
  45. oci/bds/models/node_type_level_details.py +82 -0
  46. oci/bds/models/remove_node_replace_configuration_details.py +72 -0
  47. oci/bds/models/replace_node_details.py +165 -0
  48. oci/bds/models/update_node_backup_configuration_details.py +223 -0
  49. oci/bds/models/update_node_replace_configuration_details.py +161 -0
  50. oci/bds/models/work_request.py +39 -3
  51. oci/blockchain/blockchain_platform_client.py +27 -27
  52. oci/budget/budget_client.py +10 -10
  53. oci/capacity_management/capacity_management_client.py +494 -38
  54. oci/capacity_management/models/__init__.py +4 -2
  55. oci/capacity_management/models/create_occ_capacity_request_details.py +32 -1
  56. oci/capacity_management/models/metadata_details.py +7 -3
  57. oci/capacity_management/models/occ_availability_catalog.py +2 -2
  58. oci/capacity_management/models/occ_availability_catalog_summary.py +2 -2
  59. oci/capacity_management/models/occ_availability_summary.py +99 -40
  60. oci/capacity_management/models/occ_capacity_request.py +47 -0
  61. oci/capacity_management/models/occ_capacity_request_base_details.py +96 -32
  62. oci/capacity_management/models/occ_capacity_request_summary.py +31 -0
  63. oci/capacity_management/models/occ_overview_collection.py +72 -0
  64. oci/capacity_management/models/occ_overview_summary.py +413 -0
  65. oci/certificates/certificates_client.py +5 -5
  66. oci/certificates_management/certificates_management_client.py +32 -32
  67. oci/cims/incident_client.py +8 -8
  68. oci/cims/user_client.py +1 -1
  69. oci/cloud_bridge/common_client.py +5 -5
  70. oci/cloud_bridge/discovery_client.py +14 -14
  71. oci/cloud_bridge/inventory_client.py +16 -16
  72. oci/cloud_bridge/ocb_agent_svc_client.py +23 -23
  73. oci/cloud_guard/cloud_guard_client.py +155 -155
  74. oci/cloud_migrations/migration_client.py +43 -43
  75. oci/cluster_placement_groups/cluster_placement_groups_cp_client.py +26 -26
  76. oci/compute_cloud_at_customer/compute_cloud_at_customer_client.py +12 -12
  77. oci/compute_instance_agent/compute_instance_agent_client.py +6 -6
  78. oci/compute_instance_agent/plugin_client.py +2 -2
  79. oci/compute_instance_agent/pluginconfig_client.py +1 -1
  80. oci/container_engine/container_engine_client.py +44 -44
  81. oci/container_instances/container_instance_client.py +18 -18
  82. oci/core/blockstorage_client.py +60 -60
  83. oci/core/compute_client.py +99 -99
  84. oci/core/compute_management_client.py +32 -32
  85. oci/core/virtual_network_client.py +247 -247
  86. oci/dashboard_service/dashboard_client.py +6 -6
  87. oci/dashboard_service/dashboard_group_client.py +6 -6
  88. oci/data_catalog/data_catalog_client.py +149 -149
  89. oci/data_flow/data_flow_client.py +42 -42
  90. oci/data_integration/data_integration_client.py +163 -163
  91. oci/data_labeling_service/data_labeling_management_client.py +17 -17
  92. oci/data_labeling_service_dataplane/data_labeling_client.py +15 -15
  93. oci/data_safe/data_safe_client.py +278 -278
  94. oci/data_science/data_science_client.py +124 -98
  95. oci/data_science/models/__init__.py +10 -0
  96. oci/data_science/models/fast_launch_job_config_summary.py +7 -3
  97. oci/data_science/models/job_shape_summary.py +7 -3
  98. oci/data_science/models/model_deployment_shape_summary.py +7 -3
  99. oci/data_science/models/notebook_session_shape_summary.py +7 -3
  100. oci/data_science/models/pipeline_container_configuration_details.py +101 -0
  101. oci/data_science/models/pipeline_container_step_details.py +164 -0
  102. oci/data_science/models/pipeline_container_step_run.py +87 -0
  103. oci/data_science/models/pipeline_container_step_update_details.py +99 -0
  104. oci/data_science/models/pipeline_custom_script_step_details.py +1 -1
  105. oci/data_science/models/pipeline_custom_script_step_run.py +1 -1
  106. oci/data_science/models/pipeline_custom_script_step_update_details.py +30 -3
  107. oci/data_science/models/pipeline_infrastructure_configuration_details.py +31 -0
  108. oci/data_science/models/pipeline_ml_job_step_details.py +1 -1
  109. oci/data_science/models/pipeline_ml_job_step_run.py +1 -1
  110. oci/data_science/models/pipeline_ml_job_step_update_details.py +1 -1
  111. oci/data_science/models/pipeline_ocir_container_configuration_details.py +228 -0
  112. oci/data_science/models/pipeline_step_details.py +11 -3
  113. oci/data_science/models/pipeline_step_override_details.py +29 -2
  114. oci/data_science/models/pipeline_step_run.py +11 -3
  115. oci/data_science/models/pipeline_step_update_details.py +11 -3
  116. oci/data_science/models/update_pipeline_details.py +29 -2
  117. oci/database/database_client.py +333 -333
  118. oci/database/models/database_connection_credentials_by_details.py +7 -3
  119. oci/database/models/database_ssl_connection_credentials.py +7 -3
  120. oci/database/models/enable_database_management_details.py +7 -3
  121. oci/database/models/enable_pluggable_database_management_details.py +7 -3
  122. oci/database/models/modify_database_management_details.py +7 -3
  123. oci/database/models/modify_pluggable_database_management_details.py +7 -3
  124. oci/database_management/db_management_client.py +478 -206
  125. oci/database_management/diagnosability_client.py +4 -4
  126. oci/database_management/managed_my_sql_databases_client.py +7 -7
  127. oci/database_management/models/__init__.py +10 -0
  128. oci/database_management/models/basic_named_credential_content.py +7 -3
  129. oci/database_management/models/basic_preferred_credential.py +7 -3
  130. oci/database_management/models/data_points.py +103 -0
  131. oci/database_management/models/database_connection_credentials_by_details.py +7 -3
  132. oci/database_management/models/database_password_credential_details.py +7 -3
  133. oci/database_management/models/database_secret_credential_details.py +7 -3
  134. oci/database_management/models/database_ssl_connection_credentials.py +7 -3
  135. oci/database_management/models/database_usage_metrics.py +183 -0
  136. oci/database_management/models/dataguard_performance_metrics.py +72 -0
  137. oci/database_management/models/peer_database_metrics.py +72 -0
  138. oci/database_management/models/performance_metrics.py +165 -0
  139. oci/database_management/models/performance_metrics_data.py +387 -0
  140. oci/database_management/models/preferred_credential_summary.py +7 -3
  141. oci/database_management/models/test_basic_preferred_credential_details.py +7 -3
  142. oci/database_management/models/update_basic_preferred_credential_details.py +7 -3
  143. oci/database_management/perfhub_client.py +1 -1
  144. oci/database_management/sql_tuning_client.py +17 -17
  145. oci/database_migration/database_migration_client.py +41 -41
  146. oci/database_tools/database_tools_client.py +23 -23
  147. oci/demand_signal/__init__.py +14 -0
  148. oci/demand_signal/models/__init__.py +48 -0
  149. oci/demand_signal/models/change_occ_demand_signal_compartment_details.py +76 -0
  150. oci/demand_signal/models/create_occ_demand_signal_details.py +251 -0
  151. oci/demand_signal/models/occ_demand_signal.py +501 -0
  152. oci/demand_signal/models/occ_demand_signal_collection.py +72 -0
  153. oci/demand_signal/models/occ_demand_signal_data.py +134 -0
  154. oci/demand_signal/models/occ_demand_signal_summary.py +430 -0
  155. oci/demand_signal/models/occ_demand_signal_value.py +134 -0
  156. oci/demand_signal/models/patch_insert_instruction.py +171 -0
  157. oci/demand_signal/models/patch_insert_multiple_instruction.py +171 -0
  158. oci/demand_signal/models/patch_instruction.py +192 -0
  159. oci/demand_signal/models/patch_merge_instruction.py +97 -0
  160. oci/demand_signal/models/patch_move_instruction.py +147 -0
  161. oci/demand_signal/models/patch_occ_demand_signal_details.py +72 -0
  162. oci/demand_signal/models/patch_prohibit_instruction.py +100 -0
  163. oci/demand_signal/models/patch_remove_instruction.py +59 -0
  164. oci/demand_signal/models/patch_replace_instruction.py +92 -0
  165. oci/demand_signal/models/patch_require_instruction.py +99 -0
  166. oci/demand_signal/models/update_occ_demand_signal_details.py +185 -0
  167. oci/demand_signal/occ_demand_signal_client.py +953 -0
  168. oci/demand_signal/occ_demand_signal_client_composite_operations.py +176 -0
  169. oci/desktops/desktop_service_client.py +21 -21
  170. oci/devops/devops_client.py +89 -89
  171. oci/disaster_recovery/disaster_recovery_client.py +29 -29
  172. oci/dns/dns_client.py +52 -52
  173. oci/dts/appliance_export_job_client.py +6 -6
  174. oci/dts/shipping_vendors_client.py +1 -1
  175. oci/dts/transfer_appliance_client.py +8 -8
  176. oci/dts/transfer_appliance_entitlement_client.py +3 -3
  177. oci/dts/transfer_device_client.py +5 -5
  178. oci/dts/transfer_job_client.py +6 -6
  179. oci/dts/transfer_package_client.py +7 -7
  180. oci/em_warehouse/em_data_lake_client.py +13 -13
  181. oci/em_warehouse/em_warehouse_client.py +13 -13
  182. oci/email/email_client.py +31 -31
  183. oci/email_data_plane/email_dp_client.py +1 -1
  184. oci/events/events_client.py +6 -6
  185. oci/file_storage/file_storage_client.py +50 -50
  186. oci/fleet_software_update/fleet_software_update_client.py +44 -44
  187. oci/functions/functions_invoke_client.py +1 -1
  188. oci/functions/functions_management_client.py +16 -16
  189. oci/fusion_apps/data_masking_activity_client.py +3 -3
  190. oci/fusion_apps/fusion_applications_client.py +39 -39
  191. oci/fusion_apps/fusion_environment_client.py +15 -15
  192. oci/fusion_apps/fusion_environment_family_client.py +8 -8
  193. oci/fusion_apps/refresh_activity_client.py +4 -4
  194. oci/fusion_apps/scheduled_activity_client.py +2 -2
  195. oci/fusion_apps/service_attachment_client.py +2 -2
  196. oci/generative_ai/generative_ai_client.py +22 -22
  197. oci/generative_ai_inference/generative_ai_inference_client.py +4 -4
  198. oci/generic_artifacts_content/generic_artifacts_content_client.py +3 -3
  199. oci/globally_distributed_database/sharded_database_service_client.py +29 -29
  200. oci/golden_gate/golden_gate_client.py +61 -61
  201. oci/governance_rules_control_plane/governance_rule_client.py +15 -15
  202. oci/governance_rules_control_plane/work_request_client.py +5 -5
  203. oci/healthchecks/health_checks_client.py +17 -17
  204. oci/identity/identity_client.py +145 -145
  205. oci/identity_data_plane/dataplane_client.py +2 -2
  206. oci/identity_domains/identity_domains_client.py +300 -300
  207. oci/integration/integration_instance_client.py +15 -15
  208. oci/jms/java_management_service_client.py +66 -66
  209. oci/jms_java_downloads/java_download_client.py +27 -26
  210. oci/jms_java_downloads/models/create_java_download_report_details.py +80 -6
  211. oci/jms_java_downloads/models/create_java_license_acceptance_record_details.py +76 -2
  212. oci/jms_java_downloads/models/java_download_count_aggregation.py +2 -2
  213. oci/jms_java_downloads/models/java_download_record.py +2 -2
  214. oci/jms_java_downloads/models/java_download_record_summary.py +2 -2
  215. oci/jms_java_downloads/models/java_download_report.py +174 -2
  216. oci/jms_java_downloads/models/java_download_report_summary.py +174 -2
  217. oci/jms_java_downloads/models/java_download_token.py +24 -8
  218. oci/jms_java_downloads/models/java_download_token_summary.py +24 -8
  219. oci/jms_java_downloads/models/java_license_acceptance_record.py +4 -4
  220. oci/jms_java_downloads/models/java_license_acceptance_record_summary.py +4 -4
  221. oci/jms_java_downloads/models/request_summarized_java_download_counts_details.py +2 -2
  222. oci/jms_java_downloads/models/update_java_license_acceptance_record_details.py +76 -2
  223. oci/key_management/ekm_client.py +5 -5
  224. oci/key_management/kms_crypto_client.py +6 -6
  225. oci/key_management/kms_hsm_cluster_client.py +12 -12
  226. oci/key_management/kms_management_client.py +21 -21
  227. oci/key_management/kms_vault_client.py +14 -14
  228. oci/license_manager/license_manager_client.py +18 -18
  229. oci/limits/limits_client.py +4 -4
  230. oci/limits/quotas_client.py +7 -7
  231. oci/load_balancer/load_balancer_client.py +61 -61
  232. oci/lockbox/lockbox_client.py +24 -24
  233. oci/log_analytics/log_analytics_client.py +193 -193
  234. oci/logging/logging_management_client.py +30 -30
  235. oci/loggingingestion/logging_client.py +1 -1
  236. oci/loggingsearch/log_search_client.py +1 -1
  237. oci/management_agent/management_agent_client.py +28 -28
  238. oci/management_dashboard/dashx_apis_client.py +14 -14
  239. oci/marketplace/account_client.py +2 -2
  240. oci/marketplace/marketplace_client.py +30 -30
  241. oci/marketplace_private_offer/attachment_client.py +5 -5
  242. oci/marketplace_private_offer/offer_client.py +6 -6
  243. oci/marketplace_publisher/attachment_client.py +5 -5
  244. oci/marketplace_publisher/marketplace_publisher_client.py +71 -71
  245. oci/marketplace_publisher/offer_client.py +6 -6
  246. oci/media_services/media_services_client.py +60 -60
  247. oci/media_services/media_stream_client.py +2 -2
  248. oci/monitoring/monitoring_client.py +18 -18
  249. oci/mysql/channels_client.py +7 -7
  250. oci/mysql/db_backups_client.py +6 -6
  251. oci/mysql/db_system_client.py +17 -17
  252. oci/mysql/mysqlaas_client.py +7 -7
  253. oci/mysql/replicas_client.py +5 -5
  254. oci/mysql/work_requests_client.py +4 -4
  255. oci/network_firewall/network_firewall_client.py +80 -80
  256. oci/network_load_balancer/network_load_balancer_client.py +34 -34
  257. oci/nosql/nosql_client.py +24 -24
  258. oci/object_storage/object_storage_client.py +50 -50
  259. oci/oce/oce_instance_client.py +10 -10
  260. oci/oci_control_center/occ_metrics_client.py +3 -3
  261. oci/ocvp/cluster_client.py +5 -5
  262. oci/ocvp/esxi_host_client.py +8 -8
  263. oci/ocvp/sddc_client.py +14 -14
  264. oci/ocvp/work_request_client.py +4 -4
  265. oci/oda/management_client.py +59 -59
  266. oci/oda/oda_client.py +17 -17
  267. oci/oda/odapackage_client.py +7 -7
  268. oci/onesubscription/billing_schedule_client.py +1 -1
  269. oci/onesubscription/commitment_client.py +2 -2
  270. oci/onesubscription/computed_usage_client.py +3 -3
  271. oci/onesubscription/invoice_summary_client.py +2 -2
  272. oci/onesubscription/organization_subscription_client.py +1 -1
  273. oci/onesubscription/ratecard_client.py +1 -1
  274. oci/onesubscription/subscribed_service_client.py +2 -2
  275. oci/onesubscription/subscription_client.py +1 -1
  276. oci/ons/notification_control_plane_client.py +6 -6
  277. oci/ons/notification_data_plane_client.py +10 -10
  278. oci/opa/opa_instance_client.py +13 -13
  279. oci/opensearch/opensearch_cluster_backup_client.py +4 -4
  280. oci/opensearch/opensearch_cluster_client.py +14 -14
  281. oci/operator_access_control/access_requests_client.py +10 -10
  282. oci/operator_access_control/operator_actions_client.py +2 -2
  283. oci/operator_access_control/operator_control_assignment_client.py +8 -8
  284. oci/operator_access_control/operator_control_client.py +6 -6
  285. oci/opsi/operations_insights_client.py +175 -175
  286. oci/optimizer/optimizer_client.py +26 -26
  287. oci/os_management/event_client.py +8 -8
  288. oci/os_management/os_management_client.py +69 -69
  289. oci/os_management_hub/event_client.py +8 -8
  290. oci/os_management_hub/lifecycle_environment_client.py +12 -12
  291. oci/os_management_hub/managed_instance_client.py +31 -31
  292. oci/os_management_hub/managed_instance_group_client.py +25 -25
  293. oci/os_management_hub/management_station_client.py +10 -10
  294. oci/os_management_hub/onboarding_client.py +6 -6
  295. oci/os_management_hub/reporting_managed_instance_client.py +3 -3
  296. oci/os_management_hub/scheduled_job_client.py +7 -7
  297. oci/os_management_hub/software_source_client.py +27 -27
  298. oci/os_management_hub/work_request_client.py +4 -4
  299. oci/osp_gateway/address_rule_service_client.py +1 -1
  300. oci/osp_gateway/address_service_client.py +2 -2
  301. oci/osp_gateway/invoice_service_client.py +5 -5
  302. oci/osp_gateway/subscription_service_client.py +5 -5
  303. oci/osub_billing_schedule/billing_schedule_client.py +1 -1
  304. oci/osub_organization_subscription/organization_subscription_client.py +1 -1
  305. oci/osub_subscription/commitment_client.py +2 -2
  306. oci/osub_subscription/ratecard_client.py +1 -1
  307. oci/osub_subscription/subscription_client.py +1 -1
  308. oci/osub_usage/computed_usage_client.py +3 -3
  309. oci/psql/postgresql_client.py +33 -33
  310. oci/queue/queue_admin_client.py +11 -11
  311. oci/queue/queue_client.py +8 -8
  312. oci/recovery/database_recovery_client.py +25 -25
  313. oci/redis/redis_cluster_client.py +11 -11
  314. oci/resource_manager/resource_manager_client.py +52 -52
  315. oci/resource_scheduler/__init__.py +14 -0
  316. oci/resource_scheduler/models/__init__.py +58 -0
  317. oci/resource_scheduler/models/compartment_id_resource_filter.py +113 -0
  318. oci/resource_scheduler/models/create_schedule_details.py +487 -0
  319. oci/resource_scheduler/models/defined_tag_filter_value.py +134 -0
  320. oci/resource_scheduler/models/defined_tags_resource_filter.py +82 -0
  321. oci/resource_scheduler/models/lifecycle_state_resource_filter.py +82 -0
  322. oci/resource_scheduler/models/resource.py +121 -0
  323. oci/resource_scheduler/models/resource_filter.py +133 -0
  324. oci/resource_scheduler/models/resource_type.py +72 -0
  325. oci/resource_scheduler/models/resource_type_collection.py +72 -0
  326. oci/resource_scheduler/models/resource_type_resource_filter.py +82 -0
  327. oci/resource_scheduler/models/schedule.py +787 -0
  328. oci/resource_scheduler/models/schedule_collection.py +72 -0
  329. oci/resource_scheduler/models/schedule_summary.py +815 -0
  330. oci/resource_scheduler/models/time_created_resource_filter.py +134 -0
  331. oci/resource_scheduler/models/update_schedule_details.py +452 -0
  332. oci/resource_scheduler/models/work_request.py +455 -0
  333. oci/resource_scheduler/models/work_request_error.py +146 -0
  334. oci/resource_scheduler/models/work_request_error_collection.py +72 -0
  335. oci/resource_scheduler/models/work_request_log_entry.py +109 -0
  336. oci/resource_scheduler/models/work_request_log_entry_collection.py +72 -0
  337. oci/resource_scheduler/models/work_request_resource.py +207 -0
  338. oci/resource_scheduler/models/work_request_summary.py +453 -0
  339. oci/resource_scheduler/models/work_request_summary_collection.py +72 -0
  340. oci/resource_scheduler/schedule_client.py +1778 -0
  341. oci/resource_scheduler/schedule_client_composite_operations.py +258 -0
  342. oci/resource_search/resource_search_client.py +3 -3
  343. oci/rover/rover_bundle_client.py +8 -8
  344. oci/rover/rover_cluster_client.py +8 -8
  345. oci/rover/rover_entitlement_client.py +6 -6
  346. oci/rover/rover_node_client.py +15 -15
  347. oci/rover/shape_client.py +1 -1
  348. oci/rover/work_requests_client.py +5 -5
  349. oci/sch/connector_plugins_client.py +2 -2
  350. oci/sch/service_connector_client.py +12 -12
  351. oci/secrets/secrets_client.py +3 -3
  352. oci/service_catalog/service_catalog_client.py +26 -26
  353. oci/service_manager_proxy/service_manager_proxy_client.py +2 -2
  354. oci/service_mesh/service_mesh_client.py +48 -48
  355. oci/stack_monitoring/stack_monitoring_client.py +64 -64
  356. oci/streaming/stream_admin_client.py +18 -18
  357. oci/streaming/stream_client.py +8 -8
  358. oci/tenant_manager_control_plane/domain_client.py +5 -5
  359. oci/tenant_manager_control_plane/domain_governance_client.py +5 -5
  360. oci/tenant_manager_control_plane/governance_client.py +2 -2
  361. oci/tenant_manager_control_plane/link_client.py +3 -3
  362. oci/tenant_manager_control_plane/orders_client.py +2 -2
  363. oci/tenant_manager_control_plane/organization_client.py +10 -10
  364. oci/tenant_manager_control_plane/recipient_invitation_client.py +5 -5
  365. oci/tenant_manager_control_plane/sender_invitation_client.py +5 -5
  366. oci/tenant_manager_control_plane/subscription_client.py +11 -11
  367. oci/tenant_manager_control_plane/work_request_client.py +4 -4
  368. oci/threat_intelligence/threatintel_client.py +5 -5
  369. oci/usage/resources_client.py +2 -2
  370. oci/usage/rewards_client.py +6 -6
  371. oci/usage/usagelimits_client.py +1 -1
  372. oci/usage_api/usageapi_client.py +33 -33
  373. oci/vault/vaults_client.py +13 -13
  374. oci/vbs_inst/vbs_instance_client.py +10 -10
  375. oci/version.py +1 -1
  376. oci/visual_builder/vb_instance_client.py +13 -13
  377. oci/vn_monitoring/vn_monitoring_client.py +12 -12
  378. oci/vulnerability_scanning/vulnerability_scanning_client.py +58 -58
  379. oci/waa/waa_client.py +13 -13
  380. oci/waa/work_request_client.py +4 -4
  381. oci/waas/redirect_client.py +6 -6
  382. oci/waas/waas_client.py +66 -66
  383. oci/waf/waf_client.py +24 -24
  384. oci/work_requests/work_request_client.py +4 -4
  385. {oci-2.126.3.dist-info → oci-2.127.0.dist-info}/METADATA +1 -1
  386. {oci-2.126.3.dist-info → oci-2.127.0.dist-info}/RECORD +390 -313
  387. {oci-2.126.3.dist-info → oci-2.127.0.dist-info}/LICENSE.txt +0 -0
  388. {oci-2.126.3.dist-info → oci-2.127.0.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
  389. {oci-2.126.3.dist-info → oci-2.127.0.dist-info}/WHEEL +0 -0
  390. {oci-2.126.3.dist-info → oci-2.127.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1778 @@
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: 20240430
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 resource_scheduler_type_mapping
20
+ missing = Sentinel("Missing")
21
+
22
+
23
+ class ScheduleClient(object):
24
+ """
25
+ Use the Resource scheduler API to manage schedules, to perform actions on a collection of resources.
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("resource_scheduler"):
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': '/20240430',
103
+ 'service_endpoint_template': 'https://resource-scheduler.{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("schedule", config, signer, resource_scheduler_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 activate_schedule(self, schedule_id, **kwargs):
120
+ """
121
+ This API activates a schedule.
122
+
123
+
124
+ :param str schedule_id: (required)
125
+ This is the `OCID`__ of the schedule.
126
+
127
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
128
+
129
+ :param str if_match: (optional)
130
+ This is used for optimistic concurrency control. In the PUT or DELETE call for a resource, set the
131
+ `if-match` parameter to the value of the etag from a previous GET or POST response for
132
+ that resource. The resource will be updated or deleted only if the etag you provide
133
+ matches the resource's current etag value.
134
+
135
+ :param str opc_request_id: (optional)
136
+ This is a unique Oracle-assigned identifier for the request. If you need to contact
137
+ Oracle about a particular request, please provide the request ID.
138
+ The only valid characters for request IDs are letters, numbers,
139
+ underscore, and dash.
140
+
141
+ :param str opc_retry_token: (optional)
142
+ This is a token that uniquely identifies a request so it can be retried in case of a timeout or
143
+ server error without risk of running that same action again. Retry tokens expire after 24
144
+ hours, but can be invalidated before then due to conflicting operations. For example, if a resource
145
+ has been deleted and removed from the system, then a retry of the original creation request
146
+ might be rejected.
147
+
148
+ :param obj retry_strategy: (optional)
149
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
150
+
151
+ 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.
152
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
153
+
154
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
155
+
156
+ :param bool allow_control_chars: (optional)
157
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
158
+ By default, the response will not allow control characters in strings
159
+
160
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.resource_scheduler.models.Schedule`
161
+ :rtype: :class:`~oci.response.Response`
162
+
163
+ :example:
164
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.127.0/resourcescheduler/activate_schedule.py.html>`__ to see an example of how to use activate_schedule API.
165
+ """
166
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
167
+ required_arguments = ['scheduleId']
168
+ resource_path = "/schedules/{scheduleId}/actions/activateSchedule"
169
+ method = "POST"
170
+ operation_name = "activate_schedule"
171
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/resource-scheduler/20240430/Schedule/ActivateSchedule"
172
+
173
+ # Don't accept unknown kwargs
174
+ expected_kwargs = [
175
+ "allow_control_chars",
176
+ "retry_strategy",
177
+ "if_match",
178
+ "opc_request_id",
179
+ "opc_retry_token"
180
+ ]
181
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
182
+ if extra_kwargs:
183
+ raise ValueError(
184
+ f"activate_schedule got unknown kwargs: {extra_kwargs!r}")
185
+
186
+ path_params = {
187
+ "scheduleId": schedule_id
188
+ }
189
+
190
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
191
+
192
+ for (k, v) in six.iteritems(path_params):
193
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
194
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
195
+
196
+ header_params = {
197
+ "accept": "application/json",
198
+ "content-type": "application/json",
199
+ "if-match": kwargs.get("if_match", missing),
200
+ "opc-request-id": kwargs.get("opc_request_id", missing),
201
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
202
+ }
203
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
204
+
205
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
206
+ operation_retry_strategy=kwargs.get('retry_strategy'),
207
+ client_retry_strategy=self.retry_strategy
208
+ )
209
+ if retry_strategy is None:
210
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
211
+
212
+ if retry_strategy:
213
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
214
+ self.base_client.add_opc_retry_token_if_needed(header_params)
215
+ self.base_client.add_opc_client_retries_header(header_params)
216
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
217
+ return retry_strategy.make_retrying_call(
218
+ self.base_client.call_api,
219
+ resource_path=resource_path,
220
+ method=method,
221
+ path_params=path_params,
222
+ header_params=header_params,
223
+ response_type="Schedule",
224
+ allow_control_chars=kwargs.get('allow_control_chars'),
225
+ operation_name=operation_name,
226
+ api_reference_link=api_reference_link,
227
+ required_arguments=required_arguments)
228
+ else:
229
+ return self.base_client.call_api(
230
+ resource_path=resource_path,
231
+ method=method,
232
+ path_params=path_params,
233
+ header_params=header_params,
234
+ response_type="Schedule",
235
+ allow_control_chars=kwargs.get('allow_control_chars'),
236
+ operation_name=operation_name,
237
+ api_reference_link=api_reference_link,
238
+ required_arguments=required_arguments)
239
+
240
+ def cancel_work_request(self, work_request_id, **kwargs):
241
+ """
242
+ This API cancels a work request.
243
+
244
+
245
+ :param str work_request_id: (required)
246
+ This is the `OCID`__ of the asynchronous work request.
247
+
248
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
249
+
250
+ :param str if_match: (optional)
251
+ This is used for optimistic concurrency control. In the PUT or DELETE call for a resource, set the
252
+ `if-match` parameter to the value of the etag from a previous GET or POST response for
253
+ that resource. The resource will be updated or deleted only if the etag you provide
254
+ matches the resource's current etag value.
255
+
256
+ :param str opc_request_id: (optional)
257
+ This is a unique Oracle-assigned identifier for the request. If you need to contact
258
+ Oracle about a particular request, please provide the request ID.
259
+ The only valid characters for request IDs are letters, numbers,
260
+ underscore, and dash.
261
+
262
+ :param obj retry_strategy: (optional)
263
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
264
+
265
+ 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.
266
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
267
+
268
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
269
+
270
+ :param bool allow_control_chars: (optional)
271
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
272
+ By default, the response will not allow control characters in strings
273
+
274
+ :return: A :class:`~oci.response.Response` object with data of type None
275
+ :rtype: :class:`~oci.response.Response`
276
+
277
+ :example:
278
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.127.0/resourcescheduler/cancel_work_request.py.html>`__ to see an example of how to use cancel_work_request API.
279
+ """
280
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
281
+ required_arguments = ['workRequestId']
282
+ resource_path = "/workRequests/{workRequestId}"
283
+ method = "DELETE"
284
+ operation_name = "cancel_work_request"
285
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/resource-scheduler/20240430/WorkRequest/CancelWorkRequest"
286
+
287
+ # Don't accept unknown kwargs
288
+ expected_kwargs = [
289
+ "allow_control_chars",
290
+ "retry_strategy",
291
+ "if_match",
292
+ "opc_request_id"
293
+ ]
294
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
295
+ if extra_kwargs:
296
+ raise ValueError(
297
+ f"cancel_work_request got unknown kwargs: {extra_kwargs!r}")
298
+
299
+ path_params = {
300
+ "workRequestId": work_request_id
301
+ }
302
+
303
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
304
+
305
+ for (k, v) in six.iteritems(path_params):
306
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
307
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
308
+
309
+ header_params = {
310
+ "accept": "application/json",
311
+ "content-type": "application/json",
312
+ "if-match": kwargs.get("if_match", missing),
313
+ "opc-request-id": kwargs.get("opc_request_id", missing)
314
+ }
315
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
316
+
317
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
318
+ operation_retry_strategy=kwargs.get('retry_strategy'),
319
+ client_retry_strategy=self.retry_strategy
320
+ )
321
+ if retry_strategy is None:
322
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
323
+
324
+ if retry_strategy:
325
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
326
+ self.base_client.add_opc_client_retries_header(header_params)
327
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
328
+ return retry_strategy.make_retrying_call(
329
+ self.base_client.call_api,
330
+ resource_path=resource_path,
331
+ method=method,
332
+ path_params=path_params,
333
+ header_params=header_params,
334
+ allow_control_chars=kwargs.get('allow_control_chars'),
335
+ operation_name=operation_name,
336
+ api_reference_link=api_reference_link,
337
+ required_arguments=required_arguments)
338
+ else:
339
+ return self.base_client.call_api(
340
+ resource_path=resource_path,
341
+ method=method,
342
+ path_params=path_params,
343
+ header_params=header_params,
344
+ allow_control_chars=kwargs.get('allow_control_chars'),
345
+ operation_name=operation_name,
346
+ api_reference_link=api_reference_link,
347
+ required_arguments=required_arguments)
348
+
349
+ def create_schedule(self, create_schedule_details, **kwargs):
350
+ """
351
+ Creates a Schedule
352
+
353
+
354
+ :param oci.resource_scheduler.models.CreateScheduleDetails create_schedule_details: (required)
355
+ This API shows the details of the new schedule
356
+
357
+ :param str opc_retry_token: (optional)
358
+ This is a token that uniquely identifies a request so it can be retried in case of a timeout or
359
+ server error without risk of running that same action again. Retry tokens expire after 24
360
+ hours, but can be invalidated before then due to conflicting operations. For example, if a resource
361
+ has been deleted and removed from the system, then a retry of the original creation request
362
+ might be rejected.
363
+
364
+ :param str opc_request_id: (optional)
365
+ This is a unique Oracle-assigned identifier for the request. If you need to contact
366
+ Oracle about a particular request, please provide the request ID.
367
+ The only valid characters for request IDs are letters, numbers,
368
+ underscore, and dash.
369
+
370
+ :param obj retry_strategy: (optional)
371
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
372
+
373
+ 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.
374
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
375
+
376
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
377
+
378
+ :param bool allow_control_chars: (optional)
379
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
380
+ By default, the response will not allow control characters in strings
381
+
382
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.resource_scheduler.models.Schedule`
383
+ :rtype: :class:`~oci.response.Response`
384
+
385
+ :example:
386
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.127.0/resourcescheduler/create_schedule.py.html>`__ to see an example of how to use create_schedule API.
387
+ """
388
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
389
+ required_arguments = []
390
+ resource_path = "/schedules"
391
+ method = "POST"
392
+ operation_name = "create_schedule"
393
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/resource-scheduler/20240430/Schedule/CreateSchedule"
394
+
395
+ # Don't accept unknown kwargs
396
+ expected_kwargs = [
397
+ "allow_control_chars",
398
+ "retry_strategy",
399
+ "opc_retry_token",
400
+ "opc_request_id"
401
+ ]
402
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
403
+ if extra_kwargs:
404
+ raise ValueError(
405
+ f"create_schedule got unknown kwargs: {extra_kwargs!r}")
406
+
407
+ header_params = {
408
+ "accept": "application/json",
409
+ "content-type": "application/json",
410
+ "opc-retry-token": kwargs.get("opc_retry_token", missing),
411
+ "opc-request-id": kwargs.get("opc_request_id", missing)
412
+ }
413
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
414
+
415
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
416
+ operation_retry_strategy=kwargs.get('retry_strategy'),
417
+ client_retry_strategy=self.retry_strategy
418
+ )
419
+ if retry_strategy is None:
420
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
421
+
422
+ if retry_strategy:
423
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
424
+ self.base_client.add_opc_retry_token_if_needed(header_params)
425
+ self.base_client.add_opc_client_retries_header(header_params)
426
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
427
+ return retry_strategy.make_retrying_call(
428
+ self.base_client.call_api,
429
+ resource_path=resource_path,
430
+ method=method,
431
+ header_params=header_params,
432
+ body=create_schedule_details,
433
+ response_type="Schedule",
434
+ allow_control_chars=kwargs.get('allow_control_chars'),
435
+ operation_name=operation_name,
436
+ api_reference_link=api_reference_link,
437
+ required_arguments=required_arguments)
438
+ else:
439
+ return self.base_client.call_api(
440
+ resource_path=resource_path,
441
+ method=method,
442
+ header_params=header_params,
443
+ body=create_schedule_details,
444
+ response_type="Schedule",
445
+ allow_control_chars=kwargs.get('allow_control_chars'),
446
+ operation_name=operation_name,
447
+ api_reference_link=api_reference_link,
448
+ required_arguments=required_arguments)
449
+
450
+ def deactivate_schedule(self, schedule_id, **kwargs):
451
+ """
452
+ This API deactivates a schedule.
453
+
454
+
455
+ :param str schedule_id: (required)
456
+ This is the `OCID`__ of the schedule.
457
+
458
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
459
+
460
+ :param str if_match: (optional)
461
+ This is used for optimistic concurrency control. In the PUT or DELETE call for a resource, set the
462
+ `if-match` parameter to the value of the etag from a previous GET or POST response for
463
+ that resource. The resource will be updated or deleted only if the etag you provide
464
+ matches the resource's current etag value.
465
+
466
+ :param str opc_request_id: (optional)
467
+ This is a unique Oracle-assigned identifier for the request. If you need to contact
468
+ Oracle about a particular request, please provide the request ID.
469
+ The only valid characters for request IDs are letters, numbers,
470
+ underscore, and dash.
471
+
472
+ :param str opc_retry_token: (optional)
473
+ This is a token that uniquely identifies a request so it can be retried in case of a timeout or
474
+ server error without risk of running that same action again. Retry tokens expire after 24
475
+ hours, but can be invalidated before then due to conflicting operations. For example, if a resource
476
+ has been deleted and removed from the system, then a retry of the original creation request
477
+ might be rejected.
478
+
479
+ :param obj retry_strategy: (optional)
480
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
481
+
482
+ 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.
483
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
484
+
485
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
486
+
487
+ :param bool allow_control_chars: (optional)
488
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
489
+ By default, the response will not allow control characters in strings
490
+
491
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.resource_scheduler.models.Schedule`
492
+ :rtype: :class:`~oci.response.Response`
493
+
494
+ :example:
495
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.127.0/resourcescheduler/deactivate_schedule.py.html>`__ to see an example of how to use deactivate_schedule API.
496
+ """
497
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
498
+ required_arguments = ['scheduleId']
499
+ resource_path = "/schedules/{scheduleId}/actions/deactivateSchedule"
500
+ method = "POST"
501
+ operation_name = "deactivate_schedule"
502
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/resource-scheduler/20240430/Schedule/DeactivateSchedule"
503
+
504
+ # Don't accept unknown kwargs
505
+ expected_kwargs = [
506
+ "allow_control_chars",
507
+ "retry_strategy",
508
+ "if_match",
509
+ "opc_request_id",
510
+ "opc_retry_token"
511
+ ]
512
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
513
+ if extra_kwargs:
514
+ raise ValueError(
515
+ f"deactivate_schedule got unknown kwargs: {extra_kwargs!r}")
516
+
517
+ path_params = {
518
+ "scheduleId": schedule_id
519
+ }
520
+
521
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
522
+
523
+ for (k, v) in six.iteritems(path_params):
524
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
525
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
526
+
527
+ header_params = {
528
+ "accept": "application/json",
529
+ "content-type": "application/json",
530
+ "if-match": kwargs.get("if_match", missing),
531
+ "opc-request-id": kwargs.get("opc_request_id", missing),
532
+ "opc-retry-token": kwargs.get("opc_retry_token", missing)
533
+ }
534
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
535
+
536
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
537
+ operation_retry_strategy=kwargs.get('retry_strategy'),
538
+ client_retry_strategy=self.retry_strategy
539
+ )
540
+ if retry_strategy is None:
541
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
542
+
543
+ if retry_strategy:
544
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
545
+ self.base_client.add_opc_retry_token_if_needed(header_params)
546
+ self.base_client.add_opc_client_retries_header(header_params)
547
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
548
+ return retry_strategy.make_retrying_call(
549
+ self.base_client.call_api,
550
+ resource_path=resource_path,
551
+ method=method,
552
+ path_params=path_params,
553
+ header_params=header_params,
554
+ response_type="Schedule",
555
+ allow_control_chars=kwargs.get('allow_control_chars'),
556
+ operation_name=operation_name,
557
+ api_reference_link=api_reference_link,
558
+ required_arguments=required_arguments)
559
+ else:
560
+ return self.base_client.call_api(
561
+ resource_path=resource_path,
562
+ method=method,
563
+ path_params=path_params,
564
+ header_params=header_params,
565
+ response_type="Schedule",
566
+ allow_control_chars=kwargs.get('allow_control_chars'),
567
+ operation_name=operation_name,
568
+ api_reference_link=api_reference_link,
569
+ required_arguments=required_arguments)
570
+
571
+ def delete_schedule(self, schedule_id, **kwargs):
572
+ """
573
+ This API deletes a schedule.
574
+
575
+
576
+ :param str schedule_id: (required)
577
+ This is the `OCID`__ of the schedule.
578
+
579
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
580
+
581
+ :param str if_match: (optional)
582
+ This is used for optimistic concurrency control. In the PUT or DELETE call for a resource, set the
583
+ `if-match` parameter to the value of the etag from a previous GET or POST response for
584
+ that resource. The resource will be updated or deleted only if the etag you provide
585
+ matches the resource's current etag value.
586
+
587
+ :param str opc_request_id: (optional)
588
+ This is a unique Oracle-assigned identifier for the request. If you need to contact
589
+ Oracle about a particular request, please provide the request ID.
590
+ The only valid characters for request IDs are letters, numbers,
591
+ underscore, and dash.
592
+
593
+ :param obj retry_strategy: (optional)
594
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
595
+
596
+ 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.
597
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
598
+
599
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
600
+
601
+ :param bool allow_control_chars: (optional)
602
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
603
+ By default, the response will not allow control characters in strings
604
+
605
+ :return: A :class:`~oci.response.Response` object with data of type None
606
+ :rtype: :class:`~oci.response.Response`
607
+
608
+ :example:
609
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.127.0/resourcescheduler/delete_schedule.py.html>`__ to see an example of how to use delete_schedule API.
610
+ """
611
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
612
+ required_arguments = ['scheduleId']
613
+ resource_path = "/schedules/{scheduleId}"
614
+ method = "DELETE"
615
+ operation_name = "delete_schedule"
616
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/resource-scheduler/20240430/Schedule/DeleteSchedule"
617
+
618
+ # Don't accept unknown kwargs
619
+ expected_kwargs = [
620
+ "allow_control_chars",
621
+ "retry_strategy",
622
+ "if_match",
623
+ "opc_request_id"
624
+ ]
625
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
626
+ if extra_kwargs:
627
+ raise ValueError(
628
+ f"delete_schedule got unknown kwargs: {extra_kwargs!r}")
629
+
630
+ path_params = {
631
+ "scheduleId": schedule_id
632
+ }
633
+
634
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
635
+
636
+ for (k, v) in six.iteritems(path_params):
637
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
638
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
639
+
640
+ header_params = {
641
+ "accept": "application/json",
642
+ "content-type": "application/json",
643
+ "if-match": kwargs.get("if_match", missing),
644
+ "opc-request-id": kwargs.get("opc_request_id", missing)
645
+ }
646
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
647
+
648
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
649
+ operation_retry_strategy=kwargs.get('retry_strategy'),
650
+ client_retry_strategy=self.retry_strategy
651
+ )
652
+ if retry_strategy is None:
653
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
654
+
655
+ if retry_strategy:
656
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
657
+ self.base_client.add_opc_client_retries_header(header_params)
658
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
659
+ return retry_strategy.make_retrying_call(
660
+ self.base_client.call_api,
661
+ resource_path=resource_path,
662
+ method=method,
663
+ path_params=path_params,
664
+ header_params=header_params,
665
+ allow_control_chars=kwargs.get('allow_control_chars'),
666
+ operation_name=operation_name,
667
+ api_reference_link=api_reference_link,
668
+ required_arguments=required_arguments)
669
+ else:
670
+ return self.base_client.call_api(
671
+ resource_path=resource_path,
672
+ method=method,
673
+ path_params=path_params,
674
+ header_params=header_params,
675
+ allow_control_chars=kwargs.get('allow_control_chars'),
676
+ operation_name=operation_name,
677
+ api_reference_link=api_reference_link,
678
+ required_arguments=required_arguments)
679
+
680
+ def get_schedule(self, schedule_id, **kwargs):
681
+ """
682
+ This API gets information about a schedule.
683
+
684
+
685
+ :param str schedule_id: (required)
686
+ This is the `OCID`__ of the schedule.
687
+
688
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
689
+
690
+ :param str opc_request_id: (optional)
691
+ This is a unique Oracle-assigned identifier for the request. If you need to contact
692
+ Oracle about a particular request, please provide the request ID.
693
+ The only valid characters for request IDs are letters, numbers,
694
+ underscore, and dash.
695
+
696
+ :param obj retry_strategy: (optional)
697
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
698
+
699
+ 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.
700
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
701
+
702
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
703
+
704
+ :param bool allow_control_chars: (optional)
705
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
706
+ By default, the response will not allow control characters in strings
707
+
708
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.resource_scheduler.models.Schedule`
709
+ :rtype: :class:`~oci.response.Response`
710
+
711
+ :example:
712
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.127.0/resourcescheduler/get_schedule.py.html>`__ to see an example of how to use get_schedule API.
713
+ """
714
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
715
+ required_arguments = ['scheduleId']
716
+ resource_path = "/schedules/{scheduleId}"
717
+ method = "GET"
718
+ operation_name = "get_schedule"
719
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/resource-scheduler/20240430/Schedule/GetSchedule"
720
+
721
+ # Don't accept unknown kwargs
722
+ expected_kwargs = [
723
+ "allow_control_chars",
724
+ "retry_strategy",
725
+ "opc_request_id"
726
+ ]
727
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
728
+ if extra_kwargs:
729
+ raise ValueError(
730
+ f"get_schedule got unknown kwargs: {extra_kwargs!r}")
731
+
732
+ path_params = {
733
+ "scheduleId": schedule_id
734
+ }
735
+
736
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
737
+
738
+ for (k, v) in six.iteritems(path_params):
739
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
740
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
741
+
742
+ header_params = {
743
+ "accept": "application/json",
744
+ "content-type": "application/json",
745
+ "opc-request-id": kwargs.get("opc_request_id", missing)
746
+ }
747
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
748
+
749
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
750
+ operation_retry_strategy=kwargs.get('retry_strategy'),
751
+ client_retry_strategy=self.retry_strategy
752
+ )
753
+ if retry_strategy is None:
754
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
755
+
756
+ if retry_strategy:
757
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
758
+ self.base_client.add_opc_client_retries_header(header_params)
759
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
760
+ return retry_strategy.make_retrying_call(
761
+ self.base_client.call_api,
762
+ resource_path=resource_path,
763
+ method=method,
764
+ path_params=path_params,
765
+ header_params=header_params,
766
+ response_type="Schedule",
767
+ allow_control_chars=kwargs.get('allow_control_chars'),
768
+ operation_name=operation_name,
769
+ api_reference_link=api_reference_link,
770
+ required_arguments=required_arguments)
771
+ else:
772
+ return self.base_client.call_api(
773
+ resource_path=resource_path,
774
+ method=method,
775
+ path_params=path_params,
776
+ header_params=header_params,
777
+ response_type="Schedule",
778
+ allow_control_chars=kwargs.get('allow_control_chars'),
779
+ operation_name=operation_name,
780
+ api_reference_link=api_reference_link,
781
+ required_arguments=required_arguments)
782
+
783
+ def get_work_request(self, work_request_id, **kwargs):
784
+ """
785
+ This API gets the details of a work request.
786
+
787
+
788
+ :param str work_request_id: (required)
789
+ This is the `OCID`__ of the asynchronous work request.
790
+
791
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
792
+
793
+ :param str opc_request_id: (optional)
794
+ This is a unique Oracle-assigned identifier for the request. If you need to contact
795
+ Oracle about a particular request, please provide the request ID.
796
+ The only valid characters for request IDs are letters, numbers,
797
+ underscore, and dash.
798
+
799
+ :param obj retry_strategy: (optional)
800
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
801
+
802
+ 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.
803
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
804
+
805
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
806
+
807
+ :param bool allow_control_chars: (optional)
808
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
809
+ By default, the response will not allow control characters in strings
810
+
811
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.resource_scheduler.models.WorkRequest`
812
+ :rtype: :class:`~oci.response.Response`
813
+
814
+ :example:
815
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.127.0/resourcescheduler/get_work_request.py.html>`__ to see an example of how to use get_work_request API.
816
+ """
817
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
818
+ required_arguments = ['workRequestId']
819
+ resource_path = "/workRequests/{workRequestId}"
820
+ method = "GET"
821
+ operation_name = "get_work_request"
822
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/resource-scheduler/20240430/WorkRequest/GetWorkRequest"
823
+
824
+ # Don't accept unknown kwargs
825
+ expected_kwargs = [
826
+ "allow_control_chars",
827
+ "retry_strategy",
828
+ "opc_request_id"
829
+ ]
830
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
831
+ if extra_kwargs:
832
+ raise ValueError(
833
+ f"get_work_request got unknown kwargs: {extra_kwargs!r}")
834
+
835
+ path_params = {
836
+ "workRequestId": work_request_id
837
+ }
838
+
839
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
840
+
841
+ for (k, v) in six.iteritems(path_params):
842
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
843
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
844
+
845
+ header_params = {
846
+ "accept": "application/json",
847
+ "content-type": "application/json",
848
+ "opc-request-id": kwargs.get("opc_request_id", missing)
849
+ }
850
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
851
+
852
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
853
+ operation_retry_strategy=kwargs.get('retry_strategy'),
854
+ client_retry_strategy=self.retry_strategy
855
+ )
856
+ if retry_strategy is None:
857
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
858
+
859
+ if retry_strategy:
860
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
861
+ self.base_client.add_opc_client_retries_header(header_params)
862
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
863
+ return retry_strategy.make_retrying_call(
864
+ self.base_client.call_api,
865
+ resource_path=resource_path,
866
+ method=method,
867
+ path_params=path_params,
868
+ header_params=header_params,
869
+ response_type="WorkRequest",
870
+ allow_control_chars=kwargs.get('allow_control_chars'),
871
+ operation_name=operation_name,
872
+ api_reference_link=api_reference_link,
873
+ required_arguments=required_arguments)
874
+ else:
875
+ return self.base_client.call_api(
876
+ resource_path=resource_path,
877
+ method=method,
878
+ path_params=path_params,
879
+ header_params=header_params,
880
+ response_type="WorkRequest",
881
+ allow_control_chars=kwargs.get('allow_control_chars'),
882
+ operation_name=operation_name,
883
+ api_reference_link=api_reference_link,
884
+ required_arguments=required_arguments)
885
+
886
+ def list_resource_types(self, **kwargs):
887
+ """
888
+ This API gets a list of schedule resource types.
889
+
890
+
891
+ :param str compartment_id: (optional)
892
+ This is the `OCID`__ of the compartment in which to list resources.
893
+
894
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
895
+
896
+ :param int limit: (optional)
897
+ For list pagination. The maximum number of results per page, or items to return in a
898
+ paginated \"List\" call. For important details about how pagination works, see
899
+ `List Pagination`__.
900
+
901
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
902
+
903
+ :param str page: (optional)
904
+ This used for list pagination. The value of the opc-next-page response header from the previous
905
+ \"List\" call. For important details about how pagination works, see
906
+ `List Pagination`__.
907
+
908
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
909
+
910
+ :param str opc_request_id: (optional)
911
+ This is a unique Oracle-assigned identifier for the request. If you need to contact
912
+ Oracle about a particular request, please provide the request ID.
913
+ The only valid characters for request IDs are letters, numbers,
914
+ underscore, and dash.
915
+
916
+ :param obj retry_strategy: (optional)
917
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
918
+
919
+ 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.
920
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
921
+
922
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
923
+
924
+ :param bool allow_control_chars: (optional)
925
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
926
+ By default, the response will not allow control characters in strings
927
+
928
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.resource_scheduler.models.ResourceTypeCollection`
929
+ :rtype: :class:`~oci.response.Response`
930
+
931
+ :example:
932
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.127.0/resourcescheduler/list_resource_types.py.html>`__ to see an example of how to use list_resource_types API.
933
+ """
934
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
935
+ required_arguments = []
936
+ resource_path = "/schedules/resourceTypes"
937
+ method = "GET"
938
+ operation_name = "list_resource_types"
939
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/resource-scheduler/20240430/ResourceTypeCollection/ListResourceTypes"
940
+
941
+ # Don't accept unknown kwargs
942
+ expected_kwargs = [
943
+ "allow_control_chars",
944
+ "retry_strategy",
945
+ "compartment_id",
946
+ "limit",
947
+ "page",
948
+ "opc_request_id"
949
+ ]
950
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
951
+ if extra_kwargs:
952
+ raise ValueError(
953
+ f"list_resource_types got unknown kwargs: {extra_kwargs!r}")
954
+
955
+ query_params = {
956
+ "compartmentId": kwargs.get("compartment_id", missing),
957
+ "limit": kwargs.get("limit", missing),
958
+ "page": kwargs.get("page", missing)
959
+ }
960
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
961
+
962
+ header_params = {
963
+ "accept": "application/json",
964
+ "content-type": "application/json",
965
+ "opc-request-id": kwargs.get("opc_request_id", missing)
966
+ }
967
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
968
+
969
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
970
+ operation_retry_strategy=kwargs.get('retry_strategy'),
971
+ client_retry_strategy=self.retry_strategy
972
+ )
973
+ if retry_strategy is None:
974
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
975
+
976
+ if retry_strategy:
977
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
978
+ self.base_client.add_opc_client_retries_header(header_params)
979
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
980
+ return retry_strategy.make_retrying_call(
981
+ self.base_client.call_api,
982
+ resource_path=resource_path,
983
+ method=method,
984
+ query_params=query_params,
985
+ header_params=header_params,
986
+ response_type="ResourceTypeCollection",
987
+ allow_control_chars=kwargs.get('allow_control_chars'),
988
+ operation_name=operation_name,
989
+ api_reference_link=api_reference_link,
990
+ required_arguments=required_arguments)
991
+ else:
992
+ return self.base_client.call_api(
993
+ resource_path=resource_path,
994
+ method=method,
995
+ query_params=query_params,
996
+ header_params=header_params,
997
+ response_type="ResourceTypeCollection",
998
+ allow_control_chars=kwargs.get('allow_control_chars'),
999
+ operation_name=operation_name,
1000
+ api_reference_link=api_reference_link,
1001
+ required_arguments=required_arguments)
1002
+
1003
+ def list_schedules(self, **kwargs):
1004
+ """
1005
+ This API gets a list of schedules
1006
+
1007
+
1008
+ :param str compartment_id: (optional)
1009
+ This is the `OCID`__ of the compartment in which to list resources.
1010
+
1011
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
1012
+
1013
+ :param str lifecycle_state: (optional)
1014
+ This is a filter to return only resources that match the given lifecycle state. The
1015
+ state value is case-insensitive.
1016
+
1017
+ Allowed values are: "ACTIVE", "INACTIVE", "CREATING", "UPDATING", "DELETING", "DELETED", "FAILED"
1018
+
1019
+ :param str display_name: (optional)
1020
+ This is a filter to return only resources that match the given display name exactly.
1021
+
1022
+ :param str schedule_id: (optional)
1023
+ This is the `OCID`__ of the schedule.
1024
+
1025
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
1026
+
1027
+ :param int limit: (optional)
1028
+ For list pagination. The maximum number of results per page, or items to return in a
1029
+ paginated \"List\" call. For important details about how pagination works, see
1030
+ `List Pagination`__.
1031
+
1032
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
1033
+
1034
+ :param str page: (optional)
1035
+ This used for list pagination. The value of the opc-next-page response header from the previous
1036
+ \"List\" call. For important details about how pagination works, see
1037
+ `List Pagination`__.
1038
+
1039
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
1040
+
1041
+ :param str sort_by: (optional)
1042
+ This is the field to sort by. You can provide only one sort order. The default order for `timeCreated`
1043
+ is descending. The default order for `displayName` is ascending.
1044
+
1045
+ Allowed values are: "timeCreated", "displayName", "lifecycleState", "state"
1046
+
1047
+ :param str sort_order: (optional)
1048
+ This is the sort order to use, either ascending (`ASC`) or descending (`DESC`).
1049
+
1050
+ Allowed values are: "ASC", "DESC"
1051
+
1052
+ :param str opc_request_id: (optional)
1053
+ This is a unique Oracle-assigned identifier for the request. If you need to contact
1054
+ Oracle about a particular request, please provide the request ID.
1055
+ The only valid characters for request IDs are letters, numbers,
1056
+ underscore, and dash.
1057
+
1058
+ :param obj retry_strategy: (optional)
1059
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1060
+
1061
+ 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.
1062
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1063
+
1064
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1065
+
1066
+ :param bool allow_control_chars: (optional)
1067
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1068
+ By default, the response will not allow control characters in strings
1069
+
1070
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.resource_scheduler.models.ScheduleCollection`
1071
+ :rtype: :class:`~oci.response.Response`
1072
+
1073
+ :example:
1074
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.127.0/resourcescheduler/list_schedules.py.html>`__ to see an example of how to use list_schedules API.
1075
+ """
1076
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1077
+ required_arguments = []
1078
+ resource_path = "/schedules"
1079
+ method = "GET"
1080
+ operation_name = "list_schedules"
1081
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/resource-scheduler/20240430/Schedule/ListSchedules"
1082
+
1083
+ # Don't accept unknown kwargs
1084
+ expected_kwargs = [
1085
+ "allow_control_chars",
1086
+ "retry_strategy",
1087
+ "compartment_id",
1088
+ "lifecycle_state",
1089
+ "display_name",
1090
+ "schedule_id",
1091
+ "limit",
1092
+ "page",
1093
+ "sort_by",
1094
+ "sort_order",
1095
+ "opc_request_id"
1096
+ ]
1097
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1098
+ if extra_kwargs:
1099
+ raise ValueError(
1100
+ f"list_schedules got unknown kwargs: {extra_kwargs!r}")
1101
+
1102
+ if 'lifecycle_state' in kwargs:
1103
+ lifecycle_state_allowed_values = ["ACTIVE", "INACTIVE", "CREATING", "UPDATING", "DELETING", "DELETED", "FAILED"]
1104
+ if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
1105
+ raise ValueError(
1106
+ f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
1107
+ )
1108
+
1109
+ if 'sort_by' in kwargs:
1110
+ sort_by_allowed_values = ["timeCreated", "displayName", "lifecycleState", "state"]
1111
+ if kwargs['sort_by'] not in sort_by_allowed_values:
1112
+ raise ValueError(
1113
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
1114
+ )
1115
+
1116
+ if 'sort_order' in kwargs:
1117
+ sort_order_allowed_values = ["ASC", "DESC"]
1118
+ if kwargs['sort_order'] not in sort_order_allowed_values:
1119
+ raise ValueError(
1120
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
1121
+ )
1122
+
1123
+ query_params = {
1124
+ "compartmentId": kwargs.get("compartment_id", missing),
1125
+ "lifecycleState": kwargs.get("lifecycle_state", missing),
1126
+ "displayName": kwargs.get("display_name", missing),
1127
+ "scheduleId": kwargs.get("schedule_id", missing),
1128
+ "limit": kwargs.get("limit", missing),
1129
+ "page": kwargs.get("page", missing),
1130
+ "sortBy": kwargs.get("sort_by", missing),
1131
+ "sortOrder": kwargs.get("sort_order", missing)
1132
+ }
1133
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1134
+
1135
+ header_params = {
1136
+ "accept": "application/json",
1137
+ "content-type": "application/json",
1138
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1139
+ }
1140
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1141
+
1142
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1143
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1144
+ client_retry_strategy=self.retry_strategy
1145
+ )
1146
+ if retry_strategy is None:
1147
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1148
+
1149
+ if retry_strategy:
1150
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1151
+ self.base_client.add_opc_client_retries_header(header_params)
1152
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1153
+ return retry_strategy.make_retrying_call(
1154
+ self.base_client.call_api,
1155
+ resource_path=resource_path,
1156
+ method=method,
1157
+ query_params=query_params,
1158
+ header_params=header_params,
1159
+ response_type="ScheduleCollection",
1160
+ allow_control_chars=kwargs.get('allow_control_chars'),
1161
+ operation_name=operation_name,
1162
+ api_reference_link=api_reference_link,
1163
+ required_arguments=required_arguments)
1164
+ else:
1165
+ return self.base_client.call_api(
1166
+ resource_path=resource_path,
1167
+ method=method,
1168
+ query_params=query_params,
1169
+ header_params=header_params,
1170
+ response_type="ScheduleCollection",
1171
+ allow_control_chars=kwargs.get('allow_control_chars'),
1172
+ operation_name=operation_name,
1173
+ api_reference_link=api_reference_link,
1174
+ required_arguments=required_arguments)
1175
+
1176
+ def list_work_request_errors(self, work_request_id, **kwargs):
1177
+ """
1178
+ This API lists the errors for a work request.
1179
+
1180
+
1181
+ :param str work_request_id: (required)
1182
+ This is the `OCID`__ of the asynchronous work request.
1183
+
1184
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
1185
+
1186
+ :param str opc_request_id: (optional)
1187
+ This is a unique Oracle-assigned identifier for the request. If you need to contact
1188
+ Oracle about a particular request, please provide the request ID.
1189
+ The only valid characters for request IDs are letters, numbers,
1190
+ underscore, and dash.
1191
+
1192
+ :param str page: (optional)
1193
+ This used for list pagination. The value of the opc-next-page response header from the previous
1194
+ \"List\" call. For important details about how pagination works, see
1195
+ `List Pagination`__.
1196
+
1197
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
1198
+
1199
+ :param int limit: (optional)
1200
+ For list pagination. The maximum number of results per page, or items to return in a
1201
+ paginated \"List\" call. For important details about how pagination works, see
1202
+ `List Pagination`__.
1203
+
1204
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
1205
+
1206
+ :param str sort_by: (optional)
1207
+ This is the field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending.
1208
+
1209
+ Allowed values are: "timestamp"
1210
+
1211
+ :param str sort_order: (optional)
1212
+ This is the sort order to use, either ascending (`ASC`) or descending (`DESC`).
1213
+
1214
+ Allowed values are: "ASC", "DESC"
1215
+
1216
+ :param obj retry_strategy: (optional)
1217
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1218
+
1219
+ 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.
1220
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1221
+
1222
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1223
+
1224
+ :param bool allow_control_chars: (optional)
1225
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1226
+ By default, the response will not allow control characters in strings
1227
+
1228
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.resource_scheduler.models.WorkRequestErrorCollection`
1229
+ :rtype: :class:`~oci.response.Response`
1230
+
1231
+ :example:
1232
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.127.0/resourcescheduler/list_work_request_errors.py.html>`__ to see an example of how to use list_work_request_errors API.
1233
+ """
1234
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1235
+ required_arguments = ['workRequestId']
1236
+ resource_path = "/workRequests/{workRequestId}/errors"
1237
+ method = "GET"
1238
+ operation_name = "list_work_request_errors"
1239
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/resource-scheduler/20240430/WorkRequestError/ListWorkRequestErrors"
1240
+
1241
+ # Don't accept unknown kwargs
1242
+ expected_kwargs = [
1243
+ "allow_control_chars",
1244
+ "retry_strategy",
1245
+ "opc_request_id",
1246
+ "page",
1247
+ "limit",
1248
+ "sort_by",
1249
+ "sort_order"
1250
+ ]
1251
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1252
+ if extra_kwargs:
1253
+ raise ValueError(
1254
+ f"list_work_request_errors got unknown kwargs: {extra_kwargs!r}")
1255
+
1256
+ path_params = {
1257
+ "workRequestId": work_request_id
1258
+ }
1259
+
1260
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1261
+
1262
+ for (k, v) in six.iteritems(path_params):
1263
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1264
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1265
+
1266
+ if 'sort_by' in kwargs:
1267
+ sort_by_allowed_values = ["timestamp"]
1268
+ if kwargs['sort_by'] not in sort_by_allowed_values:
1269
+ raise ValueError(
1270
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
1271
+ )
1272
+
1273
+ if 'sort_order' in kwargs:
1274
+ sort_order_allowed_values = ["ASC", "DESC"]
1275
+ if kwargs['sort_order'] not in sort_order_allowed_values:
1276
+ raise ValueError(
1277
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
1278
+ )
1279
+
1280
+ query_params = {
1281
+ "page": kwargs.get("page", missing),
1282
+ "limit": kwargs.get("limit", missing),
1283
+ "sortBy": kwargs.get("sort_by", missing),
1284
+ "sortOrder": kwargs.get("sort_order", missing)
1285
+ }
1286
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1287
+
1288
+ header_params = {
1289
+ "accept": "application/json",
1290
+ "content-type": "application/json",
1291
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1292
+ }
1293
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1294
+
1295
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1296
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1297
+ client_retry_strategy=self.retry_strategy
1298
+ )
1299
+ if retry_strategy is None:
1300
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1301
+
1302
+ if retry_strategy:
1303
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1304
+ self.base_client.add_opc_client_retries_header(header_params)
1305
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1306
+ return retry_strategy.make_retrying_call(
1307
+ self.base_client.call_api,
1308
+ resource_path=resource_path,
1309
+ method=method,
1310
+ path_params=path_params,
1311
+ query_params=query_params,
1312
+ header_params=header_params,
1313
+ response_type="WorkRequestErrorCollection",
1314
+ allow_control_chars=kwargs.get('allow_control_chars'),
1315
+ operation_name=operation_name,
1316
+ api_reference_link=api_reference_link,
1317
+ required_arguments=required_arguments)
1318
+ else:
1319
+ return self.base_client.call_api(
1320
+ resource_path=resource_path,
1321
+ method=method,
1322
+ path_params=path_params,
1323
+ query_params=query_params,
1324
+ header_params=header_params,
1325
+ response_type="WorkRequestErrorCollection",
1326
+ allow_control_chars=kwargs.get('allow_control_chars'),
1327
+ operation_name=operation_name,
1328
+ api_reference_link=api_reference_link,
1329
+ required_arguments=required_arguments)
1330
+
1331
+ def list_work_request_logs(self, work_request_id, **kwargs):
1332
+ """
1333
+ Lists the logs for a work request.
1334
+
1335
+
1336
+ :param str work_request_id: (required)
1337
+ This is the `OCID`__ of the asynchronous work request.
1338
+
1339
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
1340
+
1341
+ :param str opc_request_id: (optional)
1342
+ This is a unique Oracle-assigned identifier for the request. If you need to contact
1343
+ Oracle about a particular request, please provide the request ID.
1344
+ The only valid characters for request IDs are letters, numbers,
1345
+ underscore, and dash.
1346
+
1347
+ :param str page: (optional)
1348
+ This used for list pagination. The value of the opc-next-page response header from the previous
1349
+ \"List\" call. For important details about how pagination works, see
1350
+ `List Pagination`__.
1351
+
1352
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
1353
+
1354
+ :param int limit: (optional)
1355
+ For list pagination. The maximum number of results per page, or items to return in a
1356
+ paginated \"List\" call. For important details about how pagination works, see
1357
+ `List Pagination`__.
1358
+
1359
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
1360
+
1361
+ :param str sort_by: (optional)
1362
+ This is the field to sort by. Only one sort order may be provided. Default order for `timestamp` is descending.
1363
+
1364
+ Allowed values are: "timestamp"
1365
+
1366
+ :param str sort_order: (optional)
1367
+ This is the sort order to use, either ascending (`ASC`) or descending (`DESC`).
1368
+
1369
+ Allowed values are: "ASC", "DESC"
1370
+
1371
+ :param obj retry_strategy: (optional)
1372
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1373
+
1374
+ 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.
1375
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1376
+
1377
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1378
+
1379
+ :param bool allow_control_chars: (optional)
1380
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1381
+ By default, the response will not allow control characters in strings
1382
+
1383
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.resource_scheduler.models.WorkRequestLogEntryCollection`
1384
+ :rtype: :class:`~oci.response.Response`
1385
+
1386
+ :example:
1387
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.127.0/resourcescheduler/list_work_request_logs.py.html>`__ to see an example of how to use list_work_request_logs API.
1388
+ """
1389
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1390
+ required_arguments = ['workRequestId']
1391
+ resource_path = "/workRequests/{workRequestId}/logs"
1392
+ method = "GET"
1393
+ operation_name = "list_work_request_logs"
1394
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/resource-scheduler/20240430/WorkRequestLogEntry/ListWorkRequestLogs"
1395
+
1396
+ # Don't accept unknown kwargs
1397
+ expected_kwargs = [
1398
+ "allow_control_chars",
1399
+ "retry_strategy",
1400
+ "opc_request_id",
1401
+ "page",
1402
+ "limit",
1403
+ "sort_by",
1404
+ "sort_order"
1405
+ ]
1406
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1407
+ if extra_kwargs:
1408
+ raise ValueError(
1409
+ f"list_work_request_logs got unknown kwargs: {extra_kwargs!r}")
1410
+
1411
+ path_params = {
1412
+ "workRequestId": work_request_id
1413
+ }
1414
+
1415
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1416
+
1417
+ for (k, v) in six.iteritems(path_params):
1418
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1419
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1420
+
1421
+ if 'sort_by' in kwargs:
1422
+ sort_by_allowed_values = ["timestamp"]
1423
+ if kwargs['sort_by'] not in sort_by_allowed_values:
1424
+ raise ValueError(
1425
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
1426
+ )
1427
+
1428
+ if 'sort_order' in kwargs:
1429
+ sort_order_allowed_values = ["ASC", "DESC"]
1430
+ if kwargs['sort_order'] not in sort_order_allowed_values:
1431
+ raise ValueError(
1432
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
1433
+ )
1434
+
1435
+ query_params = {
1436
+ "page": kwargs.get("page", missing),
1437
+ "limit": kwargs.get("limit", missing),
1438
+ "sortBy": kwargs.get("sort_by", missing),
1439
+ "sortOrder": kwargs.get("sort_order", missing)
1440
+ }
1441
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1442
+
1443
+ header_params = {
1444
+ "accept": "application/json",
1445
+ "content-type": "application/json",
1446
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1447
+ }
1448
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1449
+
1450
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1451
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1452
+ client_retry_strategy=self.retry_strategy
1453
+ )
1454
+ if retry_strategy is None:
1455
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1456
+
1457
+ if retry_strategy:
1458
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1459
+ self.base_client.add_opc_client_retries_header(header_params)
1460
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1461
+ return retry_strategy.make_retrying_call(
1462
+ self.base_client.call_api,
1463
+ resource_path=resource_path,
1464
+ method=method,
1465
+ path_params=path_params,
1466
+ query_params=query_params,
1467
+ header_params=header_params,
1468
+ response_type="WorkRequestLogEntryCollection",
1469
+ allow_control_chars=kwargs.get('allow_control_chars'),
1470
+ operation_name=operation_name,
1471
+ api_reference_link=api_reference_link,
1472
+ required_arguments=required_arguments)
1473
+ else:
1474
+ return self.base_client.call_api(
1475
+ resource_path=resource_path,
1476
+ method=method,
1477
+ path_params=path_params,
1478
+ query_params=query_params,
1479
+ header_params=header_params,
1480
+ response_type="WorkRequestLogEntryCollection",
1481
+ allow_control_chars=kwargs.get('allow_control_chars'),
1482
+ operation_name=operation_name,
1483
+ api_reference_link=api_reference_link,
1484
+ required_arguments=required_arguments)
1485
+
1486
+ def list_work_requests(self, **kwargs):
1487
+ """
1488
+ Lists the cloud scheduler work requests in a compartment.
1489
+
1490
+
1491
+ :param str compartment_id: (optional)
1492
+ This is the `OCID`__ of the compartment in which to list resources.
1493
+
1494
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
1495
+
1496
+ :param str work_request_id: (optional)
1497
+ This is the `OCID`__ of the asynchronous work request.
1498
+
1499
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
1500
+
1501
+ :param str status: (optional)
1502
+ This is a filter to return only the resources that match the given lifecycle state.
1503
+
1504
+ Allowed values are: "ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"
1505
+
1506
+ :param str resource_id: (optional)
1507
+ This is the `OCID`__ of the resource affected by the work request.
1508
+
1509
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
1510
+
1511
+ :param str page: (optional)
1512
+ This used for list pagination. The value of the opc-next-page response header from the previous
1513
+ \"List\" call. For important details about how pagination works, see
1514
+ `List Pagination`__.
1515
+
1516
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
1517
+
1518
+ :param int limit: (optional)
1519
+ For list pagination. The maximum number of results per page, or items to return in a
1520
+ paginated \"List\" call. For important details about how pagination works, see
1521
+ `List Pagination`__.
1522
+
1523
+ __ https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine
1524
+
1525
+ :param str sort_order: (optional)
1526
+ This is the sort order to use, either ascending (`ASC`) or descending (`DESC`).
1527
+
1528
+ Allowed values are: "ASC", "DESC"
1529
+
1530
+ :param str sort_by: (optional)
1531
+ This is the field to sort by. Only one sort order may be provided. Default order for `timeAccepted` is descending.
1532
+
1533
+ Allowed values are: "timeAccepted"
1534
+
1535
+ :param str schedule_id: (optional)
1536
+ This is the `OCID`__ of the schedule.
1537
+
1538
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
1539
+
1540
+ :param str opc_request_id: (optional)
1541
+ This is a unique Oracle-assigned identifier for the request. If you need to contact
1542
+ Oracle about a particular request, please provide the request ID.
1543
+ The only valid characters for request IDs are letters, numbers,
1544
+ underscore, and dash.
1545
+
1546
+ :param obj retry_strategy: (optional)
1547
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1548
+
1549
+ 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.
1550
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1551
+
1552
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1553
+
1554
+ :param bool allow_control_chars: (optional)
1555
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1556
+ By default, the response will not allow control characters in strings
1557
+
1558
+ :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.resource_scheduler.models.WorkRequestSummaryCollection`
1559
+ :rtype: :class:`~oci.response.Response`
1560
+
1561
+ :example:
1562
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.127.0/resourcescheduler/list_work_requests.py.html>`__ to see an example of how to use list_work_requests API.
1563
+ """
1564
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1565
+ required_arguments = []
1566
+ resource_path = "/workRequests"
1567
+ method = "GET"
1568
+ operation_name = "list_work_requests"
1569
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/resource-scheduler/20240430/WorkRequest/ListWorkRequests"
1570
+
1571
+ # Don't accept unknown kwargs
1572
+ expected_kwargs = [
1573
+ "allow_control_chars",
1574
+ "retry_strategy",
1575
+ "compartment_id",
1576
+ "work_request_id",
1577
+ "status",
1578
+ "resource_id",
1579
+ "page",
1580
+ "limit",
1581
+ "sort_order",
1582
+ "sort_by",
1583
+ "schedule_id",
1584
+ "opc_request_id"
1585
+ ]
1586
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1587
+ if extra_kwargs:
1588
+ raise ValueError(
1589
+ f"list_work_requests got unknown kwargs: {extra_kwargs!r}")
1590
+
1591
+ if 'status' in kwargs:
1592
+ status_allowed_values = ["ACCEPTED", "IN_PROGRESS", "WAITING", "NEEDS_ATTENTION", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"]
1593
+ if kwargs['status'] not in status_allowed_values:
1594
+ raise ValueError(
1595
+ f"Invalid value for `status`, must be one of { status_allowed_values }"
1596
+ )
1597
+
1598
+ if 'sort_order' in kwargs:
1599
+ sort_order_allowed_values = ["ASC", "DESC"]
1600
+ if kwargs['sort_order'] not in sort_order_allowed_values:
1601
+ raise ValueError(
1602
+ f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
1603
+ )
1604
+
1605
+ if 'sort_by' in kwargs:
1606
+ sort_by_allowed_values = ["timeAccepted"]
1607
+ if kwargs['sort_by'] not in sort_by_allowed_values:
1608
+ raise ValueError(
1609
+ f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
1610
+ )
1611
+
1612
+ query_params = {
1613
+ "compartmentId": kwargs.get("compartment_id", missing),
1614
+ "workRequestId": kwargs.get("work_request_id", missing),
1615
+ "status": kwargs.get("status", missing),
1616
+ "resourceId": kwargs.get("resource_id", missing),
1617
+ "page": kwargs.get("page", missing),
1618
+ "limit": kwargs.get("limit", missing),
1619
+ "sortOrder": kwargs.get("sort_order", missing),
1620
+ "sortBy": kwargs.get("sort_by", missing),
1621
+ "scheduleId": kwargs.get("schedule_id", missing)
1622
+ }
1623
+ query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
1624
+
1625
+ header_params = {
1626
+ "accept": "application/json",
1627
+ "content-type": "application/json",
1628
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1629
+ }
1630
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1631
+
1632
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1633
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1634
+ client_retry_strategy=self.retry_strategy
1635
+ )
1636
+ if retry_strategy is None:
1637
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1638
+
1639
+ if retry_strategy:
1640
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1641
+ self.base_client.add_opc_client_retries_header(header_params)
1642
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1643
+ return retry_strategy.make_retrying_call(
1644
+ self.base_client.call_api,
1645
+ resource_path=resource_path,
1646
+ method=method,
1647
+ query_params=query_params,
1648
+ header_params=header_params,
1649
+ response_type="WorkRequestSummaryCollection",
1650
+ allow_control_chars=kwargs.get('allow_control_chars'),
1651
+ operation_name=operation_name,
1652
+ api_reference_link=api_reference_link,
1653
+ required_arguments=required_arguments)
1654
+ else:
1655
+ return self.base_client.call_api(
1656
+ resource_path=resource_path,
1657
+ method=method,
1658
+ query_params=query_params,
1659
+ header_params=header_params,
1660
+ response_type="WorkRequestSummaryCollection",
1661
+ allow_control_chars=kwargs.get('allow_control_chars'),
1662
+ operation_name=operation_name,
1663
+ api_reference_link=api_reference_link,
1664
+ required_arguments=required_arguments)
1665
+
1666
+ def update_schedule(self, schedule_id, update_schedule_details, **kwargs):
1667
+ """
1668
+ The API updates a schedule
1669
+
1670
+
1671
+ :param str schedule_id: (required)
1672
+ This is the `OCID`__ of the schedule.
1673
+
1674
+ __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
1675
+
1676
+ :param oci.resource_scheduler.models.UpdateScheduleDetails update_schedule_details: (required)
1677
+ The information about a schedule that will be updated.
1678
+
1679
+ :param str if_match: (optional)
1680
+ This is used for optimistic concurrency control. In the PUT or DELETE call for a resource, set the
1681
+ `if-match` parameter to the value of the etag from a previous GET or POST response for
1682
+ that resource. The resource will be updated or deleted only if the etag you provide
1683
+ matches the resource's current etag value.
1684
+
1685
+ :param str opc_request_id: (optional)
1686
+ This is a unique Oracle-assigned identifier for the request. If you need to contact
1687
+ Oracle about a particular request, please provide the request ID.
1688
+ The only valid characters for request IDs are letters, numbers,
1689
+ underscore, and dash.
1690
+
1691
+ :param obj retry_strategy: (optional)
1692
+ A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
1693
+
1694
+ 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.
1695
+ The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
1696
+
1697
+ To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
1698
+
1699
+ :param bool allow_control_chars: (optional)
1700
+ allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
1701
+ By default, the response will not allow control characters in strings
1702
+
1703
+ :return: A :class:`~oci.response.Response` object with data of type None
1704
+ :rtype: :class:`~oci.response.Response`
1705
+
1706
+ :example:
1707
+ Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/2.127.0/resourcescheduler/update_schedule.py.html>`__ to see an example of how to use update_schedule API.
1708
+ """
1709
+ # Required path and query arguments. These are in camelCase to replace values in service endpoints.
1710
+ required_arguments = ['scheduleId']
1711
+ resource_path = "/schedules/{scheduleId}"
1712
+ method = "PUT"
1713
+ operation_name = "update_schedule"
1714
+ api_reference_link = "https://docs.oracle.com/iaas/api/#/en/resource-scheduler/20240430/Schedule/UpdateSchedule"
1715
+
1716
+ # Don't accept unknown kwargs
1717
+ expected_kwargs = [
1718
+ "allow_control_chars",
1719
+ "retry_strategy",
1720
+ "if_match",
1721
+ "opc_request_id"
1722
+ ]
1723
+ extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
1724
+ if extra_kwargs:
1725
+ raise ValueError(
1726
+ f"update_schedule got unknown kwargs: {extra_kwargs!r}")
1727
+
1728
+ path_params = {
1729
+ "scheduleId": schedule_id
1730
+ }
1731
+
1732
+ path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
1733
+
1734
+ for (k, v) in six.iteritems(path_params):
1735
+ if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
1736
+ raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
1737
+
1738
+ header_params = {
1739
+ "accept": "application/json",
1740
+ "content-type": "application/json",
1741
+ "if-match": kwargs.get("if_match", missing),
1742
+ "opc-request-id": kwargs.get("opc_request_id", missing)
1743
+ }
1744
+ header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
1745
+
1746
+ retry_strategy = self.base_client.get_preferred_retry_strategy(
1747
+ operation_retry_strategy=kwargs.get('retry_strategy'),
1748
+ client_retry_strategy=self.retry_strategy
1749
+ )
1750
+ if retry_strategy is None:
1751
+ retry_strategy = retry.DEFAULT_RETRY_STRATEGY
1752
+
1753
+ if retry_strategy:
1754
+ if not isinstance(retry_strategy, retry.NoneRetryStrategy):
1755
+ self.base_client.add_opc_client_retries_header(header_params)
1756
+ retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
1757
+ return retry_strategy.make_retrying_call(
1758
+ self.base_client.call_api,
1759
+ resource_path=resource_path,
1760
+ method=method,
1761
+ path_params=path_params,
1762
+ header_params=header_params,
1763
+ body=update_schedule_details,
1764
+ allow_control_chars=kwargs.get('allow_control_chars'),
1765
+ operation_name=operation_name,
1766
+ api_reference_link=api_reference_link,
1767
+ required_arguments=required_arguments)
1768
+ else:
1769
+ return self.base_client.call_api(
1770
+ resource_path=resource_path,
1771
+ method=method,
1772
+ path_params=path_params,
1773
+ header_params=header_params,
1774
+ body=update_schedule_details,
1775
+ allow_control_chars=kwargs.get('allow_control_chars'),
1776
+ operation_name=operation_name,
1777
+ api_reference_link=api_reference_link,
1778
+ required_arguments=required_arguments)