instana-client 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (515) hide show
  1. instana_client/__init__.py +534 -0
  2. instana_client/api/__init__.py +58 -0
  3. instana_client/api/action_catalog_api.py +1380 -0
  4. instana_client/api/action_history_api.py +1793 -0
  5. instana_client/api/apdex_report_api.py +338 -0
  6. instana_client/api/apdex_settings_api.py +1353 -0
  7. instana_client/api/api_token_api.py +1370 -0
  8. instana_client/api/application_alert_configuration_api.py +2865 -0
  9. instana_client/api/application_analyze_api.py +2017 -0
  10. instana_client/api/application_catalog_api.py +885 -0
  11. instana_client/api/application_metrics_api.py +1211 -0
  12. instana_client/api/application_resources_api.py +1487 -0
  13. instana_client/api/application_settings_api.py +7261 -0
  14. instana_client/api/application_topology_api.py +354 -0
  15. instana_client/api/audit_log_api.py +635 -0
  16. instana_client/api/authentication_api.py +1008 -0
  17. instana_client/api/business_monitoring_api.py +2177 -0
  18. instana_client/api/custom_dashboards_api.py +1930 -0
  19. instana_client/api/event_settings_api.py +14613 -0
  20. instana_client/api/events_api.py +1654 -0
  21. instana_client/api/global_application_alert_configuration_api.py +2606 -0
  22. instana_client/api/groups_api.py +4078 -0
  23. instana_client/api/health_api.py +527 -0
  24. instana_client/api/host_agent_api.py +2120 -0
  25. instana_client/api/infrastructure_alert_configuration_api.py +2524 -0
  26. instana_client/api/infrastructure_analyze_api.py +1141 -0
  27. instana_client/api/infrastructure_catalog_api.py +1822 -0
  28. instana_client/api/infrastructure_metrics_api.py +331 -0
  29. instana_client/api/infrastructure_resources_api.py +1880 -0
  30. instana_client/api/infrastructure_topology_api.py +595 -0
  31. instana_client/api/log_alert_configuration_api.py +2524 -0
  32. instana_client/api/maintenance_configuration_api.py +2683 -0
  33. instana_client/api/mobile_app_analyze_api.py +613 -0
  34. instana_client/api/mobile_app_catalog_api.py +825 -0
  35. instana_client/api/mobile_app_configuration_api.py +2847 -0
  36. instana_client/api/mobile_app_metrics_api.py +892 -0
  37. instana_client/api/policies_api.py +1755 -0
  38. instana_client/api/releases_api.py +1408 -0
  39. instana_client/api/service_levels_alert_configuration_api.py +2577 -0
  40. instana_client/api/service_levels_objective_slo_configurations_api.py +1825 -0
  41. instana_client/api/service_levels_objective_slo_report_api.py +335 -0
  42. instana_client/api/session_settings_api.py +801 -0
  43. instana_client/api/sli_report_api.py +352 -0
  44. instana_client/api/sli_settings_api.py +2677 -0
  45. instana_client/api/synthetic_alert_configuration_api.py +2606 -0
  46. instana_client/api/synthetic_calls_api.py +789 -0
  47. instana_client/api/synthetic_catalog_api.py +543 -0
  48. instana_client/api/synthetic_metrics_api.py +322 -0
  49. instana_client/api/synthetic_settings_api.py +5144 -0
  50. instana_client/api/synthetic_test_playback_results_api.py +2142 -0
  51. instana_client/api/usage_api.py +1404 -0
  52. instana_client/api/user_api.py +2404 -0
  53. instana_client/api/website_analyze_api.py +619 -0
  54. instana_client/api/website_catalog_api.py +832 -0
  55. instana_client/api/website_configuration_api.py +3745 -0
  56. instana_client/api/website_metrics_api.py +889 -0
  57. instana_client/api_client.py +798 -0
  58. instana_client/api_response.py +21 -0
  59. instana_client/configuration.py +616 -0
  60. instana_client/exceptions.py +217 -0
  61. instana_client/models/__init__.py +464 -0
  62. instana_client/models/abstract_integration.py +155 -0
  63. instana_client/models/abstract_rule.py +124 -0
  64. instana_client/models/access_log_entry.py +105 -0
  65. instana_client/models/access_log_response.py +98 -0
  66. instana_client/models/access_rule.py +107 -0
  67. instana_client/models/action.py +135 -0
  68. instana_client/models/action_configuration.py +104 -0
  69. instana_client/models/action_instance.py +185 -0
  70. instana_client/models/action_instance_metadata_entry.py +90 -0
  71. instana_client/models/action_instance_parameter.py +94 -0
  72. instana_client/models/action_instance_request.py +108 -0
  73. instana_client/models/action_instance_request_parameters.py +92 -0
  74. instana_client/models/action_match.py +98 -0
  75. instana_client/models/action_search_space.py +94 -0
  76. instana_client/models/adaptive_baseline.py +92 -0
  77. instana_client/models/adaptive_threshold_rule.py +91 -0
  78. instana_client/models/adjusted_timeframe.py +91 -0
  79. instana_client/models/agent_configuration_update.py +93 -0
  80. instana_client/models/alerting_configuration.py +113 -0
  81. instana_client/models/alerting_configuration_with_last_updated.py +115 -0
  82. instana_client/models/alerting_time_window.py +109 -0
  83. instana_client/models/apdex_configuration.py +99 -0
  84. instana_client/models/apdex_configuration_input.py +95 -0
  85. instana_client/models/apdex_entity.py +119 -0
  86. instana_client/models/apdex_report.py +94 -0
  87. instana_client/models/api_create_group.py +104 -0
  88. instana_client/models/api_group.py +107 -0
  89. instana_client/models/api_member.py +90 -0
  90. instana_client/models/api_permission_set.py +178 -0
  91. instana_client/models/api_restricted_application_filter.py +108 -0
  92. instana_client/models/api_token.py +250 -0
  93. instana_client/models/app_data_metric_configuration.py +105 -0
  94. instana_client/models/application.py +104 -0
  95. instana_client/models/application_alert_config.py +203 -0
  96. instana_client/models/application_alert_config_with_metadata.py +213 -0
  97. instana_client/models/application_alert_rule.py +135 -0
  98. instana_client/models/application_apdex_entity.py +111 -0
  99. instana_client/models/application_config.py +131 -0
  100. instana_client/models/application_event_result.py +108 -0
  101. instana_client/models/application_item.py +94 -0
  102. instana_client/models/application_metric_result.py +109 -0
  103. instana_client/models/application_node.py +106 -0
  104. instana_client/models/application_result.py +102 -0
  105. instana_client/models/application_scope.py +89 -0
  106. instana_client/models/application_scope_with_metadata.py +90 -0
  107. instana_client/models/application_sli_entity.py +103 -0
  108. instana_client/models/application_slo_entity.py +112 -0
  109. instana_client/models/application_time_threshold.py +115 -0
  110. instana_client/models/audit_log_entry.py +102 -0
  111. instana_client/models/audit_log_ui_response.py +98 -0
  112. instana_client/models/author.py +100 -0
  113. instana_client/models/availability_blueprint_indicator.py +106 -0
  114. instana_client/models/availability_sli_entity.py +138 -0
  115. instana_client/models/available_metrics.py +96 -0
  116. instana_client/models/available_plugins.py +88 -0
  117. instana_client/models/backend_trace_reference.py +88 -0
  118. instana_client/models/binary_operator_dto.py +107 -0
  119. instana_client/models/browser_script_configuration.py +127 -0
  120. instana_client/models/built_in_event_specification.py +123 -0
  121. instana_client/models/built_in_event_specification_with_last_updated.py +125 -0
  122. instana_client/models/business_activity.py +132 -0
  123. instana_client/models/business_perspective_config.py +99 -0
  124. instana_client/models/call_groups_item.py +95 -0
  125. instana_client/models/call_groups_result.py +111 -0
  126. instana_client/models/call_relation.py +100 -0
  127. instana_client/models/change_summary.py +101 -0
  128. instana_client/models/cloudfoundry_physical_context.py +104 -0
  129. instana_client/models/condition.py +88 -0
  130. instana_client/models/config_version.py +101 -0
  131. instana_client/models/crash_mobile_app_alert_rule.py +90 -0
  132. instana_client/models/cursor_paginated_business_activity_item.py +96 -0
  133. instana_client/models/cursor_pagination.py +93 -0
  134. instana_client/models/cursor_pagination_infra_explore_cursor.py +90 -0
  135. instana_client/models/custom_blueprint_indicator.py +104 -0
  136. instana_client/models/custom_dashboard.py +111 -0
  137. instana_client/models/custom_dashboard_preview.py +103 -0
  138. instana_client/models/custom_email_subject_prefix.py +94 -0
  139. instana_client/models/custom_event_mobile_app_alert_rule.py +92 -0
  140. instana_client/models/custom_event_specification.py +133 -0
  141. instana_client/models/custom_event_specification_with_last_updated.py +143 -0
  142. instana_client/models/custom_event_website_alert_rule.py +92 -0
  143. instana_client/models/custom_payload_configuration.py +97 -0
  144. instana_client/models/custom_payload_field.py +112 -0
  145. instana_client/models/custom_payload_with_last_updated.py +99 -0
  146. instana_client/models/dashboard_api_token.py +90 -0
  147. instana_client/models/database_integration.py +90 -0
  148. instana_client/models/deprecated_tag_filter.py +111 -0
  149. instana_client/models/dns_action_configuration.py +134 -0
  150. instana_client/models/dns_action_filter_query_time.py +99 -0
  151. instana_client/models/dns_action_filter_target_value.py +106 -0
  152. instana_client/models/duration.py +98 -0
  153. instana_client/models/dynamic_field.py +95 -0
  154. instana_client/models/dynamic_field_value.py +90 -0
  155. instana_client/models/dynamic_parameter.py +94 -0
  156. instana_client/models/edit_user.py +88 -0
  157. instana_client/models/email_integration.py +98 -0
  158. instana_client/models/empty_configuration.py +92 -0
  159. instana_client/models/endpoint.py +131 -0
  160. instana_client/models/endpoint_config.py +112 -0
  161. instana_client/models/endpoint_event_result.py +112 -0
  162. instana_client/models/endpoint_item.py +94 -0
  163. instana_client/models/endpoint_metric_result.py +109 -0
  164. instana_client/models/endpoint_node.py +91 -0
  165. instana_client/models/endpoint_result.py +102 -0
  166. instana_client/models/endpoint_simple.py +102 -0
  167. instana_client/models/entity_count_rule.py +100 -0
  168. instana_client/models/entity_count_verification_rule.py +114 -0
  169. instana_client/models/entity_health_info.py +99 -0
  170. instana_client/models/entity_id.py +92 -0
  171. instana_client/models/entity_verification_rule.py +105 -0
  172. instana_client/models/error_budget_alert_rule.py +97 -0
  173. instana_client/models/errors_application_alert_rule.py +90 -0
  174. instana_client/models/event.py +127 -0
  175. instana_client/models/event_filtering_configuration.py +106 -0
  176. instana_client/models/event_result.py +145 -0
  177. instana_client/models/event_specification_info.py +114 -0
  178. instana_client/models/extended_service.py +123 -0
  179. instana_client/models/failure_synthetic_alert_rule.py +90 -0
  180. instana_client/models/fixed_http_path_segment_matching_rule.py +90 -0
  181. instana_client/models/fixed_time_window.py +93 -0
  182. instana_client/models/full_trace.py +97 -0
  183. instana_client/models/generic_infra_alert_rule.py +93 -0
  184. instana_client/models/geo_location_configuration.py +106 -0
  185. instana_client/models/geo_mapping_rule.py +120 -0
  186. instana_client/models/geo_subdivision.py +91 -0
  187. instana_client/models/get_activities.py +115 -0
  188. instana_client/models/get_application_metrics.py +112 -0
  189. instana_client/models/get_applications.py +150 -0
  190. instana_client/models/get_available_metrics_query.py +103 -0
  191. instana_client/models/get_available_plugins_query.py +98 -0
  192. instana_client/models/get_call_groups.py +141 -0
  193. instana_client/models/get_combined_metrics.py +103 -0
  194. instana_client/models/get_dynamic_parameter_values.py +100 -0
  195. instana_client/models/get_endpoints.py +150 -0
  196. instana_client/models/get_infrastructure_groups_query.py +127 -0
  197. instana_client/models/get_infrastructure_query.py +127 -0
  198. instana_client/models/get_metrics_result.py +128 -0
  199. instana_client/models/get_mobile_app_beacon_groups.py +146 -0
  200. instana_client/models/get_mobile_app_beacons.py +118 -0
  201. instana_client/models/get_mobile_app_metrics.py +122 -0
  202. instana_client/models/get_mobile_app_metrics_v2.py +118 -0
  203. instana_client/models/get_payload_keys_result.py +88 -0
  204. instana_client/models/get_services.py +147 -0
  205. instana_client/models/get_snapshots_query.py +95 -0
  206. instana_client/models/get_test_result.py +139 -0
  207. instana_client/models/get_test_result_base.py +120 -0
  208. instana_client/models/get_test_result_list.py +125 -0
  209. instana_client/models/get_test_summary_result.py +130 -0
  210. instana_client/models/get_trace_download_result_item.py +114 -0
  211. instana_client/models/get_trace_groups.py +141 -0
  212. instana_client/models/get_traces.py +125 -0
  213. instana_client/models/get_website_beacon_groups.py +146 -0
  214. instana_client/models/get_website_beacons.py +118 -0
  215. instana_client/models/get_website_metrics.py +122 -0
  216. instana_client/models/get_website_metrics_v2.py +118 -0
  217. instana_client/models/global_application_alert_config_with_metadata.py +205 -0
  218. instana_client/models/global_applications_alert_config.py +191 -0
  219. instana_client/models/google_chat_integration.py +92 -0
  220. instana_client/models/graph_edge.py +102 -0
  221. instana_client/models/graph_node.py +100 -0
  222. instana_client/models/group.py +100 -0
  223. instana_client/models/group_by_tag.py +90 -0
  224. instana_client/models/group_mapping.py +95 -0
  225. instana_client/models/health_state.py +100 -0
  226. instana_client/models/historic_baseline.py +105 -0
  227. instana_client/models/host_availability_rule.py +100 -0
  228. instana_client/models/http_action_configuration.py +127 -0
  229. instana_client/models/http_endpoint_config.py +103 -0
  230. instana_client/models/http_endpoint_rule.py +101 -0
  231. instana_client/models/http_path_segment_matching_rule.py +124 -0
  232. instana_client/models/http_script_configuration.py +113 -0
  233. instana_client/models/hyper_param.py +111 -0
  234. instana_client/models/identity_provider_patch.py +88 -0
  235. instana_client/models/infra_alert_config.py +166 -0
  236. instana_client/models/infra_alert_config_with_metadata.py +176 -0
  237. instana_client/models/infra_alert_rule.py +133 -0
  238. instana_client/models/infra_event_result.py +109 -0
  239. instana_client/models/infra_metric_configuration.py +115 -0
  240. instana_client/models/infra_time_threshold.py +109 -0
  241. instana_client/models/infrastructure_entities_result.py +109 -0
  242. instana_client/models/infrastructure_group.py +92 -0
  243. instana_client/models/infrastructure_groups_result.py +109 -0
  244. instana_client/models/infrastructure_item.py +104 -0
  245. instana_client/models/infrastructure_metric_result.py +96 -0
  246. instana_client/models/instana_version_info.py +92 -0
  247. instana_client/models/integration_overview.py +94 -0
  248. instana_client/models/invitation.py +94 -0
  249. instana_client/models/invitation_response.py +96 -0
  250. instana_client/models/invitation_result.py +100 -0
  251. instana_client/models/ip_masking_configuration.py +95 -0
  252. instana_client/models/js_stack_trace_line.py +99 -0
  253. instana_client/models/kubernetes_physical_context.py +107 -0
  254. instana_client/models/latency_blueprint_indicator.py +106 -0
  255. instana_client/models/location_status.py +96 -0
  256. instana_client/models/log_alert_config.py +154 -0
  257. instana_client/models/log_alert_config_with_metadata.py +164 -0
  258. instana_client/models/log_alert_rule.py +120 -0
  259. instana_client/models/log_count_alert_rule.py +90 -0
  260. instana_client/models/log_entry_actor.py +101 -0
  261. instana_client/models/log_event_result.py +107 -0
  262. instana_client/models/log_time_threshold.py +109 -0
  263. instana_client/models/logs_application_alert_rule.py +122 -0
  264. instana_client/models/maintenance_config.py +103 -0
  265. instana_client/models/maintenance_config_scheduling.py +118 -0
  266. instana_client/models/maintenance_config_v2.py +111 -0
  267. instana_client/models/maintenance_config_v2_with_state_and_occurrence.py +131 -0
  268. instana_client/models/maintenance_config_with_last_updated.py +105 -0
  269. instana_client/models/maintenance_window.py +93 -0
  270. instana_client/models/manual_alerting_channel_configuration.py +99 -0
  271. instana_client/models/manual_close_info.py +99 -0
  272. instana_client/models/manual_service_config.py +103 -0
  273. instana_client/models/match_all_http_path_segment_matching_rule.py +88 -0
  274. instana_client/models/match_expression_dto.py +111 -0
  275. instana_client/models/meta_data.py +96 -0
  276. instana_client/models/metric_api_result.py +94 -0
  277. instana_client/models/metric_config.py +99 -0
  278. instana_client/models/metric_configuration.py +103 -0
  279. instana_client/models/metric_description.py +116 -0
  280. instana_client/models/metric_instance.py +105 -0
  281. instana_client/models/metric_item.py +102 -0
  282. instana_client/models/metric_metadata.py +132 -0
  283. instana_client/models/metric_pattern.py +101 -0
  284. instana_client/models/metrics_result.py +96 -0
  285. instana_client/models/metrics_result_item.py +100 -0
  286. instana_client/models/metrics_test_result_item.py +102 -0
  287. instana_client/models/mobile_app.py +91 -0
  288. instana_client/models/mobile_app_alert_config.py +162 -0
  289. instana_client/models/mobile_app_alert_rule.py +129 -0
  290. instana_client/models/mobile_app_beacon_groups_item.py +95 -0
  291. instana_client/models/mobile_app_beacon_groups_result.py +111 -0
  292. instana_client/models/mobile_app_beacon_result.py +111 -0
  293. instana_client/models/mobile_app_beacon_tag_group.py +100 -0
  294. instana_client/models/mobile_app_beacons_item.py +94 -0
  295. instana_client/models/mobile_app_event_result.py +108 -0
  296. instana_client/models/mobile_app_metric_result.py +88 -0
  297. instana_client/models/mobile_app_monitoring_beacon.py +259 -0
  298. instana_client/models/mobile_app_monitoring_metric_description.py +123 -0
  299. instana_client/models/mobile_app_monitoring_metrics_configuration.py +105 -0
  300. instana_client/models/mobile_app_time_threshold.py +115 -0
  301. instana_client/models/model_field.py +96 -0
  302. instana_client/models/monitoring_state.py +92 -0
  303. instana_client/models/multiple_scripts_configuration.py +90 -0
  304. instana_client/models/new_application_config.py +129 -0
  305. instana_client/models/new_business_perspective_config.py +97 -0
  306. instana_client/models/new_manual_service_config.py +100 -0
  307. instana_client/models/occurrence.py +91 -0
  308. instana_client/models/office365_integration.py +92 -0
  309. instana_client/models/one_time_maintenance_window.py +94 -0
  310. instana_client/models/opsgenie_integration.py +105 -0
  311. instana_client/models/order.py +99 -0
  312. instana_client/models/pagerduty_integration.py +92 -0
  313. instana_client/models/paginated_result.py +95 -0
  314. instana_client/models/pagination.py +91 -0
  315. instana_client/models/parameter.py +102 -0
  316. instana_client/models/parameter_value.py +90 -0
  317. instana_client/models/path_parameter_http_path_segment_matching_rule.py +90 -0
  318. instana_client/models/physical_context.py +119 -0
  319. instana_client/models/plugin_result.py +90 -0
  320. instana_client/models/policy.py +113 -0
  321. instana_client/models/policy_runnable.py +103 -0
  322. instana_client/models/post_snapshots_result.py +98 -0
  323. instana_client/models/problem.py +95 -0
  324. instana_client/models/prometheus_webhook_integration.py +94 -0
  325. instana_client/models/recurrent_maintenance_window.py +98 -0
  326. instana_client/models/release.py +111 -0
  327. instana_client/models/release_scope.py +94 -0
  328. instana_client/models/release_with_metadata.py +125 -0
  329. instana_client/models/rolling_time_window.py +90 -0
  330. instana_client/models/rule_input.py +98 -0
  331. instana_client/models/rule_with_threshold_application_alert_rule.py +116 -0
  332. instana_client/models/rule_with_threshold_infra_alert_rule.py +116 -0
  333. instana_client/models/rule_with_threshold_log_alert_rule.py +116 -0
  334. instana_client/models/rule_with_threshold_mobile_app_alert_rule.py +116 -0
  335. instana_client/models/rule_with_threshold_website_alert_rule.py +116 -0
  336. instana_client/models/run_configuration.py +96 -0
  337. instana_client/models/salesforce_integration.py +98 -0
  338. instana_client/models/scope_binding.py +91 -0
  339. instana_client/models/search_field_result.py +116 -0
  340. instana_client/models/service.py +116 -0
  341. instana_client/models/service_config.py +107 -0
  342. instana_client/models/service_event_result.py +110 -0
  343. instana_client/models/service_item.py +94 -0
  344. instana_client/models/service_level_indicator.py +172 -0
  345. instana_client/models/service_level_objective_alert_rule.py +100 -0
  346. instana_client/models/service_level_objective_configuration.py +118 -0
  347. instana_client/models/service_levels_alert_config.py +133 -0
  348. instana_client/models/service_levels_alert_rule.py +111 -0
  349. instana_client/models/service_levels_burn_rate_time_windows.py +97 -0
  350. instana_client/models/service_levels_time_threshold.py +90 -0
  351. instana_client/models/service_levelse_alert_config_with_metadata.py +143 -0
  352. instana_client/models/service_map.py +106 -0
  353. instana_client/models/service_map_connection.py +97 -0
  354. instana_client/models/service_matching_rule.py +90 -0
  355. instana_client/models/service_metric_result.py +109 -0
  356. instana_client/models/service_node.py +106 -0
  357. instana_client/models/service_now_enhanced_integration.py +116 -0
  358. instana_client/models/service_now_integration.py +98 -0
  359. instana_client/models/service_result.py +102 -0
  360. instana_client/models/service_scope.py +95 -0
  361. instana_client/models/service_scope_with_metadata.py +96 -0
  362. instana_client/models/service_scoped_to.py +97 -0
  363. instana_client/models/service_scoped_to_with_metadata.py +97 -0
  364. instana_client/models/service_simple.py +90 -0
  365. instana_client/models/session_settings.py +91 -0
  366. instana_client/models/slack_integration.py +98 -0
  367. instana_client/models/sli_configuration.py +105 -0
  368. instana_client/models/sli_configuration_with_last_updated.py +107 -0
  369. instana_client/models/sli_entity.py +117 -0
  370. instana_client/models/sli_report.py +100 -0
  371. instana_client/models/slo_entity.py +119 -0
  372. instana_client/models/slo_report.py +112 -0
  373. instana_client/models/slowness_application_alert_rule.py +90 -0
  374. instana_client/models/slowness_website_alert_rule.py +90 -0
  375. instana_client/models/snapshot_item.py +102 -0
  376. instana_client/models/snapshot_preview.py +97 -0
  377. instana_client/models/snapshot_result.py +96 -0
  378. instana_client/models/software_user.py +94 -0
  379. instana_client/models/software_version.py +124 -0
  380. instana_client/models/source_map_file_blob.py +92 -0
  381. instana_client/models/source_map_file_meta.py +115 -0
  382. instana_client/models/source_map_upload_config.py +106 -0
  383. instana_client/models/span.py +156 -0
  384. instana_client/models/span_excerpt.py +132 -0
  385. instana_client/models/span_relation.py +114 -0
  386. instana_client/models/specific_js_errors_website_alert_rule.py +101 -0
  387. instana_client/models/splunk_integration.py +94 -0
  388. instana_client/models/ssl_certificate_configuration.py +99 -0
  389. instana_client/models/stack_trace_item.py +92 -0
  390. instana_client/models/stack_trace_line.py +99 -0
  391. instana_client/models/static_baseline_threshold_rule.py +102 -0
  392. instana_client/models/static_string_field.py +91 -0
  393. instana_client/models/static_threshold.py +94 -0
  394. instana_client/models/static_threshold_rule.py +91 -0
  395. instana_client/models/status_code_application_alert_rule.py +95 -0
  396. instana_client/models/status_code_mobile_app_alert_rule.py +101 -0
  397. instana_client/models/status_code_website_alert_rule.py +101 -0
  398. instana_client/models/synthetic_alert_config.py +127 -0
  399. instana_client/models/synthetic_alert_config_with_metadata.py +137 -0
  400. instana_client/models/synthetic_alert_rule.py +120 -0
  401. instana_client/models/synthetic_call_config.py +99 -0
  402. instana_client/models/synthetic_call_rule.py +99 -0
  403. instana_client/models/synthetic_call_with_defaults_config.py +108 -0
  404. instana_client/models/synthetic_credential.py +111 -0
  405. instana_client/models/synthetic_datacenter.py +117 -0
  406. instana_client/models/synthetic_datacenter_configuration.py +88 -0
  407. instana_client/models/synthetic_geo_point.py +94 -0
  408. instana_client/models/synthetic_location.py +129 -0
  409. instana_client/models/synthetic_location_configuration.py +102 -0
  410. instana_client/models/synthetic_metric_configuration.py +99 -0
  411. instana_client/models/synthetic_metric_tag_group.py +100 -0
  412. instana_client/models/synthetic_playback_capabilities.py +98 -0
  413. instana_client/models/synthetic_slo_entity.py +95 -0
  414. instana_client/models/synthetic_test.py +149 -0
  415. instana_client/models/synthetic_time_threshold.py +110 -0
  416. instana_client/models/synthetic_type_configuration.py +141 -0
  417. instana_client/models/synthetics_event_result.py +110 -0
  418. instana_client/models/system_rule.py +91 -0
  419. instana_client/models/system_rule_label.py +90 -0
  420. instana_client/models/tag.py +123 -0
  421. instana_client/models/tag_catalog.py +106 -0
  422. instana_client/models/tag_filter.py +113 -0
  423. instana_client/models/tag_filter_expression.py +106 -0
  424. instana_client/models/tag_filter_expression_element.py +111 -0
  425. instana_client/models/tag_matcher_dto.py +110 -0
  426. instana_client/models/tag_tree_level.py +109 -0
  427. instana_client/models/tag_tree_node.py +113 -0
  428. instana_client/models/tag_tree_tag.py +103 -0
  429. instana_client/models/test_common_properties.py +136 -0
  430. instana_client/models/test_result.py +105 -0
  431. instana_client/models/test_result_common_properties.py +108 -0
  432. instana_client/models/test_result_detail_data.py +112 -0
  433. instana_client/models/test_result_item.py +106 -0
  434. instana_client/models/test_result_list_item.py +94 -0
  435. instana_client/models/test_result_list_result.py +103 -0
  436. instana_client/models/test_result_metadata.py +94 -0
  437. instana_client/models/test_result_subtransaction.py +90 -0
  438. instana_client/models/threshold.py +122 -0
  439. instana_client/models/threshold_config_rule.py +114 -0
  440. instana_client/models/threshold_rule.py +125 -0
  441. instana_client/models/throughput_application_alert_rule.py +90 -0
  442. instana_client/models/throughput_mobile_app_alert_rule.py +90 -0
  443. instana_client/models/throughput_website_alert_rule.py +90 -0
  444. instana_client/models/time_frame.py +91 -0
  445. instana_client/models/time_window.py +120 -0
  446. instana_client/models/topology.py +106 -0
  447. instana_client/models/trace.py +109 -0
  448. instana_client/models/trace_activity_tree_node_details.py +139 -0
  449. instana_client/models/trace_download_result.py +111 -0
  450. instana_client/models/trace_groups_item.py +95 -0
  451. instana_client/models/trace_groups_result.py +111 -0
  452. instana_client/models/trace_impact_application_time_threshold.py +92 -0
  453. instana_client/models/trace_item.py +94 -0
  454. instana_client/models/trace_result.py +111 -0
  455. instana_client/models/traffic_blueprint_indicator.py +104 -0
  456. instana_client/models/trigger.py +99 -0
  457. instana_client/models/type_configuration.py +107 -0
  458. instana_client/models/unsupported_http_path_segment_matching_rule.py +90 -0
  459. instana_client/models/updated_business_perspective_config.py +97 -0
  460. instana_client/models/usage_result.py +98 -0
  461. instana_client/models/usage_result_items.py +90 -0
  462. instana_client/models/user_basic_result.py +92 -0
  463. instana_client/models/user_impact_mobile_app_time_threshold.py +103 -0
  464. instana_client/models/user_impact_website_time_threshold.py +103 -0
  465. instana_client/models/user_result.py +98 -0
  466. instana_client/models/users_result.py +106 -0
  467. instana_client/models/validated_alerting_channel_input_info.py +123 -0
  468. instana_client/models/validated_alerting_configuration.py +121 -0
  469. instana_client/models/validated_maintenance_config_v2_with_state_and_occurrence.py +135 -0
  470. instana_client/models/validated_maintenance_config_with_status.py +116 -0
  471. instana_client/models/victor_ops_integration.py +94 -0
  472. instana_client/models/violations_in_period_application_time_threshold.py +92 -0
  473. instana_client/models/violations_in_period_mobile_app_time_threshold.py +92 -0
  474. instana_client/models/violations_in_period_website_time_threshold.py +92 -0
  475. instana_client/models/violations_in_sequence_application_time_threshold.py +89 -0
  476. instana_client/models/violations_in_sequence_infra_time_threshold.py +89 -0
  477. instana_client/models/violations_in_sequence_log_time_threshold.py +89 -0
  478. instana_client/models/violations_in_sequence_mobile_app_time_threshold.py +89 -0
  479. instana_client/models/violations_in_sequence_synthetic_time_threshold.py +89 -0
  480. instana_client/models/violations_in_sequence_website_time_threshold.py +89 -0
  481. instana_client/models/watson_ai_ops_webhook_integration.py +94 -0
  482. instana_client/models/webex_teams_webhook_integration.py +92 -0
  483. instana_client/models/webhook_integration.py +94 -0
  484. instana_client/models/webpage_action_configuration.py +109 -0
  485. instana_client/models/webpage_script_configuration.py +109 -0
  486. instana_client/models/website.py +92 -0
  487. instana_client/models/website_alert_config.py +166 -0
  488. instana_client/models/website_alert_config_with_metadata.py +176 -0
  489. instana_client/models/website_alert_rule.py +132 -0
  490. instana_client/models/website_apdex_entity.py +107 -0
  491. instana_client/models/website_beacon_groups_item.py +95 -0
  492. instana_client/models/website_beacon_groups_result.py +111 -0
  493. instana_client/models/website_beacon_result.py +111 -0
  494. instana_client/models/website_beacon_tag_group.py +100 -0
  495. instana_client/models/website_beacons_item.py +94 -0
  496. instana_client/models/website_event_based_sli_entity.py +110 -0
  497. instana_client/models/website_event_result.py +108 -0
  498. instana_client/models/website_metric_result.py +88 -0
  499. instana_client/models/website_monitoring_beacon.py +301 -0
  500. instana_client/models/website_monitoring_metric_description.py +123 -0
  501. instana_client/models/website_monitoring_metrics_configuration.py +99 -0
  502. instana_client/models/website_slo_entity.py +104 -0
  503. instana_client/models/website_time_based_sli_entity.py +105 -0
  504. instana_client/models/website_time_threshold.py +115 -0
  505. instana_client/models/widget.py +103 -0
  506. instana_client/models/with_metadata.py +172 -0
  507. instana_client/models/with_resolved_name.py +102 -0
  508. instana_client/models/z_chat_ops_integration.py +97 -0
  509. instana_client/py.typed +0 -0
  510. instana_client/rest.py +258 -0
  511. instana_client-1.0.0.dist-info/METADATA +25 -0
  512. instana_client-1.0.0.dist-info/RECORD +515 -0
  513. instana_client-1.0.0.dist-info/WHEEL +5 -0
  514. instana_client-1.0.0.dist-info/licenses/LICENSE +202 -0
  515. instana_client-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2524 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Instana REST API documentation
5
+
6
+ Searching for answers and best pratices? Check our [IBM Instana Community](https://community.ibm.com/community/user/aiops/communities/community-home?CommunityKey=58f324a3-3104-41be-9510-5b7c413cc48f). ## Overview The Instana REST API provides programmatic access to the Instana platform. It can be used to retrieve data available through the Instana UI Dashboard -- metrics, events, traces, etc -- and also to automate configuration tasks such as user management. ### Navigating the API documentation The API endpoints are grouped by product area and functionality. This generally maps to how our UI Dashboard is organized, hopefully making it easier to locate which endpoints you'd use to fetch the data you see visualized in our UI. The [UI sections](https://www.ibm.com/docs/en/instana-observability/current?topic=working-user-interface#navigation-menu) include: - Websites & Mobile Apps - Applications - Infrastructure - Synthetic Monitoring - Events - Automation - Service Levels - Settings - etc ### Rate Limiting A rate limit is applied to API usage. Up to 5,000 calls per hour can be made. How many remaining calls can be made and when this call limit resets, can inspected via three headers that are part of the responses of the API server. - **X-RateLimit-Limit:** Shows the maximum number of calls that may be executed per hour. - **X-RateLimit-Remaining:** How many calls may still be executed within the current hour. - **X-RateLimit-Reset:** Time when the remaining calls will be reset to the limit. For compatibility reasons with other rate limited APIs, this date is not the date in milliseconds, but instead in seconds since 1970-01-01T00:00:00+00:00. ### Further Reading We provide additional documentation for our REST API in our [product documentation](https://www.ibm.com/docs/en/instana-observability/current?topic=apis-web-rest-api). Here you'll also find some common queries for retrieving data and configuring Instana. ## Getting Started with the REST API ### API base URL The base URL for an specific instance of Instana can be determined using the tenant and unit information. - `base`: This is the base URL of a tenant unit, e.g. `https://test-example.instana.io`. This is the same URL that is used to access the Instana user interface. - `apiToken`: Requests against the Instana API require valid API tokens. An initial API token can be generated via the Instana user interface. Any additional API tokens can be generated via the API itself. ### Curl Example Here is an Example to use the REST API with Curl. First lets get all the available metrics with possible aggregations with a GET call. ```bash curl --request GET \\ --url https://test-instana.instana.io/api/application-monitoring/catalog/metrics \\ --header 'authorization: apiToken xxxxxxxxxxxxxxxx' ``` Next we can get every call grouped by the endpoint name that has an error count greater then zero. As a metric we could get the mean error rate for example. ```bash curl --request POST \\ --url https://test-instana.instana.io/api/application-monitoring/analyze/call-groups \\ --header 'authorization: apiToken xxxxxxxxxxxxxxxx' \\ --header 'content-type: application/json' \\ --data '{ \"group\":{ \"groupbyTag\":\"endpoint.name\" }, \"tagFilters\":[ { \"name\":\"call.error.count\", \"value\":\"0\", \"operator\":\"GREATER_THAN\" } ], \"metrics\":[ { \"metric\":\"errors\", \"aggregation\":\"MEAN\" } ] }' ``` ### Generating REST API clients The API is specified using the [OpenAPI v3](https://github.com/OAI/OpenAPI-Specification) (previously known as Swagger) format. You can download the current specification at our [GitHub API documentation](https://instana.github.io/openapi/openapi.yaml). OpenAPI tries to solve the issue of ever-evolving APIs and clients lagging behind. Please make sure that you always use the latest version of the generator, as a number of improvements are regularly made. To generate a client library for your language, you can use the [OpenAPI client generators](https://github.com/OpenAPITools/openapi-generator). #### Go For example, to generate a client library for Go to interact with our backend, you can use the following script; mind replacing the values of the `UNIT_NAME` and `TENANT_NAME` environment variables using those for your tenant unit: ```bash #!/bin/bash ### This script assumes you have the `java` and `wget` commands on the path export UNIT_NAME='myunit' # for example: prod export TENANT_NAME='mytenant' # for example: awesomecompany //Download the generator to your current working directory: wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1/openapi-generator-cli-4.3.1.jar -O openapi-generator-cli.jar --server-variables \"tenant=${TENANT_NAME},unit=${UNIT_NAME}\" //generate a client library that you can vendor into your repository java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g go \\ -o pkg/instana/openapi \\ --skip-validate-spec //(optional) format the Go code according to the Go code standard gofmt -s -w pkg/instana/openapi ``` The generated clients contain comprehensive READMEs, and you can start right away using the client from the example above: ```go import instana \"./pkg/instana/openapi\" // readTags will read all available application monitoring tags along with their type and category func readTags() { configuration := instana.NewConfiguration() configuration.Host = \"tenant-unit.instana.io\" configuration.BasePath = \"https://tenant-unit.instana.io\" client := instana.NewAPIClient(configuration) auth := context.WithValue(context.Background(), instana.ContextAPIKey, instana.APIKey{ Key: apiKey, Prefix: \"apiToken\", }) tags, _, err := client.ApplicationCatalogApi.GetApplicationTagCatalog(auth) if err != nil { fmt.Fatalf(\"Error calling the API, aborting.\") } for _, tag := range tags { fmt.Printf(\"%s (%s): %s\\n\", tag.Category, tag.Type, tag.Name) } } ``` #### Java Follow the instructions provided in the official documentation from [OpenAPI Tools](https://github.com/OpenAPITools) to download the [openapi-generator-cli.jar](https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#13---download-jar). Depending on your environment, use one of the following java http client implementations which will create a valid client for our OpenAPI specification: ``` //Nativ Java HTTP Client java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8 --library native //Spring WebClient java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8,hideGenerationTimestamp=true --library webclient //Spring RestTemplate java -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8,hideGenerationTimestamp=true --library resttemplate ```
7
+
8
+ The version of the OpenAPI document: 1.291.1002
9
+ Contact: support@instana.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import Field, StrictInt, StrictStr
21
+ from typing import List, Optional
22
+ from typing_extensions import Annotated
23
+ from instana_client.models.config_version import ConfigVersion
24
+ from instana_client.models.infra_alert_config import InfraAlertConfig
25
+ from instana_client.models.infra_alert_config_with_metadata import InfraAlertConfigWithMetadata
26
+
27
+ from instana_client.api_client import ApiClient, RequestSerialized
28
+ from instana_client.api_response import ApiResponse
29
+ from instana_client.rest import RESTResponseType
30
+
31
+
32
+ class InfrastructureAlertConfigurationApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+
45
+ @validate_call
46
+ def create_infra_alert_config(
47
+ self,
48
+ infra_alert_config: InfraAlertConfig,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> InfraAlertConfigWithMetadata:
62
+ """Create Infra Alert Config
63
+
64
+
65
+ :param infra_alert_config: (required)
66
+ :type infra_alert_config: InfraAlertConfig
67
+ :param _request_timeout: timeout setting for this request. If one
68
+ number provided, it will be total request
69
+ timeout. It can also be a pair (tuple) of
70
+ (connection, read) timeouts.
71
+ :type _request_timeout: int, tuple(int, int), optional
72
+ :param _request_auth: set to override the auth_settings for an a single
73
+ request; this effectively ignores the
74
+ authentication in the spec for a single request.
75
+ :type _request_auth: dict, optional
76
+ :param _content_type: force content-type for the request.
77
+ :type _content_type: str, Optional
78
+ :param _headers: set to override the headers for a single
79
+ request; this effectively ignores the headers
80
+ in the spec for a single request.
81
+ :type _headers: dict, optional
82
+ :param _host_index: set to override the host_index for a single
83
+ request; this effectively ignores the host_index
84
+ in the spec for a single request.
85
+ :type _host_index: int, optional
86
+ :return: Returns the result object.
87
+ """ # noqa: E501
88
+
89
+ _param = self._create_infra_alert_config_serialize(
90
+ infra_alert_config=infra_alert_config,
91
+ _request_auth=_request_auth,
92
+ _content_type=_content_type,
93
+ _headers=_headers,
94
+ _host_index=_host_index
95
+ )
96
+
97
+ _response_types_map: Dict[str, Optional[str]] = {
98
+ '200': "InfraAlertConfigWithMetadata",
99
+ }
100
+ response_data = self.api_client.call_api(
101
+ *_param,
102
+ _request_timeout=_request_timeout
103
+ )
104
+ response_data.read()
105
+ return self.api_client.response_deserialize(
106
+ response_data=response_data,
107
+ response_types_map=_response_types_map,
108
+ ).data
109
+
110
+
111
+ @validate_call
112
+ def create_infra_alert_config_with_http_info(
113
+ self,
114
+ infra_alert_config: InfraAlertConfig,
115
+ _request_timeout: Union[
116
+ None,
117
+ Annotated[StrictFloat, Field(gt=0)],
118
+ Tuple[
119
+ Annotated[StrictFloat, Field(gt=0)],
120
+ Annotated[StrictFloat, Field(gt=0)]
121
+ ]
122
+ ] = None,
123
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
124
+ _content_type: Optional[StrictStr] = None,
125
+ _headers: Optional[Dict[StrictStr, Any]] = None,
126
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
127
+ ) -> ApiResponse[InfraAlertConfigWithMetadata]:
128
+ """Create Infra Alert Config
129
+
130
+
131
+ :param infra_alert_config: (required)
132
+ :type infra_alert_config: InfraAlertConfig
133
+ :param _request_timeout: timeout setting for this request. If one
134
+ number provided, it will be total request
135
+ timeout. It can also be a pair (tuple) of
136
+ (connection, read) timeouts.
137
+ :type _request_timeout: int, tuple(int, int), optional
138
+ :param _request_auth: set to override the auth_settings for an a single
139
+ request; this effectively ignores the
140
+ authentication in the spec for a single request.
141
+ :type _request_auth: dict, optional
142
+ :param _content_type: force content-type for the request.
143
+ :type _content_type: str, Optional
144
+ :param _headers: set to override the headers for a single
145
+ request; this effectively ignores the headers
146
+ in the spec for a single request.
147
+ :type _headers: dict, optional
148
+ :param _host_index: set to override the host_index for a single
149
+ request; this effectively ignores the host_index
150
+ in the spec for a single request.
151
+ :type _host_index: int, optional
152
+ :return: Returns the result object.
153
+ """ # noqa: E501
154
+
155
+ _param = self._create_infra_alert_config_serialize(
156
+ infra_alert_config=infra_alert_config,
157
+ _request_auth=_request_auth,
158
+ _content_type=_content_type,
159
+ _headers=_headers,
160
+ _host_index=_host_index
161
+ )
162
+
163
+ _response_types_map: Dict[str, Optional[str]] = {
164
+ '200': "InfraAlertConfigWithMetadata",
165
+ }
166
+ response_data = self.api_client.call_api(
167
+ *_param,
168
+ _request_timeout=_request_timeout
169
+ )
170
+ response_data.read()
171
+ return self.api_client.response_deserialize(
172
+ response_data=response_data,
173
+ response_types_map=_response_types_map,
174
+ )
175
+
176
+
177
+ @validate_call
178
+ def create_infra_alert_config_without_preload_content(
179
+ self,
180
+ infra_alert_config: InfraAlertConfig,
181
+ _request_timeout: Union[
182
+ None,
183
+ Annotated[StrictFloat, Field(gt=0)],
184
+ Tuple[
185
+ Annotated[StrictFloat, Field(gt=0)],
186
+ Annotated[StrictFloat, Field(gt=0)]
187
+ ]
188
+ ] = None,
189
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
190
+ _content_type: Optional[StrictStr] = None,
191
+ _headers: Optional[Dict[StrictStr, Any]] = None,
192
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
193
+ ) -> RESTResponseType:
194
+ """Create Infra Alert Config
195
+
196
+
197
+ :param infra_alert_config: (required)
198
+ :type infra_alert_config: InfraAlertConfig
199
+ :param _request_timeout: timeout setting for this request. If one
200
+ number provided, it will be total request
201
+ timeout. It can also be a pair (tuple) of
202
+ (connection, read) timeouts.
203
+ :type _request_timeout: int, tuple(int, int), optional
204
+ :param _request_auth: set to override the auth_settings for an a single
205
+ request; this effectively ignores the
206
+ authentication in the spec for a single request.
207
+ :type _request_auth: dict, optional
208
+ :param _content_type: force content-type for the request.
209
+ :type _content_type: str, Optional
210
+ :param _headers: set to override the headers for a single
211
+ request; this effectively ignores the headers
212
+ in the spec for a single request.
213
+ :type _headers: dict, optional
214
+ :param _host_index: set to override the host_index for a single
215
+ request; this effectively ignores the host_index
216
+ in the spec for a single request.
217
+ :type _host_index: int, optional
218
+ :return: Returns the result object.
219
+ """ # noqa: E501
220
+
221
+ _param = self._create_infra_alert_config_serialize(
222
+ infra_alert_config=infra_alert_config,
223
+ _request_auth=_request_auth,
224
+ _content_type=_content_type,
225
+ _headers=_headers,
226
+ _host_index=_host_index
227
+ )
228
+
229
+ _response_types_map: Dict[str, Optional[str]] = {
230
+ '200': "InfraAlertConfigWithMetadata",
231
+ }
232
+ response_data = self.api_client.call_api(
233
+ *_param,
234
+ _request_timeout=_request_timeout
235
+ )
236
+ return response_data.response
237
+
238
+
239
+ def _create_infra_alert_config_serialize(
240
+ self,
241
+ infra_alert_config,
242
+ _request_auth,
243
+ _content_type,
244
+ _headers,
245
+ _host_index,
246
+ ) -> RequestSerialized:
247
+
248
+ _host = None
249
+
250
+ _collection_formats: Dict[str, str] = {
251
+ }
252
+
253
+ _path_params: Dict[str, str] = {}
254
+ _query_params: List[Tuple[str, str]] = []
255
+ _header_params: Dict[str, Optional[str]] = _headers or {}
256
+ _form_params: List[Tuple[str, str]] = []
257
+ _files: Dict[
258
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
259
+ ] = {}
260
+ _body_params: Optional[bytes] = None
261
+
262
+ # process the path parameters
263
+ # process the query parameters
264
+ # process the header parameters
265
+ # process the form parameters
266
+ # process the body parameter
267
+ if infra_alert_config is not None:
268
+ _body_params = infra_alert_config
269
+
270
+
271
+ # set the HTTP header `Accept`
272
+ if 'Accept' not in _header_params:
273
+ _header_params['Accept'] = self.api_client.select_header_accept(
274
+ [
275
+ 'application/json'
276
+ ]
277
+ )
278
+
279
+ # set the HTTP header `Content-Type`
280
+ if _content_type:
281
+ _header_params['Content-Type'] = _content_type
282
+ else:
283
+ _default_content_type = (
284
+ self.api_client.select_header_content_type(
285
+ [
286
+ 'application/json'
287
+ ]
288
+ )
289
+ )
290
+ if _default_content_type is not None:
291
+ _header_params['Content-Type'] = _default_content_type
292
+
293
+ # authentication setting
294
+ _auth_settings: List[str] = [
295
+ 'ApiKeyAuth'
296
+ ]
297
+
298
+ return self.api_client.param_serialize(
299
+ method='POST',
300
+ resource_path='/api/events/settings/infra-alert-configs',
301
+ path_params=_path_params,
302
+ query_params=_query_params,
303
+ header_params=_header_params,
304
+ body=_body_params,
305
+ post_params=_form_params,
306
+ files=_files,
307
+ auth_settings=_auth_settings,
308
+ collection_formats=_collection_formats,
309
+ _host=_host,
310
+ _request_auth=_request_auth
311
+ )
312
+
313
+
314
+
315
+
316
+ @validate_call
317
+ def delete_infra_alert_config(
318
+ self,
319
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to delete")],
320
+ _request_timeout: Union[
321
+ None,
322
+ Annotated[StrictFloat, Field(gt=0)],
323
+ Tuple[
324
+ Annotated[StrictFloat, Field(gt=0)],
325
+ Annotated[StrictFloat, Field(gt=0)]
326
+ ]
327
+ ] = None,
328
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
329
+ _content_type: Optional[StrictStr] = None,
330
+ _headers: Optional[Dict[StrictStr, Any]] = None,
331
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
332
+ ) -> None:
333
+ """Delete Infra Alert Config
334
+
335
+
336
+ :param id: ID of the Infra Smart Alert configuration to delete (required)
337
+ :type id: str
338
+ :param _request_timeout: timeout setting for this request. If one
339
+ number provided, it will be total request
340
+ timeout. It can also be a pair (tuple) of
341
+ (connection, read) timeouts.
342
+ :type _request_timeout: int, tuple(int, int), optional
343
+ :param _request_auth: set to override the auth_settings for an a single
344
+ request; this effectively ignores the
345
+ authentication in the spec for a single request.
346
+ :type _request_auth: dict, optional
347
+ :param _content_type: force content-type for the request.
348
+ :type _content_type: str, Optional
349
+ :param _headers: set to override the headers for a single
350
+ request; this effectively ignores the headers
351
+ in the spec for a single request.
352
+ :type _headers: dict, optional
353
+ :param _host_index: set to override the host_index for a single
354
+ request; this effectively ignores the host_index
355
+ in the spec for a single request.
356
+ :type _host_index: int, optional
357
+ :return: Returns the result object.
358
+ """ # noqa: E501
359
+
360
+ _param = self._delete_infra_alert_config_serialize(
361
+ id=id,
362
+ _request_auth=_request_auth,
363
+ _content_type=_content_type,
364
+ _headers=_headers,
365
+ _host_index=_host_index
366
+ )
367
+
368
+ _response_types_map: Dict[str, Optional[str]] = {
369
+ }
370
+ response_data = self.api_client.call_api(
371
+ *_param,
372
+ _request_timeout=_request_timeout
373
+ )
374
+ response_data.read()
375
+ return self.api_client.response_deserialize(
376
+ response_data=response_data,
377
+ response_types_map=_response_types_map,
378
+ ).data
379
+
380
+
381
+ @validate_call
382
+ def delete_infra_alert_config_with_http_info(
383
+ self,
384
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to delete")],
385
+ _request_timeout: Union[
386
+ None,
387
+ Annotated[StrictFloat, Field(gt=0)],
388
+ Tuple[
389
+ Annotated[StrictFloat, Field(gt=0)],
390
+ Annotated[StrictFloat, Field(gt=0)]
391
+ ]
392
+ ] = None,
393
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
394
+ _content_type: Optional[StrictStr] = None,
395
+ _headers: Optional[Dict[StrictStr, Any]] = None,
396
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
397
+ ) -> ApiResponse[None]:
398
+ """Delete Infra Alert Config
399
+
400
+
401
+ :param id: ID of the Infra Smart Alert configuration to delete (required)
402
+ :type id: str
403
+ :param _request_timeout: timeout setting for this request. If one
404
+ number provided, it will be total request
405
+ timeout. It can also be a pair (tuple) of
406
+ (connection, read) timeouts.
407
+ :type _request_timeout: int, tuple(int, int), optional
408
+ :param _request_auth: set to override the auth_settings for an a single
409
+ request; this effectively ignores the
410
+ authentication in the spec for a single request.
411
+ :type _request_auth: dict, optional
412
+ :param _content_type: force content-type for the request.
413
+ :type _content_type: str, Optional
414
+ :param _headers: set to override the headers for a single
415
+ request; this effectively ignores the headers
416
+ in the spec for a single request.
417
+ :type _headers: dict, optional
418
+ :param _host_index: set to override the host_index for a single
419
+ request; this effectively ignores the host_index
420
+ in the spec for a single request.
421
+ :type _host_index: int, optional
422
+ :return: Returns the result object.
423
+ """ # noqa: E501
424
+
425
+ _param = self._delete_infra_alert_config_serialize(
426
+ id=id,
427
+ _request_auth=_request_auth,
428
+ _content_type=_content_type,
429
+ _headers=_headers,
430
+ _host_index=_host_index
431
+ )
432
+
433
+ _response_types_map: Dict[str, Optional[str]] = {
434
+ }
435
+ response_data = self.api_client.call_api(
436
+ *_param,
437
+ _request_timeout=_request_timeout
438
+ )
439
+ response_data.read()
440
+ return self.api_client.response_deserialize(
441
+ response_data=response_data,
442
+ response_types_map=_response_types_map,
443
+ )
444
+
445
+
446
+ @validate_call
447
+ def delete_infra_alert_config_without_preload_content(
448
+ self,
449
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to delete")],
450
+ _request_timeout: Union[
451
+ None,
452
+ Annotated[StrictFloat, Field(gt=0)],
453
+ Tuple[
454
+ Annotated[StrictFloat, Field(gt=0)],
455
+ Annotated[StrictFloat, Field(gt=0)]
456
+ ]
457
+ ] = None,
458
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
459
+ _content_type: Optional[StrictStr] = None,
460
+ _headers: Optional[Dict[StrictStr, Any]] = None,
461
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
462
+ ) -> RESTResponseType:
463
+ """Delete Infra Alert Config
464
+
465
+
466
+ :param id: ID of the Infra Smart Alert configuration to delete (required)
467
+ :type id: str
468
+ :param _request_timeout: timeout setting for this request. If one
469
+ number provided, it will be total request
470
+ timeout. It can also be a pair (tuple) of
471
+ (connection, read) timeouts.
472
+ :type _request_timeout: int, tuple(int, int), optional
473
+ :param _request_auth: set to override the auth_settings for an a single
474
+ request; this effectively ignores the
475
+ authentication in the spec for a single request.
476
+ :type _request_auth: dict, optional
477
+ :param _content_type: force content-type for the request.
478
+ :type _content_type: str, Optional
479
+ :param _headers: set to override the headers for a single
480
+ request; this effectively ignores the headers
481
+ in the spec for a single request.
482
+ :type _headers: dict, optional
483
+ :param _host_index: set to override the host_index for a single
484
+ request; this effectively ignores the host_index
485
+ in the spec for a single request.
486
+ :type _host_index: int, optional
487
+ :return: Returns the result object.
488
+ """ # noqa: E501
489
+
490
+ _param = self._delete_infra_alert_config_serialize(
491
+ id=id,
492
+ _request_auth=_request_auth,
493
+ _content_type=_content_type,
494
+ _headers=_headers,
495
+ _host_index=_host_index
496
+ )
497
+
498
+ _response_types_map: Dict[str, Optional[str]] = {
499
+ }
500
+ response_data = self.api_client.call_api(
501
+ *_param,
502
+ _request_timeout=_request_timeout
503
+ )
504
+ return response_data.response
505
+
506
+
507
+ def _delete_infra_alert_config_serialize(
508
+ self,
509
+ id,
510
+ _request_auth,
511
+ _content_type,
512
+ _headers,
513
+ _host_index,
514
+ ) -> RequestSerialized:
515
+
516
+ _host = None
517
+
518
+ _collection_formats: Dict[str, str] = {
519
+ }
520
+
521
+ _path_params: Dict[str, str] = {}
522
+ _query_params: List[Tuple[str, str]] = []
523
+ _header_params: Dict[str, Optional[str]] = _headers or {}
524
+ _form_params: List[Tuple[str, str]] = []
525
+ _files: Dict[
526
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
527
+ ] = {}
528
+ _body_params: Optional[bytes] = None
529
+
530
+ # process the path parameters
531
+ if id is not None:
532
+ _path_params['id'] = id
533
+ # process the query parameters
534
+ # process the header parameters
535
+ # process the form parameters
536
+ # process the body parameter
537
+
538
+
539
+ # set the HTTP header `Accept`
540
+ if 'Accept' not in _header_params:
541
+ _header_params['Accept'] = self.api_client.select_header_accept(
542
+ [
543
+ 'application/json'
544
+ ]
545
+ )
546
+
547
+
548
+ # authentication setting
549
+ _auth_settings: List[str] = [
550
+ 'ApiKeyAuth'
551
+ ]
552
+
553
+ return self.api_client.param_serialize(
554
+ method='DELETE',
555
+ resource_path='/api/events/settings/infra-alert-configs/{id}',
556
+ path_params=_path_params,
557
+ query_params=_query_params,
558
+ header_params=_header_params,
559
+ body=_body_params,
560
+ post_params=_form_params,
561
+ files=_files,
562
+ auth_settings=_auth_settings,
563
+ collection_formats=_collection_formats,
564
+ _host=_host,
565
+ _request_auth=_request_auth
566
+ )
567
+
568
+
569
+
570
+
571
+ @validate_call
572
+ def disable_infra_alert_config(
573
+ self,
574
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to disable")],
575
+ body: Optional[StrictStr] = None,
576
+ _request_timeout: Union[
577
+ None,
578
+ Annotated[StrictFloat, Field(gt=0)],
579
+ Tuple[
580
+ Annotated[StrictFloat, Field(gt=0)],
581
+ Annotated[StrictFloat, Field(gt=0)]
582
+ ]
583
+ ] = None,
584
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
585
+ _content_type: Optional[StrictStr] = None,
586
+ _headers: Optional[Dict[StrictStr, Any]] = None,
587
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
588
+ ) -> None:
589
+ """Disable Infra Alert Config
590
+
591
+
592
+ :param id: ID of the Infra Smart Alert configuration to disable (required)
593
+ :type id: str
594
+ :param body:
595
+ :type body: str
596
+ :param _request_timeout: timeout setting for this request. If one
597
+ number provided, it will be total request
598
+ timeout. It can also be a pair (tuple) of
599
+ (connection, read) timeouts.
600
+ :type _request_timeout: int, tuple(int, int), optional
601
+ :param _request_auth: set to override the auth_settings for an a single
602
+ request; this effectively ignores the
603
+ authentication in the spec for a single request.
604
+ :type _request_auth: dict, optional
605
+ :param _content_type: force content-type for the request.
606
+ :type _content_type: str, Optional
607
+ :param _headers: set to override the headers for a single
608
+ request; this effectively ignores the headers
609
+ in the spec for a single request.
610
+ :type _headers: dict, optional
611
+ :param _host_index: set to override the host_index for a single
612
+ request; this effectively ignores the host_index
613
+ in the spec for a single request.
614
+ :type _host_index: int, optional
615
+ :return: Returns the result object.
616
+ """ # noqa: E501
617
+
618
+ _param = self._disable_infra_alert_config_serialize(
619
+ id=id,
620
+ body=body,
621
+ _request_auth=_request_auth,
622
+ _content_type=_content_type,
623
+ _headers=_headers,
624
+ _host_index=_host_index
625
+ )
626
+
627
+ _response_types_map: Dict[str, Optional[str]] = {
628
+ }
629
+ response_data = self.api_client.call_api(
630
+ *_param,
631
+ _request_timeout=_request_timeout
632
+ )
633
+ response_data.read()
634
+ return self.api_client.response_deserialize(
635
+ response_data=response_data,
636
+ response_types_map=_response_types_map,
637
+ ).data
638
+
639
+
640
+ @validate_call
641
+ def disable_infra_alert_config_with_http_info(
642
+ self,
643
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to disable")],
644
+ body: Optional[StrictStr] = None,
645
+ _request_timeout: Union[
646
+ None,
647
+ Annotated[StrictFloat, Field(gt=0)],
648
+ Tuple[
649
+ Annotated[StrictFloat, Field(gt=0)],
650
+ Annotated[StrictFloat, Field(gt=0)]
651
+ ]
652
+ ] = None,
653
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
654
+ _content_type: Optional[StrictStr] = None,
655
+ _headers: Optional[Dict[StrictStr, Any]] = None,
656
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
657
+ ) -> ApiResponse[None]:
658
+ """Disable Infra Alert Config
659
+
660
+
661
+ :param id: ID of the Infra Smart Alert configuration to disable (required)
662
+ :type id: str
663
+ :param body:
664
+ :type body: str
665
+ :param _request_timeout: timeout setting for this request. If one
666
+ number provided, it will be total request
667
+ timeout. It can also be a pair (tuple) of
668
+ (connection, read) timeouts.
669
+ :type _request_timeout: int, tuple(int, int), optional
670
+ :param _request_auth: set to override the auth_settings for an a single
671
+ request; this effectively ignores the
672
+ authentication in the spec for a single request.
673
+ :type _request_auth: dict, optional
674
+ :param _content_type: force content-type for the request.
675
+ :type _content_type: str, Optional
676
+ :param _headers: set to override the headers for a single
677
+ request; this effectively ignores the headers
678
+ in the spec for a single request.
679
+ :type _headers: dict, optional
680
+ :param _host_index: set to override the host_index for a single
681
+ request; this effectively ignores the host_index
682
+ in the spec for a single request.
683
+ :type _host_index: int, optional
684
+ :return: Returns the result object.
685
+ """ # noqa: E501
686
+
687
+ _param = self._disable_infra_alert_config_serialize(
688
+ id=id,
689
+ body=body,
690
+ _request_auth=_request_auth,
691
+ _content_type=_content_type,
692
+ _headers=_headers,
693
+ _host_index=_host_index
694
+ )
695
+
696
+ _response_types_map: Dict[str, Optional[str]] = {
697
+ }
698
+ response_data = self.api_client.call_api(
699
+ *_param,
700
+ _request_timeout=_request_timeout
701
+ )
702
+ response_data.read()
703
+ return self.api_client.response_deserialize(
704
+ response_data=response_data,
705
+ response_types_map=_response_types_map,
706
+ )
707
+
708
+
709
+ @validate_call
710
+ def disable_infra_alert_config_without_preload_content(
711
+ self,
712
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to disable")],
713
+ body: Optional[StrictStr] = None,
714
+ _request_timeout: Union[
715
+ None,
716
+ Annotated[StrictFloat, Field(gt=0)],
717
+ Tuple[
718
+ Annotated[StrictFloat, Field(gt=0)],
719
+ Annotated[StrictFloat, Field(gt=0)]
720
+ ]
721
+ ] = None,
722
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
723
+ _content_type: Optional[StrictStr] = None,
724
+ _headers: Optional[Dict[StrictStr, Any]] = None,
725
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
726
+ ) -> RESTResponseType:
727
+ """Disable Infra Alert Config
728
+
729
+
730
+ :param id: ID of the Infra Smart Alert configuration to disable (required)
731
+ :type id: str
732
+ :param body:
733
+ :type body: str
734
+ :param _request_timeout: timeout setting for this request. If one
735
+ number provided, it will be total request
736
+ timeout. It can also be a pair (tuple) of
737
+ (connection, read) timeouts.
738
+ :type _request_timeout: int, tuple(int, int), optional
739
+ :param _request_auth: set to override the auth_settings for an a single
740
+ request; this effectively ignores the
741
+ authentication in the spec for a single request.
742
+ :type _request_auth: dict, optional
743
+ :param _content_type: force content-type for the request.
744
+ :type _content_type: str, Optional
745
+ :param _headers: set to override the headers for a single
746
+ request; this effectively ignores the headers
747
+ in the spec for a single request.
748
+ :type _headers: dict, optional
749
+ :param _host_index: set to override the host_index for a single
750
+ request; this effectively ignores the host_index
751
+ in the spec for a single request.
752
+ :type _host_index: int, optional
753
+ :return: Returns the result object.
754
+ """ # noqa: E501
755
+
756
+ _param = self._disable_infra_alert_config_serialize(
757
+ id=id,
758
+ body=body,
759
+ _request_auth=_request_auth,
760
+ _content_type=_content_type,
761
+ _headers=_headers,
762
+ _host_index=_host_index
763
+ )
764
+
765
+ _response_types_map: Dict[str, Optional[str]] = {
766
+ }
767
+ response_data = self.api_client.call_api(
768
+ *_param,
769
+ _request_timeout=_request_timeout
770
+ )
771
+ return response_data.response
772
+
773
+
774
+ def _disable_infra_alert_config_serialize(
775
+ self,
776
+ id,
777
+ body,
778
+ _request_auth,
779
+ _content_type,
780
+ _headers,
781
+ _host_index,
782
+ ) -> RequestSerialized:
783
+
784
+ _host = None
785
+
786
+ _collection_formats: Dict[str, str] = {
787
+ }
788
+
789
+ _path_params: Dict[str, str] = {}
790
+ _query_params: List[Tuple[str, str]] = []
791
+ _header_params: Dict[str, Optional[str]] = _headers or {}
792
+ _form_params: List[Tuple[str, str]] = []
793
+ _files: Dict[
794
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
795
+ ] = {}
796
+ _body_params: Optional[bytes] = None
797
+
798
+ # process the path parameters
799
+ if id is not None:
800
+ _path_params['id'] = id
801
+ # process the query parameters
802
+ # process the header parameters
803
+ # process the form parameters
804
+ # process the body parameter
805
+ if body is not None:
806
+ _body_params = body
807
+
808
+
809
+ # set the HTTP header `Accept`
810
+ if 'Accept' not in _header_params:
811
+ _header_params['Accept'] = self.api_client.select_header_accept(
812
+ [
813
+ 'application/json'
814
+ ]
815
+ )
816
+
817
+ # set the HTTP header `Content-Type`
818
+ if _content_type:
819
+ _header_params['Content-Type'] = _content_type
820
+ else:
821
+ _default_content_type = (
822
+ self.api_client.select_header_content_type(
823
+ [
824
+ 'application/json'
825
+ ]
826
+ )
827
+ )
828
+ if _default_content_type is not None:
829
+ _header_params['Content-Type'] = _default_content_type
830
+
831
+ # authentication setting
832
+ _auth_settings: List[str] = [
833
+ 'ApiKeyAuth'
834
+ ]
835
+
836
+ return self.api_client.param_serialize(
837
+ method='PUT',
838
+ resource_path='/api/events/settings/infra-alert-configs/{id}/disable',
839
+ path_params=_path_params,
840
+ query_params=_query_params,
841
+ header_params=_header_params,
842
+ body=_body_params,
843
+ post_params=_form_params,
844
+ files=_files,
845
+ auth_settings=_auth_settings,
846
+ collection_formats=_collection_formats,
847
+ _host=_host,
848
+ _request_auth=_request_auth
849
+ )
850
+
851
+
852
+
853
+
854
+ @validate_call
855
+ def enable_infra_alert_config(
856
+ self,
857
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to enable")],
858
+ body: Optional[StrictStr] = None,
859
+ _request_timeout: Union[
860
+ None,
861
+ Annotated[StrictFloat, Field(gt=0)],
862
+ Tuple[
863
+ Annotated[StrictFloat, Field(gt=0)],
864
+ Annotated[StrictFloat, Field(gt=0)]
865
+ ]
866
+ ] = None,
867
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
868
+ _content_type: Optional[StrictStr] = None,
869
+ _headers: Optional[Dict[StrictStr, Any]] = None,
870
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
871
+ ) -> None:
872
+ """Enable Infra Alert Config
873
+
874
+
875
+ :param id: ID of the Infra Smart Alert configuration to enable (required)
876
+ :type id: str
877
+ :param body:
878
+ :type body: str
879
+ :param _request_timeout: timeout setting for this request. If one
880
+ number provided, it will be total request
881
+ timeout. It can also be a pair (tuple) of
882
+ (connection, read) timeouts.
883
+ :type _request_timeout: int, tuple(int, int), optional
884
+ :param _request_auth: set to override the auth_settings for an a single
885
+ request; this effectively ignores the
886
+ authentication in the spec for a single request.
887
+ :type _request_auth: dict, optional
888
+ :param _content_type: force content-type for the request.
889
+ :type _content_type: str, Optional
890
+ :param _headers: set to override the headers for a single
891
+ request; this effectively ignores the headers
892
+ in the spec for a single request.
893
+ :type _headers: dict, optional
894
+ :param _host_index: set to override the host_index for a single
895
+ request; this effectively ignores the host_index
896
+ in the spec for a single request.
897
+ :type _host_index: int, optional
898
+ :return: Returns the result object.
899
+ """ # noqa: E501
900
+
901
+ _param = self._enable_infra_alert_config_serialize(
902
+ id=id,
903
+ body=body,
904
+ _request_auth=_request_auth,
905
+ _content_type=_content_type,
906
+ _headers=_headers,
907
+ _host_index=_host_index
908
+ )
909
+
910
+ _response_types_map: Dict[str, Optional[str]] = {
911
+ }
912
+ response_data = self.api_client.call_api(
913
+ *_param,
914
+ _request_timeout=_request_timeout
915
+ )
916
+ response_data.read()
917
+ return self.api_client.response_deserialize(
918
+ response_data=response_data,
919
+ response_types_map=_response_types_map,
920
+ ).data
921
+
922
+
923
+ @validate_call
924
+ def enable_infra_alert_config_with_http_info(
925
+ self,
926
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to enable")],
927
+ body: Optional[StrictStr] = None,
928
+ _request_timeout: Union[
929
+ None,
930
+ Annotated[StrictFloat, Field(gt=0)],
931
+ Tuple[
932
+ Annotated[StrictFloat, Field(gt=0)],
933
+ Annotated[StrictFloat, Field(gt=0)]
934
+ ]
935
+ ] = None,
936
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
937
+ _content_type: Optional[StrictStr] = None,
938
+ _headers: Optional[Dict[StrictStr, Any]] = None,
939
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
940
+ ) -> ApiResponse[None]:
941
+ """Enable Infra Alert Config
942
+
943
+
944
+ :param id: ID of the Infra Smart Alert configuration to enable (required)
945
+ :type id: str
946
+ :param body:
947
+ :type body: str
948
+ :param _request_timeout: timeout setting for this request. If one
949
+ number provided, it will be total request
950
+ timeout. It can also be a pair (tuple) of
951
+ (connection, read) timeouts.
952
+ :type _request_timeout: int, tuple(int, int), optional
953
+ :param _request_auth: set to override the auth_settings for an a single
954
+ request; this effectively ignores the
955
+ authentication in the spec for a single request.
956
+ :type _request_auth: dict, optional
957
+ :param _content_type: force content-type for the request.
958
+ :type _content_type: str, Optional
959
+ :param _headers: set to override the headers for a single
960
+ request; this effectively ignores the headers
961
+ in the spec for a single request.
962
+ :type _headers: dict, optional
963
+ :param _host_index: set to override the host_index for a single
964
+ request; this effectively ignores the host_index
965
+ in the spec for a single request.
966
+ :type _host_index: int, optional
967
+ :return: Returns the result object.
968
+ """ # noqa: E501
969
+
970
+ _param = self._enable_infra_alert_config_serialize(
971
+ id=id,
972
+ body=body,
973
+ _request_auth=_request_auth,
974
+ _content_type=_content_type,
975
+ _headers=_headers,
976
+ _host_index=_host_index
977
+ )
978
+
979
+ _response_types_map: Dict[str, Optional[str]] = {
980
+ }
981
+ response_data = self.api_client.call_api(
982
+ *_param,
983
+ _request_timeout=_request_timeout
984
+ )
985
+ response_data.read()
986
+ return self.api_client.response_deserialize(
987
+ response_data=response_data,
988
+ response_types_map=_response_types_map,
989
+ )
990
+
991
+
992
+ @validate_call
993
+ def enable_infra_alert_config_without_preload_content(
994
+ self,
995
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to enable")],
996
+ body: Optional[StrictStr] = None,
997
+ _request_timeout: Union[
998
+ None,
999
+ Annotated[StrictFloat, Field(gt=0)],
1000
+ Tuple[
1001
+ Annotated[StrictFloat, Field(gt=0)],
1002
+ Annotated[StrictFloat, Field(gt=0)]
1003
+ ]
1004
+ ] = None,
1005
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1006
+ _content_type: Optional[StrictStr] = None,
1007
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1008
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1009
+ ) -> RESTResponseType:
1010
+ """Enable Infra Alert Config
1011
+
1012
+
1013
+ :param id: ID of the Infra Smart Alert configuration to enable (required)
1014
+ :type id: str
1015
+ :param body:
1016
+ :type body: str
1017
+ :param _request_timeout: timeout setting for this request. If one
1018
+ number provided, it will be total request
1019
+ timeout. It can also be a pair (tuple) of
1020
+ (connection, read) timeouts.
1021
+ :type _request_timeout: int, tuple(int, int), optional
1022
+ :param _request_auth: set to override the auth_settings for an a single
1023
+ request; this effectively ignores the
1024
+ authentication in the spec for a single request.
1025
+ :type _request_auth: dict, optional
1026
+ :param _content_type: force content-type for the request.
1027
+ :type _content_type: str, Optional
1028
+ :param _headers: set to override the headers for a single
1029
+ request; this effectively ignores the headers
1030
+ in the spec for a single request.
1031
+ :type _headers: dict, optional
1032
+ :param _host_index: set to override the host_index for a single
1033
+ request; this effectively ignores the host_index
1034
+ in the spec for a single request.
1035
+ :type _host_index: int, optional
1036
+ :return: Returns the result object.
1037
+ """ # noqa: E501
1038
+
1039
+ _param = self._enable_infra_alert_config_serialize(
1040
+ id=id,
1041
+ body=body,
1042
+ _request_auth=_request_auth,
1043
+ _content_type=_content_type,
1044
+ _headers=_headers,
1045
+ _host_index=_host_index
1046
+ )
1047
+
1048
+ _response_types_map: Dict[str, Optional[str]] = {
1049
+ }
1050
+ response_data = self.api_client.call_api(
1051
+ *_param,
1052
+ _request_timeout=_request_timeout
1053
+ )
1054
+ return response_data.response
1055
+
1056
+
1057
+ def _enable_infra_alert_config_serialize(
1058
+ self,
1059
+ id,
1060
+ body,
1061
+ _request_auth,
1062
+ _content_type,
1063
+ _headers,
1064
+ _host_index,
1065
+ ) -> RequestSerialized:
1066
+
1067
+ _host = None
1068
+
1069
+ _collection_formats: Dict[str, str] = {
1070
+ }
1071
+
1072
+ _path_params: Dict[str, str] = {}
1073
+ _query_params: List[Tuple[str, str]] = []
1074
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1075
+ _form_params: List[Tuple[str, str]] = []
1076
+ _files: Dict[
1077
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1078
+ ] = {}
1079
+ _body_params: Optional[bytes] = None
1080
+
1081
+ # process the path parameters
1082
+ if id is not None:
1083
+ _path_params['id'] = id
1084
+ # process the query parameters
1085
+ # process the header parameters
1086
+ # process the form parameters
1087
+ # process the body parameter
1088
+ if body is not None:
1089
+ _body_params = body
1090
+
1091
+
1092
+ # set the HTTP header `Accept`
1093
+ if 'Accept' not in _header_params:
1094
+ _header_params['Accept'] = self.api_client.select_header_accept(
1095
+ [
1096
+ 'application/json'
1097
+ ]
1098
+ )
1099
+
1100
+ # set the HTTP header `Content-Type`
1101
+ if _content_type:
1102
+ _header_params['Content-Type'] = _content_type
1103
+ else:
1104
+ _default_content_type = (
1105
+ self.api_client.select_header_content_type(
1106
+ [
1107
+ 'application/json'
1108
+ ]
1109
+ )
1110
+ )
1111
+ if _default_content_type is not None:
1112
+ _header_params['Content-Type'] = _default_content_type
1113
+
1114
+ # authentication setting
1115
+ _auth_settings: List[str] = [
1116
+ 'ApiKeyAuth'
1117
+ ]
1118
+
1119
+ return self.api_client.param_serialize(
1120
+ method='PUT',
1121
+ resource_path='/api/events/settings/infra-alert-configs/{id}/enable',
1122
+ path_params=_path_params,
1123
+ query_params=_query_params,
1124
+ header_params=_header_params,
1125
+ body=_body_params,
1126
+ post_params=_form_params,
1127
+ files=_files,
1128
+ auth_settings=_auth_settings,
1129
+ collection_formats=_collection_formats,
1130
+ _host=_host,
1131
+ _request_auth=_request_auth
1132
+ )
1133
+
1134
+
1135
+
1136
+
1137
+ @validate_call
1138
+ def find_active_infra_alert_configs(
1139
+ self,
1140
+ alert_ids: Annotated[Optional[Annotated[List[StrictStr], Field(min_length=0, max_length=1000)]], Field(description="List of IDs of Infra Smart Alert configurations")] = None,
1141
+ _request_timeout: Union[
1142
+ None,
1143
+ Annotated[StrictFloat, Field(gt=0)],
1144
+ Tuple[
1145
+ Annotated[StrictFloat, Field(gt=0)],
1146
+ Annotated[StrictFloat, Field(gt=0)]
1147
+ ]
1148
+ ] = None,
1149
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1150
+ _content_type: Optional[StrictStr] = None,
1151
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1152
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1153
+ ) -> List[InfraAlertConfigWithMetadata]:
1154
+ """All Infra Alert Configs
1155
+
1156
+ Configs are sorted descending by their created date.
1157
+
1158
+ :param alert_ids: List of IDs of Infra Smart Alert configurations
1159
+ :type alert_ids: List[str]
1160
+ :param _request_timeout: timeout setting for this request. If one
1161
+ number provided, it will be total request
1162
+ timeout. It can also be a pair (tuple) of
1163
+ (connection, read) timeouts.
1164
+ :type _request_timeout: int, tuple(int, int), optional
1165
+ :param _request_auth: set to override the auth_settings for an a single
1166
+ request; this effectively ignores the
1167
+ authentication in the spec for a single request.
1168
+ :type _request_auth: dict, optional
1169
+ :param _content_type: force content-type for the request.
1170
+ :type _content_type: str, Optional
1171
+ :param _headers: set to override the headers for a single
1172
+ request; this effectively ignores the headers
1173
+ in the spec for a single request.
1174
+ :type _headers: dict, optional
1175
+ :param _host_index: set to override the host_index for a single
1176
+ request; this effectively ignores the host_index
1177
+ in the spec for a single request.
1178
+ :type _host_index: int, optional
1179
+ :return: Returns the result object.
1180
+ """ # noqa: E501
1181
+
1182
+ _param = self._find_active_infra_alert_configs_serialize(
1183
+ alert_ids=alert_ids,
1184
+ _request_auth=_request_auth,
1185
+ _content_type=_content_type,
1186
+ _headers=_headers,
1187
+ _host_index=_host_index
1188
+ )
1189
+
1190
+ _response_types_map: Dict[str, Optional[str]] = {
1191
+ '200': "List[InfraAlertConfigWithMetadata]",
1192
+ }
1193
+ response_data = self.api_client.call_api(
1194
+ *_param,
1195
+ _request_timeout=_request_timeout
1196
+ )
1197
+ response_data.read()
1198
+ return self.api_client.response_deserialize(
1199
+ response_data=response_data,
1200
+ response_types_map=_response_types_map,
1201
+ ).data
1202
+
1203
+
1204
+ @validate_call
1205
+ def find_active_infra_alert_configs_with_http_info(
1206
+ self,
1207
+ alert_ids: Annotated[Optional[Annotated[List[StrictStr], Field(min_length=0, max_length=1000)]], Field(description="List of IDs of Infra Smart Alert configurations")] = None,
1208
+ _request_timeout: Union[
1209
+ None,
1210
+ Annotated[StrictFloat, Field(gt=0)],
1211
+ Tuple[
1212
+ Annotated[StrictFloat, Field(gt=0)],
1213
+ Annotated[StrictFloat, Field(gt=0)]
1214
+ ]
1215
+ ] = None,
1216
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1217
+ _content_type: Optional[StrictStr] = None,
1218
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1219
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1220
+ ) -> ApiResponse[List[InfraAlertConfigWithMetadata]]:
1221
+ """All Infra Alert Configs
1222
+
1223
+ Configs are sorted descending by their created date.
1224
+
1225
+ :param alert_ids: List of IDs of Infra Smart Alert configurations
1226
+ :type alert_ids: List[str]
1227
+ :param _request_timeout: timeout setting for this request. If one
1228
+ number provided, it will be total request
1229
+ timeout. It can also be a pair (tuple) of
1230
+ (connection, read) timeouts.
1231
+ :type _request_timeout: int, tuple(int, int), optional
1232
+ :param _request_auth: set to override the auth_settings for an a single
1233
+ request; this effectively ignores the
1234
+ authentication in the spec for a single request.
1235
+ :type _request_auth: dict, optional
1236
+ :param _content_type: force content-type for the request.
1237
+ :type _content_type: str, Optional
1238
+ :param _headers: set to override the headers for a single
1239
+ request; this effectively ignores the headers
1240
+ in the spec for a single request.
1241
+ :type _headers: dict, optional
1242
+ :param _host_index: set to override the host_index for a single
1243
+ request; this effectively ignores the host_index
1244
+ in the spec for a single request.
1245
+ :type _host_index: int, optional
1246
+ :return: Returns the result object.
1247
+ """ # noqa: E501
1248
+
1249
+ _param = self._find_active_infra_alert_configs_serialize(
1250
+ alert_ids=alert_ids,
1251
+ _request_auth=_request_auth,
1252
+ _content_type=_content_type,
1253
+ _headers=_headers,
1254
+ _host_index=_host_index
1255
+ )
1256
+
1257
+ _response_types_map: Dict[str, Optional[str]] = {
1258
+ '200': "List[InfraAlertConfigWithMetadata]",
1259
+ }
1260
+ response_data = self.api_client.call_api(
1261
+ *_param,
1262
+ _request_timeout=_request_timeout
1263
+ )
1264
+ response_data.read()
1265
+ return self.api_client.response_deserialize(
1266
+ response_data=response_data,
1267
+ response_types_map=_response_types_map,
1268
+ )
1269
+
1270
+
1271
+ @validate_call
1272
+ def find_active_infra_alert_configs_without_preload_content(
1273
+ self,
1274
+ alert_ids: Annotated[Optional[Annotated[List[StrictStr], Field(min_length=0, max_length=1000)]], Field(description="List of IDs of Infra Smart Alert configurations")] = None,
1275
+ _request_timeout: Union[
1276
+ None,
1277
+ Annotated[StrictFloat, Field(gt=0)],
1278
+ Tuple[
1279
+ Annotated[StrictFloat, Field(gt=0)],
1280
+ Annotated[StrictFloat, Field(gt=0)]
1281
+ ]
1282
+ ] = None,
1283
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1284
+ _content_type: Optional[StrictStr] = None,
1285
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1286
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1287
+ ) -> RESTResponseType:
1288
+ """All Infra Alert Configs
1289
+
1290
+ Configs are sorted descending by their created date.
1291
+
1292
+ :param alert_ids: List of IDs of Infra Smart Alert configurations
1293
+ :type alert_ids: List[str]
1294
+ :param _request_timeout: timeout setting for this request. If one
1295
+ number provided, it will be total request
1296
+ timeout. It can also be a pair (tuple) of
1297
+ (connection, read) timeouts.
1298
+ :type _request_timeout: int, tuple(int, int), optional
1299
+ :param _request_auth: set to override the auth_settings for an a single
1300
+ request; this effectively ignores the
1301
+ authentication in the spec for a single request.
1302
+ :type _request_auth: dict, optional
1303
+ :param _content_type: force content-type for the request.
1304
+ :type _content_type: str, Optional
1305
+ :param _headers: set to override the headers for a single
1306
+ request; this effectively ignores the headers
1307
+ in the spec for a single request.
1308
+ :type _headers: dict, optional
1309
+ :param _host_index: set to override the host_index for a single
1310
+ request; this effectively ignores the host_index
1311
+ in the spec for a single request.
1312
+ :type _host_index: int, optional
1313
+ :return: Returns the result object.
1314
+ """ # noqa: E501
1315
+
1316
+ _param = self._find_active_infra_alert_configs_serialize(
1317
+ alert_ids=alert_ids,
1318
+ _request_auth=_request_auth,
1319
+ _content_type=_content_type,
1320
+ _headers=_headers,
1321
+ _host_index=_host_index
1322
+ )
1323
+
1324
+ _response_types_map: Dict[str, Optional[str]] = {
1325
+ '200': "List[InfraAlertConfigWithMetadata]",
1326
+ }
1327
+ response_data = self.api_client.call_api(
1328
+ *_param,
1329
+ _request_timeout=_request_timeout
1330
+ )
1331
+ return response_data.response
1332
+
1333
+
1334
+ def _find_active_infra_alert_configs_serialize(
1335
+ self,
1336
+ alert_ids,
1337
+ _request_auth,
1338
+ _content_type,
1339
+ _headers,
1340
+ _host_index,
1341
+ ) -> RequestSerialized:
1342
+
1343
+ _host = None
1344
+
1345
+ _collection_formats: Dict[str, str] = {
1346
+ 'alertIds': 'multi',
1347
+ }
1348
+
1349
+ _path_params: Dict[str, str] = {}
1350
+ _query_params: List[Tuple[str, str]] = []
1351
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1352
+ _form_params: List[Tuple[str, str]] = []
1353
+ _files: Dict[
1354
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1355
+ ] = {}
1356
+ _body_params: Optional[bytes] = None
1357
+
1358
+ # process the path parameters
1359
+ # process the query parameters
1360
+ if alert_ids is not None:
1361
+
1362
+ _query_params.append(('alertIds', alert_ids))
1363
+
1364
+ # process the header parameters
1365
+ # process the form parameters
1366
+ # process the body parameter
1367
+
1368
+
1369
+ # set the HTTP header `Accept`
1370
+ if 'Accept' not in _header_params:
1371
+ _header_params['Accept'] = self.api_client.select_header_accept(
1372
+ [
1373
+ 'application/json'
1374
+ ]
1375
+ )
1376
+
1377
+
1378
+ # authentication setting
1379
+ _auth_settings: List[str] = [
1380
+ 'ApiKeyAuth'
1381
+ ]
1382
+
1383
+ return self.api_client.param_serialize(
1384
+ method='GET',
1385
+ resource_path='/api/events/settings/infra-alert-configs',
1386
+ path_params=_path_params,
1387
+ query_params=_query_params,
1388
+ header_params=_header_params,
1389
+ body=_body_params,
1390
+ post_params=_form_params,
1391
+ files=_files,
1392
+ auth_settings=_auth_settings,
1393
+ collection_formats=_collection_formats,
1394
+ _host=_host,
1395
+ _request_auth=_request_auth
1396
+ )
1397
+
1398
+
1399
+
1400
+
1401
+ @validate_call
1402
+ def find_infra_alert_config(
1403
+ self,
1404
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration")],
1405
+ valid_on: Annotated[Optional[StrictInt], Field(description="A Unix timestamp representing a specific time the config was active. If no timestamp is provided, the latest active version will be retrieved. ")] = None,
1406
+ _request_timeout: Union[
1407
+ None,
1408
+ Annotated[StrictFloat, Field(gt=0)],
1409
+ Tuple[
1410
+ Annotated[StrictFloat, Field(gt=0)],
1411
+ Annotated[StrictFloat, Field(gt=0)]
1412
+ ]
1413
+ ] = None,
1414
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1415
+ _content_type: Optional[StrictStr] = None,
1416
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1417
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1418
+ ) -> InfraAlertConfigWithMetadata:
1419
+ """Get Infra Alert Config
1420
+
1421
+ Find a Infra Alert Config by ID. This will deliver deleted configs too.
1422
+
1423
+ :param id: ID of the Infra Smart Alert configuration (required)
1424
+ :type id: str
1425
+ :param valid_on: A Unix timestamp representing a specific time the config was active. If no timestamp is provided, the latest active version will be retrieved.
1426
+ :type valid_on: int
1427
+ :param _request_timeout: timeout setting for this request. If one
1428
+ number provided, it will be total request
1429
+ timeout. It can also be a pair (tuple) of
1430
+ (connection, read) timeouts.
1431
+ :type _request_timeout: int, tuple(int, int), optional
1432
+ :param _request_auth: set to override the auth_settings for an a single
1433
+ request; this effectively ignores the
1434
+ authentication in the spec for a single request.
1435
+ :type _request_auth: dict, optional
1436
+ :param _content_type: force content-type for the request.
1437
+ :type _content_type: str, Optional
1438
+ :param _headers: set to override the headers for a single
1439
+ request; this effectively ignores the headers
1440
+ in the spec for a single request.
1441
+ :type _headers: dict, optional
1442
+ :param _host_index: set to override the host_index for a single
1443
+ request; this effectively ignores the host_index
1444
+ in the spec for a single request.
1445
+ :type _host_index: int, optional
1446
+ :return: Returns the result object.
1447
+ """ # noqa: E501
1448
+
1449
+ _param = self._find_infra_alert_config_serialize(
1450
+ id=id,
1451
+ valid_on=valid_on,
1452
+ _request_auth=_request_auth,
1453
+ _content_type=_content_type,
1454
+ _headers=_headers,
1455
+ _host_index=_host_index
1456
+ )
1457
+
1458
+ _response_types_map: Dict[str, Optional[str]] = {
1459
+ '200': "InfraAlertConfigWithMetadata",
1460
+ }
1461
+ response_data = self.api_client.call_api(
1462
+ *_param,
1463
+ _request_timeout=_request_timeout
1464
+ )
1465
+ response_data.read()
1466
+ return self.api_client.response_deserialize(
1467
+ response_data=response_data,
1468
+ response_types_map=_response_types_map,
1469
+ ).data
1470
+
1471
+
1472
+ @validate_call
1473
+ def find_infra_alert_config_with_http_info(
1474
+ self,
1475
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration")],
1476
+ valid_on: Annotated[Optional[StrictInt], Field(description="A Unix timestamp representing a specific time the config was active. If no timestamp is provided, the latest active version will be retrieved. ")] = None,
1477
+ _request_timeout: Union[
1478
+ None,
1479
+ Annotated[StrictFloat, Field(gt=0)],
1480
+ Tuple[
1481
+ Annotated[StrictFloat, Field(gt=0)],
1482
+ Annotated[StrictFloat, Field(gt=0)]
1483
+ ]
1484
+ ] = None,
1485
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1486
+ _content_type: Optional[StrictStr] = None,
1487
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1488
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1489
+ ) -> ApiResponse[InfraAlertConfigWithMetadata]:
1490
+ """Get Infra Alert Config
1491
+
1492
+ Find a Infra Alert Config by ID. This will deliver deleted configs too.
1493
+
1494
+ :param id: ID of the Infra Smart Alert configuration (required)
1495
+ :type id: str
1496
+ :param valid_on: A Unix timestamp representing a specific time the config was active. If no timestamp is provided, the latest active version will be retrieved.
1497
+ :type valid_on: int
1498
+ :param _request_timeout: timeout setting for this request. If one
1499
+ number provided, it will be total request
1500
+ timeout. It can also be a pair (tuple) of
1501
+ (connection, read) timeouts.
1502
+ :type _request_timeout: int, tuple(int, int), optional
1503
+ :param _request_auth: set to override the auth_settings for an a single
1504
+ request; this effectively ignores the
1505
+ authentication in the spec for a single request.
1506
+ :type _request_auth: dict, optional
1507
+ :param _content_type: force content-type for the request.
1508
+ :type _content_type: str, Optional
1509
+ :param _headers: set to override the headers for a single
1510
+ request; this effectively ignores the headers
1511
+ in the spec for a single request.
1512
+ :type _headers: dict, optional
1513
+ :param _host_index: set to override the host_index for a single
1514
+ request; this effectively ignores the host_index
1515
+ in the spec for a single request.
1516
+ :type _host_index: int, optional
1517
+ :return: Returns the result object.
1518
+ """ # noqa: E501
1519
+
1520
+ _param = self._find_infra_alert_config_serialize(
1521
+ id=id,
1522
+ valid_on=valid_on,
1523
+ _request_auth=_request_auth,
1524
+ _content_type=_content_type,
1525
+ _headers=_headers,
1526
+ _host_index=_host_index
1527
+ )
1528
+
1529
+ _response_types_map: Dict[str, Optional[str]] = {
1530
+ '200': "InfraAlertConfigWithMetadata",
1531
+ }
1532
+ response_data = self.api_client.call_api(
1533
+ *_param,
1534
+ _request_timeout=_request_timeout
1535
+ )
1536
+ response_data.read()
1537
+ return self.api_client.response_deserialize(
1538
+ response_data=response_data,
1539
+ response_types_map=_response_types_map,
1540
+ )
1541
+
1542
+
1543
+ @validate_call
1544
+ def find_infra_alert_config_without_preload_content(
1545
+ self,
1546
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration")],
1547
+ valid_on: Annotated[Optional[StrictInt], Field(description="A Unix timestamp representing a specific time the config was active. If no timestamp is provided, the latest active version will be retrieved. ")] = None,
1548
+ _request_timeout: Union[
1549
+ None,
1550
+ Annotated[StrictFloat, Field(gt=0)],
1551
+ Tuple[
1552
+ Annotated[StrictFloat, Field(gt=0)],
1553
+ Annotated[StrictFloat, Field(gt=0)]
1554
+ ]
1555
+ ] = None,
1556
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1557
+ _content_type: Optional[StrictStr] = None,
1558
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1559
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1560
+ ) -> RESTResponseType:
1561
+ """Get Infra Alert Config
1562
+
1563
+ Find a Infra Alert Config by ID. This will deliver deleted configs too.
1564
+
1565
+ :param id: ID of the Infra Smart Alert configuration (required)
1566
+ :type id: str
1567
+ :param valid_on: A Unix timestamp representing a specific time the config was active. If no timestamp is provided, the latest active version will be retrieved.
1568
+ :type valid_on: int
1569
+ :param _request_timeout: timeout setting for this request. If one
1570
+ number provided, it will be total request
1571
+ timeout. It can also be a pair (tuple) of
1572
+ (connection, read) timeouts.
1573
+ :type _request_timeout: int, tuple(int, int), optional
1574
+ :param _request_auth: set to override the auth_settings for an a single
1575
+ request; this effectively ignores the
1576
+ authentication in the spec for a single request.
1577
+ :type _request_auth: dict, optional
1578
+ :param _content_type: force content-type for the request.
1579
+ :type _content_type: str, Optional
1580
+ :param _headers: set to override the headers for a single
1581
+ request; this effectively ignores the headers
1582
+ in the spec for a single request.
1583
+ :type _headers: dict, optional
1584
+ :param _host_index: set to override the host_index for a single
1585
+ request; this effectively ignores the host_index
1586
+ in the spec for a single request.
1587
+ :type _host_index: int, optional
1588
+ :return: Returns the result object.
1589
+ """ # noqa: E501
1590
+
1591
+ _param = self._find_infra_alert_config_serialize(
1592
+ id=id,
1593
+ valid_on=valid_on,
1594
+ _request_auth=_request_auth,
1595
+ _content_type=_content_type,
1596
+ _headers=_headers,
1597
+ _host_index=_host_index
1598
+ )
1599
+
1600
+ _response_types_map: Dict[str, Optional[str]] = {
1601
+ '200': "InfraAlertConfigWithMetadata",
1602
+ }
1603
+ response_data = self.api_client.call_api(
1604
+ *_param,
1605
+ _request_timeout=_request_timeout
1606
+ )
1607
+ return response_data.response
1608
+
1609
+
1610
+ def _find_infra_alert_config_serialize(
1611
+ self,
1612
+ id,
1613
+ valid_on,
1614
+ _request_auth,
1615
+ _content_type,
1616
+ _headers,
1617
+ _host_index,
1618
+ ) -> RequestSerialized:
1619
+
1620
+ _host = None
1621
+
1622
+ _collection_formats: Dict[str, str] = {
1623
+ }
1624
+
1625
+ _path_params: Dict[str, str] = {}
1626
+ _query_params: List[Tuple[str, str]] = []
1627
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1628
+ _form_params: List[Tuple[str, str]] = []
1629
+ _files: Dict[
1630
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1631
+ ] = {}
1632
+ _body_params: Optional[bytes] = None
1633
+
1634
+ # process the path parameters
1635
+ if id is not None:
1636
+ _path_params['id'] = id
1637
+ # process the query parameters
1638
+ if valid_on is not None:
1639
+
1640
+ _query_params.append(('validOn', valid_on))
1641
+
1642
+ # process the header parameters
1643
+ # process the form parameters
1644
+ # process the body parameter
1645
+
1646
+
1647
+ # set the HTTP header `Accept`
1648
+ if 'Accept' not in _header_params:
1649
+ _header_params['Accept'] = self.api_client.select_header_accept(
1650
+ [
1651
+ 'application/json'
1652
+ ]
1653
+ )
1654
+
1655
+
1656
+ # authentication setting
1657
+ _auth_settings: List[str] = [
1658
+ 'ApiKeyAuth'
1659
+ ]
1660
+
1661
+ return self.api_client.param_serialize(
1662
+ method='GET',
1663
+ resource_path='/api/events/settings/infra-alert-configs/{id}',
1664
+ path_params=_path_params,
1665
+ query_params=_query_params,
1666
+ header_params=_header_params,
1667
+ body=_body_params,
1668
+ post_params=_form_params,
1669
+ files=_files,
1670
+ auth_settings=_auth_settings,
1671
+ collection_formats=_collection_formats,
1672
+ _host=_host,
1673
+ _request_auth=_request_auth
1674
+ )
1675
+
1676
+
1677
+
1678
+
1679
+ @validate_call
1680
+ def find_infra_alert_config_versions(
1681
+ self,
1682
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration")],
1683
+ _request_timeout: Union[
1684
+ None,
1685
+ Annotated[StrictFloat, Field(gt=0)],
1686
+ Tuple[
1687
+ Annotated[StrictFloat, Field(gt=0)],
1688
+ Annotated[StrictFloat, Field(gt=0)]
1689
+ ]
1690
+ ] = None,
1691
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1692
+ _content_type: Optional[StrictStr] = None,
1693
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1694
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1695
+ ) -> List[ConfigVersion]:
1696
+ """Get versions of Infra Alert Config
1697
+
1698
+ Find all versions of a Infra Alert Config by ID. This will deliver deleted configs too. Configs are sorted descending by their created date.
1699
+
1700
+ :param id: ID of the Infra Smart Alert configuration (required)
1701
+ :type id: str
1702
+ :param _request_timeout: timeout setting for this request. If one
1703
+ number provided, it will be total request
1704
+ timeout. It can also be a pair (tuple) of
1705
+ (connection, read) timeouts.
1706
+ :type _request_timeout: int, tuple(int, int), optional
1707
+ :param _request_auth: set to override the auth_settings for an a single
1708
+ request; this effectively ignores the
1709
+ authentication in the spec for a single request.
1710
+ :type _request_auth: dict, optional
1711
+ :param _content_type: force content-type for the request.
1712
+ :type _content_type: str, Optional
1713
+ :param _headers: set to override the headers for a single
1714
+ request; this effectively ignores the headers
1715
+ in the spec for a single request.
1716
+ :type _headers: dict, optional
1717
+ :param _host_index: set to override the host_index for a single
1718
+ request; this effectively ignores the host_index
1719
+ in the spec for a single request.
1720
+ :type _host_index: int, optional
1721
+ :return: Returns the result object.
1722
+ """ # noqa: E501
1723
+
1724
+ _param = self._find_infra_alert_config_versions_serialize(
1725
+ id=id,
1726
+ _request_auth=_request_auth,
1727
+ _content_type=_content_type,
1728
+ _headers=_headers,
1729
+ _host_index=_host_index
1730
+ )
1731
+
1732
+ _response_types_map: Dict[str, Optional[str]] = {
1733
+ '200': "List[ConfigVersion]",
1734
+ }
1735
+ response_data = self.api_client.call_api(
1736
+ *_param,
1737
+ _request_timeout=_request_timeout
1738
+ )
1739
+ response_data.read()
1740
+ return self.api_client.response_deserialize(
1741
+ response_data=response_data,
1742
+ response_types_map=_response_types_map,
1743
+ ).data
1744
+
1745
+
1746
+ @validate_call
1747
+ def find_infra_alert_config_versions_with_http_info(
1748
+ self,
1749
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration")],
1750
+ _request_timeout: Union[
1751
+ None,
1752
+ Annotated[StrictFloat, Field(gt=0)],
1753
+ Tuple[
1754
+ Annotated[StrictFloat, Field(gt=0)],
1755
+ Annotated[StrictFloat, Field(gt=0)]
1756
+ ]
1757
+ ] = None,
1758
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1759
+ _content_type: Optional[StrictStr] = None,
1760
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1761
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1762
+ ) -> ApiResponse[List[ConfigVersion]]:
1763
+ """Get versions of Infra Alert Config
1764
+
1765
+ Find all versions of a Infra Alert Config by ID. This will deliver deleted configs too. Configs are sorted descending by their created date.
1766
+
1767
+ :param id: ID of the Infra Smart Alert configuration (required)
1768
+ :type id: str
1769
+ :param _request_timeout: timeout setting for this request. If one
1770
+ number provided, it will be total request
1771
+ timeout. It can also be a pair (tuple) of
1772
+ (connection, read) timeouts.
1773
+ :type _request_timeout: int, tuple(int, int), optional
1774
+ :param _request_auth: set to override the auth_settings for an a single
1775
+ request; this effectively ignores the
1776
+ authentication in the spec for a single request.
1777
+ :type _request_auth: dict, optional
1778
+ :param _content_type: force content-type for the request.
1779
+ :type _content_type: str, Optional
1780
+ :param _headers: set to override the headers for a single
1781
+ request; this effectively ignores the headers
1782
+ in the spec for a single request.
1783
+ :type _headers: dict, optional
1784
+ :param _host_index: set to override the host_index for a single
1785
+ request; this effectively ignores the host_index
1786
+ in the spec for a single request.
1787
+ :type _host_index: int, optional
1788
+ :return: Returns the result object.
1789
+ """ # noqa: E501
1790
+
1791
+ _param = self._find_infra_alert_config_versions_serialize(
1792
+ id=id,
1793
+ _request_auth=_request_auth,
1794
+ _content_type=_content_type,
1795
+ _headers=_headers,
1796
+ _host_index=_host_index
1797
+ )
1798
+
1799
+ _response_types_map: Dict[str, Optional[str]] = {
1800
+ '200': "List[ConfigVersion]",
1801
+ }
1802
+ response_data = self.api_client.call_api(
1803
+ *_param,
1804
+ _request_timeout=_request_timeout
1805
+ )
1806
+ response_data.read()
1807
+ return self.api_client.response_deserialize(
1808
+ response_data=response_data,
1809
+ response_types_map=_response_types_map,
1810
+ )
1811
+
1812
+
1813
+ @validate_call
1814
+ def find_infra_alert_config_versions_without_preload_content(
1815
+ self,
1816
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration")],
1817
+ _request_timeout: Union[
1818
+ None,
1819
+ Annotated[StrictFloat, Field(gt=0)],
1820
+ Tuple[
1821
+ Annotated[StrictFloat, Field(gt=0)],
1822
+ Annotated[StrictFloat, Field(gt=0)]
1823
+ ]
1824
+ ] = None,
1825
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1826
+ _content_type: Optional[StrictStr] = None,
1827
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1828
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1829
+ ) -> RESTResponseType:
1830
+ """Get versions of Infra Alert Config
1831
+
1832
+ Find all versions of a Infra Alert Config by ID. This will deliver deleted configs too. Configs are sorted descending by their created date.
1833
+
1834
+ :param id: ID of the Infra Smart Alert configuration (required)
1835
+ :type id: str
1836
+ :param _request_timeout: timeout setting for this request. If one
1837
+ number provided, it will be total request
1838
+ timeout. It can also be a pair (tuple) of
1839
+ (connection, read) timeouts.
1840
+ :type _request_timeout: int, tuple(int, int), optional
1841
+ :param _request_auth: set to override the auth_settings for an a single
1842
+ request; this effectively ignores the
1843
+ authentication in the spec for a single request.
1844
+ :type _request_auth: dict, optional
1845
+ :param _content_type: force content-type for the request.
1846
+ :type _content_type: str, Optional
1847
+ :param _headers: set to override the headers for a single
1848
+ request; this effectively ignores the headers
1849
+ in the spec for a single request.
1850
+ :type _headers: dict, optional
1851
+ :param _host_index: set to override the host_index for a single
1852
+ request; this effectively ignores the host_index
1853
+ in the spec for a single request.
1854
+ :type _host_index: int, optional
1855
+ :return: Returns the result object.
1856
+ """ # noqa: E501
1857
+
1858
+ _param = self._find_infra_alert_config_versions_serialize(
1859
+ id=id,
1860
+ _request_auth=_request_auth,
1861
+ _content_type=_content_type,
1862
+ _headers=_headers,
1863
+ _host_index=_host_index
1864
+ )
1865
+
1866
+ _response_types_map: Dict[str, Optional[str]] = {
1867
+ '200': "List[ConfigVersion]",
1868
+ }
1869
+ response_data = self.api_client.call_api(
1870
+ *_param,
1871
+ _request_timeout=_request_timeout
1872
+ )
1873
+ return response_data.response
1874
+
1875
+
1876
+ def _find_infra_alert_config_versions_serialize(
1877
+ self,
1878
+ id,
1879
+ _request_auth,
1880
+ _content_type,
1881
+ _headers,
1882
+ _host_index,
1883
+ ) -> RequestSerialized:
1884
+
1885
+ _host = None
1886
+
1887
+ _collection_formats: Dict[str, str] = {
1888
+ }
1889
+
1890
+ _path_params: Dict[str, str] = {}
1891
+ _query_params: List[Tuple[str, str]] = []
1892
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1893
+ _form_params: List[Tuple[str, str]] = []
1894
+ _files: Dict[
1895
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1896
+ ] = {}
1897
+ _body_params: Optional[bytes] = None
1898
+
1899
+ # process the path parameters
1900
+ if id is not None:
1901
+ _path_params['id'] = id
1902
+ # process the query parameters
1903
+ # process the header parameters
1904
+ # process the form parameters
1905
+ # process the body parameter
1906
+
1907
+
1908
+ # set the HTTP header `Accept`
1909
+ if 'Accept' not in _header_params:
1910
+ _header_params['Accept'] = self.api_client.select_header_accept(
1911
+ [
1912
+ 'application/json'
1913
+ ]
1914
+ )
1915
+
1916
+
1917
+ # authentication setting
1918
+ _auth_settings: List[str] = [
1919
+ 'ApiKeyAuth'
1920
+ ]
1921
+
1922
+ return self.api_client.param_serialize(
1923
+ method='GET',
1924
+ resource_path='/api/events/settings/infra-alert-configs/{id}/versions',
1925
+ path_params=_path_params,
1926
+ query_params=_query_params,
1927
+ header_params=_header_params,
1928
+ body=_body_params,
1929
+ post_params=_form_params,
1930
+ files=_files,
1931
+ auth_settings=_auth_settings,
1932
+ collection_formats=_collection_formats,
1933
+ _host=_host,
1934
+ _request_auth=_request_auth
1935
+ )
1936
+
1937
+
1938
+
1939
+
1940
+ @validate_call
1941
+ def restore_infra_alert_config(
1942
+ self,
1943
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to restore")],
1944
+ created: Annotated[StrictInt, Field(description="A Unix Timestamp of when the alert was created")],
1945
+ body: Optional[StrictStr] = None,
1946
+ _request_timeout: Union[
1947
+ None,
1948
+ Annotated[StrictFloat, Field(gt=0)],
1949
+ Tuple[
1950
+ Annotated[StrictFloat, Field(gt=0)],
1951
+ Annotated[StrictFloat, Field(gt=0)]
1952
+ ]
1953
+ ] = None,
1954
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1955
+ _content_type: Optional[StrictStr] = None,
1956
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1957
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1958
+ ) -> None:
1959
+ """Restore Infra Alert Config
1960
+
1961
+
1962
+ :param id: ID of the Infra Smart Alert configuration to restore (required)
1963
+ :type id: str
1964
+ :param created: A Unix Timestamp of when the alert was created (required)
1965
+ :type created: int
1966
+ :param body:
1967
+ :type body: str
1968
+ :param _request_timeout: timeout setting for this request. If one
1969
+ number provided, it will be total request
1970
+ timeout. It can also be a pair (tuple) of
1971
+ (connection, read) timeouts.
1972
+ :type _request_timeout: int, tuple(int, int), optional
1973
+ :param _request_auth: set to override the auth_settings for an a single
1974
+ request; this effectively ignores the
1975
+ authentication in the spec for a single request.
1976
+ :type _request_auth: dict, optional
1977
+ :param _content_type: force content-type for the request.
1978
+ :type _content_type: str, Optional
1979
+ :param _headers: set to override the headers for a single
1980
+ request; this effectively ignores the headers
1981
+ in the spec for a single request.
1982
+ :type _headers: dict, optional
1983
+ :param _host_index: set to override the host_index for a single
1984
+ request; this effectively ignores the host_index
1985
+ in the spec for a single request.
1986
+ :type _host_index: int, optional
1987
+ :return: Returns the result object.
1988
+ """ # noqa: E501
1989
+
1990
+ _param = self._restore_infra_alert_config_serialize(
1991
+ id=id,
1992
+ created=created,
1993
+ body=body,
1994
+ _request_auth=_request_auth,
1995
+ _content_type=_content_type,
1996
+ _headers=_headers,
1997
+ _host_index=_host_index
1998
+ )
1999
+
2000
+ _response_types_map: Dict[str, Optional[str]] = {
2001
+ }
2002
+ response_data = self.api_client.call_api(
2003
+ *_param,
2004
+ _request_timeout=_request_timeout
2005
+ )
2006
+ response_data.read()
2007
+ return self.api_client.response_deserialize(
2008
+ response_data=response_data,
2009
+ response_types_map=_response_types_map,
2010
+ ).data
2011
+
2012
+
2013
+ @validate_call
2014
+ def restore_infra_alert_config_with_http_info(
2015
+ self,
2016
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to restore")],
2017
+ created: Annotated[StrictInt, Field(description="A Unix Timestamp of when the alert was created")],
2018
+ body: Optional[StrictStr] = None,
2019
+ _request_timeout: Union[
2020
+ None,
2021
+ Annotated[StrictFloat, Field(gt=0)],
2022
+ Tuple[
2023
+ Annotated[StrictFloat, Field(gt=0)],
2024
+ Annotated[StrictFloat, Field(gt=0)]
2025
+ ]
2026
+ ] = None,
2027
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2028
+ _content_type: Optional[StrictStr] = None,
2029
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2030
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2031
+ ) -> ApiResponse[None]:
2032
+ """Restore Infra Alert Config
2033
+
2034
+
2035
+ :param id: ID of the Infra Smart Alert configuration to restore (required)
2036
+ :type id: str
2037
+ :param created: A Unix Timestamp of when the alert was created (required)
2038
+ :type created: int
2039
+ :param body:
2040
+ :type body: str
2041
+ :param _request_timeout: timeout setting for this request. If one
2042
+ number provided, it will be total request
2043
+ timeout. It can also be a pair (tuple) of
2044
+ (connection, read) timeouts.
2045
+ :type _request_timeout: int, tuple(int, int), optional
2046
+ :param _request_auth: set to override the auth_settings for an a single
2047
+ request; this effectively ignores the
2048
+ authentication in the spec for a single request.
2049
+ :type _request_auth: dict, optional
2050
+ :param _content_type: force content-type for the request.
2051
+ :type _content_type: str, Optional
2052
+ :param _headers: set to override the headers for a single
2053
+ request; this effectively ignores the headers
2054
+ in the spec for a single request.
2055
+ :type _headers: dict, optional
2056
+ :param _host_index: set to override the host_index for a single
2057
+ request; this effectively ignores the host_index
2058
+ in the spec for a single request.
2059
+ :type _host_index: int, optional
2060
+ :return: Returns the result object.
2061
+ """ # noqa: E501
2062
+
2063
+ _param = self._restore_infra_alert_config_serialize(
2064
+ id=id,
2065
+ created=created,
2066
+ body=body,
2067
+ _request_auth=_request_auth,
2068
+ _content_type=_content_type,
2069
+ _headers=_headers,
2070
+ _host_index=_host_index
2071
+ )
2072
+
2073
+ _response_types_map: Dict[str, Optional[str]] = {
2074
+ }
2075
+ response_data = self.api_client.call_api(
2076
+ *_param,
2077
+ _request_timeout=_request_timeout
2078
+ )
2079
+ response_data.read()
2080
+ return self.api_client.response_deserialize(
2081
+ response_data=response_data,
2082
+ response_types_map=_response_types_map,
2083
+ )
2084
+
2085
+
2086
+ @validate_call
2087
+ def restore_infra_alert_config_without_preload_content(
2088
+ self,
2089
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to restore")],
2090
+ created: Annotated[StrictInt, Field(description="A Unix Timestamp of when the alert was created")],
2091
+ body: Optional[StrictStr] = None,
2092
+ _request_timeout: Union[
2093
+ None,
2094
+ Annotated[StrictFloat, Field(gt=0)],
2095
+ Tuple[
2096
+ Annotated[StrictFloat, Field(gt=0)],
2097
+ Annotated[StrictFloat, Field(gt=0)]
2098
+ ]
2099
+ ] = None,
2100
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2101
+ _content_type: Optional[StrictStr] = None,
2102
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2103
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2104
+ ) -> RESTResponseType:
2105
+ """Restore Infra Alert Config
2106
+
2107
+
2108
+ :param id: ID of the Infra Smart Alert configuration to restore (required)
2109
+ :type id: str
2110
+ :param created: A Unix Timestamp of when the alert was created (required)
2111
+ :type created: int
2112
+ :param body:
2113
+ :type body: str
2114
+ :param _request_timeout: timeout setting for this request. If one
2115
+ number provided, it will be total request
2116
+ timeout. It can also be a pair (tuple) of
2117
+ (connection, read) timeouts.
2118
+ :type _request_timeout: int, tuple(int, int), optional
2119
+ :param _request_auth: set to override the auth_settings for an a single
2120
+ request; this effectively ignores the
2121
+ authentication in the spec for a single request.
2122
+ :type _request_auth: dict, optional
2123
+ :param _content_type: force content-type for the request.
2124
+ :type _content_type: str, Optional
2125
+ :param _headers: set to override the headers for a single
2126
+ request; this effectively ignores the headers
2127
+ in the spec for a single request.
2128
+ :type _headers: dict, optional
2129
+ :param _host_index: set to override the host_index for a single
2130
+ request; this effectively ignores the host_index
2131
+ in the spec for a single request.
2132
+ :type _host_index: int, optional
2133
+ :return: Returns the result object.
2134
+ """ # noqa: E501
2135
+
2136
+ _param = self._restore_infra_alert_config_serialize(
2137
+ id=id,
2138
+ created=created,
2139
+ body=body,
2140
+ _request_auth=_request_auth,
2141
+ _content_type=_content_type,
2142
+ _headers=_headers,
2143
+ _host_index=_host_index
2144
+ )
2145
+
2146
+ _response_types_map: Dict[str, Optional[str]] = {
2147
+ }
2148
+ response_data = self.api_client.call_api(
2149
+ *_param,
2150
+ _request_timeout=_request_timeout
2151
+ )
2152
+ return response_data.response
2153
+
2154
+
2155
+ def _restore_infra_alert_config_serialize(
2156
+ self,
2157
+ id,
2158
+ created,
2159
+ body,
2160
+ _request_auth,
2161
+ _content_type,
2162
+ _headers,
2163
+ _host_index,
2164
+ ) -> RequestSerialized:
2165
+
2166
+ _host = None
2167
+
2168
+ _collection_formats: Dict[str, str] = {
2169
+ }
2170
+
2171
+ _path_params: Dict[str, str] = {}
2172
+ _query_params: List[Tuple[str, str]] = []
2173
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2174
+ _form_params: List[Tuple[str, str]] = []
2175
+ _files: Dict[
2176
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2177
+ ] = {}
2178
+ _body_params: Optional[bytes] = None
2179
+
2180
+ # process the path parameters
2181
+ if id is not None:
2182
+ _path_params['id'] = id
2183
+ if created is not None:
2184
+ _path_params['created'] = created
2185
+ # process the query parameters
2186
+ # process the header parameters
2187
+ # process the form parameters
2188
+ # process the body parameter
2189
+ if body is not None:
2190
+ _body_params = body
2191
+
2192
+
2193
+ # set the HTTP header `Accept`
2194
+ if 'Accept' not in _header_params:
2195
+ _header_params['Accept'] = self.api_client.select_header_accept(
2196
+ [
2197
+ 'application/json'
2198
+ ]
2199
+ )
2200
+
2201
+ # set the HTTP header `Content-Type`
2202
+ if _content_type:
2203
+ _header_params['Content-Type'] = _content_type
2204
+ else:
2205
+ _default_content_type = (
2206
+ self.api_client.select_header_content_type(
2207
+ [
2208
+ 'application/json'
2209
+ ]
2210
+ )
2211
+ )
2212
+ if _default_content_type is not None:
2213
+ _header_params['Content-Type'] = _default_content_type
2214
+
2215
+ # authentication setting
2216
+ _auth_settings: List[str] = [
2217
+ 'ApiKeyAuth'
2218
+ ]
2219
+
2220
+ return self.api_client.param_serialize(
2221
+ method='PUT',
2222
+ resource_path='/api/events/settings/infra-alert-configs/{id}/restore/{created}',
2223
+ path_params=_path_params,
2224
+ query_params=_query_params,
2225
+ header_params=_header_params,
2226
+ body=_body_params,
2227
+ post_params=_form_params,
2228
+ files=_files,
2229
+ auth_settings=_auth_settings,
2230
+ collection_formats=_collection_formats,
2231
+ _host=_host,
2232
+ _request_auth=_request_auth
2233
+ )
2234
+
2235
+
2236
+
2237
+
2238
+ @validate_call
2239
+ def update_infra_alert_config(
2240
+ self,
2241
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to update")],
2242
+ infra_alert_config: InfraAlertConfig,
2243
+ _request_timeout: Union[
2244
+ None,
2245
+ Annotated[StrictFloat, Field(gt=0)],
2246
+ Tuple[
2247
+ Annotated[StrictFloat, Field(gt=0)],
2248
+ Annotated[StrictFloat, Field(gt=0)]
2249
+ ]
2250
+ ] = None,
2251
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2252
+ _content_type: Optional[StrictStr] = None,
2253
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2254
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2255
+ ) -> InfraAlertConfigWithMetadata:
2256
+ """Update Infra Alert Config
2257
+
2258
+
2259
+ :param id: ID of the Infra Smart Alert configuration to update (required)
2260
+ :type id: str
2261
+ :param infra_alert_config: (required)
2262
+ :type infra_alert_config: InfraAlertConfig
2263
+ :param _request_timeout: timeout setting for this request. If one
2264
+ number provided, it will be total request
2265
+ timeout. It can also be a pair (tuple) of
2266
+ (connection, read) timeouts.
2267
+ :type _request_timeout: int, tuple(int, int), optional
2268
+ :param _request_auth: set to override the auth_settings for an a single
2269
+ request; this effectively ignores the
2270
+ authentication in the spec for a single request.
2271
+ :type _request_auth: dict, optional
2272
+ :param _content_type: force content-type for the request.
2273
+ :type _content_type: str, Optional
2274
+ :param _headers: set to override the headers for a single
2275
+ request; this effectively ignores the headers
2276
+ in the spec for a single request.
2277
+ :type _headers: dict, optional
2278
+ :param _host_index: set to override the host_index for a single
2279
+ request; this effectively ignores the host_index
2280
+ in the spec for a single request.
2281
+ :type _host_index: int, optional
2282
+ :return: Returns the result object.
2283
+ """ # noqa: E501
2284
+
2285
+ _param = self._update_infra_alert_config_serialize(
2286
+ id=id,
2287
+ infra_alert_config=infra_alert_config,
2288
+ _request_auth=_request_auth,
2289
+ _content_type=_content_type,
2290
+ _headers=_headers,
2291
+ _host_index=_host_index
2292
+ )
2293
+
2294
+ _response_types_map: Dict[str, Optional[str]] = {
2295
+ '200': "InfraAlertConfigWithMetadata",
2296
+ '204': None,
2297
+ }
2298
+ response_data = self.api_client.call_api(
2299
+ *_param,
2300
+ _request_timeout=_request_timeout
2301
+ )
2302
+ response_data.read()
2303
+ return self.api_client.response_deserialize(
2304
+ response_data=response_data,
2305
+ response_types_map=_response_types_map,
2306
+ ).data
2307
+
2308
+
2309
+ @validate_call
2310
+ def update_infra_alert_config_with_http_info(
2311
+ self,
2312
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to update")],
2313
+ infra_alert_config: InfraAlertConfig,
2314
+ _request_timeout: Union[
2315
+ None,
2316
+ Annotated[StrictFloat, Field(gt=0)],
2317
+ Tuple[
2318
+ Annotated[StrictFloat, Field(gt=0)],
2319
+ Annotated[StrictFloat, Field(gt=0)]
2320
+ ]
2321
+ ] = None,
2322
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2323
+ _content_type: Optional[StrictStr] = None,
2324
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2325
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2326
+ ) -> ApiResponse[InfraAlertConfigWithMetadata]:
2327
+ """Update Infra Alert Config
2328
+
2329
+
2330
+ :param id: ID of the Infra Smart Alert configuration to update (required)
2331
+ :type id: str
2332
+ :param infra_alert_config: (required)
2333
+ :type infra_alert_config: InfraAlertConfig
2334
+ :param _request_timeout: timeout setting for this request. If one
2335
+ number provided, it will be total request
2336
+ timeout. It can also be a pair (tuple) of
2337
+ (connection, read) timeouts.
2338
+ :type _request_timeout: int, tuple(int, int), optional
2339
+ :param _request_auth: set to override the auth_settings for an a single
2340
+ request; this effectively ignores the
2341
+ authentication in the spec for a single request.
2342
+ :type _request_auth: dict, optional
2343
+ :param _content_type: force content-type for the request.
2344
+ :type _content_type: str, Optional
2345
+ :param _headers: set to override the headers for a single
2346
+ request; this effectively ignores the headers
2347
+ in the spec for a single request.
2348
+ :type _headers: dict, optional
2349
+ :param _host_index: set to override the host_index for a single
2350
+ request; this effectively ignores the host_index
2351
+ in the spec for a single request.
2352
+ :type _host_index: int, optional
2353
+ :return: Returns the result object.
2354
+ """ # noqa: E501
2355
+
2356
+ _param = self._update_infra_alert_config_serialize(
2357
+ id=id,
2358
+ infra_alert_config=infra_alert_config,
2359
+ _request_auth=_request_auth,
2360
+ _content_type=_content_type,
2361
+ _headers=_headers,
2362
+ _host_index=_host_index
2363
+ )
2364
+
2365
+ _response_types_map: Dict[str, Optional[str]] = {
2366
+ '200': "InfraAlertConfigWithMetadata",
2367
+ '204': None,
2368
+ }
2369
+ response_data = self.api_client.call_api(
2370
+ *_param,
2371
+ _request_timeout=_request_timeout
2372
+ )
2373
+ response_data.read()
2374
+ return self.api_client.response_deserialize(
2375
+ response_data=response_data,
2376
+ response_types_map=_response_types_map,
2377
+ )
2378
+
2379
+
2380
+ @validate_call
2381
+ def update_infra_alert_config_without_preload_content(
2382
+ self,
2383
+ id: Annotated[StrictStr, Field(description="ID of the Infra Smart Alert configuration to update")],
2384
+ infra_alert_config: InfraAlertConfig,
2385
+ _request_timeout: Union[
2386
+ None,
2387
+ Annotated[StrictFloat, Field(gt=0)],
2388
+ Tuple[
2389
+ Annotated[StrictFloat, Field(gt=0)],
2390
+ Annotated[StrictFloat, Field(gt=0)]
2391
+ ]
2392
+ ] = None,
2393
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2394
+ _content_type: Optional[StrictStr] = None,
2395
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2396
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2397
+ ) -> RESTResponseType:
2398
+ """Update Infra Alert Config
2399
+
2400
+
2401
+ :param id: ID of the Infra Smart Alert configuration to update (required)
2402
+ :type id: str
2403
+ :param infra_alert_config: (required)
2404
+ :type infra_alert_config: InfraAlertConfig
2405
+ :param _request_timeout: timeout setting for this request. If one
2406
+ number provided, it will be total request
2407
+ timeout. It can also be a pair (tuple) of
2408
+ (connection, read) timeouts.
2409
+ :type _request_timeout: int, tuple(int, int), optional
2410
+ :param _request_auth: set to override the auth_settings for an a single
2411
+ request; this effectively ignores the
2412
+ authentication in the spec for a single request.
2413
+ :type _request_auth: dict, optional
2414
+ :param _content_type: force content-type for the request.
2415
+ :type _content_type: str, Optional
2416
+ :param _headers: set to override the headers for a single
2417
+ request; this effectively ignores the headers
2418
+ in the spec for a single request.
2419
+ :type _headers: dict, optional
2420
+ :param _host_index: set to override the host_index for a single
2421
+ request; this effectively ignores the host_index
2422
+ in the spec for a single request.
2423
+ :type _host_index: int, optional
2424
+ :return: Returns the result object.
2425
+ """ # noqa: E501
2426
+
2427
+ _param = self._update_infra_alert_config_serialize(
2428
+ id=id,
2429
+ infra_alert_config=infra_alert_config,
2430
+ _request_auth=_request_auth,
2431
+ _content_type=_content_type,
2432
+ _headers=_headers,
2433
+ _host_index=_host_index
2434
+ )
2435
+
2436
+ _response_types_map: Dict[str, Optional[str]] = {
2437
+ '200': "InfraAlertConfigWithMetadata",
2438
+ '204': None,
2439
+ }
2440
+ response_data = self.api_client.call_api(
2441
+ *_param,
2442
+ _request_timeout=_request_timeout
2443
+ )
2444
+ return response_data.response
2445
+
2446
+
2447
+ def _update_infra_alert_config_serialize(
2448
+ self,
2449
+ id,
2450
+ infra_alert_config,
2451
+ _request_auth,
2452
+ _content_type,
2453
+ _headers,
2454
+ _host_index,
2455
+ ) -> RequestSerialized:
2456
+
2457
+ _host = None
2458
+
2459
+ _collection_formats: Dict[str, str] = {
2460
+ }
2461
+
2462
+ _path_params: Dict[str, str] = {}
2463
+ _query_params: List[Tuple[str, str]] = []
2464
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2465
+ _form_params: List[Tuple[str, str]] = []
2466
+ _files: Dict[
2467
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2468
+ ] = {}
2469
+ _body_params: Optional[bytes] = None
2470
+
2471
+ # process the path parameters
2472
+ if id is not None:
2473
+ _path_params['id'] = id
2474
+ # process the query parameters
2475
+ # process the header parameters
2476
+ # process the form parameters
2477
+ # process the body parameter
2478
+ if infra_alert_config is not None:
2479
+ _body_params = infra_alert_config
2480
+
2481
+
2482
+ # set the HTTP header `Accept`
2483
+ if 'Accept' not in _header_params:
2484
+ _header_params['Accept'] = self.api_client.select_header_accept(
2485
+ [
2486
+ 'application/json'
2487
+ ]
2488
+ )
2489
+
2490
+ # set the HTTP header `Content-Type`
2491
+ if _content_type:
2492
+ _header_params['Content-Type'] = _content_type
2493
+ else:
2494
+ _default_content_type = (
2495
+ self.api_client.select_header_content_type(
2496
+ [
2497
+ 'application/json'
2498
+ ]
2499
+ )
2500
+ )
2501
+ if _default_content_type is not None:
2502
+ _header_params['Content-Type'] = _default_content_type
2503
+
2504
+ # authentication setting
2505
+ _auth_settings: List[str] = [
2506
+ 'ApiKeyAuth'
2507
+ ]
2508
+
2509
+ return self.api_client.param_serialize(
2510
+ method='POST',
2511
+ resource_path='/api/events/settings/infra-alert-configs/{id}',
2512
+ path_params=_path_params,
2513
+ query_params=_query_params,
2514
+ header_params=_header_params,
2515
+ body=_body_params,
2516
+ post_params=_form_params,
2517
+ files=_files,
2518
+ auth_settings=_auth_settings,
2519
+ collection_formats=_collection_formats,
2520
+ _host=_host,
2521
+ _request_auth=_request_auth
2522
+ )
2523
+
2524
+