oci 2.10.0 → 2.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (611) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/lib/oci.rb +4 -0
  4. data/lib/oci/api_client.rb +1 -3
  5. data/lib/oci/apigateway/api_gateway_client.rb +619 -0
  6. data/lib/oci/apigateway/api_gateway_client_composite_operations.rb +198 -0
  7. data/lib/oci/apigateway/apigateway.rb +10 -0
  8. data/lib/oci/apigateway/models/api.rb +340 -0
  9. data/lib/oci/apigateway/models/api_collection.rb +150 -0
  10. data/lib/oci/apigateway/models/api_summary.rb +342 -0
  11. data/lib/oci/apigateway/models/api_validation_detail.rb +191 -0
  12. data/lib/oci/apigateway/models/api_validation_details.rb +192 -0
  13. data/lib/oci/apigateway/models/api_validation_result.rb +182 -0
  14. data/lib/oci/apigateway/models/api_validations.rb +150 -0
  15. data/lib/oci/{log_analytics/models/create_namespace_details.rb → apigateway/models/change_api_compartment_details.rb} +5 -3
  16. data/lib/oci/apigateway/models/create_api_details.rb +222 -0
  17. data/lib/oci/apigateway/models/update_api_details.rb +206 -0
  18. data/lib/oci/apigateway/models/work_request.rb +4 -0
  19. data/lib/oci/application_migration/application_migration.rb +2 -0
  20. data/lib/oci/application_migration/application_migration_client.rb +169 -52
  21. data/lib/oci/application_migration/application_migration_client_composite_operations.rb +447 -0
  22. data/lib/oci/application_migration/models/authorization_details.rb +4 -2
  23. data/lib/oci/application_migration/models/change_compartment_details.rb +2 -2
  24. data/lib/oci/application_migration/models/configuration_field.rb +9 -7
  25. data/lib/oci/application_migration/models/create_migration_details.rb +54 -12
  26. data/lib/oci/application_migration/models/create_source_details.rb +13 -8
  27. data/lib/oci/application_migration/models/discovery_details.rb +2 -2
  28. data/lib/oci/application_migration/models/ics_discovery_details.rb +4 -3
  29. data/lib/oci/application_migration/models/internal_authorization_details.rb +1 -1
  30. data/lib/oci/application_migration/models/internal_source_details.rb +2 -2
  31. data/lib/oci/application_migration/models/jcs_discovery_details.rb +5 -3
  32. data/lib/oci/application_migration/models/migration.rb +111 -18
  33. data/lib/oci/application_migration/models/migration_summary.rb +63 -15
  34. data/lib/oci/application_migration/models/oac_discovery_details.rb +3 -3
  35. data/lib/oci/application_migration/models/ocic_authorization_details.rb +1 -1
  36. data/lib/oci/application_migration/models/ocic_source_details.rb +8 -3
  37. data/lib/oci/application_migration/models/oic_discovery_details.rb +4 -3
  38. data/lib/oci/application_migration/models/pcs_discovery_details.rb +4 -3
  39. data/lib/oci/application_migration/models/soacs_discovery_details.rb +5 -3
  40. data/lib/oci/application_migration/models/source.rb +41 -13
  41. data/lib/oci/application_migration/models/source_application.rb +6 -6
  42. data/lib/oci/application_migration/models/source_application_summary.rb +7 -6
  43. data/lib/oci/application_migration/models/source_details.rb +10 -2
  44. data/lib/oci/application_migration/models/source_summary.rb +36 -14
  45. data/lib/oci/application_migration/models/target_database_types.rb +11 -0
  46. data/lib/oci/application_migration/models/update_migration_details.rb +15 -7
  47. data/lib/oci/application_migration/models/update_source_details.rb +7 -7
  48. data/lib/oci/application_migration/models/work_request.rb +54 -3
  49. data/lib/oci/application_migration/models/work_request_error.rb +1 -1
  50. data/lib/oci/application_migration/models/work_request_log_entry.rb +2 -2
  51. data/lib/oci/application_migration/models/work_request_resource.rb +1 -1
  52. data/lib/oci/application_migration/models/work_request_summary.rb +54 -3
  53. data/lib/oci/auth/signers/instance_principals_delegation_token_signer.rb +1 -1
  54. data/lib/oci/compute_instance_agent/compute_instance_agent.rb +39 -0
  55. data/lib/oci/compute_instance_agent/compute_instance_agent_client.rb +522 -0
  56. data/lib/oci/compute_instance_agent/compute_instance_agent_client_composite_operations.rb +25 -0
  57. data/lib/oci/compute_instance_agent/models/create_instance_agent_command_details.rb +205 -0
  58. data/lib/oci/compute_instance_agent/models/instance_agent_command.rb +256 -0
  59. data/lib/oci/compute_instance_agent/models/instance_agent_command_content.rb +159 -0
  60. data/lib/oci/compute_instance_agent/models/instance_agent_command_content_info.rb +236 -0
  61. data/lib/oci/compute_instance_agent/models/instance_agent_command_execution.rb +321 -0
  62. data/lib/oci/compute_instance_agent/models/instance_agent_command_execution_output_content.rb +218 -0
  63. data/lib/oci/compute_instance_agent/models/instance_agent_command_execution_output_via_object_storage_tuple_details.rb +198 -0
  64. data/lib/oci/compute_instance_agent/models/instance_agent_command_execution_output_via_object_storage_uri_details.rb +170 -0
  65. data/lib/oci/compute_instance_agent/models/instance_agent_command_execution_output_via_text_details.rb +180 -0
  66. data/lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb +321 -0
  67. data/lib/oci/compute_instance_agent/models/instance_agent_command_output_details.rb +197 -0
  68. data/lib/oci/compute_instance_agent/models/instance_agent_command_output_via_object_storage_tuple_details.rb +190 -0
  69. data/lib/oci/compute_instance_agent/models/instance_agent_command_output_via_object_storage_uri_details.rb +162 -0
  70. data/lib/oci/compute_instance_agent/models/instance_agent_command_output_via_text_details.rb +145 -0
  71. data/lib/oci/compute_instance_agent/models/instance_agent_command_source_details.rb +197 -0
  72. data/lib/oci/compute_instance_agent/models/instance_agent_command_source_via_object_storage_tuple_details.rb +190 -0
  73. data/lib/oci/compute_instance_agent/models/instance_agent_command_source_via_object_storage_uri_details.rb +162 -0
  74. data/lib/oci/compute_instance_agent/models/instance_agent_command_source_via_text_details.rb +172 -0
  75. data/lib/oci/compute_instance_agent/models/instance_agent_command_summary.rb +224 -0
  76. data/lib/oci/compute_instance_agent/models/instance_agent_command_target.rb +154 -0
  77. data/lib/oci/compute_instance_agent/util.rb +3 -0
  78. data/lib/oci/container_engine/container_engine_client.rb +0 -11
  79. data/lib/oci/container_engine/models/create_node_shape_config_details.rb +19 -4
  80. data/lib/oci/container_engine/models/node_shape_config.rb +19 -4
  81. data/lib/oci/container_engine/models/update_node_shape_config_details.rb +19 -4
  82. data/lib/oci/core/core.rb +4 -0
  83. data/lib/oci/core/models/add_vcn_cidr_details.rb +155 -0
  84. data/lib/oci/core/models/create_vcn_details.rb +24 -2
  85. data/lib/oci/core/models/create_vlan_details.rb +1 -0
  86. data/lib/oci/core/models/image_memory_constraints.rb +17 -17
  87. data/lib/oci/core/models/modify_vcn_cidr_details.rb +172 -0
  88. data/lib/oci/core/models/remove_vcn_cidr_details.rb +155 -0
  89. data/lib/oci/core/models/subnet.rb +1 -0
  90. data/lib/oci/core/models/update_subnet_details.rb +27 -4
  91. data/lib/oci/core/models/update_vlan_details.rb +25 -4
  92. data/lib/oci/core/models/vcn.rb +18 -2
  93. data/lib/oci/core/models/vcn_dns_resolver_association.rb +206 -0
  94. data/lib/oci/core/virtual_network_client.rb +289 -4
  95. data/lib/oci/data_catalog/data_catalog.rb +30 -0
  96. data/lib/oci/data_catalog/data_catalog_client.rb +1763 -112
  97. data/lib/oci/data_catalog/data_catalog_client_composite_operations.rb +413 -0
  98. data/lib/oci/data_catalog/models/attribute.rb +15 -1
  99. data/lib/oci/data_catalog/models/connection.rb +15 -1
  100. data/lib/oci/data_catalog/models/create_attribute_details.rb +15 -1
  101. data/lib/oci/data_catalog/models/create_connection_details.rb +15 -1
  102. data/lib/oci/data_catalog/models/create_custom_property_details.rb +324 -0
  103. data/lib/oci/data_catalog/models/create_data_asset_details.rb +15 -1
  104. data/lib/oci/data_catalog/models/create_entity_details.rb +43 -1
  105. data/lib/oci/data_catalog/models/create_folder_details.rb +15 -1
  106. data/lib/oci/data_catalog/models/create_glossary_details.rb +18 -4
  107. data/lib/oci/data_catalog/models/create_namespace_details.rb +182 -0
  108. data/lib/oci/data_catalog/models/create_pattern_details.rb +243 -0
  109. data/lib/oci/data_catalog/models/create_term_details.rb +18 -4
  110. data/lib/oci/data_catalog/models/custom_property.rb +506 -0
  111. data/lib/oci/data_catalog/models/custom_property_collection.rb +161 -0
  112. data/lib/oci/data_catalog/models/custom_property_data_type.rb +14 -0
  113. data/lib/oci/data_catalog/models/custom_property_get_usage.rb +327 -0
  114. data/lib/oci/data_catalog/models/custom_property_set_usage.rb +188 -0
  115. data/lib/oci/data_catalog/models/custom_property_summary.rb +432 -0
  116. data/lib/oci/data_catalog/models/custom_property_type_usage.rb +178 -0
  117. data/lib/oci/data_catalog/models/data_asset.rb +29 -1
  118. data/lib/oci/{log_analytics/models/string_list_details.rb → data_catalog/models/data_selector_pattern_details.rb} +11 -10
  119. data/lib/oci/data_catalog/models/derived_logical_entities.rb +178 -0
  120. data/lib/oci/data_catalog/models/entity.rb +43 -1
  121. data/lib/oci/data_catalog/models/entity_summary.rb +29 -1
  122. data/lib/oci/data_catalog/models/faceted_search_aggregation.rb +160 -0
  123. data/lib/oci/data_catalog/models/faceted_search_custom_property.rb +174 -0
  124. data/lib/oci/data_catalog/models/faceted_search_date_filter_request.rb +186 -0
  125. data/lib/oci/data_catalog/models/faceted_search_filter_request.rb +168 -0
  126. data/lib/oci/data_catalog/models/faceted_search_sort_request.rb +181 -0
  127. data/lib/oci/data_catalog/models/faceted_search_string_filter_request.rb +160 -0
  128. data/lib/oci/data_catalog/models/folder.rb +15 -1
  129. data/lib/oci/data_catalog/models/glossary.rb +73 -1
  130. data/lib/oci/data_catalog/models/glossary_summary.rb +62 -4
  131. data/lib/oci/data_catalog/models/namespace.rb +290 -0
  132. data/lib/oci/data_catalog/models/namespace_collection.rb +161 -0
  133. data/lib/oci/data_catalog/models/namespace_summary.rb +247 -0
  134. data/lib/oci/data_catalog/models/pattern.rb +368 -0
  135. data/lib/oci/data_catalog/models/pattern_collection.rb +162 -0
  136. data/lib/oci/data_catalog/models/pattern_summary.rb +258 -0
  137. data/lib/oci/data_catalog/models/search_criteria.rb +47 -4
  138. data/lib/oci/data_catalog/models/search_result.rb +28 -4
  139. data/lib/oci/data_catalog/models/search_result_collection.rb +28 -4
  140. data/lib/oci/data_catalog/models/term.rb +18 -4
  141. data/lib/oci/data_catalog/models/type.rb +18 -4
  142. data/lib/oci/{log_analytics/models/register_entity_types_details.rb → data_catalog/models/type_custom_property_details.rb} +13 -13
  143. data/lib/oci/data_catalog/models/update_attribute_details.rb +15 -1
  144. data/lib/oci/data_catalog/models/update_connection_details.rb +15 -1
  145. data/lib/oci/data_catalog/models/update_custom_property_details.rb +291 -0
  146. data/lib/oci/data_catalog/models/update_data_asset_details.rb +15 -1
  147. data/lib/oci/data_catalog/models/update_entity_details.rb +43 -1
  148. data/lib/oci/data_catalog/models/update_folder_details.rb +15 -1
  149. data/lib/oci/data_catalog/models/update_glossary_details.rb +18 -4
  150. data/lib/oci/data_catalog/models/update_namespace_details.rb +182 -0
  151. data/lib/oci/data_catalog/models/update_pattern_details.rb +243 -0
  152. data/lib/oci/data_catalog/models/update_term_details.rb +18 -4
  153. data/lib/oci/data_catalog/models/validate_pattern_details.rb +187 -0
  154. data/lib/oci/data_catalog/models/validate_pattern_result.rb +184 -0
  155. data/lib/oci/data_integration/models/source.rb +1 -0
  156. data/lib/oci/database/database.rb +19 -0
  157. data/lib/oci/database/database_client.rb +1112 -8
  158. data/lib/oci/database/database_client_composite_operations.rb +281 -0
  159. data/lib/oci/database/models/autonomous_container_database.rb +80 -4
  160. data/lib/oci/database/models/autonomous_container_database_dataguard_association.rb +480 -0
  161. data/lib/oci/database/models/autonomous_container_database_summary.rb +80 -4
  162. data/lib/oci/database/models/autonomous_database.rb +141 -8
  163. data/lib/oci/database/models/autonomous_database_backup.rb +32 -4
  164. data/lib/oci/database/models/autonomous_database_backup_config.rb +189 -0
  165. data/lib/oci/database/models/autonomous_database_backup_summary.rb +32 -4
  166. data/lib/oci/database/models/autonomous_database_dataguard_association.rb +468 -0
  167. data/lib/oci/database/models/autonomous_database_summary.rb +141 -8
  168. data/lib/oci/database/models/autonomous_db_version_summary.rb +46 -4
  169. data/lib/oci/{log_analytics/models/query.rb → database/models/change_key_store_compartment_details.rb} +5 -3
  170. data/lib/oci/database/models/create_autonomous_container_database_details.rb +138 -5
  171. data/lib/oci/database/models/create_autonomous_database_base.rb +30 -5
  172. data/lib/oci/database/models/create_autonomous_database_clone_details.rb +5 -1
  173. data/lib/oci/database/models/create_autonomous_database_details.rb +5 -1
  174. data/lib/oci/database/models/create_autonomous_database_from_backup_details.rb +5 -1
  175. data/lib/oci/database/models/create_autonomous_database_from_backup_timestamp_details.rb +5 -1
  176. data/lib/oci/database/models/create_data_guard_association_details.rb +15 -1
  177. data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +24 -4
  178. data/lib/oci/database/models/create_data_guard_association_to_existing_vm_cluster_details.rb +24 -4
  179. data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +5 -1
  180. data/lib/oci/database/models/create_database_details.rb +15 -1
  181. data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +1 -1
  182. data/lib/oci/database/models/create_db_home_with_vm_cluster_id_details.rb +1 -1
  183. data/lib/oci/database/models/create_key_store_details.rb +217 -0
  184. data/lib/oci/database/models/create_refreshable_autonomous_database_clone_details.rb +5 -1
  185. data/lib/oci/database/models/database.rb +1 -0
  186. data/lib/oci/database/models/database_software_image.rb +18 -4
  187. data/lib/oci/database/models/database_software_image_summary.rb +18 -4
  188. data/lib/oci/database/models/database_summary.rb +1 -0
  189. data/lib/oci/database/models/database_upgrade_history_entry.rb +352 -0
  190. data/lib/oci/database/models/database_upgrade_history_entry_summary.rb +355 -0
  191. data/lib/oci/database/models/database_upgrade_source_base.rb +188 -0
  192. data/lib/oci/database/models/database_upgrade_with_database_software_image_details.rb +164 -0
  193. data/lib/oci/database/models/database_upgrade_with_db_home_details.rb +164 -0
  194. data/lib/oci/database/models/database_upgrade_with_db_version_details.rb +164 -0
  195. data/lib/oci/database/models/db_system.rb +1 -0
  196. data/lib/oci/database/models/db_system_summary.rb +1 -0
  197. data/lib/oci/database/models/db_version_summary.rb +18 -4
  198. data/lib/oci/database/models/key_store.rb +300 -0
  199. data/lib/oci/database/models/key_store_associated_database_details.rb +164 -0
  200. data/lib/oci/database/models/key_store_summary.rb +303 -0
  201. data/lib/oci/database/models/key_store_type_details.rb +185 -0
  202. data/lib/oci/database/models/key_store_type_from_oracle_key_vault_details.rb +204 -0
  203. data/lib/oci/database/models/maintenance_run.rb +18 -4
  204. data/lib/oci/database/models/maintenance_run_summary.rb +18 -4
  205. data/lib/oci/database/models/peer_autonomous_container_database_backup_config.rb +172 -0
  206. data/lib/oci/database/models/update.rb +1 -0
  207. data/lib/oci/database/models/update_autonomous_container_database_details.rb +17 -1
  208. data/lib/oci/database/models/update_autonomous_database_details.rb +30 -5
  209. data/lib/oci/database/models/update_database_details.rb +43 -1
  210. data/lib/oci/database/models/update_history_entry.rb +1 -0
  211. data/lib/oci/database/models/update_history_entry_summary.rb +1 -0
  212. data/lib/oci/database/models/update_key_store_details.rb +187 -0
  213. data/lib/oci/database/models/update_summary.rb +1 -0
  214. data/lib/oci/database/models/upgrade_database_details.rb +179 -0
  215. data/lib/oci/dns/dns.rb +24 -0
  216. data/lib/oci/dns/dns_client.rb +1695 -175
  217. data/lib/oci/dns/dns_client_composite_operations.rb +240 -0
  218. data/lib/oci/{log_analytics/models/service_tenancy.rb → dns/models/attached_view.rb} +13 -12
  219. data/lib/oci/dns/models/attached_view_details.rb +155 -0
  220. data/lib/oci/dns/models/change_resolver_compartment_details.rb +156 -0
  221. data/lib/oci/{log_analytics/models/query_work_request_resource.rb → dns/models/change_view_compartment_details.rb} +5 -3
  222. data/lib/oci/dns/models/create_resolver_endpoint_details.rb +261 -0
  223. data/lib/oci/dns/models/create_resolver_vnic_endpoint_details.rb +203 -0
  224. data/lib/oci/dns/models/create_view_details.rb +210 -0
  225. data/lib/oci/dns/models/create_zone_details.rb +41 -2
  226. data/lib/oci/dns/models/migration_replacement.rb +1 -1
  227. data/lib/oci/dns/models/record.rb +1 -2
  228. data/lib/oci/dns/models/record_collection.rb +1 -0
  229. data/lib/oci/dns/models/record_details.rb +1 -2
  230. data/lib/oci/dns/models/record_operation.rb +1 -2
  231. data/lib/oci/dns/models/resolver.rb +393 -0
  232. data/lib/oci/dns/models/resolver_endpoint.rb +371 -0
  233. data/lib/oci/dns/models/resolver_endpoint_summary.rb +371 -0
  234. data/lib/oci/{log_analytics/models/generate_agent_object_name_details.rb → dns/models/resolver_forward_rule.rb} +42 -51
  235. data/lib/oci/dns/models/resolver_forward_rule_details.rb +187 -0
  236. data/lib/oci/dns/models/resolver_rule.rb +222 -0
  237. data/lib/oci/dns/models/resolver_rule_details.rb +215 -0
  238. data/lib/oci/dns/models/resolver_summary.rb +357 -0
  239. data/lib/oci/dns/models/resolver_vnic_endpoint.rb +220 -0
  240. data/lib/oci/dns/models/resolver_vnic_endpoint_summary.rb +205 -0
  241. data/lib/oci/dns/models/rr_set.rb +1 -0
  242. data/lib/oci/{log_analytics/models/sort_orders.rb → dns/models/scope.rb} +4 -4
  243. data/lib/oci/dns/models/steering_policy.rb +12 -12
  244. data/lib/oci/dns/models/steering_policy_answer.rb +1 -1
  245. data/lib/oci/dns/models/steering_policy_attachment.rb +10 -10
  246. data/lib/oci/dns/models/steering_policy_attachment_summary.rb +10 -10
  247. data/lib/oci/dns/models/steering_policy_summary.rb +10 -10
  248. data/lib/oci/dns/models/tsig_key.rb +10 -10
  249. data/lib/oci/dns/models/tsig_key_summary.rb +9 -9
  250. data/lib/oci/dns/models/update_resolver_details.rb +221 -0
  251. data/lib/oci/dns/models/update_resolver_endpoint_details.rb +188 -0
  252. data/lib/oci/dns/models/update_resolver_vnic_endpoint_details.rb +166 -0
  253. data/lib/oci/dns/models/update_view_details.rb +196 -0
  254. data/lib/oci/{log_analytics/models/log_analytics.rb → dns/models/view.rb} +105 -77
  255. data/lib/oci/dns/models/view_summary.rb +321 -0
  256. data/lib/oci/dns/models/zone.rb +75 -14
  257. data/lib/oci/dns/models/zone_summary.rb +76 -15
  258. data/lib/oci/functions/functions_management_client.rb +1 -1
  259. data/lib/oci/functions/models/application.rb +21 -2
  260. data/lib/oci/functions/models/application_summary.rb +1 -1
  261. data/lib/oci/functions/models/create_application_details.rb +20 -1
  262. data/lib/oci/functions/models/function.rb +1 -1
  263. data/lib/oci/functions/models/function_summary.rb +1 -1
  264. data/lib/oci/functions/models/update_application_details.rb +20 -1
  265. data/lib/oci/identity/identity.rb +5 -0
  266. data/lib/oci/identity/identity_client.rb +152 -23
  267. data/lib/oci/identity/identity_client_composite_operations.rb +48 -0
  268. data/lib/oci/identity/models/bulk_edit_operation_details.rb +193 -0
  269. data/lib/oci/identity/models/bulk_edit_resource.rb +175 -0
  270. data/lib/oci/identity/models/bulk_edit_tags_details.rb +181 -0
  271. data/lib/oci/identity/models/bulk_edit_tags_resource_type.rb +175 -0
  272. data/lib/oci/identity/models/bulk_edit_tags_resource_type_collection.rb +151 -0
  273. data/lib/oci/identity/models/customer_secret_key.rb +3 -3
  274. data/lib/oci/identity/models/tagging_work_request.rb +4 -0
  275. data/lib/oci/identity/models/tagging_work_request_summary.rb +4 -0
  276. data/lib/oci/identity/models/user.rb +54 -4
  277. data/lib/oci/identity/models/work_request_resource.rb +1 -0
  278. data/lib/oci/load_balancer/load_balancer.rb +1 -0
  279. data/lib/oci/load_balancer/models/add_http_request_header_rule.rb +2 -1
  280. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +16 -1
  281. data/lib/oci/load_balancer/models/ip_address.rb +17 -4
  282. data/lib/oci/load_balancer/models/remove_http_request_header_rule.rb +0 -2
  283. data/lib/oci/{log_analytics/models/log_analytics_collection_warning.rb → load_balancer/models/reserved_ip.rb} +2 -4
  284. data/lib/oci/load_balancer/models/update_load_balancer_shape_details.rb +7 -6
  285. data/lib/oci/log_analytics/log_analytics.rb +0 -15
  286. data/lib/oci/log_analytics/log_analytics_client.rb +193 -180
  287. data/lib/oci/log_analytics/log_analytics_client_composite_operations.rb +68 -17
  288. data/lib/oci/log_analytics/models/abstract_command_descriptor.rb +1 -1
  289. data/lib/oci/log_analytics/models/archiving_configuration.rb +3 -3
  290. data/lib/oci/log_analytics/models/bucket_range.rb +1 -1
  291. data/lib/oci/log_analytics/models/change_log_analytics_object_collection_rule_compartment_details.rb +1 -1
  292. data/lib/oci/log_analytics/models/char_encoding_collection.rb +2 -2
  293. data/lib/oci/log_analytics/models/create_log_analytics_object_collection_rule_details.rb +4 -6
  294. data/lib/oci/log_analytics/models/estimate_purge_data_size_details.rb +6 -6
  295. data/lib/oci/log_analytics/models/estimate_purge_data_size_result.rb +1 -1
  296. data/lib/oci/log_analytics/models/export_content.rb +1 -0
  297. data/lib/oci/log_analytics/models/extract_log_field_results.rb +1 -1
  298. data/lib/oci/log_analytics/models/extract_log_header_details.rb +1 -1
  299. data/lib/oci/log_analytics/models/extract_log_header_results.rb +1 -1
  300. data/lib/oci/log_analytics/models/file_validation_response.rb +3 -3
  301. data/lib/oci/log_analytics/models/filter.rb +1 -1
  302. data/lib/oci/log_analytics/models/filter_details.rb +1 -1
  303. data/lib/oci/log_analytics/models/label_source_summary.rb +1 -1
  304. data/lib/oci/log_analytics/models/log_analytics_entity_summary.rb +36 -4
  305. data/lib/oci/log_analytics/models/log_analytics_field_summary.rb +1 -1
  306. data/lib/oci/log_analytics/models/log_analytics_import_custom_content.rb +0 -1
  307. data/lib/oci/log_analytics/models/log_analytics_lookup.rb +0 -2
  308. data/lib/oci/log_analytics/models/log_analytics_object_collection_rule.rb +4 -6
  309. data/lib/oci/log_analytics/models/log_analytics_object_collection_rule_summary.rb +1 -3
  310. data/lib/oci/log_analytics/models/log_analytics_parser_filter.rb +3 -3
  311. data/lib/oci/log_analytics/models/namespace.rb +5 -4
  312. data/lib/oci/log_analytics/models/namespace_collection.rb +2 -2
  313. data/lib/oci/log_analytics/models/namespace_summary.rb +5 -4
  314. data/lib/oci/log_analytics/models/parsed_content.rb +2 -2
  315. data/lib/oci/log_analytics/models/parsed_field.rb +1 -1
  316. data/lib/oci/log_analytics/models/purge_storage_data_details.rb +6 -6
  317. data/lib/oci/log_analytics/models/query_aggregation.rb +1 -1
  318. data/lib/oci/log_analytics/models/query_details.rb +5 -5
  319. data/lib/oci/log_analytics/models/recall_archived_data_details.rb +5 -5
  320. data/lib/oci/log_analytics/models/release_recalled_data_details.rb +5 -5
  321. data/lib/oci/log_analytics/models/scope_filter.rb +1 -1
  322. data/lib/oci/log_analytics/models/source_validate_details.rb +1 -1
  323. data/lib/oci/log_analytics/models/source_validate_results.rb +1 -1
  324. data/lib/oci/log_analytics/models/storage.rb +2 -2
  325. data/lib/oci/log_analytics/models/storage_usage.rb +4 -4
  326. data/lib/oci/log_analytics/models/storage_work_request.rb +14 -14
  327. data/lib/oci/log_analytics/models/storage_work_request_collection.rb +2 -2
  328. data/lib/oci/log_analytics/models/storage_work_request_summary.rb +14 -14
  329. data/lib/oci/log_analytics/models/timezone_collection.rb +2 -2
  330. data/lib/oci/log_analytics/models/update_log_analytics_object_collection_rule_details.rb +3 -3
  331. data/lib/oci/log_analytics/models/update_storage_details.rb +1 -1
  332. data/lib/oci/log_analytics/models/upload.rb +1 -1
  333. data/lib/oci/log_analytics/models/upload_collection.rb +1 -1
  334. data/lib/oci/log_analytics/models/upload_file_collection.rb +1 -1
  335. data/lib/oci/log_analytics/models/upload_summary.rb +1 -1
  336. data/lib/oci/log_analytics/models/upload_warning_summary.rb +1 -1
  337. data/lib/oci/log_analytics/models/work_request_error_collection.rb +2 -2
  338. data/lib/oci/log_analytics/models/work_request_log.rb +3 -3
  339. data/lib/oci/log_analytics/models/work_request_log_collection.rb +2 -2
  340. data/lib/oci/logging/logging_management_client.rb +52 -52
  341. data/lib/oci/logging/logging_management_client_composite_operations.rb +128 -7
  342. data/lib/oci/logging/models/category.rb +4 -4
  343. data/lib/oci/logging/models/change_log_group_compartment_details.rb +2 -2
  344. data/lib/oci/logging/models/change_log_log_group_details.rb +1 -1
  345. data/lib/oci/logging/models/change_unified_agent_configuration_compartment_details.rb +2 -2
  346. data/lib/oci/logging/models/create_log_details.rb +3 -3
  347. data/lib/oci/logging/models/create_log_group_details.rb +1 -1
  348. data/lib/oci/logging/models/create_log_saved_search_details.rb +2 -16
  349. data/lib/oci/logging/models/create_unified_agent_configuration_details.rb +1 -1
  350. data/lib/oci/logging/models/grok_pattern.rb +6 -6
  351. data/lib/oci/logging/models/log.rb +5 -5
  352. data/lib/oci/logging/models/log_group.rb +3 -3
  353. data/lib/oci/logging/models/log_group_summary.rb +43 -5
  354. data/lib/oci/logging/models/log_included_search.rb +1 -1
  355. data/lib/oci/logging/models/log_included_search_summary.rb +1 -1
  356. data/lib/oci/logging/models/log_saved_search.rb +44 -19
  357. data/lib/oci/logging/models/log_saved_search_lifecycle_state.rb +5 -1
  358. data/lib/oci/logging/models/log_saved_search_summary.rb +63 -17
  359. data/lib/oci/logging/models/log_saved_search_summary_collection.rb +1 -1
  360. data/lib/oci/logging/models/log_summary.rb +4 -4
  361. data/lib/oci/logging/models/parameter.rb +2 -2
  362. data/lib/oci/logging/models/resource_type.rb +2 -2
  363. data/lib/oci/logging/models/service_summary.rb +6 -6
  364. data/lib/oci/logging/models/source.rb +1 -1
  365. data/lib/oci/logging/models/unified_agent_apache2_parser.rb +1 -1
  366. data/lib/oci/logging/models/unified_agent_apache_error_parser.rb +1 -1
  367. data/lib/oci/logging/models/unified_agent_configuration.rb +2 -2
  368. data/lib/oci/logging/models/unified_agent_configuration_collection.rb +1 -1
  369. data/lib/oci/logging/models/unified_agent_configuration_summary.rb +4 -4
  370. data/lib/oci/logging/models/unified_agent_csv_parser.rb +1 -1
  371. data/lib/oci/logging/models/unified_agent_grok_parser.rb +1 -1
  372. data/lib/oci/logging/models/unified_agent_logging_destination.rb +1 -1
  373. data/lib/oci/logging/models/unified_agent_logging_source.rb +2 -2
  374. data/lib/oci/logging/models/unified_agent_multiline_grok_parser.rb +1 -1
  375. data/lib/oci/logging/models/unified_agent_multiline_parser.rb +1 -1
  376. data/lib/oci/logging/models/unified_agent_none_parser.rb +1 -1
  377. data/lib/oci/logging/models/unified_agent_parser.rb +7 -7
  378. data/lib/oci/logging/models/unified_agent_regex_parser.rb +1 -1
  379. data/lib/oci/logging/models/unified_agent_service_configuration_details.rb +1 -1
  380. data/lib/oci/logging/models/unified_agent_syslog_parser.rb +1 -1
  381. data/lib/oci/logging/models/unified_agent_tail_log_source.rb +1 -1
  382. data/lib/oci/logging/models/unified_agent_tsv_parser.rb +1 -1
  383. data/lib/oci/logging/models/unified_agent_windows_event_source.rb +1 -1
  384. data/lib/oci/logging/models/unified_json_parser.rb +1 -1
  385. data/lib/oci/logging/models/update_configuration_details.rb +1 -1
  386. data/lib/oci/logging/models/update_log_details.rb +3 -3
  387. data/lib/oci/logging/models/update_log_group_details.rb +1 -1
  388. data/lib/oci/logging/models/update_log_saved_search_details.rb +2 -16
  389. data/lib/oci/logging/models/update_unified_agent_configuration_details.rb +2 -2
  390. data/lib/oci/logging/models/work_request.rb +2 -2
  391. data/lib/oci/logging/models/work_request_error.rb +3 -3
  392. data/lib/oci/logging/models/work_request_log.rb +1 -1
  393. data/lib/oci/logging/models/work_request_resource.rb +3 -3
  394. data/lib/oci/loggingingestion/logging_client.rb +3 -3
  395. data/lib/oci/loggingingestion/models/log_entry.rb +4 -5
  396. data/lib/oci/loggingingestion/models/log_entry_batch.rb +7 -7
  397. data/lib/oci/loggingsearch/log_search_client.rb +3 -3
  398. data/lib/oci/loggingsearch/models/field_info.rb +1 -1
  399. data/lib/oci/loggingsearch/models/search_logs_details.rb +2 -2
  400. data/lib/oci/loggingsearch/models/search_result.rb +2 -2
  401. data/lib/oci/management_dashboard/dashx_apis_client.rb +31 -32
  402. data/lib/oci/management_dashboard/models/change_management_dashboards_compartment_details.rb +2 -2
  403. data/lib/oci/management_dashboard/models/change_management_saved_searches_compartment_details.rb +2 -2
  404. data/lib/oci/management_dashboard/models/create_management_dashboard_details.rb +18 -18
  405. data/lib/oci/management_dashboard/models/create_management_saved_search_details.rb +15 -15
  406. data/lib/oci/management_dashboard/models/management_dashboard.rb +23 -23
  407. data/lib/oci/management_dashboard/models/management_dashboard_export_details.rb +1 -1
  408. data/lib/oci/management_dashboard/models/management_dashboard_for_import_export_details.rb +19 -19
  409. data/lib/oci/management_dashboard/models/management_dashboard_import_details.rb +1 -1
  410. data/lib/oci/management_dashboard/models/management_dashboard_summary.rb +14 -14
  411. data/lib/oci/management_dashboard/models/management_dashboard_tile_details.rb +14 -12
  412. data/lib/oci/management_dashboard/models/management_saved_search.rb +19 -19
  413. data/lib/oci/management_dashboard/models/management_saved_search_for_import_details.rb +15 -15
  414. data/lib/oci/management_dashboard/models/management_saved_search_summary.rb +46 -18
  415. data/lib/oci/management_dashboard/models/update_management_dashboard_details.rb +17 -17
  416. data/lib/oci/management_dashboard/models/update_management_saved_search_details.rb +15 -15
  417. data/lib/oci/mysql/db_system_client.rb +611 -2
  418. data/lib/oci/mysql/db_system_client_composite_operations.rb +345 -0
  419. data/lib/oci/mysql/models/add_analytics_cluster_details.rb +173 -0
  420. data/lib/oci/mysql/models/analytics_cluster.rb +282 -0
  421. data/lib/oci/mysql/models/analytics_cluster_memory_estimate.rb +236 -0
  422. data/lib/oci/mysql/models/analytics_cluster_memory_estimate_status.rb +15 -0
  423. data/lib/oci/mysql/models/analytics_cluster_node.rb +222 -0
  424. data/lib/oci/mysql/models/analytics_cluster_schema_memory_estimate.rb +172 -0
  425. data/lib/oci/mysql/models/analytics_cluster_summary.rb +215 -0
  426. data/lib/oci/mysql/models/analytics_cluster_table_memory_estimate.rb +236 -0
  427. data/lib/oci/mysql/models/db_system.rb +31 -1
  428. data/lib/oci/mysql/models/db_system_summary.rb +31 -1
  429. data/lib/oci/mysql/models/shape_summary.rb +46 -4
  430. data/lib/oci/mysql/models/update_analytics_cluster_details.rb +179 -0
  431. data/lib/oci/mysql/models/work_request.rb +7 -0
  432. data/lib/oci/mysql/models/work_request_operation_type.rb +8 -1
  433. data/lib/oci/mysql/models/work_request_summary.rb +7 -0
  434. data/lib/oci/mysql/mysql.rb +9 -0
  435. data/lib/oci/mysql/mysqlaas_client.rb +14 -0
  436. data/lib/oci/nosql/models/create_table_details.rb +15 -1
  437. data/lib/oci/nosql/models/table.rb +55 -4
  438. data/lib/oci/nosql/models/table_collection.rb +32 -4
  439. data/lib/oci/nosql/models/table_summary.rb +54 -4
  440. data/lib/oci/nosql/nosql_client.rb +6 -6
  441. data/lib/oci/object_storage/models/object_lifecycle_rule.rb +6 -0
  442. data/lib/oci/ocvp/models/create_esxi_host_details.rb +4 -2
  443. data/lib/oci/ocvp/models/create_sddc_details.rb +35 -3
  444. data/lib/oci/ocvp/models/sddc.rb +89 -1
  445. data/lib/oci/ocvp/models/sddc_summary.rb +29 -1
  446. data/lib/oci/ocvp/models/update_esxi_host_details.rb +3 -1
  447. data/lib/oci/ocvp/models/update_sddc_details.rb +17 -1
  448. data/lib/oci/opsi/models/database_details.rb +210 -0
  449. data/lib/oci/opsi/models/database_insight_summary.rb +286 -0
  450. data/lib/oci/opsi/models/database_insights.rb +154 -0
  451. data/lib/oci/opsi/models/database_insights_collection.rb +150 -0
  452. data/lib/oci/opsi/models/historical_data_item.rb +165 -0
  453. data/lib/oci/opsi/models/ingest_sql_bucket_details.rb +151 -0
  454. data/lib/oci/opsi/models/ingest_sql_bucket_response_details.rb +152 -0
  455. data/lib/oci/opsi/models/ingest_sql_plan_lines_details.rb +151 -0
  456. data/lib/oci/opsi/models/ingest_sql_plan_lines_response_details.rb +152 -0
  457. data/lib/oci/opsi/models/ingest_sql_text_details.rb +151 -0
  458. data/lib/oci/opsi/models/ingest_sql_text_response_details.rb +152 -0
  459. data/lib/oci/opsi/models/projected_data_item.rb +195 -0
  460. data/lib/oci/opsi/models/resource_capacity_trend_aggregation.rb +180 -0
  461. data/lib/oci/opsi/models/resource_insight_current_utilization.rb +160 -0
  462. data/lib/oci/opsi/models/resource_insight_projected_utilization.rb +160 -0
  463. data/lib/oci/opsi/models/resource_insight_projected_utilization_item.rb +164 -0
  464. data/lib/oci/opsi/models/resource_statistics.rb +219 -0
  465. data/lib/oci/opsi/models/resource_statistics_aggregation.rb +166 -0
  466. data/lib/oci/opsi/models/resource_usage_trend_aggregation.rb +176 -0
  467. data/lib/oci/opsi/models/sort_order.rb +11 -0
  468. data/lib/oci/opsi/models/sql_bucket.rb +307 -0
  469. data/lib/oci/opsi/models/sql_insight_aggregation.rb +202 -0
  470. data/lib/oci/opsi/models/sql_insight_aggregation_collection.rb +199 -0
  471. data/lib/oci/opsi/models/sql_insight_thresholds.rb +243 -0
  472. data/lib/oci/opsi/models/sql_inventory.rb +182 -0
  473. data/lib/oci/opsi/models/sql_plan_collection.rb +180 -0
  474. data/lib/oci/opsi/models/sql_plan_insight_aggregation.rb +210 -0
  475. data/lib/oci/opsi/models/sql_plan_insight_aggregation_collection.rb +218 -0
  476. data/lib/oci/opsi/models/sql_plan_insights.rb +177 -0
  477. data/lib/oci/opsi/models/sql_plan_line.rb +673 -0
  478. data/lib/oci/opsi/models/sql_plan_summary.rb +169 -0
  479. data/lib/oci/opsi/models/sql_response_time_distribution_aggregation.rb +168 -0
  480. data/lib/oci/opsi/models/sql_response_time_distribution_aggregation_collection.rb +208 -0
  481. data/lib/oci/opsi/models/sql_search_collection.rb +209 -0
  482. data/lib/oci/opsi/models/sql_search_summary.rb +224 -0
  483. data/lib/oci/opsi/models/sql_statistic_aggregation.rb +189 -0
  484. data/lib/oci/opsi/models/sql_statistic_aggregation_collection.rb +179 -0
  485. data/lib/oci/opsi/models/sql_statistics.rb +402 -0
  486. data/lib/oci/opsi/models/sql_statistics_time_series.rb +162 -0
  487. data/lib/oci/opsi/models/sql_statistics_time_series_aggregation.rb +165 -0
  488. data/lib/oci/opsi/models/sql_statistics_time_series_aggregation_collection.rb +223 -0
  489. data/lib/oci/opsi/models/sql_statistics_time_series_by_plan_aggregation.rb +165 -0
  490. data/lib/oci/opsi/models/sql_statistics_time_series_by_plan_aggregation_collection.rb +237 -0
  491. data/lib/oci/opsi/models/sql_text.rb +248 -0
  492. data/lib/oci/opsi/models/sql_text_collection.rb +151 -0
  493. data/lib/oci/opsi/models/sql_text_summary.rb +184 -0
  494. data/lib/oci/opsi/models/summarize_database_insight_resource_capacity_trend_aggregation_collection.rb +270 -0
  495. data/lib/oci/opsi/models/summarize_database_insight_resource_forecast_trend_aggregation.rb +302 -0
  496. data/lib/oci/opsi/models/summarize_database_insight_resource_statistics_aggregation_collection.rb +249 -0
  497. data/lib/oci/opsi/models/summarize_database_insight_resource_usage_aggregation.rb +275 -0
  498. data/lib/oci/opsi/models/summarize_database_insight_resource_usage_trend_aggregation_collection.rb +270 -0
  499. data/lib/oci/opsi/models/summarize_database_insight_resource_utilization_insight_aggregation.rb +232 -0
  500. data/lib/oci/opsi/models/usage_unit.rb +13 -0
  501. data/lib/oci/opsi/operations_insights_client.rb +2008 -0
  502. data/lib/oci/opsi/operations_insights_client_composite_operations.rb +25 -0
  503. data/lib/oci/opsi/opsi.rb +72 -0
  504. data/lib/oci/opsi/util.rb +3 -0
  505. data/lib/oci/optimizer/models/action.rb +192 -0
  506. data/lib/oci/optimizer/models/action_type.rb +10 -0
  507. data/lib/oci/optimizer/models/bulk_apply_recommendations_details.rb +197 -0
  508. data/lib/oci/optimizer/models/category.rb +298 -0
  509. data/lib/oci/optimizer/models/category_collection.rb +151 -0
  510. data/lib/oci/optimizer/models/category_summary.rb +298 -0
  511. data/lib/oci/optimizer/models/create_profile_details.rb +227 -0
  512. data/lib/oci/{log_analytics/models/log_analytics_summary.rb → optimizer/models/enrollment_status.rb} +81 -63
  513. data/lib/oci/optimizer/models/enrollment_status_collection.rb +151 -0
  514. data/lib/oci/optimizer/models/enrollment_status_summary.rb +279 -0
  515. data/lib/oci/optimizer/models/history_collection.rb +151 -0
  516. data/lib/oci/optimizer/models/history_summary.rb +429 -0
  517. data/lib/oci/optimizer/models/importance.rb +14 -0
  518. data/lib/oci/{log_analytics/models/field_map.rb → optimizer/models/level_configuration.rb} +19 -24
  519. data/lib/oci/optimizer/models/levels_configuration.rb +150 -0
  520. data/lib/oci/optimizer/models/lifecycle_state.rb +18 -0
  521. data/lib/oci/optimizer/models/operation_status.rb +15 -0
  522. data/lib/oci/optimizer/models/operation_type.rb +10 -0
  523. data/lib/oci/optimizer/models/optimizer_enrollment_status.rb +11 -0
  524. data/lib/oci/optimizer/models/profile.rb +305 -0
  525. data/lib/oci/optimizer/models/profile_collection.rb +151 -0
  526. data/lib/oci/optimizer/models/profile_summary.rb +303 -0
  527. data/lib/oci/optimizer/models/recommendation.rb +409 -0
  528. data/lib/oci/optimizer/models/recommendation_collection.rb +151 -0
  529. data/lib/oci/optimizer/models/recommendation_count.rb +183 -0
  530. data/lib/oci/optimizer/models/recommendation_summary.rb +409 -0
  531. data/lib/oci/optimizer/models/resource_action.rb +450 -0
  532. data/lib/oci/optimizer/models/resource_action_collection.rb +151 -0
  533. data/lib/oci/optimizer/models/resource_action_summary.rb +450 -0
  534. data/lib/oci/optimizer/models/resource_count.rb +182 -0
  535. data/lib/oci/optimizer/models/sort_order.rb +11 -0
  536. data/lib/oci/optimizer/models/status.rb +13 -0
  537. data/lib/oci/{log_analytics/models/agent_upload.rb → optimizer/models/supported_level.rb} +3 -3
  538. data/lib/oci/optimizer/models/supported_levels.rb +153 -0
  539. data/lib/oci/optimizer/models/update_enrollment_status_details.rb +166 -0
  540. data/lib/oci/optimizer/models/update_profile_details.rb +202 -0
  541. data/lib/oci/optimizer/models/update_recommendation_details.rb +183 -0
  542. data/lib/oci/optimizer/models/update_resource_action_details.rb +183 -0
  543. data/lib/oci/optimizer/models/work_request.rb +300 -0
  544. data/lib/oci/optimizer/models/work_request_action_type.rb +14 -0
  545. data/lib/oci/optimizer/models/work_request_collection.rb +151 -0
  546. data/lib/oci/optimizer/models/work_request_error.rb +173 -0
  547. data/lib/oci/optimizer/models/work_request_error_collection.rb +151 -0
  548. data/lib/oci/optimizer/models/work_request_log_entry.rb +161 -0
  549. data/lib/oci/optimizer/models/work_request_log_entry_collection.rb +151 -0
  550. data/lib/oci/{log_analytics/models/out_of_box_entity_type_details.rb → optimizer/models/work_request_resource.rb} +60 -57
  551. data/lib/oci/optimizer/optimizer.rb +66 -0
  552. data/lib/oci/optimizer/optimizer_client.rb +1652 -0
  553. data/lib/oci/optimizer/optimizer_client_composite_operations.rb +314 -0
  554. data/lib/oci/optimizer/util.rb +3 -0
  555. data/lib/oci/regions.rb +5 -1
  556. data/lib/oci/sch/models/service_connector.rb +1 -1
  557. data/lib/oci/sch/models/source_details.rb +1 -1
  558. data/lib/oci/sch/models/target_details.rb +1 -1
  559. data/lib/oci/sch/models/task_details.rb +1 -1
  560. data/lib/oci/sch/models/work_request.rb +1 -1
  561. data/lib/oci/sch/service_connector_client.rb +8 -8
  562. data/lib/oci/signer.rb +3 -1
  563. data/lib/oci/tenant_manager_control_plane/link_client.rb +287 -0
  564. data/lib/oci/tenant_manager_control_plane/link_client_composite_operations.rb +65 -0
  565. data/lib/oci/tenant_manager_control_plane/models/action_type.rb +14 -0
  566. data/lib/oci/tenant_manager_control_plane/models/create_sender_invitation_details.rb +228 -0
  567. data/lib/oci/tenant_manager_control_plane/models/lifecycle_state.rb +15 -0
  568. data/lib/oci/tenant_manager_control_plane/models/link.rb +258 -0
  569. data/lib/oci/tenant_manager_control_plane/models/link_collection.rb +150 -0
  570. data/lib/oci/tenant_manager_control_plane/models/link_summary.rb +258 -0
  571. data/lib/oci/tenant_manager_control_plane/models/operation_status.rb +15 -0
  572. data/lib/oci/tenant_manager_control_plane/models/operation_type.rb +12 -0
  573. data/lib/oci/tenant_manager_control_plane/models/recipient_invitation.rb +367 -0
  574. data/lib/oci/tenant_manager_control_plane/models/recipient_invitation_collection.rb +150 -0
  575. data/lib/oci/tenant_manager_control_plane/models/recipient_invitation_status.rb +15 -0
  576. data/lib/oci/tenant_manager_control_plane/models/recipient_invitation_summary.rb +367 -0
  577. data/lib/oci/tenant_manager_control_plane/models/sender_invitation.rb +366 -0
  578. data/lib/oci/tenant_manager_control_plane/models/sender_invitation_collection.rb +150 -0
  579. data/lib/oci/tenant_manager_control_plane/models/sender_invitation_status.rb +14 -0
  580. data/lib/oci/tenant_manager_control_plane/models/sender_invitation_summary.rb +366 -0
  581. data/lib/oci/tenant_manager_control_plane/models/sort_order.rb +11 -0
  582. data/lib/oci/tenant_manager_control_plane/models/update_recipient_invitation_details.rb +186 -0
  583. data/lib/oci/tenant_manager_control_plane/models/update_sender_invitation_details.rb +186 -0
  584. data/lib/oci/tenant_manager_control_plane/models/work_request.rb +307 -0
  585. data/lib/oci/tenant_manager_control_plane/models/work_request_collection.rb +150 -0
  586. data/lib/oci/tenant_manager_control_plane/models/work_request_error.rb +173 -0
  587. data/lib/oci/tenant_manager_control_plane/models/work_request_error_collection.rb +150 -0
  588. data/lib/oci/tenant_manager_control_plane/models/work_request_log_entry.rb +160 -0
  589. data/lib/oci/tenant_manager_control_plane/models/work_request_log_entry_collection.rb +150 -0
  590. data/lib/oci/tenant_manager_control_plane/models/work_request_resource.rb +219 -0
  591. data/lib/oci/tenant_manager_control_plane/models/work_request_summary.rb +307 -0
  592. data/lib/oci/tenant_manager_control_plane/recipient_invitation_client.rb +425 -0
  593. data/lib/oci/tenant_manager_control_plane/recipient_invitation_client_composite_operations.rb +153 -0
  594. data/lib/oci/tenant_manager_control_plane/sender_invitation_client.rb +435 -0
  595. data/lib/oci/tenant_manager_control_plane/sender_invitation_client_composite_operations.rb +163 -0
  596. data/lib/oci/tenant_manager_control_plane/tenant_manager_control_plane.rb +52 -0
  597. data/lib/oci/tenant_manager_control_plane/util.rb +3 -0
  598. data/lib/oci/tenant_manager_control_plane/work_request_client.rb +356 -0
  599. data/lib/oci/tenant_manager_control_plane/work_request_client_composite_operations.rb +25 -0
  600. data/lib/oci/usage_api/models/configuration.rb +3 -3
  601. data/lib/oci/usage_api/models/configuration_aggregation.rb +2 -2
  602. data/lib/oci/usage_api/models/dimension.rb +3 -3
  603. data/lib/oci/usage_api/models/filter.rb +1 -1
  604. data/lib/oci/usage_api/models/request_summarized_usages_details.rb +12 -12
  605. data/lib/oci/usage_api/models/tag.rb +3 -3
  606. data/lib/oci/usage_api/models/usage_aggregation.rb +1 -1
  607. data/lib/oci/usage_api/models/usage_summary.rb +47 -19
  608. data/lib/oci/usage_api/usageapi_client.rb +4 -4
  609. data/lib/oci/version.rb +1 -1
  610. metadata +273 -17
  611. data/lib/oci/log_analytics/models/attribute.rb +0 -435
@@ -0,0 +1,232 @@
1
+ # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2
+ # 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.
3
+
4
+ require 'date'
5
+ require 'logger'
6
+
7
+ # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
8
+ module OCI
9
+ # Insights response containing current/projected groups for storage or CPU.
10
+ #
11
+ class Opsi::Models::SummarizeDatabaseInsightResourceUtilizationInsightAggregation
12
+ RESOURCE_METRIC_ENUM = [
13
+ RESOURCE_METRIC_CPU = 'CPU'.freeze,
14
+ RESOURCE_METRIC_STORAGE = 'STORAGE'.freeze,
15
+ RESOURCE_METRIC_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
16
+ ].freeze
17
+
18
+ # **[Required]** The start timestamp that was passed into the request.
19
+ # @return [DateTime]
20
+ attr_accessor :time_interval_start
21
+
22
+ # **[Required]** The end timestamp that was passed into the request.
23
+ # @return [DateTime]
24
+ attr_accessor :time_interval_end
25
+
26
+ # **[Required]** Defines the type of resource metric (CPU, STORAGE)
27
+ #
28
+ # @return [String]
29
+ attr_reader :resource_metric
30
+
31
+ # This attribute is required.
32
+ # @return [OCI::Opsi::Models::ResourceInsightProjectedUtilization]
33
+ attr_accessor :projected_utilization
34
+
35
+ # This attribute is required.
36
+ # @return [OCI::Opsi::Models::ResourceInsightCurrentUtilization]
37
+ attr_accessor :current_utilization
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ # rubocop:disable Style/SymbolLiteral
43
+ 'time_interval_start': :'timeIntervalStart',
44
+ 'time_interval_end': :'timeIntervalEnd',
45
+ 'resource_metric': :'resourceMetric',
46
+ 'projected_utilization': :'projectedUtilization',
47
+ 'current_utilization': :'currentUtilization'
48
+ # rubocop:enable Style/SymbolLiteral
49
+ }
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.swagger_types
54
+ {
55
+ # rubocop:disable Style/SymbolLiteral
56
+ 'time_interval_start': :'DateTime',
57
+ 'time_interval_end': :'DateTime',
58
+ 'resource_metric': :'String',
59
+ 'projected_utilization': :'OCI::Opsi::Models::ResourceInsightProjectedUtilization',
60
+ 'current_utilization': :'OCI::Opsi::Models::ResourceInsightCurrentUtilization'
61
+ # rubocop:enable Style/SymbolLiteral
62
+ }
63
+ end
64
+
65
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
66
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
67
+
68
+
69
+ # Initializes the object
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ # @option attributes [DateTime] :time_interval_start The value to assign to the {#time_interval_start} property
72
+ # @option attributes [DateTime] :time_interval_end The value to assign to the {#time_interval_end} property
73
+ # @option attributes [String] :resource_metric The value to assign to the {#resource_metric} property
74
+ # @option attributes [OCI::Opsi::Models::ResourceInsightProjectedUtilization] :projected_utilization The value to assign to the {#projected_utilization} property
75
+ # @option attributes [OCI::Opsi::Models::ResourceInsightCurrentUtilization] :current_utilization The value to assign to the {#current_utilization} property
76
+ def initialize(attributes = {})
77
+ return unless attributes.is_a?(Hash)
78
+
79
+ # convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
81
+
82
+ self.time_interval_start = attributes[:'timeIntervalStart'] if attributes[:'timeIntervalStart']
83
+
84
+ raise 'You cannot provide both :timeIntervalStart and :time_interval_start' if attributes.key?(:'timeIntervalStart') && attributes.key?(:'time_interval_start')
85
+
86
+ self.time_interval_start = attributes[:'time_interval_start'] if attributes[:'time_interval_start']
87
+
88
+ self.time_interval_end = attributes[:'timeIntervalEnd'] if attributes[:'timeIntervalEnd']
89
+
90
+ raise 'You cannot provide both :timeIntervalEnd and :time_interval_end' if attributes.key?(:'timeIntervalEnd') && attributes.key?(:'time_interval_end')
91
+
92
+ self.time_interval_end = attributes[:'time_interval_end'] if attributes[:'time_interval_end']
93
+
94
+ self.resource_metric = attributes[:'resourceMetric'] if attributes[:'resourceMetric']
95
+
96
+ raise 'You cannot provide both :resourceMetric and :resource_metric' if attributes.key?(:'resourceMetric') && attributes.key?(:'resource_metric')
97
+
98
+ self.resource_metric = attributes[:'resource_metric'] if attributes[:'resource_metric']
99
+
100
+ self.projected_utilization = attributes[:'projectedUtilization'] if attributes[:'projectedUtilization']
101
+
102
+ raise 'You cannot provide both :projectedUtilization and :projected_utilization' if attributes.key?(:'projectedUtilization') && attributes.key?(:'projected_utilization')
103
+
104
+ self.projected_utilization = attributes[:'projected_utilization'] if attributes[:'projected_utilization']
105
+
106
+ self.current_utilization = attributes[:'currentUtilization'] if attributes[:'currentUtilization']
107
+
108
+ raise 'You cannot provide both :currentUtilization and :current_utilization' if attributes.key?(:'currentUtilization') && attributes.key?(:'current_utilization')
109
+
110
+ self.current_utilization = attributes[:'current_utilization'] if attributes[:'current_utilization']
111
+ end
112
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
113
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
114
+
115
+ # Custom attribute writer method checking allowed values (enum).
116
+ # @param [Object] resource_metric Object to be assigned
117
+ def resource_metric=(resource_metric)
118
+ # rubocop:disable Style/ConditionalAssignment
119
+ if resource_metric && !RESOURCE_METRIC_ENUM.include?(resource_metric)
120
+ OCI.logger.debug("Unknown value for 'resource_metric' [" + resource_metric + "]. Mapping to 'RESOURCE_METRIC_UNKNOWN_ENUM_VALUE'") if OCI.logger
121
+ @resource_metric = RESOURCE_METRIC_UNKNOWN_ENUM_VALUE
122
+ else
123
+ @resource_metric = resource_metric
124
+ end
125
+ # rubocop:enable Style/ConditionalAssignment
126
+ end
127
+
128
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
129
+
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param [Object] other the other object to be compared
133
+ def ==(other)
134
+ return true if equal?(other)
135
+
136
+ self.class == other.class &&
137
+ time_interval_start == other.time_interval_start &&
138
+ time_interval_end == other.time_interval_end &&
139
+ resource_metric == other.resource_metric &&
140
+ projected_utilization == other.projected_utilization &&
141
+ current_utilization == other.current_utilization
142
+ end
143
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
144
+
145
+ # @see the `==` method
146
+ # @param [Object] other the other object to be compared
147
+ def eql?(other)
148
+ self == other
149
+ end
150
+
151
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
152
+
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Fixnum] Hash code
156
+ def hash
157
+ [time_interval_start, time_interval_end, resource_metric, projected_utilization, current_utilization].hash
158
+ end
159
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
160
+
161
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
162
+
163
+
164
+ # Builds the object from hash
165
+ # @param [Hash] attributes Model attributes in the form of hash
166
+ # @return [Object] Returns the model itself
167
+ def build_from_hash(attributes)
168
+ return nil unless attributes.is_a?(Hash)
169
+
170
+ self.class.swagger_types.each_pair do |key, type|
171
+ if type =~ /^Array<(.*)>/i
172
+ # check to ensure the input is an array given that the the attribute
173
+ # is documented as an array but the input is not
174
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
175
+ public_method("#{key}=").call(
176
+ attributes[self.class.attribute_map[key]]
177
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
178
+ )
179
+ end
180
+ elsif !attributes[self.class.attribute_map[key]].nil?
181
+ public_method("#{key}=").call(
182
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
183
+ )
184
+ end
185
+ # or else data not found in attributes(hash), not an issue as the data can be optional
186
+ end
187
+
188
+ self
189
+ end
190
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ self.class.attribute_map.each_pair do |attr, param|
203
+ value = public_method(attr).call
204
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
205
+
206
+ hash[param] = _to_hash(value)
207
+ end
208
+ hash
209
+ end
210
+
211
+ private
212
+
213
+ # Outputs non-array value in the form of hash
214
+ # For object, use to_hash. Otherwise, just return the value
215
+ # @param [Object] value Any valid value
216
+ # @return [Hash] Returns the value in the form of hash
217
+ def _to_hash(value)
218
+ if value.is_a?(Array)
219
+ value.compact.map { |v| _to_hash(v) }
220
+ elsif value.is_a?(Hash)
221
+ {}.tap do |hash|
222
+ value.each { |k, v| hash[k] = _to_hash(v) }
223
+ end
224
+ elsif value.respond_to? :to_hash
225
+ value.to_hash
226
+ else
227
+ value
228
+ end
229
+ end
230
+ end
231
+ end
232
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -0,0 +1,13 @@
1
+ # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2
+ # 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.
3
+
4
+ module OCI
5
+ module Opsi::Models
6
+ USAGE_UNIT_ENUM = [
7
+ USAGE_UNIT_CORES = 'CORES'.freeze,
8
+ USAGE_UNIT_GB = 'GB'.freeze,
9
+ USAGE_UNIT_MBPS = 'MBPS'.freeze,
10
+ USAGE_UNIT_PERCENT = 'PERCENT'.freeze
11
+ ].freeze
12
+ end
13
+ end
@@ -0,0 +1,2008 @@
1
+ # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2
+ # 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.
3
+
4
+ require 'uri'
5
+ require 'logger'
6
+
7
+ # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
8
+ module OCI
9
+ # Use the Operations Insights API to perform data extraction operations to obtain database
10
+ # resource utilization, performance statistics, and reference information. For more information,
11
+ # see [About Oracle Cloud Infrastructure Operations Insights](https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html).
12
+ class Opsi::OperationsInsightsClient
13
+ # Client used to make HTTP requests.
14
+ # @return [OCI::ApiClient]
15
+ attr_reader :api_client
16
+
17
+ # Fully qualified endpoint URL
18
+ # @return [String]
19
+ attr_reader :endpoint
20
+
21
+ # The default retry configuration to apply to all operations in this service client. This can be overridden
22
+ # on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
23
+ # will not perform any retries
24
+ # @return [OCI::Retry::RetryConfig]
25
+ attr_reader :retry_config
26
+
27
+ # The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}.
28
+ # @return [String]
29
+ attr_reader :region
30
+
31
+ # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity
32
+
33
+
34
+ # Creates a new OperationsInsightsClient.
35
+ # Notes:
36
+ # If a config is not specified, then the global OCI.config will be used.
37
+ #
38
+ # This client is not thread-safe
39
+ #
40
+ # Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the
41
+ # region. A region may be specified in the config or via or the region parameter. If specified in both, then the
42
+ # region parameter will be used.
43
+ # @param [Config] config A Config object.
44
+ # @param [String] region A region used to determine the service endpoint. This will usually
45
+ # correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
46
+ # @param [String] endpoint The fully qualified endpoint URL
47
+ # @param [OCI::BaseSigner] signer A signer implementation which can be used by this client. If this is not provided then
48
+ # a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication,
49
+ # so that the instance principals signer can be provided to the client
50
+ # @param [OCI::ApiClientProxySettings] proxy_settings If your environment requires you to use a proxy server for outgoing HTTP requests
51
+ # the details for the proxy can be provided in this parameter
52
+ # @param [OCI::Retry::RetryConfig] retry_config The retry configuration for this service client. This represents the default retry configuration to
53
+ # apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
54
+ # will not perform any retries
55
+ def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
56
+ # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers)
57
+ # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
58
+ # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
59
+ # pass it to this constructor.
60
+ #
61
+ # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
62
+ # so try and load the config from the default file.
63
+ config = OCI::Config.validate_and_build_config_with_signer(config, signer)
64
+
65
+ signer = OCI::Signer.config_file_auth_builder(config) if signer.nil?
66
+
67
+ @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
68
+ @retry_config = retry_config
69
+
70
+ if endpoint
71
+ @endpoint = endpoint + '/20200630'
72
+ else
73
+ region ||= config.region
74
+ region ||= signer.region if signer.respond_to?(:region)
75
+ self.region = region
76
+ end
77
+ logger.info "OperationsInsightsClient endpoint set to '#{@endpoint}'." if logger
78
+ end
79
+ # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity
80
+
81
+ # Set the region that will be used to determine the service endpoint.
82
+ # This will usually correspond to a value in {OCI::Regions::REGION_ENUM},
83
+ # but may be an arbitrary string.
84
+ def region=(new_region)
85
+ @region = new_region
86
+
87
+ raise 'A region must be specified.' unless @region
88
+
89
+ @endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://operationsinsights.{region}.oci.{secondLevelDomain}') + '/20200630'
90
+ logger.info "OperationsInsightsClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
91
+ end
92
+
93
+ # @return [Logger] The logger for this client. May be nil.
94
+ def logger
95
+ @api_client.config.logger
96
+ end
97
+
98
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
99
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
100
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
101
+
102
+
103
+ # The sqlbucket endpoint takes in a JSON payload, persists it in Operations Insights ingest pipeline.
104
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
105
+ # @param [String] database_id Required [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
106
+ #
107
+ # @param [OCI::Opsi::Models::IngestSqlBucketDetails] ingest_sql_bucket_details Collection of SQL bucket objects for a particular database.
108
+ # @param [Hash] opts the optional parameters
109
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
110
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
111
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
112
+ # Oracle about a particular request, please provide the request ID.
113
+ #
114
+ # @option opts [String] :if_match Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match`
115
+ # parameter to the value of the etag from a previous get, create, or update response for that resource. The resource
116
+ # will be updated or deleted only if the etag you provide matches the resource's current etag value.
117
+ #
118
+ # @option opts [String] :opc_retry_token A token that uniquely identifies a request that can be retried in case of a timeout or
119
+ # server error without risk of executing the same action again. Retry tokens expire after 24
120
+ # hours.
121
+ #
122
+ # *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting
123
+ # operations, such as a resource being deleted or purged from the system.
124
+ #
125
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::IngestSqlBucketResponseDetails IngestSqlBucketResponseDetails}
126
+ def ingest_sql_bucket(compartment_id, database_id, ingest_sql_bucket_details, opts = {})
127
+ logger.debug 'Calling operation OperationsInsightsClient#ingest_sql_bucket.' if logger
128
+
129
+ raise "Missing the required parameter 'compartment_id' when calling ingest_sql_bucket." if compartment_id.nil?
130
+ raise "Missing the required parameter 'database_id' when calling ingest_sql_bucket." if database_id.nil?
131
+ raise "Missing the required parameter 'ingest_sql_bucket_details' when calling ingest_sql_bucket." if ingest_sql_bucket_details.nil?
132
+
133
+ path = '/databaseInsights/actions/ingestSqlBucket'
134
+ operation_signing_strategy = :standard
135
+
136
+ # rubocop:disable Style/NegatedIf
137
+ # Query Params
138
+ query_params = {}
139
+ query_params[:compartmentId] = compartment_id
140
+ query_params[:databaseId] = database_id
141
+
142
+ # Header Params
143
+ header_params = {}
144
+ header_params[:accept] = 'application/json'
145
+ header_params[:'content-type'] = 'application/json'
146
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
147
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
148
+ header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
149
+ # rubocop:enable Style/NegatedIf
150
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
151
+
152
+ post_body = @api_client.object_to_http_body(ingest_sql_bucket_details)
153
+
154
+ # rubocop:disable Metrics/BlockLength
155
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#ingest_sql_bucket') do
156
+ @api_client.call_api(
157
+ :POST,
158
+ path,
159
+ endpoint,
160
+ header_params: header_params,
161
+ query_params: query_params,
162
+ operation_signing_strategy: operation_signing_strategy,
163
+ body: post_body,
164
+ return_type: 'OCI::Opsi::Models::IngestSqlBucketResponseDetails'
165
+ )
166
+ end
167
+ # rubocop:enable Metrics/BlockLength
168
+ end
169
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
170
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
171
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
172
+
173
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
174
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
175
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
176
+
177
+
178
+ # The SqlPlanLines endpoint takes in a JSON payload, persists it in Operation Insights ingest pipeline.
179
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
180
+ # @param [String] database_id Required [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
181
+ #
182
+ # @param [OCI::Opsi::Models::IngestSqlPlanLinesDetails] ingest_sql_plan_lines_details Collection of SQL plan line objects for a particular database.
183
+ # @param [Hash] opts the optional parameters
184
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
185
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
186
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
187
+ # Oracle about a particular request, please provide the request ID.
188
+ #
189
+ # @option opts [String] :if_match Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match`
190
+ # parameter to the value of the etag from a previous get, create, or update response for that resource. The resource
191
+ # will be updated or deleted only if the etag you provide matches the resource's current etag value.
192
+ #
193
+ # @option opts [String] :opc_retry_token A token that uniquely identifies a request that can be retried in case of a timeout or
194
+ # server error without risk of executing the same action again. Retry tokens expire after 24
195
+ # hours.
196
+ #
197
+ # *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting
198
+ # operations, such as a resource being deleted or purged from the system.
199
+ #
200
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::IngestSqlPlanLinesResponseDetails IngestSqlPlanLinesResponseDetails}
201
+ def ingest_sql_plan_lines(compartment_id, database_id, ingest_sql_plan_lines_details, opts = {})
202
+ logger.debug 'Calling operation OperationsInsightsClient#ingest_sql_plan_lines.' if logger
203
+
204
+ raise "Missing the required parameter 'compartment_id' when calling ingest_sql_plan_lines." if compartment_id.nil?
205
+ raise "Missing the required parameter 'database_id' when calling ingest_sql_plan_lines." if database_id.nil?
206
+ raise "Missing the required parameter 'ingest_sql_plan_lines_details' when calling ingest_sql_plan_lines." if ingest_sql_plan_lines_details.nil?
207
+
208
+ path = '/databaseInsights/actions/ingestSqlPlanLines'
209
+ operation_signing_strategy = :standard
210
+
211
+ # rubocop:disable Style/NegatedIf
212
+ # Query Params
213
+ query_params = {}
214
+ query_params[:compartmentId] = compartment_id
215
+ query_params[:databaseId] = database_id
216
+
217
+ # Header Params
218
+ header_params = {}
219
+ header_params[:accept] = 'application/json'
220
+ header_params[:'content-type'] = 'application/json'
221
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
222
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
223
+ header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
224
+ # rubocop:enable Style/NegatedIf
225
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
226
+
227
+ post_body = @api_client.object_to_http_body(ingest_sql_plan_lines_details)
228
+
229
+ # rubocop:disable Metrics/BlockLength
230
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#ingest_sql_plan_lines') do
231
+ @api_client.call_api(
232
+ :POST,
233
+ path,
234
+ endpoint,
235
+ header_params: header_params,
236
+ query_params: query_params,
237
+ operation_signing_strategy: operation_signing_strategy,
238
+ body: post_body,
239
+ return_type: 'OCI::Opsi::Models::IngestSqlPlanLinesResponseDetails'
240
+ )
241
+ end
242
+ # rubocop:enable Metrics/BlockLength
243
+ end
244
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
245
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
246
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
247
+
248
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
249
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
250
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
251
+
252
+
253
+ # The SqlText endpoint takes in a JSON payload, persists it in Operation Insights ingest pipeline.
254
+ # Disclaimer: SQL text being uploaded explicitly via APIs is not masked. Any sensitive literals contained in the sqlFullText column should be masked prior to ingestion.
255
+ #
256
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
257
+ # @param [String] database_id Required [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
258
+ #
259
+ # @param [OCI::Opsi::Models::IngestSqlTextDetails] ingest_sql_text_details Collection of SQL text objects for a particular database.
260
+ # @param [Hash] opts the optional parameters
261
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
262
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
263
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
264
+ # Oracle about a particular request, please provide the request ID.
265
+ #
266
+ # @option opts [String] :if_match Used for optimistic concurrency control. In the update or delete call for a resource, set the `if-match`
267
+ # parameter to the value of the etag from a previous get, create, or update response for that resource. The resource
268
+ # will be updated or deleted only if the etag you provide matches the resource's current etag value.
269
+ #
270
+ # @option opts [String] :opc_retry_token A token that uniquely identifies a request that can be retried in case of a timeout or
271
+ # server error without risk of executing the same action again. Retry tokens expire after 24
272
+ # hours.
273
+ #
274
+ # *Note:* Retry tokens can be invalidated before the 24 hour time limit due to conflicting
275
+ # operations, such as a resource being deleted or purged from the system.
276
+ #
277
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::IngestSqlTextResponseDetails IngestSqlTextResponseDetails}
278
+ def ingest_sql_text(compartment_id, database_id, ingest_sql_text_details, opts = {})
279
+ logger.debug 'Calling operation OperationsInsightsClient#ingest_sql_text.' if logger
280
+
281
+ raise "Missing the required parameter 'compartment_id' when calling ingest_sql_text." if compartment_id.nil?
282
+ raise "Missing the required parameter 'database_id' when calling ingest_sql_text." if database_id.nil?
283
+ raise "Missing the required parameter 'ingest_sql_text_details' when calling ingest_sql_text." if ingest_sql_text_details.nil?
284
+
285
+ path = '/databaseInsights/actions/ingestSqlText'
286
+ operation_signing_strategy = :standard
287
+
288
+ # rubocop:disable Style/NegatedIf
289
+ # Query Params
290
+ query_params = {}
291
+ query_params[:compartmentId] = compartment_id
292
+ query_params[:databaseId] = database_id
293
+
294
+ # Header Params
295
+ header_params = {}
296
+ header_params[:accept] = 'application/json'
297
+ header_params[:'content-type'] = 'application/json'
298
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
299
+ header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
300
+ header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
301
+ # rubocop:enable Style/NegatedIf
302
+ header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
303
+
304
+ post_body = @api_client.object_to_http_body(ingest_sql_text_details)
305
+
306
+ # rubocop:disable Metrics/BlockLength
307
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#ingest_sql_text') do
308
+ @api_client.call_api(
309
+ :POST,
310
+ path,
311
+ endpoint,
312
+ header_params: header_params,
313
+ query_params: query_params,
314
+ operation_signing_strategy: operation_signing_strategy,
315
+ body: post_body,
316
+ return_type: 'OCI::Opsi::Models::IngestSqlTextResponseDetails'
317
+ )
318
+ end
319
+ # rubocop:enable Metrics/BlockLength
320
+ end
321
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
322
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
323
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
324
+
325
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
326
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
327
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
328
+
329
+
330
+ # Lists database insight resources
331
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
332
+ # @param [Hash] opts the optional parameters
333
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
334
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
335
+ # @option opts [Array<String>] :database_type Filter by one or more database type.
336
+ # Possible values are ADW-S, ATP-S, ADW-D, ATP-D
337
+ # (default to [])
338
+ # Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D
339
+ # @option opts [Array<String>] :database_id Optional list of database [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
340
+ # (default to [])
341
+ # @option opts [Array<String>] :fields Specifies the fields to return in a database summary response. By default all fields are returned if omitted.
342
+ # (default to [])
343
+ # Allowed values are: compartmentId, databaseName, databaseDisplayName, databaseType, databaseVersion, databaseHostNames, freeformTags, definedTags
344
+ # @option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to
345
+ # return in a paginated \"List\" call.
346
+ # For important details about how pagination works, see
347
+ # [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
348
+ # Example: `50`
349
+ # (default to 50)
350
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
351
+ # the previous \"List\" call. For important details about how pagination works,
352
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
353
+ #
354
+ # @option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`).
355
+ #
356
+ # @option opts [String] :sort_by Database insight list sort options. If `fields` parameter is selected, the `sortBy` parameter must be one of the fields specified.
357
+ #
358
+ # Allowed values are: databaseName, databaseDisplayName, databaseType
359
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
360
+ # Oracle about a particular request, please provide the request ID.
361
+ #
362
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::DatabaseInsightsCollection DatabaseInsightsCollection}
363
+ def list_database_insights(compartment_id, opts = {})
364
+ logger.debug 'Calling operation OperationsInsightsClient#list_database_insights.' if logger
365
+
366
+ raise "Missing the required parameter 'compartment_id' when calling list_database_insights." if compartment_id.nil?
367
+
368
+
369
+ database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D]
370
+ if opts[:database_type] && !opts[:database_type].empty?
371
+ opts[:database_type].each do |val_to_check|
372
+ unless database_type_allowable_values.include?(val_to_check)
373
+ raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D.'
374
+ end
375
+ end
376
+ end
377
+
378
+
379
+ fields_allowable_values = %w[compartmentId databaseName databaseDisplayName databaseType databaseVersion databaseHostNames freeformTags definedTags]
380
+ if opts[:fields] && !opts[:fields].empty?
381
+ opts[:fields].each do |val_to_check|
382
+ unless fields_allowable_values.include?(val_to_check)
383
+ raise 'Invalid value for "fields", must be one of compartmentId, databaseName, databaseDisplayName, databaseType, databaseVersion, databaseHostNames, freeformTags, definedTags.'
384
+ end
385
+ end
386
+ end
387
+
388
+ if opts[:sort_order] && !OCI::Opsi::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
389
+ raise 'Invalid value for "sort_order", must be one of the values in OCI::Opsi::Models::SORT_ORDER_ENUM.'
390
+ end
391
+
392
+ if opts[:sort_by] && !%w[databaseName databaseDisplayName databaseType].include?(opts[:sort_by])
393
+ raise 'Invalid value for "sort_by", must be one of databaseName, databaseDisplayName, databaseType.'
394
+ end
395
+
396
+ path = '/databaseInsights'
397
+ operation_signing_strategy = :standard
398
+
399
+ # rubocop:disable Style/NegatedIf
400
+ # Query Params
401
+ query_params = {}
402
+ query_params[:compartmentId] = compartment_id
403
+ query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
404
+ query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
405
+ query_params[:fields] = OCI::ApiClient.build_collection_params(opts[:fields], :multi) if opts[:fields] && !opts[:fields].empty?
406
+ query_params[:limit] = opts[:limit] if opts[:limit]
407
+ query_params[:page] = opts[:page] if opts[:page]
408
+ query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
409
+ query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
410
+
411
+ # Header Params
412
+ header_params = {}
413
+ header_params[:accept] = 'application/json'
414
+ header_params[:'content-type'] = 'application/json'
415
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
416
+ # rubocop:enable Style/NegatedIf
417
+
418
+ post_body = nil
419
+
420
+ # rubocop:disable Metrics/BlockLength
421
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#list_database_insights') do
422
+ @api_client.call_api(
423
+ :GET,
424
+ path,
425
+ endpoint,
426
+ header_params: header_params,
427
+ query_params: query_params,
428
+ operation_signing_strategy: operation_signing_strategy,
429
+ body: post_body,
430
+ return_type: 'OCI::Opsi::Models::DatabaseInsightsCollection'
431
+ )
432
+ end
433
+ # rubocop:enable Metrics/BlockLength
434
+ end
435
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
436
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
437
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
438
+
439
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
440
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
441
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
442
+
443
+
444
+ # Query SQL Warehouse to list the plan xml for a given SQL execution plan. This returns a SqlPlanCollection object, but is currently limited to a single plan.
445
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
446
+ # @param [String] database_id Required [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
447
+ #
448
+ # @param [String] sql_identifier Unique SQL_ID for a SQL Statement.
449
+ # Example: `6rgjh9bjmy2s7`
450
+ #
451
+ # @param [Array<Integer>] plan_hash Unique plan hash for a SQL Plan of a particular SQL Statement.
452
+ # Example: `9820154385`
453
+ #
454
+ # @param [Hash] opts the optional parameters
455
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
456
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
457
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
458
+ # the previous \"List\" call. For important details about how pagination works,
459
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
460
+ #
461
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
462
+ # Oracle about a particular request, please provide the request ID.
463
+ #
464
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SqlPlanCollection SqlPlanCollection}
465
+ def list_sql_plans(compartment_id, database_id, sql_identifier, plan_hash, opts = {})
466
+ logger.debug 'Calling operation OperationsInsightsClient#list_sql_plans.' if logger
467
+
468
+ raise "Missing the required parameter 'compartment_id' when calling list_sql_plans." if compartment_id.nil?
469
+ raise "Missing the required parameter 'database_id' when calling list_sql_plans." if database_id.nil?
470
+ raise "Missing the required parameter 'sql_identifier' when calling list_sql_plans." if sql_identifier.nil?
471
+ raise "Missing the required parameter 'plan_hash' when calling list_sql_plans." if plan_hash.nil?
472
+
473
+ path = '/databaseInsights/sqlPlans'
474
+ operation_signing_strategy = :standard
475
+
476
+ # rubocop:disable Style/NegatedIf
477
+ # Query Params
478
+ query_params = {}
479
+ query_params[:compartmentId] = compartment_id
480
+ query_params[:databaseId] = database_id
481
+ query_params[:sqlIdentifier] = sql_identifier
482
+ query_params[:planHash] = OCI::ApiClient.build_collection_params(plan_hash, :multi)
483
+ query_params[:page] = opts[:page] if opts[:page]
484
+
485
+ # Header Params
486
+ header_params = {}
487
+ header_params[:accept] = 'application/json'
488
+ header_params[:'content-type'] = 'application/json'
489
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
490
+ # rubocop:enable Style/NegatedIf
491
+
492
+ post_body = nil
493
+
494
+ # rubocop:disable Metrics/BlockLength
495
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#list_sql_plans') do
496
+ @api_client.call_api(
497
+ :GET,
498
+ path,
499
+ endpoint,
500
+ header_params: header_params,
501
+ query_params: query_params,
502
+ operation_signing_strategy: operation_signing_strategy,
503
+ body: post_body,
504
+ return_type: 'OCI::Opsi::Models::SqlPlanCollection'
505
+ )
506
+ end
507
+ # rubocop:enable Metrics/BlockLength
508
+ end
509
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
510
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
511
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
512
+
513
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
514
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
515
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
516
+
517
+
518
+ # Search SQL by SQL Identifier across databases and get the SQL Text and the details of the databases executing the SQL for a given time period.
519
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
520
+ # @param [String] sql_identifier Unique SQL_ID for a SQL Statement.
521
+ # Example: `6rgjh9bjmy2s7`
522
+ #
523
+ # @param [Hash] opts the optional parameters
524
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
525
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
526
+ # @option opts [String] :analysis_time_interval Specify time period in ISO 8601 format with respect to current time.
527
+ # Default is last 30 days represented by P30D.
528
+ # If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored.
529
+ # Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).
530
+ # (default to P30D)
531
+ # @option opts [DateTime] :time_interval_start Analysis start time in UTC in ISO 8601 format(inclusive).
532
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
533
+ # The minimum allowed value is 2 years prior to the current day.
534
+ # timeIntervalStart and timeIntervalEnd parameters are used together.
535
+ # If analysisTimeInterval is specified, this parameter is ignored.
536
+ #
537
+ # @option opts [DateTime] :time_interval_end Analysis end time in UTC in ISO 8601 format(exclusive).
538
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
539
+ # timeIntervalStart and timeIntervalEnd are used together.
540
+ # If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.
541
+ #
542
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
543
+ # the previous \"List\" call. For important details about how pagination works,
544
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
545
+ #
546
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
547
+ # Oracle about a particular request, please provide the request ID.
548
+ #
549
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SqlSearchCollection SqlSearchCollection}
550
+ def list_sql_searches(compartment_id, sql_identifier, opts = {})
551
+ logger.debug 'Calling operation OperationsInsightsClient#list_sql_searches.' if logger
552
+
553
+ raise "Missing the required parameter 'compartment_id' when calling list_sql_searches." if compartment_id.nil?
554
+ raise "Missing the required parameter 'sql_identifier' when calling list_sql_searches." if sql_identifier.nil?
555
+
556
+ path = '/databaseInsights/sqlSearches'
557
+ operation_signing_strategy = :standard
558
+
559
+ # rubocop:disable Style/NegatedIf
560
+ # Query Params
561
+ query_params = {}
562
+ query_params[:compartmentId] = compartment_id
563
+ query_params[:sqlIdentifier] = sql_identifier
564
+ query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
565
+ query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
566
+ query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
567
+ query_params[:page] = opts[:page] if opts[:page]
568
+
569
+ # Header Params
570
+ header_params = {}
571
+ header_params[:accept] = 'application/json'
572
+ header_params[:'content-type'] = 'application/json'
573
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
574
+ # rubocop:enable Style/NegatedIf
575
+
576
+ post_body = nil
577
+
578
+ # rubocop:disable Metrics/BlockLength
579
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#list_sql_searches') do
580
+ @api_client.call_api(
581
+ :GET,
582
+ path,
583
+ endpoint,
584
+ header_params: header_params,
585
+ query_params: query_params,
586
+ operation_signing_strategy: operation_signing_strategy,
587
+ body: post_body,
588
+ return_type: 'OCI::Opsi::Models::SqlSearchCollection'
589
+ )
590
+ end
591
+ # rubocop:enable Metrics/BlockLength
592
+ end
593
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
594
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
595
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
596
+
597
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
598
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
599
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
600
+
601
+
602
+ # Query SQL Warehouse to get the full SQL Text for a SQL.
603
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
604
+ # @param [Array<String>] sql_identifier One or more unique SQL_IDs for a SQL Statement.
605
+ # Example: `6rgjh9bjmy2s7`
606
+ #
607
+ # @param [Hash] opts the optional parameters
608
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
609
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
610
+ # @option opts [Array<String>] :database_id Optional list of database [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
611
+ # (default to [])
612
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
613
+ # the previous \"List\" call. For important details about how pagination works,
614
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
615
+ #
616
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
617
+ # Oracle about a particular request, please provide the request ID.
618
+ #
619
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SqlTextCollection SqlTextCollection}
620
+ def list_sql_texts(compartment_id, sql_identifier, opts = {})
621
+ logger.debug 'Calling operation OperationsInsightsClient#list_sql_texts.' if logger
622
+
623
+ raise "Missing the required parameter 'compartment_id' when calling list_sql_texts." if compartment_id.nil?
624
+ raise "Missing the required parameter 'sql_identifier' when calling list_sql_texts." if sql_identifier.nil?
625
+
626
+ path = '/databaseInsights/sqlTexts'
627
+ operation_signing_strategy = :standard
628
+
629
+ # rubocop:disable Style/NegatedIf
630
+ # Query Params
631
+ query_params = {}
632
+ query_params[:compartmentId] = compartment_id
633
+ query_params[:sqlIdentifier] = OCI::ApiClient.build_collection_params(sql_identifier, :multi)
634
+ query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
635
+ query_params[:page] = opts[:page] if opts[:page]
636
+
637
+ # Header Params
638
+ header_params = {}
639
+ header_params[:accept] = 'application/json'
640
+ header_params[:'content-type'] = 'application/json'
641
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
642
+ # rubocop:enable Style/NegatedIf
643
+
644
+ post_body = nil
645
+
646
+ # rubocop:disable Metrics/BlockLength
647
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#list_sql_texts') do
648
+ @api_client.call_api(
649
+ :GET,
650
+ path,
651
+ endpoint,
652
+ header_params: header_params,
653
+ query_params: query_params,
654
+ operation_signing_strategy: operation_signing_strategy,
655
+ body: post_body,
656
+ return_type: 'OCI::Opsi::Models::SqlTextCollection'
657
+ )
658
+ end
659
+ # rubocop:enable Metrics/BlockLength
660
+ end
661
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
662
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
663
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
664
+
665
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
666
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
667
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
668
+
669
+
670
+ # Returns response with time series data (endTimestamp, capacity, baseCapacity) for the time period specified.
671
+ # The maximum time range for analysis is 2 years, hence this is intentionally not paginated.
672
+ #
673
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
674
+ # @param [String] resource_metric Filter by resource metric.
675
+ # Supported values are CPU and STORAGE.
676
+ #
677
+ # @param [Hash] opts the optional parameters
678
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
679
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
680
+ # @option opts [String] :analysis_time_interval Specify time period in ISO 8601 format with respect to current time.
681
+ # Default is last 30 days represented by P30D.
682
+ # If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored.
683
+ # Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).
684
+ # (default to P30D)
685
+ # @option opts [DateTime] :time_interval_start Analysis start time in UTC in ISO 8601 format(inclusive).
686
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
687
+ # The minimum allowed value is 2 years prior to the current day.
688
+ # timeIntervalStart and timeIntervalEnd parameters are used together.
689
+ # If analysisTimeInterval is specified, this parameter is ignored.
690
+ #
691
+ # @option opts [DateTime] :time_interval_end Analysis end time in UTC in ISO 8601 format(exclusive).
692
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
693
+ # timeIntervalStart and timeIntervalEnd are used together.
694
+ # If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.
695
+ #
696
+ # @option opts [Array<String>] :database_type Filter by one or more database type.
697
+ # Possible values are ADW-S, ATP-S, ADW-D, ATP-D
698
+ # (default to [])
699
+ # Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D
700
+ # @option opts [Array<String>] :database_id Optional list of database [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
701
+ # (default to [])
702
+ # @option opts [String] :utilization_level Filter by utilization level by the following buckets:
703
+ # - HIGH_UTILIZATION: DBs with utilization greater or equal than 75.
704
+ # - LOW_UTILIZATION: DBs with utilization lower than 25.
705
+ # - MEDIUM_HIGH_UTILIZATION: DBs with utilization greater or equal than 50 but lower than 75.
706
+ # - MEDIUM_LOW_UTILIZATION: DBs with utilization greater or equal than 25 but lower than 50.
707
+ #
708
+ # Allowed values are: HIGH_UTILIZATION, LOW_UTILIZATION, MEDIUM_HIGH_UTILIZATION, MEDIUM_LOW_UTILIZATION
709
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
710
+ # the previous \"List\" call. For important details about how pagination works,
711
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
712
+ #
713
+ # @option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`).
714
+ #
715
+ # @option opts [String] :sort_by Sorts using end timestamp , capacity or baseCapacity
716
+ # (default to endTimestamp)
717
+ # Allowed values are: endTimestamp, capacity, baseCapacity
718
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
719
+ # Oracle about a particular request, please provide the request ID.
720
+ #
721
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection}
722
+ def summarize_database_insight_resource_capacity_trend(compartment_id, resource_metric, opts = {})
723
+ logger.debug 'Calling operation OperationsInsightsClient#summarize_database_insight_resource_capacity_trend.' if logger
724
+
725
+ raise "Missing the required parameter 'compartment_id' when calling summarize_database_insight_resource_capacity_trend." if compartment_id.nil?
726
+ raise "Missing the required parameter 'resource_metric' when calling summarize_database_insight_resource_capacity_trend." if resource_metric.nil?
727
+
728
+
729
+ database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D]
730
+ if opts[:database_type] && !opts[:database_type].empty?
731
+ opts[:database_type].each do |val_to_check|
732
+ unless database_type_allowable_values.include?(val_to_check)
733
+ raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D.'
734
+ end
735
+ end
736
+ end
737
+
738
+ if opts[:utilization_level] && !%w[HIGH_UTILIZATION LOW_UTILIZATION MEDIUM_HIGH_UTILIZATION MEDIUM_LOW_UTILIZATION].include?(opts[:utilization_level])
739
+ raise 'Invalid value for "utilization_level", must be one of HIGH_UTILIZATION, LOW_UTILIZATION, MEDIUM_HIGH_UTILIZATION, MEDIUM_LOW_UTILIZATION.'
740
+ end
741
+
742
+ if opts[:sort_order] && !OCI::Opsi::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
743
+ raise 'Invalid value for "sort_order", must be one of the values in OCI::Opsi::Models::SORT_ORDER_ENUM.'
744
+ end
745
+
746
+ if opts[:sort_by] && !%w[endTimestamp capacity baseCapacity].include?(opts[:sort_by])
747
+ raise 'Invalid value for "sort_by", must be one of endTimestamp, capacity, baseCapacity.'
748
+ end
749
+
750
+ path = '/databaseInsights/resourceCapacityTrend'
751
+ operation_signing_strategy = :standard
752
+
753
+ # rubocop:disable Style/NegatedIf
754
+ # Query Params
755
+ query_params = {}
756
+ query_params[:compartmentId] = compartment_id
757
+ query_params[:resourceMetric] = resource_metric
758
+ query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
759
+ query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
760
+ query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
761
+ query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
762
+ query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
763
+ query_params[:utilizationLevel] = opts[:utilization_level] if opts[:utilization_level]
764
+ query_params[:page] = opts[:page] if opts[:page]
765
+ query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
766
+ query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
767
+
768
+ # Header Params
769
+ header_params = {}
770
+ header_params[:accept] = 'application/json'
771
+ header_params[:'content-type'] = 'application/json'
772
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
773
+ # rubocop:enable Style/NegatedIf
774
+
775
+ post_body = nil
776
+
777
+ # rubocop:disable Metrics/BlockLength
778
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_database_insight_resource_capacity_trend') do
779
+ @api_client.call_api(
780
+ :GET,
781
+ path,
782
+ endpoint,
783
+ header_params: header_params,
784
+ query_params: query_params,
785
+ operation_signing_strategy: operation_signing_strategy,
786
+ body: post_body,
787
+ return_type: 'OCI::Opsi::Models::SummarizeDatabaseInsightResourceCapacityTrendAggregationCollection'
788
+ )
789
+ end
790
+ # rubocop:enable Metrics/BlockLength
791
+ end
792
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
793
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
794
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
795
+
796
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
797
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
798
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
799
+
800
+
801
+ # Get Forecast predictions for CPU and Storage resources since a time in the past.
802
+ #
803
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
804
+ # @param [String] resource_metric Filter by resource metric.
805
+ # Supported values are CPU and STORAGE.
806
+ #
807
+ # @param [Hash] opts the optional parameters
808
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
809
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
810
+ # @option opts [String] :analysis_time_interval Specify time period in ISO 8601 format with respect to current time.
811
+ # Default is last 30 days represented by P30D.
812
+ # If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored.
813
+ # Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).
814
+ # (default to P30D)
815
+ # @option opts [DateTime] :time_interval_start Analysis start time in UTC in ISO 8601 format(inclusive).
816
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
817
+ # The minimum allowed value is 2 years prior to the current day.
818
+ # timeIntervalStart and timeIntervalEnd parameters are used together.
819
+ # If analysisTimeInterval is specified, this parameter is ignored.
820
+ #
821
+ # @option opts [DateTime] :time_interval_end Analysis end time in UTC in ISO 8601 format(exclusive).
822
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
823
+ # timeIntervalStart and timeIntervalEnd are used together.
824
+ # If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.
825
+ #
826
+ # @option opts [Array<String>] :database_type Filter by one or more database type.
827
+ # Possible values are ADW-S, ATP-S, ADW-D, ATP-D
828
+ # (default to [])
829
+ # Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D
830
+ # @option opts [Array<String>] :database_id Optional list of database [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
831
+ # (default to [])
832
+ # @option opts [String] :statistic Choose the type of statistic metric data to be used for forecasting. (default to AVG)
833
+ # Allowed values are: AVG, MAX
834
+ # @option opts [Integer] :forecast_days Number of days used for utilization forecast analysis.
835
+ # (default to 30)
836
+ # @option opts [String] :forecast_model Choose algorithm model for the forecasting.
837
+ # Possible values:
838
+ # - LINEAR: Uses linear regression algorithm for forecasting.
839
+ # - ML_AUTO: Automatically detects best algorithm to use for forecasting.
840
+ # - ML_NO_AUTO: Automatically detects seasonality of the data for forecasting using linear or seasonal algorithm.
841
+ # (default to ML_NO_AUTO)
842
+ # Allowed values are: LINEAR, ML_AUTO, ML_NO_AUTO
843
+ # @option opts [String] :utilization_level Filter by utilization level by the following buckets:
844
+ # - HIGH_UTILIZATION: DBs with utilization greater or equal than 75.
845
+ # - LOW_UTILIZATION: DBs with utilization lower than 25.
846
+ # - MEDIUM_HIGH_UTILIZATION: DBs with utilization greater or equal than 50 but lower than 75.
847
+ # - MEDIUM_LOW_UTILIZATION: DBs with utilization greater or equal than 25 but lower than 50.
848
+ #
849
+ # Allowed values are: HIGH_UTILIZATION, LOW_UTILIZATION, MEDIUM_HIGH_UTILIZATION, MEDIUM_LOW_UTILIZATION
850
+ # @option opts [Integer] :confidence This parameter is used to change data's confidence level, this data is ingested by the
851
+ # forecast algorithm.
852
+ # Confidence is the probability of an interval to contain the expected population parameter.
853
+ # Manipulation of this value will lead to different results.
854
+ # If not set, default confidence value is 95%.
855
+ # (default to 95)
856
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
857
+ # the previous \"List\" call. For important details about how pagination works,
858
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
859
+ #
860
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
861
+ # Oracle about a particular request, please provide the request ID.
862
+ #
863
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SummarizeDatabaseInsightResourceForecastTrendAggregation SummarizeDatabaseInsightResourceForecastTrendAggregation}
864
+ def summarize_database_insight_resource_forecast_trend(compartment_id, resource_metric, opts = {})
865
+ logger.debug 'Calling operation OperationsInsightsClient#summarize_database_insight_resource_forecast_trend.' if logger
866
+
867
+ raise "Missing the required parameter 'compartment_id' when calling summarize_database_insight_resource_forecast_trend." if compartment_id.nil?
868
+ raise "Missing the required parameter 'resource_metric' when calling summarize_database_insight_resource_forecast_trend." if resource_metric.nil?
869
+
870
+
871
+ database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D]
872
+ if opts[:database_type] && !opts[:database_type].empty?
873
+ opts[:database_type].each do |val_to_check|
874
+ unless database_type_allowable_values.include?(val_to_check)
875
+ raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D.'
876
+ end
877
+ end
878
+ end
879
+
880
+ if opts[:statistic] && !%w[AVG MAX].include?(opts[:statistic])
881
+ raise 'Invalid value for "statistic", must be one of AVG, MAX.'
882
+ end
883
+
884
+ if opts[:forecast_model] && !%w[LINEAR ML_AUTO ML_NO_AUTO].include?(opts[:forecast_model])
885
+ raise 'Invalid value for "forecast_model", must be one of LINEAR, ML_AUTO, ML_NO_AUTO.'
886
+ end
887
+
888
+ if opts[:utilization_level] && !%w[HIGH_UTILIZATION LOW_UTILIZATION MEDIUM_HIGH_UTILIZATION MEDIUM_LOW_UTILIZATION].include?(opts[:utilization_level])
889
+ raise 'Invalid value for "utilization_level", must be one of HIGH_UTILIZATION, LOW_UTILIZATION, MEDIUM_HIGH_UTILIZATION, MEDIUM_LOW_UTILIZATION.'
890
+ end
891
+
892
+ path = '/databaseInsights/resourceForecastTrend'
893
+ operation_signing_strategy = :standard
894
+
895
+ # rubocop:disable Style/NegatedIf
896
+ # Query Params
897
+ query_params = {}
898
+ query_params[:compartmentId] = compartment_id
899
+ query_params[:resourceMetric] = resource_metric
900
+ query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
901
+ query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
902
+ query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
903
+ query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
904
+ query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
905
+ query_params[:statistic] = opts[:statistic] if opts[:statistic]
906
+ query_params[:forecastDays] = opts[:forecast_days] if opts[:forecast_days]
907
+ query_params[:forecastModel] = opts[:forecast_model] if opts[:forecast_model]
908
+ query_params[:utilizationLevel] = opts[:utilization_level] if opts[:utilization_level]
909
+ query_params[:confidence] = opts[:confidence] if opts[:confidence]
910
+ query_params[:page] = opts[:page] if opts[:page]
911
+
912
+ # Header Params
913
+ header_params = {}
914
+ header_params[:accept] = 'application/json'
915
+ header_params[:'content-type'] = 'application/json'
916
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
917
+ # rubocop:enable Style/NegatedIf
918
+
919
+ post_body = nil
920
+
921
+ # rubocop:disable Metrics/BlockLength
922
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_database_insight_resource_forecast_trend') do
923
+ @api_client.call_api(
924
+ :GET,
925
+ path,
926
+ endpoint,
927
+ header_params: header_params,
928
+ query_params: query_params,
929
+ operation_signing_strategy: operation_signing_strategy,
930
+ body: post_body,
931
+ return_type: 'OCI::Opsi::Models::SummarizeDatabaseInsightResourceForecastTrendAggregation'
932
+ )
933
+ end
934
+ # rubocop:enable Metrics/BlockLength
935
+ end
936
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
937
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
938
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
939
+
940
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
941
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
942
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
943
+
944
+
945
+ # Lists the Resource statistics (usage,capacity, usage change percent, utilization percent, base capacity, isAutoScalingEnabled) for each database filtered by utilization level
946
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
947
+ # @param [String] resource_metric Filter by resource metric.
948
+ # Supported values are CPU and STORAGE.
949
+ #
950
+ # @param [Hash] opts the optional parameters
951
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
952
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
953
+ # @option opts [String] :analysis_time_interval Specify time period in ISO 8601 format with respect to current time.
954
+ # Default is last 30 days represented by P30D.
955
+ # If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored.
956
+ # Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).
957
+ # (default to P30D)
958
+ # @option opts [DateTime] :time_interval_start Analysis start time in UTC in ISO 8601 format(inclusive).
959
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
960
+ # The minimum allowed value is 2 years prior to the current day.
961
+ # timeIntervalStart and timeIntervalEnd parameters are used together.
962
+ # If analysisTimeInterval is specified, this parameter is ignored.
963
+ #
964
+ # @option opts [DateTime] :time_interval_end Analysis end time in UTC in ISO 8601 format(exclusive).
965
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
966
+ # timeIntervalStart and timeIntervalEnd are used together.
967
+ # If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.
968
+ #
969
+ # @option opts [Array<String>] :database_type Filter by one or more database type.
970
+ # Possible values are ADW-S, ATP-S, ADW-D, ATP-D
971
+ # (default to [])
972
+ # Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D
973
+ # @option opts [Array<String>] :database_id Optional list of database [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
974
+ # (default to [])
975
+ # @option opts [Integer] :percentile Percentile values of daily usage to be used for computing the aggregate resource usage.
976
+ # (default to 90)
977
+ # @option opts [String] :insight_by Return data of a specific insight
978
+ # Possible values are High Utilization, Low Utilization, Any ,High Utilization Forecast,
979
+ # Low Utilization Forecast
980
+ # (default to [ANY])
981
+ # @option opts [Integer] :forecast_days Number of days used for utilization forecast analysis.
982
+ # (default to 30)
983
+ # @option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to
984
+ # return in a paginated \"List\" call.
985
+ # For important details about how pagination works, see
986
+ # [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
987
+ # Example: `50`
988
+ # (default to 50)
989
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
990
+ # the previous \"List\" call. For important details about how pagination works,
991
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
992
+ #
993
+ # @option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`).
994
+ #
995
+ # @option opts [String] :sort_by The order in which resource statistics records are listed
996
+ # (default to utilizationPercent)
997
+ # Allowed values are: utilizationPercent, usage, usageChangePercent, databaseName, databaseType
998
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
999
+ # Oracle about a particular request, please provide the request ID.
1000
+ #
1001
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SummarizeDatabaseInsightResourceStatisticsAggregationCollection SummarizeDatabaseInsightResourceStatisticsAggregationCollection}
1002
+ def summarize_database_insight_resource_statistics(compartment_id, resource_metric, opts = {})
1003
+ logger.debug 'Calling operation OperationsInsightsClient#summarize_database_insight_resource_statistics.' if logger
1004
+
1005
+ raise "Missing the required parameter 'compartment_id' when calling summarize_database_insight_resource_statistics." if compartment_id.nil?
1006
+ raise "Missing the required parameter 'resource_metric' when calling summarize_database_insight_resource_statistics." if resource_metric.nil?
1007
+
1008
+
1009
+ database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D]
1010
+ if opts[:database_type] && !opts[:database_type].empty?
1011
+ opts[:database_type].each do |val_to_check|
1012
+ unless database_type_allowable_values.include?(val_to_check)
1013
+ raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D.'
1014
+ end
1015
+ end
1016
+ end
1017
+
1018
+ if opts[:sort_order] && !OCI::Opsi::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
1019
+ raise 'Invalid value for "sort_order", must be one of the values in OCI::Opsi::Models::SORT_ORDER_ENUM.'
1020
+ end
1021
+
1022
+ if opts[:sort_by] && !%w[utilizationPercent usage usageChangePercent databaseName databaseType].include?(opts[:sort_by])
1023
+ raise 'Invalid value for "sort_by", must be one of utilizationPercent, usage, usageChangePercent, databaseName, databaseType.'
1024
+ end
1025
+
1026
+ path = '/databaseInsights/resourceStatistics'
1027
+ operation_signing_strategy = :standard
1028
+
1029
+ # rubocop:disable Style/NegatedIf
1030
+ # Query Params
1031
+ query_params = {}
1032
+ query_params[:compartmentId] = compartment_id
1033
+ query_params[:resourceMetric] = resource_metric
1034
+ query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
1035
+ query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
1036
+ query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
1037
+ query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
1038
+ query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
1039
+ query_params[:percentile] = opts[:percentile] if opts[:percentile]
1040
+ query_params[:insightBy] = opts[:insight_by] if opts[:insight_by]
1041
+ query_params[:forecastDays] = opts[:forecast_days] if opts[:forecast_days]
1042
+ query_params[:limit] = opts[:limit] if opts[:limit]
1043
+ query_params[:page] = opts[:page] if opts[:page]
1044
+ query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
1045
+ query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
1046
+
1047
+ # Header Params
1048
+ header_params = {}
1049
+ header_params[:accept] = 'application/json'
1050
+ header_params[:'content-type'] = 'application/json'
1051
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
1052
+ # rubocop:enable Style/NegatedIf
1053
+
1054
+ post_body = nil
1055
+
1056
+ # rubocop:disable Metrics/BlockLength
1057
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_database_insight_resource_statistics') do
1058
+ @api_client.call_api(
1059
+ :GET,
1060
+ path,
1061
+ endpoint,
1062
+ header_params: header_params,
1063
+ query_params: query_params,
1064
+ operation_signing_strategy: operation_signing_strategy,
1065
+ body: post_body,
1066
+ return_type: 'OCI::Opsi::Models::SummarizeDatabaseInsightResourceStatisticsAggregationCollection'
1067
+ )
1068
+ end
1069
+ # rubocop:enable Metrics/BlockLength
1070
+ end
1071
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1072
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1073
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1074
+
1075
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1076
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1077
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1078
+
1079
+
1080
+ # A cumulative distribution function is used to rank the usage data points per database within the specified time period.
1081
+ # For each database, the minimum data point with a ranking > the percentile value is included in the summation.
1082
+ # Linear regression functions are used to calculate the usage change percentage.
1083
+ #
1084
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
1085
+ # @param [String] resource_metric Filter by resource metric.
1086
+ # Supported values are CPU and STORAGE.
1087
+ #
1088
+ # @param [Hash] opts the optional parameters
1089
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1090
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1091
+ # @option opts [String] :analysis_time_interval Specify time period in ISO 8601 format with respect to current time.
1092
+ # Default is last 30 days represented by P30D.
1093
+ # If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored.
1094
+ # Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).
1095
+ # (default to P30D)
1096
+ # @option opts [DateTime] :time_interval_start Analysis start time in UTC in ISO 8601 format(inclusive).
1097
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1098
+ # The minimum allowed value is 2 years prior to the current day.
1099
+ # timeIntervalStart and timeIntervalEnd parameters are used together.
1100
+ # If analysisTimeInterval is specified, this parameter is ignored.
1101
+ #
1102
+ # @option opts [DateTime] :time_interval_end Analysis end time in UTC in ISO 8601 format(exclusive).
1103
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1104
+ # timeIntervalStart and timeIntervalEnd are used together.
1105
+ # If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.
1106
+ #
1107
+ # @option opts [Array<String>] :database_type Filter by one or more database type.
1108
+ # Possible values are ADW-S, ATP-S, ADW-D, ATP-D
1109
+ # (default to [])
1110
+ # Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D
1111
+ # @option opts [Array<String>] :database_id Optional list of database [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
1112
+ # (default to [])
1113
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
1114
+ # the previous \"List\" call. For important details about how pagination works,
1115
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
1116
+ #
1117
+ # @option opts [Integer] :percentile Percentile values of daily usage to be used for computing the aggregate resource usage.
1118
+ # (default to 90)
1119
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
1120
+ # Oracle about a particular request, please provide the request ID.
1121
+ #
1122
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SummarizeDatabaseInsightResourceUsageAggregation SummarizeDatabaseInsightResourceUsageAggregation}
1123
+ def summarize_database_insight_resource_usage(compartment_id, resource_metric, opts = {})
1124
+ logger.debug 'Calling operation OperationsInsightsClient#summarize_database_insight_resource_usage.' if logger
1125
+
1126
+ raise "Missing the required parameter 'compartment_id' when calling summarize_database_insight_resource_usage." if compartment_id.nil?
1127
+ raise "Missing the required parameter 'resource_metric' when calling summarize_database_insight_resource_usage." if resource_metric.nil?
1128
+
1129
+
1130
+ database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D]
1131
+ if opts[:database_type] && !opts[:database_type].empty?
1132
+ opts[:database_type].each do |val_to_check|
1133
+ unless database_type_allowable_values.include?(val_to_check)
1134
+ raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D.'
1135
+ end
1136
+ end
1137
+ end
1138
+
1139
+ path = '/databaseInsights/resourceUsageSummary'
1140
+ operation_signing_strategy = :standard
1141
+
1142
+ # rubocop:disable Style/NegatedIf
1143
+ # Query Params
1144
+ query_params = {}
1145
+ query_params[:compartmentId] = compartment_id
1146
+ query_params[:resourceMetric] = resource_metric
1147
+ query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
1148
+ query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
1149
+ query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
1150
+ query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
1151
+ query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
1152
+ query_params[:page] = opts[:page] if opts[:page]
1153
+ query_params[:percentile] = opts[:percentile] if opts[:percentile]
1154
+
1155
+ # Header Params
1156
+ header_params = {}
1157
+ header_params[:accept] = 'application/json'
1158
+ header_params[:'content-type'] = 'application/json'
1159
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
1160
+ # rubocop:enable Style/NegatedIf
1161
+
1162
+ post_body = nil
1163
+
1164
+ # rubocop:disable Metrics/BlockLength
1165
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_database_insight_resource_usage') do
1166
+ @api_client.call_api(
1167
+ :GET,
1168
+ path,
1169
+ endpoint,
1170
+ header_params: header_params,
1171
+ query_params: query_params,
1172
+ operation_signing_strategy: operation_signing_strategy,
1173
+ body: post_body,
1174
+ return_type: 'OCI::Opsi::Models::SummarizeDatabaseInsightResourceUsageAggregation'
1175
+ )
1176
+ end
1177
+ # rubocop:enable Metrics/BlockLength
1178
+ end
1179
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1180
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1181
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1182
+
1183
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1184
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1185
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1186
+
1187
+
1188
+ # Returns response with time series data (endTimestamp, usage, capacity) for the time period specified.
1189
+ # The maximum time range for analysis is 2 years, hence this is intentionally not paginated.
1190
+ #
1191
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
1192
+ # @param [String] resource_metric Filter by resource metric.
1193
+ # Supported values are CPU and STORAGE.
1194
+ #
1195
+ # @param [Hash] opts the optional parameters
1196
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1197
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1198
+ # @option opts [String] :analysis_time_interval Specify time period in ISO 8601 format with respect to current time.
1199
+ # Default is last 30 days represented by P30D.
1200
+ # If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored.
1201
+ # Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).
1202
+ # (default to P30D)
1203
+ # @option opts [DateTime] :time_interval_start Analysis start time in UTC in ISO 8601 format(inclusive).
1204
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1205
+ # The minimum allowed value is 2 years prior to the current day.
1206
+ # timeIntervalStart and timeIntervalEnd parameters are used together.
1207
+ # If analysisTimeInterval is specified, this parameter is ignored.
1208
+ #
1209
+ # @option opts [DateTime] :time_interval_end Analysis end time in UTC in ISO 8601 format(exclusive).
1210
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1211
+ # timeIntervalStart and timeIntervalEnd are used together.
1212
+ # If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.
1213
+ #
1214
+ # @option opts [Array<String>] :database_type Filter by one or more database type.
1215
+ # Possible values are ADW-S, ATP-S, ADW-D, ATP-D
1216
+ # (default to [])
1217
+ # Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D
1218
+ # @option opts [Array<String>] :database_id Optional list of database [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
1219
+ # (default to [])
1220
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
1221
+ # the previous \"List\" call. For important details about how pagination works,
1222
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
1223
+ #
1224
+ # @option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`).
1225
+ #
1226
+ # @option opts [String] :sort_by Sorts using end timestamp, usage or capacity
1227
+ # (default to endTimestamp)
1228
+ # Allowed values are: endTimestamp, usage, capacity
1229
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
1230
+ # Oracle about a particular request, please provide the request ID.
1231
+ #
1232
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SummarizeDatabaseInsightResourceUsageTrendAggregationCollection SummarizeDatabaseInsightResourceUsageTrendAggregationCollection}
1233
+ def summarize_database_insight_resource_usage_trend(compartment_id, resource_metric, opts = {})
1234
+ logger.debug 'Calling operation OperationsInsightsClient#summarize_database_insight_resource_usage_trend.' if logger
1235
+
1236
+ raise "Missing the required parameter 'compartment_id' when calling summarize_database_insight_resource_usage_trend." if compartment_id.nil?
1237
+ raise "Missing the required parameter 'resource_metric' when calling summarize_database_insight_resource_usage_trend." if resource_metric.nil?
1238
+
1239
+
1240
+ database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D]
1241
+ if opts[:database_type] && !opts[:database_type].empty?
1242
+ opts[:database_type].each do |val_to_check|
1243
+ unless database_type_allowable_values.include?(val_to_check)
1244
+ raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D.'
1245
+ end
1246
+ end
1247
+ end
1248
+
1249
+ if opts[:sort_order] && !OCI::Opsi::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
1250
+ raise 'Invalid value for "sort_order", must be one of the values in OCI::Opsi::Models::SORT_ORDER_ENUM.'
1251
+ end
1252
+
1253
+ if opts[:sort_by] && !%w[endTimestamp usage capacity].include?(opts[:sort_by])
1254
+ raise 'Invalid value for "sort_by", must be one of endTimestamp, usage, capacity.'
1255
+ end
1256
+
1257
+ path = '/databaseInsights/resourceUsageTrend'
1258
+ operation_signing_strategy = :standard
1259
+
1260
+ # rubocop:disable Style/NegatedIf
1261
+ # Query Params
1262
+ query_params = {}
1263
+ query_params[:compartmentId] = compartment_id
1264
+ query_params[:resourceMetric] = resource_metric
1265
+ query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
1266
+ query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
1267
+ query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
1268
+ query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
1269
+ query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
1270
+ query_params[:page] = opts[:page] if opts[:page]
1271
+ query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
1272
+ query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
1273
+
1274
+ # Header Params
1275
+ header_params = {}
1276
+ header_params[:accept] = 'application/json'
1277
+ header_params[:'content-type'] = 'application/json'
1278
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
1279
+ # rubocop:enable Style/NegatedIf
1280
+
1281
+ post_body = nil
1282
+
1283
+ # rubocop:disable Metrics/BlockLength
1284
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_database_insight_resource_usage_trend') do
1285
+ @api_client.call_api(
1286
+ :GET,
1287
+ path,
1288
+ endpoint,
1289
+ header_params: header_params,
1290
+ query_params: query_params,
1291
+ operation_signing_strategy: operation_signing_strategy,
1292
+ body: post_body,
1293
+ return_type: 'OCI::Opsi::Models::SummarizeDatabaseInsightResourceUsageTrendAggregationCollection'
1294
+ )
1295
+ end
1296
+ # rubocop:enable Metrics/BlockLength
1297
+ end
1298
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1299
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1300
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1301
+
1302
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1303
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1304
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1305
+
1306
+
1307
+ # Gets resources with current utilization (high and low) and projected utilization (high and low) for a resource type over specified time period.
1308
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
1309
+ # @param [String] resource_metric Filter by resource metric.
1310
+ # Supported values are CPU and STORAGE.
1311
+ #
1312
+ # @param [Hash] opts the optional parameters
1313
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1314
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1315
+ # @option opts [String] :analysis_time_interval Specify time period in ISO 8601 format with respect to current time.
1316
+ # Default is last 30 days represented by P30D.
1317
+ # If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored.
1318
+ # Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).
1319
+ # (default to P30D)
1320
+ # @option opts [DateTime] :time_interval_start Analysis start time in UTC in ISO 8601 format(inclusive).
1321
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1322
+ # The minimum allowed value is 2 years prior to the current day.
1323
+ # timeIntervalStart and timeIntervalEnd parameters are used together.
1324
+ # If analysisTimeInterval is specified, this parameter is ignored.
1325
+ #
1326
+ # @option opts [DateTime] :time_interval_end Analysis end time in UTC in ISO 8601 format(exclusive).
1327
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1328
+ # timeIntervalStart and timeIntervalEnd are used together.
1329
+ # If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.
1330
+ #
1331
+ # @option opts [Array<String>] :database_type Filter by one or more database type.
1332
+ # Possible values are ADW-S, ATP-S, ADW-D, ATP-D
1333
+ # (default to [])
1334
+ # Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D
1335
+ # @option opts [Array<String>] :database_id Optional list of database [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
1336
+ # (default to [])
1337
+ # @option opts [Integer] :forecast_days Number of days used for utilization forecast analysis.
1338
+ # (default to 30)
1339
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
1340
+ # the previous \"List\" call. For important details about how pagination works,
1341
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
1342
+ #
1343
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
1344
+ # Oracle about a particular request, please provide the request ID.
1345
+ #
1346
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SummarizeDatabaseInsightResourceUtilizationInsightAggregation SummarizeDatabaseInsightResourceUtilizationInsightAggregation}
1347
+ def summarize_database_insight_resource_utilization_insight(compartment_id, resource_metric, opts = {})
1348
+ logger.debug 'Calling operation OperationsInsightsClient#summarize_database_insight_resource_utilization_insight.' if logger
1349
+
1350
+ raise "Missing the required parameter 'compartment_id' when calling summarize_database_insight_resource_utilization_insight." if compartment_id.nil?
1351
+ raise "Missing the required parameter 'resource_metric' when calling summarize_database_insight_resource_utilization_insight." if resource_metric.nil?
1352
+
1353
+
1354
+ database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D]
1355
+ if opts[:database_type] && !opts[:database_type].empty?
1356
+ opts[:database_type].each do |val_to_check|
1357
+ unless database_type_allowable_values.include?(val_to_check)
1358
+ raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D.'
1359
+ end
1360
+ end
1361
+ end
1362
+
1363
+ path = '/databaseInsights/resourceUtilizationInsight'
1364
+ operation_signing_strategy = :standard
1365
+
1366
+ # rubocop:disable Style/NegatedIf
1367
+ # Query Params
1368
+ query_params = {}
1369
+ query_params[:compartmentId] = compartment_id
1370
+ query_params[:resourceMetric] = resource_metric
1371
+ query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
1372
+ query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
1373
+ query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
1374
+ query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
1375
+ query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
1376
+ query_params[:forecastDays] = opts[:forecast_days] if opts[:forecast_days]
1377
+ query_params[:page] = opts[:page] if opts[:page]
1378
+
1379
+ # Header Params
1380
+ header_params = {}
1381
+ header_params[:accept] = 'application/json'
1382
+ header_params[:'content-type'] = 'application/json'
1383
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
1384
+ # rubocop:enable Style/NegatedIf
1385
+
1386
+ post_body = nil
1387
+
1388
+ # rubocop:disable Metrics/BlockLength
1389
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_database_insight_resource_utilization_insight') do
1390
+ @api_client.call_api(
1391
+ :GET,
1392
+ path,
1393
+ endpoint,
1394
+ header_params: header_params,
1395
+ query_params: query_params,
1396
+ operation_signing_strategy: operation_signing_strategy,
1397
+ body: post_body,
1398
+ return_type: 'OCI::Opsi::Models::SummarizeDatabaseInsightResourceUtilizationInsightAggregation'
1399
+ )
1400
+ end
1401
+ # rubocop:enable Metrics/BlockLength
1402
+ end
1403
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1404
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1405
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1406
+
1407
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1408
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1409
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1410
+
1411
+
1412
+ # Query SQL Warehouse to get the performance insights for SQLs taking greater than X% database time for a given time period across the given databases or database types.
1413
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
1414
+ # @param [Hash] opts the optional parameters
1415
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1416
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1417
+ # @option opts [Array<String>] :database_type Filter by one or more database type.
1418
+ # Possible values are ADW-S, ATP-S, ADW-D, ATP-D
1419
+ # (default to [])
1420
+ # Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D
1421
+ # @option opts [Array<String>] :database_id Optional list of database [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
1422
+ # (default to [])
1423
+ # @option opts [Float] :database_time_pct_greater_than Filter sqls by percentage of db time.
1424
+ # (default to 1)
1425
+ # @option opts [String] :analysis_time_interval Specify time period in ISO 8601 format with respect to current time.
1426
+ # Default is last 30 days represented by P30D.
1427
+ # If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored.
1428
+ # Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).
1429
+ # (default to P30D)
1430
+ # @option opts [DateTime] :time_interval_start Analysis start time in UTC in ISO 8601 format(inclusive).
1431
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1432
+ # The minimum allowed value is 2 years prior to the current day.
1433
+ # timeIntervalStart and timeIntervalEnd parameters are used together.
1434
+ # If analysisTimeInterval is specified, this parameter is ignored.
1435
+ #
1436
+ # @option opts [DateTime] :time_interval_end Analysis end time in UTC in ISO 8601 format(exclusive).
1437
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1438
+ # timeIntervalStart and timeIntervalEnd are used together.
1439
+ # If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.
1440
+ #
1441
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
1442
+ # the previous \"List\" call. For important details about how pagination works,
1443
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
1444
+ #
1445
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
1446
+ # Oracle about a particular request, please provide the request ID.
1447
+ #
1448
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SqlInsightAggregationCollection SqlInsightAggregationCollection}
1449
+ def summarize_sql_insights(compartment_id, opts = {})
1450
+ logger.debug 'Calling operation OperationsInsightsClient#summarize_sql_insights.' if logger
1451
+
1452
+ raise "Missing the required parameter 'compartment_id' when calling summarize_sql_insights." if compartment_id.nil?
1453
+
1454
+
1455
+ database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D]
1456
+ if opts[:database_type] && !opts[:database_type].empty?
1457
+ opts[:database_type].each do |val_to_check|
1458
+ unless database_type_allowable_values.include?(val_to_check)
1459
+ raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D.'
1460
+ end
1461
+ end
1462
+ end
1463
+
1464
+ path = '/databaseInsights/sqlInsights'
1465
+ operation_signing_strategy = :standard
1466
+
1467
+ # rubocop:disable Style/NegatedIf
1468
+ # Query Params
1469
+ query_params = {}
1470
+ query_params[:compartmentId] = compartment_id
1471
+ query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
1472
+ query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
1473
+ query_params[:databaseTimePctGreaterThan] = opts[:database_time_pct_greater_than] if opts[:database_time_pct_greater_than]
1474
+ query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
1475
+ query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
1476
+ query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
1477
+ query_params[:page] = opts[:page] if opts[:page]
1478
+
1479
+ # Header Params
1480
+ header_params = {}
1481
+ header_params[:accept] = 'application/json'
1482
+ header_params[:'content-type'] = 'application/json'
1483
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
1484
+ # rubocop:enable Style/NegatedIf
1485
+
1486
+ post_body = nil
1487
+
1488
+ # rubocop:disable Metrics/BlockLength
1489
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_sql_insights') do
1490
+ @api_client.call_api(
1491
+ :GET,
1492
+ path,
1493
+ endpoint,
1494
+ header_params: header_params,
1495
+ query_params: query_params,
1496
+ operation_signing_strategy: operation_signing_strategy,
1497
+ body: post_body,
1498
+ return_type: 'OCI::Opsi::Models::SqlInsightAggregationCollection'
1499
+ )
1500
+ end
1501
+ # rubocop:enable Metrics/BlockLength
1502
+ end
1503
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1504
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1505
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1506
+
1507
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1508
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1509
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1510
+
1511
+
1512
+ # Query SQL Warehouse to get the performance insights on the execution plans for a given SQL for a given time period.
1513
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
1514
+ # @param [String] database_id Required [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
1515
+ #
1516
+ # @param [String] sql_identifier Unique SQL_ID for a SQL Statement.
1517
+ # Example: `6rgjh9bjmy2s7`
1518
+ #
1519
+ # @param [Hash] opts the optional parameters
1520
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1521
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1522
+ # @option opts [String] :analysis_time_interval Specify time period in ISO 8601 format with respect to current time.
1523
+ # Default is last 30 days represented by P30D.
1524
+ # If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored.
1525
+ # Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).
1526
+ # (default to P30D)
1527
+ # @option opts [DateTime] :time_interval_start Analysis start time in UTC in ISO 8601 format(inclusive).
1528
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1529
+ # The minimum allowed value is 2 years prior to the current day.
1530
+ # timeIntervalStart and timeIntervalEnd parameters are used together.
1531
+ # If analysisTimeInterval is specified, this parameter is ignored.
1532
+ #
1533
+ # @option opts [DateTime] :time_interval_end Analysis end time in UTC in ISO 8601 format(exclusive).
1534
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1535
+ # timeIntervalStart and timeIntervalEnd are used together.
1536
+ # If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.
1537
+ #
1538
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
1539
+ # the previous \"List\" call. For important details about how pagination works,
1540
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
1541
+ #
1542
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
1543
+ # Oracle about a particular request, please provide the request ID.
1544
+ #
1545
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SqlPlanInsightAggregationCollection SqlPlanInsightAggregationCollection}
1546
+ def summarize_sql_plan_insights(compartment_id, database_id, sql_identifier, opts = {})
1547
+ logger.debug 'Calling operation OperationsInsightsClient#summarize_sql_plan_insights.' if logger
1548
+
1549
+ raise "Missing the required parameter 'compartment_id' when calling summarize_sql_plan_insights." if compartment_id.nil?
1550
+ raise "Missing the required parameter 'database_id' when calling summarize_sql_plan_insights." if database_id.nil?
1551
+ raise "Missing the required parameter 'sql_identifier' when calling summarize_sql_plan_insights." if sql_identifier.nil?
1552
+
1553
+ path = '/databaseInsights/sqlPlanInsights'
1554
+ operation_signing_strategy = :standard
1555
+
1556
+ # rubocop:disable Style/NegatedIf
1557
+ # Query Params
1558
+ query_params = {}
1559
+ query_params[:compartmentId] = compartment_id
1560
+ query_params[:databaseId] = database_id
1561
+ query_params[:sqlIdentifier] = sql_identifier
1562
+ query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
1563
+ query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
1564
+ query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
1565
+ query_params[:page] = opts[:page] if opts[:page]
1566
+
1567
+ # Header Params
1568
+ header_params = {}
1569
+ header_params[:accept] = 'application/json'
1570
+ header_params[:'content-type'] = 'application/json'
1571
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
1572
+ # rubocop:enable Style/NegatedIf
1573
+
1574
+ post_body = nil
1575
+
1576
+ # rubocop:disable Metrics/BlockLength
1577
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_sql_plan_insights') do
1578
+ @api_client.call_api(
1579
+ :GET,
1580
+ path,
1581
+ endpoint,
1582
+ header_params: header_params,
1583
+ query_params: query_params,
1584
+ operation_signing_strategy: operation_signing_strategy,
1585
+ body: post_body,
1586
+ return_type: 'OCI::Opsi::Models::SqlPlanInsightAggregationCollection'
1587
+ )
1588
+ end
1589
+ # rubocop:enable Metrics/BlockLength
1590
+ end
1591
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1592
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1593
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1594
+
1595
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1596
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1597
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1598
+
1599
+
1600
+ # Query SQL Warehouse to summarize the response time distribution of query executions for a given SQL for a given time period.
1601
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
1602
+ # @param [String] database_id Required [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
1603
+ #
1604
+ # @param [String] sql_identifier Unique SQL_ID for a SQL Statement.
1605
+ # Example: `6rgjh9bjmy2s7`
1606
+ #
1607
+ # @param [Hash] opts the optional parameters
1608
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1609
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1610
+ # @option opts [String] :analysis_time_interval Specify time period in ISO 8601 format with respect to current time.
1611
+ # Default is last 30 days represented by P30D.
1612
+ # If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored.
1613
+ # Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).
1614
+ # (default to P30D)
1615
+ # @option opts [DateTime] :time_interval_start Analysis start time in UTC in ISO 8601 format(inclusive).
1616
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1617
+ # The minimum allowed value is 2 years prior to the current day.
1618
+ # timeIntervalStart and timeIntervalEnd parameters are used together.
1619
+ # If analysisTimeInterval is specified, this parameter is ignored.
1620
+ #
1621
+ # @option opts [DateTime] :time_interval_end Analysis end time in UTC in ISO 8601 format(exclusive).
1622
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1623
+ # timeIntervalStart and timeIntervalEnd are used together.
1624
+ # If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.
1625
+ #
1626
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
1627
+ # the previous \"List\" call. For important details about how pagination works,
1628
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
1629
+ #
1630
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
1631
+ # Oracle about a particular request, please provide the request ID.
1632
+ #
1633
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SqlResponseTimeDistributionAggregationCollection SqlResponseTimeDistributionAggregationCollection}
1634
+ def summarize_sql_response_time_distributions(compartment_id, database_id, sql_identifier, opts = {})
1635
+ logger.debug 'Calling operation OperationsInsightsClient#summarize_sql_response_time_distributions.' if logger
1636
+
1637
+ raise "Missing the required parameter 'compartment_id' when calling summarize_sql_response_time_distributions." if compartment_id.nil?
1638
+ raise "Missing the required parameter 'database_id' when calling summarize_sql_response_time_distributions." if database_id.nil?
1639
+ raise "Missing the required parameter 'sql_identifier' when calling summarize_sql_response_time_distributions." if sql_identifier.nil?
1640
+
1641
+ path = '/databaseInsights/sqlResponseTimeDistributions'
1642
+ operation_signing_strategy = :standard
1643
+
1644
+ # rubocop:disable Style/NegatedIf
1645
+ # Query Params
1646
+ query_params = {}
1647
+ query_params[:compartmentId] = compartment_id
1648
+ query_params[:databaseId] = database_id
1649
+ query_params[:sqlIdentifier] = sql_identifier
1650
+ query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
1651
+ query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
1652
+ query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
1653
+ query_params[:page] = opts[:page] if opts[:page]
1654
+
1655
+ # Header Params
1656
+ header_params = {}
1657
+ header_params[:accept] = 'application/json'
1658
+ header_params[:'content-type'] = 'application/json'
1659
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
1660
+ # rubocop:enable Style/NegatedIf
1661
+
1662
+ post_body = nil
1663
+
1664
+ # rubocop:disable Metrics/BlockLength
1665
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_sql_response_time_distributions') do
1666
+ @api_client.call_api(
1667
+ :GET,
1668
+ path,
1669
+ endpoint,
1670
+ header_params: header_params,
1671
+ query_params: query_params,
1672
+ operation_signing_strategy: operation_signing_strategy,
1673
+ body: post_body,
1674
+ return_type: 'OCI::Opsi::Models::SqlResponseTimeDistributionAggregationCollection'
1675
+ )
1676
+ end
1677
+ # rubocop:enable Metrics/BlockLength
1678
+ end
1679
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1680
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1681
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1682
+
1683
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1684
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1685
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1686
+
1687
+
1688
+ # Query SQL Warehouse to get the performance statistics for SQLs taking greater than X% database time for a given time period across the given databases or database types.
1689
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
1690
+ # @param [Hash] opts the optional parameters
1691
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1692
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1693
+ # @option opts [Array<String>] :database_type Filter by one or more database type.
1694
+ # Possible values are ADW-S, ATP-S, ADW-D, ATP-D
1695
+ # (default to [])
1696
+ # Allowed values are: ADW-S, ATP-S, ADW-D, ATP-D
1697
+ # @option opts [Array<String>] :database_id Optional list of database [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
1698
+ # (default to [])
1699
+ # @option opts [Float] :database_time_pct_greater_than Filter sqls by percentage of db time.
1700
+ # (default to 1)
1701
+ # @option opts [Array<String>] :sql_identifier One or more unique SQL_IDs for a SQL Statement.
1702
+ # Example: `6rgjh9bjmy2s7`
1703
+ # (default to [])
1704
+ # @option opts [String] :analysis_time_interval Specify time period in ISO 8601 format with respect to current time.
1705
+ # Default is last 30 days represented by P30D.
1706
+ # If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored.
1707
+ # Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).
1708
+ # (default to P30D)
1709
+ # @option opts [DateTime] :time_interval_start Analysis start time in UTC in ISO 8601 format(inclusive).
1710
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1711
+ # The minimum allowed value is 2 years prior to the current day.
1712
+ # timeIntervalStart and timeIntervalEnd parameters are used together.
1713
+ # If analysisTimeInterval is specified, this parameter is ignored.
1714
+ #
1715
+ # @option opts [DateTime] :time_interval_end Analysis end time in UTC in ISO 8601 format(exclusive).
1716
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1717
+ # timeIntervalStart and timeIntervalEnd are used together.
1718
+ # If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.
1719
+ #
1720
+ # @option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to
1721
+ # return in a paginated \"List\" call.
1722
+ # For important details about how pagination works, see
1723
+ # [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
1724
+ # Example: `50`
1725
+ # (default to 50)
1726
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
1727
+ # the previous \"List\" call. For important details about how pagination works,
1728
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
1729
+ #
1730
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
1731
+ # Oracle about a particular request, please provide the request ID.
1732
+ #
1733
+ # @option opts [String] :sort_order The sort order to use, either ascending (`ASC`) or descending (`DESC`).
1734
+ #
1735
+ # @option opts [String] :sort_by The field to use when sorting SQL statistics.
1736
+ # Example: databaseTimeInSec
1737
+ # (default to databaseTimeInSec)
1738
+ # Allowed values are: databaseTimeInSec, executionsPerHour, executionsCount, cpuTimeInSec, ioTimeInSec, inefficientWaitTimeInSec, responseTimeInSec, planCount, variability, averageActiveSessions, databaseTimePct, inefficiencyInPct, changeInCpuTimeInPct, changeInIoTimeInPct, changeInInefficientWaitTimeInPct, changeInResponseTimeInPct, changeInAverageActiveSessionsInPct, changeInExecutionsPerHourInPct, changeInInefficiencyInPct
1739
+ # @option opts [Array<String>] :category Filter sqls by one or more performance categories.
1740
+ # (default to [])
1741
+ # Allowed values are: DEGRADING, VARIANT, INEFFICIENT, CHANGING_PLANS, DEGRADING_VARIANT, DEGRADING_INEFFICIENT, DEGRADING_CHANGING_PLANS, DEGRADING_INCREASING_IO, DEGRADING_INCREASING_CPU, DEGRADING_INCREASING_INEFFICIENT_WAIT, DEGRADING_CHANGING_PLANS_AND_INCREASING_IO, DEGRADING_CHANGING_PLANS_AND_INCREASING_CPU, DEGRADING_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT, VARIANT_INEFFICIENT, VARIANT_CHANGING_PLANS, VARIANT_INCREASING_IO, VARIANT_INCREASING_CPU, VARIANT_INCREASING_INEFFICIENT_WAIT, VARIANT_CHANGING_PLANS_AND_INCREASING_IO, VARIANT_CHANGING_PLANS_AND_INCREASING_CPU, VARIANT_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT, INEFFICIENT_CHANGING_PLANS, INEFFICIENT_INCREASING_INEFFICIENT_WAIT, INEFFICIENT_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT
1742
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SqlStatisticAggregationCollection SqlStatisticAggregationCollection}
1743
+ def summarize_sql_statistics(compartment_id, opts = {})
1744
+ logger.debug 'Calling operation OperationsInsightsClient#summarize_sql_statistics.' if logger
1745
+
1746
+ raise "Missing the required parameter 'compartment_id' when calling summarize_sql_statistics." if compartment_id.nil?
1747
+
1748
+
1749
+ database_type_allowable_values = %w[ADW-S ATP-S ADW-D ATP-D]
1750
+ if opts[:database_type] && !opts[:database_type].empty?
1751
+ opts[:database_type].each do |val_to_check|
1752
+ unless database_type_allowable_values.include?(val_to_check)
1753
+ raise 'Invalid value for "database_type", must be one of ADW-S, ATP-S, ADW-D, ATP-D.'
1754
+ end
1755
+ end
1756
+ end
1757
+
1758
+ if opts[:sort_order] && !OCI::Opsi::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
1759
+ raise 'Invalid value for "sort_order", must be one of the values in OCI::Opsi::Models::SORT_ORDER_ENUM.'
1760
+ end
1761
+
1762
+ if opts[:sort_by] && !%w[databaseTimeInSec executionsPerHour executionsCount cpuTimeInSec ioTimeInSec inefficientWaitTimeInSec responseTimeInSec planCount variability averageActiveSessions databaseTimePct inefficiencyInPct changeInCpuTimeInPct changeInIoTimeInPct changeInInefficientWaitTimeInPct changeInResponseTimeInPct changeInAverageActiveSessionsInPct changeInExecutionsPerHourInPct changeInInefficiencyInPct].include?(opts[:sort_by])
1763
+ raise 'Invalid value for "sort_by", must be one of databaseTimeInSec, executionsPerHour, executionsCount, cpuTimeInSec, ioTimeInSec, inefficientWaitTimeInSec, responseTimeInSec, planCount, variability, averageActiveSessions, databaseTimePct, inefficiencyInPct, changeInCpuTimeInPct, changeInIoTimeInPct, changeInInefficientWaitTimeInPct, changeInResponseTimeInPct, changeInAverageActiveSessionsInPct, changeInExecutionsPerHourInPct, changeInInefficiencyInPct.'
1764
+ end
1765
+
1766
+
1767
+ category_allowable_values = %w[DEGRADING VARIANT INEFFICIENT CHANGING_PLANS DEGRADING_VARIANT DEGRADING_INEFFICIENT DEGRADING_CHANGING_PLANS DEGRADING_INCREASING_IO DEGRADING_INCREASING_CPU DEGRADING_INCREASING_INEFFICIENT_WAIT DEGRADING_CHANGING_PLANS_AND_INCREASING_IO DEGRADING_CHANGING_PLANS_AND_INCREASING_CPU DEGRADING_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT VARIANT_INEFFICIENT VARIANT_CHANGING_PLANS VARIANT_INCREASING_IO VARIANT_INCREASING_CPU VARIANT_INCREASING_INEFFICIENT_WAIT VARIANT_CHANGING_PLANS_AND_INCREASING_IO VARIANT_CHANGING_PLANS_AND_INCREASING_CPU VARIANT_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT INEFFICIENT_CHANGING_PLANS INEFFICIENT_INCREASING_INEFFICIENT_WAIT INEFFICIENT_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT]
1768
+ if opts[:category] && !opts[:category].empty?
1769
+ opts[:category].each do |val_to_check|
1770
+ unless category_allowable_values.include?(val_to_check)
1771
+ raise 'Invalid value for "category", must be one of DEGRADING, VARIANT, INEFFICIENT, CHANGING_PLANS, DEGRADING_VARIANT, DEGRADING_INEFFICIENT, DEGRADING_CHANGING_PLANS, DEGRADING_INCREASING_IO, DEGRADING_INCREASING_CPU, DEGRADING_INCREASING_INEFFICIENT_WAIT, DEGRADING_CHANGING_PLANS_AND_INCREASING_IO, DEGRADING_CHANGING_PLANS_AND_INCREASING_CPU, DEGRADING_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT, VARIANT_INEFFICIENT, VARIANT_CHANGING_PLANS, VARIANT_INCREASING_IO, VARIANT_INCREASING_CPU, VARIANT_INCREASING_INEFFICIENT_WAIT, VARIANT_CHANGING_PLANS_AND_INCREASING_IO, VARIANT_CHANGING_PLANS_AND_INCREASING_CPU, VARIANT_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT, INEFFICIENT_CHANGING_PLANS, INEFFICIENT_INCREASING_INEFFICIENT_WAIT, INEFFICIENT_CHANGING_PLANS_AND_INCREASING_INEFFICIENT_WAIT.'
1772
+ end
1773
+ end
1774
+ end
1775
+
1776
+ path = '/databaseInsights/sqlStatistics'
1777
+ operation_signing_strategy = :standard
1778
+
1779
+ # rubocop:disable Style/NegatedIf
1780
+ # Query Params
1781
+ query_params = {}
1782
+ query_params[:compartmentId] = compartment_id
1783
+ query_params[:databaseType] = OCI::ApiClient.build_collection_params(opts[:database_type], :multi) if opts[:database_type] && !opts[:database_type].empty?
1784
+ query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
1785
+ query_params[:databaseTimePctGreaterThan] = opts[:database_time_pct_greater_than] if opts[:database_time_pct_greater_than]
1786
+ query_params[:sqlIdentifier] = OCI::ApiClient.build_collection_params(opts[:sql_identifier], :multi) if opts[:sql_identifier] && !opts[:sql_identifier].empty?
1787
+ query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
1788
+ query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
1789
+ query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
1790
+ query_params[:limit] = opts[:limit] if opts[:limit]
1791
+ query_params[:page] = opts[:page] if opts[:page]
1792
+ query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
1793
+ query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
1794
+ query_params[:category] = OCI::ApiClient.build_collection_params(opts[:category], :multi) if opts[:category] && !opts[:category].empty?
1795
+
1796
+ # Header Params
1797
+ header_params = {}
1798
+ header_params[:accept] = 'application/json'
1799
+ header_params[:'content-type'] = 'application/json'
1800
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
1801
+ # rubocop:enable Style/NegatedIf
1802
+
1803
+ post_body = nil
1804
+
1805
+ # rubocop:disable Metrics/BlockLength
1806
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_sql_statistics') do
1807
+ @api_client.call_api(
1808
+ :GET,
1809
+ path,
1810
+ endpoint,
1811
+ header_params: header_params,
1812
+ query_params: query_params,
1813
+ operation_signing_strategy: operation_signing_strategy,
1814
+ body: post_body,
1815
+ return_type: 'OCI::Opsi::Models::SqlStatisticAggregationCollection'
1816
+ )
1817
+ end
1818
+ # rubocop:enable Metrics/BlockLength
1819
+ end
1820
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1821
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1822
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1823
+
1824
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1825
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1826
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1827
+
1828
+
1829
+ # Query SQL Warehouse to get the performance statistics time series for a given SQL across given databases for a given time period.
1830
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
1831
+ # @param [String] sql_identifier Unique SQL_ID for a SQL Statement.
1832
+ # Example: `6rgjh9bjmy2s7`
1833
+ #
1834
+ # @param [Hash] opts the optional parameters
1835
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1836
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1837
+ # @option opts [Array<String>] :database_id Optional list of database [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
1838
+ # (default to [])
1839
+ # @option opts [String] :analysis_time_interval Specify time period in ISO 8601 format with respect to current time.
1840
+ # Default is last 30 days represented by P30D.
1841
+ # If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored.
1842
+ # Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).
1843
+ # (default to P30D)
1844
+ # @option opts [DateTime] :time_interval_start Analysis start time in UTC in ISO 8601 format(inclusive).
1845
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1846
+ # The minimum allowed value is 2 years prior to the current day.
1847
+ # timeIntervalStart and timeIntervalEnd parameters are used together.
1848
+ # If analysisTimeInterval is specified, this parameter is ignored.
1849
+ #
1850
+ # @option opts [DateTime] :time_interval_end Analysis end time in UTC in ISO 8601 format(exclusive).
1851
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1852
+ # timeIntervalStart and timeIntervalEnd are used together.
1853
+ # If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.
1854
+ #
1855
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
1856
+ # the previous \"List\" call. For important details about how pagination works,
1857
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
1858
+ #
1859
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
1860
+ # Oracle about a particular request, please provide the request ID.
1861
+ #
1862
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SqlStatisticsTimeSeriesAggregationCollection SqlStatisticsTimeSeriesAggregationCollection}
1863
+ def summarize_sql_statistics_time_series(compartment_id, sql_identifier, opts = {})
1864
+ logger.debug 'Calling operation OperationsInsightsClient#summarize_sql_statistics_time_series.' if logger
1865
+
1866
+ raise "Missing the required parameter 'compartment_id' when calling summarize_sql_statistics_time_series." if compartment_id.nil?
1867
+ raise "Missing the required parameter 'sql_identifier' when calling summarize_sql_statistics_time_series." if sql_identifier.nil?
1868
+
1869
+ path = '/databaseInsights/sqlStatisticsTimeSeries'
1870
+ operation_signing_strategy = :standard
1871
+
1872
+ # rubocop:disable Style/NegatedIf
1873
+ # Query Params
1874
+ query_params = {}
1875
+ query_params[:compartmentId] = compartment_id
1876
+ query_params[:sqlIdentifier] = sql_identifier
1877
+ query_params[:databaseId] = OCI::ApiClient.build_collection_params(opts[:database_id], :multi) if opts[:database_id] && !opts[:database_id].empty?
1878
+ query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
1879
+ query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
1880
+ query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
1881
+ query_params[:page] = opts[:page] if opts[:page]
1882
+
1883
+ # Header Params
1884
+ header_params = {}
1885
+ header_params[:accept] = 'application/json'
1886
+ header_params[:'content-type'] = 'application/json'
1887
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
1888
+ # rubocop:enable Style/NegatedIf
1889
+
1890
+ post_body = nil
1891
+
1892
+ # rubocop:disable Metrics/BlockLength
1893
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_sql_statistics_time_series') do
1894
+ @api_client.call_api(
1895
+ :GET,
1896
+ path,
1897
+ endpoint,
1898
+ header_params: header_params,
1899
+ query_params: query_params,
1900
+ operation_signing_strategy: operation_signing_strategy,
1901
+ body: post_body,
1902
+ return_type: 'OCI::Opsi::Models::SqlStatisticsTimeSeriesAggregationCollection'
1903
+ )
1904
+ end
1905
+ # rubocop:enable Metrics/BlockLength
1906
+ end
1907
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1908
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1909
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1910
+
1911
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1912
+ # rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
1913
+ # rubocop:disable Metrics/MethodLength, Layout/EmptyLines
1914
+
1915
+
1916
+ # Query SQL Warehouse to get the performance statistics time series for a given SQL by execution plans for a given time period.
1917
+ # @param [String] compartment_id The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
1918
+ # @param [String] database_id Required [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the database.
1919
+ #
1920
+ # @param [String] sql_identifier Unique SQL_ID for a SQL Statement.
1921
+ # Example: `6rgjh9bjmy2s7`
1922
+ #
1923
+ # @param [Hash] opts the optional parameters
1924
+ # @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
1925
+ # retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
1926
+ # @option opts [String] :analysis_time_interval Specify time period in ISO 8601 format with respect to current time.
1927
+ # Default is last 30 days represented by P30D.
1928
+ # If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored.
1929
+ # Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M).
1930
+ # (default to P30D)
1931
+ # @option opts [DateTime] :time_interval_start Analysis start time in UTC in ISO 8601 format(inclusive).
1932
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1933
+ # The minimum allowed value is 2 years prior to the current day.
1934
+ # timeIntervalStart and timeIntervalEnd parameters are used together.
1935
+ # If analysisTimeInterval is specified, this parameter is ignored.
1936
+ #
1937
+ # @option opts [DateTime] :time_interval_end Analysis end time in UTC in ISO 8601 format(exclusive).
1938
+ # Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ).
1939
+ # timeIntervalStart and timeIntervalEnd are used together.
1940
+ # If timeIntervalEnd is not specified, current time is used as timeIntervalEnd.
1941
+ #
1942
+ # @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from
1943
+ # the previous \"List\" call. For important details about how pagination works,
1944
+ # see [List Pagination](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine).
1945
+ #
1946
+ # @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact
1947
+ # Oracle about a particular request, please provide the request ID.
1948
+ #
1949
+ # @return [Response] A Response object with data of type {OCI::Opsi::Models::SqlStatisticsTimeSeriesByPlanAggregationCollection SqlStatisticsTimeSeriesByPlanAggregationCollection}
1950
+ def summarize_sql_statistics_time_series_by_plan(compartment_id, database_id, sql_identifier, opts = {})
1951
+ logger.debug 'Calling operation OperationsInsightsClient#summarize_sql_statistics_time_series_by_plan.' if logger
1952
+
1953
+ raise "Missing the required parameter 'compartment_id' when calling summarize_sql_statistics_time_series_by_plan." if compartment_id.nil?
1954
+ raise "Missing the required parameter 'database_id' when calling summarize_sql_statistics_time_series_by_plan." if database_id.nil?
1955
+ raise "Missing the required parameter 'sql_identifier' when calling summarize_sql_statistics_time_series_by_plan." if sql_identifier.nil?
1956
+
1957
+ path = '/databaseInsights/sqlStatisticsTimeSeriesByPlan'
1958
+ operation_signing_strategy = :standard
1959
+
1960
+ # rubocop:disable Style/NegatedIf
1961
+ # Query Params
1962
+ query_params = {}
1963
+ query_params[:compartmentId] = compartment_id
1964
+ query_params[:databaseId] = database_id
1965
+ query_params[:sqlIdentifier] = sql_identifier
1966
+ query_params[:analysisTimeInterval] = opts[:analysis_time_interval] if opts[:analysis_time_interval]
1967
+ query_params[:timeIntervalStart] = opts[:time_interval_start] if opts[:time_interval_start]
1968
+ query_params[:timeIntervalEnd] = opts[:time_interval_end] if opts[:time_interval_end]
1969
+ query_params[:page] = opts[:page] if opts[:page]
1970
+
1971
+ # Header Params
1972
+ header_params = {}
1973
+ header_params[:accept] = 'application/json'
1974
+ header_params[:'content-type'] = 'application/json'
1975
+ header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
1976
+ # rubocop:enable Style/NegatedIf
1977
+
1978
+ post_body = nil
1979
+
1980
+ # rubocop:disable Metrics/BlockLength
1981
+ OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'OperationsInsightsClient#summarize_sql_statistics_time_series_by_plan') do
1982
+ @api_client.call_api(
1983
+ :GET,
1984
+ path,
1985
+ endpoint,
1986
+ header_params: header_params,
1987
+ query_params: query_params,
1988
+ operation_signing_strategy: operation_signing_strategy,
1989
+ body: post_body,
1990
+ return_type: 'OCI::Opsi::Models::SqlStatisticsTimeSeriesByPlanAggregationCollection'
1991
+ )
1992
+ end
1993
+ # rubocop:enable Metrics/BlockLength
1994
+ end
1995
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
1996
+ # rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
1997
+ # rubocop:enable Metrics/MethodLength, Layout/EmptyLines
1998
+
1999
+ private
2000
+
2001
+ def applicable_retry_config(opts = {})
2002
+ return @retry_config unless opts.key?(:retry_config)
2003
+
2004
+ opts[:retry_config]
2005
+ end
2006
+ end
2007
+ end
2008
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength