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,2577 @@
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.service_levels_alert_config import ServiceLevelsAlertConfig
25
+ from instana_client.models.service_levelse_alert_config_with_metadata import ServiceLevelseAlertConfigWithMetadata
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 ServiceLevelsAlertConfigurationApi:
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_service_levels_alert_config(
47
+ self,
48
+ service_levels_alert_config: Annotated[ServiceLevelsAlertConfig, Field(description="Create Request Body")],
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
+ ) -> ServiceLevelseAlertConfigWithMetadata:
62
+ """Create Service levels Alert Config
63
+
64
+
65
+ :param service_levels_alert_config: Create Request Body (required)
66
+ :type service_levels_alert_config: ServiceLevelsAlertConfig
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_service_levels_alert_config_serialize(
90
+ service_levels_alert_config=service_levels_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': "ServiceLevelseAlertConfigWithMetadata",
99
+ '400': "List[str]",
100
+ }
101
+ response_data = self.api_client.call_api(
102
+ *_param,
103
+ _request_timeout=_request_timeout
104
+ )
105
+ response_data.read()
106
+ return self.api_client.response_deserialize(
107
+ response_data=response_data,
108
+ response_types_map=_response_types_map,
109
+ ).data
110
+
111
+
112
+ @validate_call
113
+ def create_service_levels_alert_config_with_http_info(
114
+ self,
115
+ service_levels_alert_config: Annotated[ServiceLevelsAlertConfig, Field(description="Create Request Body")],
116
+ _request_timeout: Union[
117
+ None,
118
+ Annotated[StrictFloat, Field(gt=0)],
119
+ Tuple[
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Annotated[StrictFloat, Field(gt=0)]
122
+ ]
123
+ ] = None,
124
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
125
+ _content_type: Optional[StrictStr] = None,
126
+ _headers: Optional[Dict[StrictStr, Any]] = None,
127
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
128
+ ) -> ApiResponse[ServiceLevelseAlertConfigWithMetadata]:
129
+ """Create Service levels Alert Config
130
+
131
+
132
+ :param service_levels_alert_config: Create Request Body (required)
133
+ :type service_levels_alert_config: ServiceLevelsAlertConfig
134
+ :param _request_timeout: timeout setting for this request. If one
135
+ number provided, it will be total request
136
+ timeout. It can also be a pair (tuple) of
137
+ (connection, read) timeouts.
138
+ :type _request_timeout: int, tuple(int, int), optional
139
+ :param _request_auth: set to override the auth_settings for an a single
140
+ request; this effectively ignores the
141
+ authentication in the spec for a single request.
142
+ :type _request_auth: dict, optional
143
+ :param _content_type: force content-type for the request.
144
+ :type _content_type: str, Optional
145
+ :param _headers: set to override the headers for a single
146
+ request; this effectively ignores the headers
147
+ in the spec for a single request.
148
+ :type _headers: dict, optional
149
+ :param _host_index: set to override the host_index for a single
150
+ request; this effectively ignores the host_index
151
+ in the spec for a single request.
152
+ :type _host_index: int, optional
153
+ :return: Returns the result object.
154
+ """ # noqa: E501
155
+
156
+ _param = self._create_service_levels_alert_config_serialize(
157
+ service_levels_alert_config=service_levels_alert_config,
158
+ _request_auth=_request_auth,
159
+ _content_type=_content_type,
160
+ _headers=_headers,
161
+ _host_index=_host_index
162
+ )
163
+
164
+ _response_types_map: Dict[str, Optional[str]] = {
165
+ '200': "ServiceLevelseAlertConfigWithMetadata",
166
+ '400': "List[str]",
167
+ }
168
+ response_data = self.api_client.call_api(
169
+ *_param,
170
+ _request_timeout=_request_timeout
171
+ )
172
+ response_data.read()
173
+ return self.api_client.response_deserialize(
174
+ response_data=response_data,
175
+ response_types_map=_response_types_map,
176
+ )
177
+
178
+
179
+ @validate_call
180
+ def create_service_levels_alert_config_without_preload_content(
181
+ self,
182
+ service_levels_alert_config: Annotated[ServiceLevelsAlertConfig, Field(description="Create Request Body")],
183
+ _request_timeout: Union[
184
+ None,
185
+ Annotated[StrictFloat, Field(gt=0)],
186
+ Tuple[
187
+ Annotated[StrictFloat, Field(gt=0)],
188
+ Annotated[StrictFloat, Field(gt=0)]
189
+ ]
190
+ ] = None,
191
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
192
+ _content_type: Optional[StrictStr] = None,
193
+ _headers: Optional[Dict[StrictStr, Any]] = None,
194
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
195
+ ) -> RESTResponseType:
196
+ """Create Service levels Alert Config
197
+
198
+
199
+ :param service_levels_alert_config: Create Request Body (required)
200
+ :type service_levels_alert_config: ServiceLevelsAlertConfig
201
+ :param _request_timeout: timeout setting for this request. If one
202
+ number provided, it will be total request
203
+ timeout. It can also be a pair (tuple) of
204
+ (connection, read) timeouts.
205
+ :type _request_timeout: int, tuple(int, int), optional
206
+ :param _request_auth: set to override the auth_settings for an a single
207
+ request; this effectively ignores the
208
+ authentication in the spec for a single request.
209
+ :type _request_auth: dict, optional
210
+ :param _content_type: force content-type for the request.
211
+ :type _content_type: str, Optional
212
+ :param _headers: set to override the headers for a single
213
+ request; this effectively ignores the headers
214
+ in the spec for a single request.
215
+ :type _headers: dict, optional
216
+ :param _host_index: set to override the host_index for a single
217
+ request; this effectively ignores the host_index
218
+ in the spec for a single request.
219
+ :type _host_index: int, optional
220
+ :return: Returns the result object.
221
+ """ # noqa: E501
222
+
223
+ _param = self._create_service_levels_alert_config_serialize(
224
+ service_levels_alert_config=service_levels_alert_config,
225
+ _request_auth=_request_auth,
226
+ _content_type=_content_type,
227
+ _headers=_headers,
228
+ _host_index=_host_index
229
+ )
230
+
231
+ _response_types_map: Dict[str, Optional[str]] = {
232
+ '200': "ServiceLevelseAlertConfigWithMetadata",
233
+ '400': "List[str]",
234
+ }
235
+ response_data = self.api_client.call_api(
236
+ *_param,
237
+ _request_timeout=_request_timeout
238
+ )
239
+ return response_data.response
240
+
241
+
242
+ def _create_service_levels_alert_config_serialize(
243
+ self,
244
+ service_levels_alert_config,
245
+ _request_auth,
246
+ _content_type,
247
+ _headers,
248
+ _host_index,
249
+ ) -> RequestSerialized:
250
+
251
+ _host = None
252
+
253
+ _collection_formats: Dict[str, str] = {
254
+ }
255
+
256
+ _path_params: Dict[str, str] = {}
257
+ _query_params: List[Tuple[str, str]] = []
258
+ _header_params: Dict[str, Optional[str]] = _headers or {}
259
+ _form_params: List[Tuple[str, str]] = []
260
+ _files: Dict[
261
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
262
+ ] = {}
263
+ _body_params: Optional[bytes] = None
264
+
265
+ # process the path parameters
266
+ # process the query parameters
267
+ # process the header parameters
268
+ # process the form parameters
269
+ # process the body parameter
270
+ if service_levels_alert_config is not None:
271
+ _body_params = service_levels_alert_config
272
+
273
+
274
+ # set the HTTP header `Accept`
275
+ if 'Accept' not in _header_params:
276
+ _header_params['Accept'] = self.api_client.select_header_accept(
277
+ [
278
+ 'application/json'
279
+ ]
280
+ )
281
+
282
+ # set the HTTP header `Content-Type`
283
+ if _content_type:
284
+ _header_params['Content-Type'] = _content_type
285
+ else:
286
+ _default_content_type = (
287
+ self.api_client.select_header_content_type(
288
+ [
289
+ 'application/json'
290
+ ]
291
+ )
292
+ )
293
+ if _default_content_type is not None:
294
+ _header_params['Content-Type'] = _default_content_type
295
+
296
+ # authentication setting
297
+ _auth_settings: List[str] = [
298
+ 'ApiKeyAuth'
299
+ ]
300
+
301
+ return self.api_client.param_serialize(
302
+ method='POST',
303
+ resource_path='/api/events/settings/global-alert-configs/service-levels',
304
+ path_params=_path_params,
305
+ query_params=_query_params,
306
+ header_params=_header_params,
307
+ body=_body_params,
308
+ post_params=_form_params,
309
+ files=_files,
310
+ auth_settings=_auth_settings,
311
+ collection_formats=_collection_formats,
312
+ _host=_host,
313
+ _request_auth=_request_auth
314
+ )
315
+
316
+
317
+
318
+
319
+ @validate_call
320
+ def delete_service_levels_alert_config(
321
+ self,
322
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
323
+ _request_timeout: Union[
324
+ None,
325
+ Annotated[StrictFloat, Field(gt=0)],
326
+ Tuple[
327
+ Annotated[StrictFloat, Field(gt=0)],
328
+ Annotated[StrictFloat, Field(gt=0)]
329
+ ]
330
+ ] = None,
331
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
332
+ _content_type: Optional[StrictStr] = None,
333
+ _headers: Optional[Dict[StrictStr, Any]] = None,
334
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
335
+ ) -> None:
336
+ """Delete Service levels Alert Config
337
+
338
+
339
+ :param id: Service Levels Alert Configuration ID (required)
340
+ :type id: str
341
+ :param _request_timeout: timeout setting for this request. If one
342
+ number provided, it will be total request
343
+ timeout. It can also be a pair (tuple) of
344
+ (connection, read) timeouts.
345
+ :type _request_timeout: int, tuple(int, int), optional
346
+ :param _request_auth: set to override the auth_settings for an a single
347
+ request; this effectively ignores the
348
+ authentication in the spec for a single request.
349
+ :type _request_auth: dict, optional
350
+ :param _content_type: force content-type for the request.
351
+ :type _content_type: str, Optional
352
+ :param _headers: set to override the headers for a single
353
+ request; this effectively ignores the headers
354
+ in the spec for a single request.
355
+ :type _headers: dict, optional
356
+ :param _host_index: set to override the host_index for a single
357
+ request; this effectively ignores the host_index
358
+ in the spec for a single request.
359
+ :type _host_index: int, optional
360
+ :return: Returns the result object.
361
+ """ # noqa: E501
362
+
363
+ _param = self._delete_service_levels_alert_config_serialize(
364
+ id=id,
365
+ _request_auth=_request_auth,
366
+ _content_type=_content_type,
367
+ _headers=_headers,
368
+ _host_index=_host_index
369
+ )
370
+
371
+ _response_types_map: Dict[str, Optional[str]] = {
372
+ '204': None,
373
+ '404': "str",
374
+ }
375
+ response_data = self.api_client.call_api(
376
+ *_param,
377
+ _request_timeout=_request_timeout
378
+ )
379
+ response_data.read()
380
+ return self.api_client.response_deserialize(
381
+ response_data=response_data,
382
+ response_types_map=_response_types_map,
383
+ ).data
384
+
385
+
386
+ @validate_call
387
+ def delete_service_levels_alert_config_with_http_info(
388
+ self,
389
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
390
+ _request_timeout: Union[
391
+ None,
392
+ Annotated[StrictFloat, Field(gt=0)],
393
+ Tuple[
394
+ Annotated[StrictFloat, Field(gt=0)],
395
+ Annotated[StrictFloat, Field(gt=0)]
396
+ ]
397
+ ] = None,
398
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
399
+ _content_type: Optional[StrictStr] = None,
400
+ _headers: Optional[Dict[StrictStr, Any]] = None,
401
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
402
+ ) -> ApiResponse[None]:
403
+ """Delete Service levels Alert Config
404
+
405
+
406
+ :param id: Service Levels Alert Configuration ID (required)
407
+ :type id: str
408
+ :param _request_timeout: timeout setting for this request. If one
409
+ number provided, it will be total request
410
+ timeout. It can also be a pair (tuple) of
411
+ (connection, read) timeouts.
412
+ :type _request_timeout: int, tuple(int, int), optional
413
+ :param _request_auth: set to override the auth_settings for an a single
414
+ request; this effectively ignores the
415
+ authentication in the spec for a single request.
416
+ :type _request_auth: dict, optional
417
+ :param _content_type: force content-type for the request.
418
+ :type _content_type: str, Optional
419
+ :param _headers: set to override the headers for a single
420
+ request; this effectively ignores the headers
421
+ in the spec for a single request.
422
+ :type _headers: dict, optional
423
+ :param _host_index: set to override the host_index for a single
424
+ request; this effectively ignores the host_index
425
+ in the spec for a single request.
426
+ :type _host_index: int, optional
427
+ :return: Returns the result object.
428
+ """ # noqa: E501
429
+
430
+ _param = self._delete_service_levels_alert_config_serialize(
431
+ id=id,
432
+ _request_auth=_request_auth,
433
+ _content_type=_content_type,
434
+ _headers=_headers,
435
+ _host_index=_host_index
436
+ )
437
+
438
+ _response_types_map: Dict[str, Optional[str]] = {
439
+ '204': None,
440
+ '404': "str",
441
+ }
442
+ response_data = self.api_client.call_api(
443
+ *_param,
444
+ _request_timeout=_request_timeout
445
+ )
446
+ response_data.read()
447
+ return self.api_client.response_deserialize(
448
+ response_data=response_data,
449
+ response_types_map=_response_types_map,
450
+ )
451
+
452
+
453
+ @validate_call
454
+ def delete_service_levels_alert_config_without_preload_content(
455
+ self,
456
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
457
+ _request_timeout: Union[
458
+ None,
459
+ Annotated[StrictFloat, Field(gt=0)],
460
+ Tuple[
461
+ Annotated[StrictFloat, Field(gt=0)],
462
+ Annotated[StrictFloat, Field(gt=0)]
463
+ ]
464
+ ] = None,
465
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
466
+ _content_type: Optional[StrictStr] = None,
467
+ _headers: Optional[Dict[StrictStr, Any]] = None,
468
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
469
+ ) -> RESTResponseType:
470
+ """Delete Service levels Alert Config
471
+
472
+
473
+ :param id: Service Levels Alert Configuration ID (required)
474
+ :type id: str
475
+ :param _request_timeout: timeout setting for this request. If one
476
+ number provided, it will be total request
477
+ timeout. It can also be a pair (tuple) of
478
+ (connection, read) timeouts.
479
+ :type _request_timeout: int, tuple(int, int), optional
480
+ :param _request_auth: set to override the auth_settings for an a single
481
+ request; this effectively ignores the
482
+ authentication in the spec for a single request.
483
+ :type _request_auth: dict, optional
484
+ :param _content_type: force content-type for the request.
485
+ :type _content_type: str, Optional
486
+ :param _headers: set to override the headers for a single
487
+ request; this effectively ignores the headers
488
+ in the spec for a single request.
489
+ :type _headers: dict, optional
490
+ :param _host_index: set to override the host_index for a single
491
+ request; this effectively ignores the host_index
492
+ in the spec for a single request.
493
+ :type _host_index: int, optional
494
+ :return: Returns the result object.
495
+ """ # noqa: E501
496
+
497
+ _param = self._delete_service_levels_alert_config_serialize(
498
+ id=id,
499
+ _request_auth=_request_auth,
500
+ _content_type=_content_type,
501
+ _headers=_headers,
502
+ _host_index=_host_index
503
+ )
504
+
505
+ _response_types_map: Dict[str, Optional[str]] = {
506
+ '204': None,
507
+ '404': "str",
508
+ }
509
+ response_data = self.api_client.call_api(
510
+ *_param,
511
+ _request_timeout=_request_timeout
512
+ )
513
+ return response_data.response
514
+
515
+
516
+ def _delete_service_levels_alert_config_serialize(
517
+ self,
518
+ id,
519
+ _request_auth,
520
+ _content_type,
521
+ _headers,
522
+ _host_index,
523
+ ) -> RequestSerialized:
524
+
525
+ _host = None
526
+
527
+ _collection_formats: Dict[str, str] = {
528
+ }
529
+
530
+ _path_params: Dict[str, str] = {}
531
+ _query_params: List[Tuple[str, str]] = []
532
+ _header_params: Dict[str, Optional[str]] = _headers or {}
533
+ _form_params: List[Tuple[str, str]] = []
534
+ _files: Dict[
535
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
536
+ ] = {}
537
+ _body_params: Optional[bytes] = None
538
+
539
+ # process the path parameters
540
+ if id is not None:
541
+ _path_params['id'] = id
542
+ # process the query parameters
543
+ # process the header parameters
544
+ # process the form parameters
545
+ # process the body parameter
546
+
547
+
548
+ # set the HTTP header `Accept`
549
+ if 'Accept' not in _header_params:
550
+ _header_params['Accept'] = self.api_client.select_header_accept(
551
+ [
552
+ 'application/json'
553
+ ]
554
+ )
555
+
556
+
557
+ # authentication setting
558
+ _auth_settings: List[str] = [
559
+ 'ApiKeyAuth'
560
+ ]
561
+
562
+ return self.api_client.param_serialize(
563
+ method='DELETE',
564
+ resource_path='/api/events/settings/global-alert-configs/service-levels/{id}',
565
+ path_params=_path_params,
566
+ query_params=_query_params,
567
+ header_params=_header_params,
568
+ body=_body_params,
569
+ post_params=_form_params,
570
+ files=_files,
571
+ auth_settings=_auth_settings,
572
+ collection_formats=_collection_formats,
573
+ _host=_host,
574
+ _request_auth=_request_auth
575
+ )
576
+
577
+
578
+
579
+
580
+ @validate_call
581
+ def disable_service_levels_alert_config(
582
+ self,
583
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
584
+ body: Optional[StrictStr] = None,
585
+ _request_timeout: Union[
586
+ None,
587
+ Annotated[StrictFloat, Field(gt=0)],
588
+ Tuple[
589
+ Annotated[StrictFloat, Field(gt=0)],
590
+ Annotated[StrictFloat, Field(gt=0)]
591
+ ]
592
+ ] = None,
593
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
594
+ _content_type: Optional[StrictStr] = None,
595
+ _headers: Optional[Dict[StrictStr, Any]] = None,
596
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
597
+ ) -> None:
598
+ """Disable Service levels Alert Config
599
+
600
+
601
+ :param id: Service Levels Alert Configuration ID (required)
602
+ :type id: str
603
+ :param body:
604
+ :type body: str
605
+ :param _request_timeout: timeout setting for this request. If one
606
+ number provided, it will be total request
607
+ timeout. It can also be a pair (tuple) of
608
+ (connection, read) timeouts.
609
+ :type _request_timeout: int, tuple(int, int), optional
610
+ :param _request_auth: set to override the auth_settings for an a single
611
+ request; this effectively ignores the
612
+ authentication in the spec for a single request.
613
+ :type _request_auth: dict, optional
614
+ :param _content_type: force content-type for the request.
615
+ :type _content_type: str, Optional
616
+ :param _headers: set to override the headers for a single
617
+ request; this effectively ignores the headers
618
+ in the spec for a single request.
619
+ :type _headers: dict, optional
620
+ :param _host_index: set to override the host_index for a single
621
+ request; this effectively ignores the host_index
622
+ in the spec for a single request.
623
+ :type _host_index: int, optional
624
+ :return: Returns the result object.
625
+ """ # noqa: E501
626
+
627
+ _param = self._disable_service_levels_alert_config_serialize(
628
+ id=id,
629
+ body=body,
630
+ _request_auth=_request_auth,
631
+ _content_type=_content_type,
632
+ _headers=_headers,
633
+ _host_index=_host_index
634
+ )
635
+
636
+ _response_types_map: Dict[str, Optional[str]] = {
637
+ '204': None,
638
+ '404': "str",
639
+ }
640
+ response_data = self.api_client.call_api(
641
+ *_param,
642
+ _request_timeout=_request_timeout
643
+ )
644
+ response_data.read()
645
+ return self.api_client.response_deserialize(
646
+ response_data=response_data,
647
+ response_types_map=_response_types_map,
648
+ ).data
649
+
650
+
651
+ @validate_call
652
+ def disable_service_levels_alert_config_with_http_info(
653
+ self,
654
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
655
+ body: Optional[StrictStr] = None,
656
+ _request_timeout: Union[
657
+ None,
658
+ Annotated[StrictFloat, Field(gt=0)],
659
+ Tuple[
660
+ Annotated[StrictFloat, Field(gt=0)],
661
+ Annotated[StrictFloat, Field(gt=0)]
662
+ ]
663
+ ] = None,
664
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
665
+ _content_type: Optional[StrictStr] = None,
666
+ _headers: Optional[Dict[StrictStr, Any]] = None,
667
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
668
+ ) -> ApiResponse[None]:
669
+ """Disable Service levels Alert Config
670
+
671
+
672
+ :param id: Service Levels Alert Configuration ID (required)
673
+ :type id: str
674
+ :param body:
675
+ :type body: str
676
+ :param _request_timeout: timeout setting for this request. If one
677
+ number provided, it will be total request
678
+ timeout. It can also be a pair (tuple) of
679
+ (connection, read) timeouts.
680
+ :type _request_timeout: int, tuple(int, int), optional
681
+ :param _request_auth: set to override the auth_settings for an a single
682
+ request; this effectively ignores the
683
+ authentication in the spec for a single request.
684
+ :type _request_auth: dict, optional
685
+ :param _content_type: force content-type for the request.
686
+ :type _content_type: str, Optional
687
+ :param _headers: set to override the headers for a single
688
+ request; this effectively ignores the headers
689
+ in the spec for a single request.
690
+ :type _headers: dict, optional
691
+ :param _host_index: set to override the host_index for a single
692
+ request; this effectively ignores the host_index
693
+ in the spec for a single request.
694
+ :type _host_index: int, optional
695
+ :return: Returns the result object.
696
+ """ # noqa: E501
697
+
698
+ _param = self._disable_service_levels_alert_config_serialize(
699
+ id=id,
700
+ body=body,
701
+ _request_auth=_request_auth,
702
+ _content_type=_content_type,
703
+ _headers=_headers,
704
+ _host_index=_host_index
705
+ )
706
+
707
+ _response_types_map: Dict[str, Optional[str]] = {
708
+ '204': None,
709
+ '404': "str",
710
+ }
711
+ response_data = self.api_client.call_api(
712
+ *_param,
713
+ _request_timeout=_request_timeout
714
+ )
715
+ response_data.read()
716
+ return self.api_client.response_deserialize(
717
+ response_data=response_data,
718
+ response_types_map=_response_types_map,
719
+ )
720
+
721
+
722
+ @validate_call
723
+ def disable_service_levels_alert_config_without_preload_content(
724
+ self,
725
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
726
+ body: Optional[StrictStr] = None,
727
+ _request_timeout: Union[
728
+ None,
729
+ Annotated[StrictFloat, Field(gt=0)],
730
+ Tuple[
731
+ Annotated[StrictFloat, Field(gt=0)],
732
+ Annotated[StrictFloat, Field(gt=0)]
733
+ ]
734
+ ] = None,
735
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
736
+ _content_type: Optional[StrictStr] = None,
737
+ _headers: Optional[Dict[StrictStr, Any]] = None,
738
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
739
+ ) -> RESTResponseType:
740
+ """Disable Service levels Alert Config
741
+
742
+
743
+ :param id: Service Levels Alert Configuration ID (required)
744
+ :type id: str
745
+ :param body:
746
+ :type body: str
747
+ :param _request_timeout: timeout setting for this request. If one
748
+ number provided, it will be total request
749
+ timeout. It can also be a pair (tuple) of
750
+ (connection, read) timeouts.
751
+ :type _request_timeout: int, tuple(int, int), optional
752
+ :param _request_auth: set to override the auth_settings for an a single
753
+ request; this effectively ignores the
754
+ authentication in the spec for a single request.
755
+ :type _request_auth: dict, optional
756
+ :param _content_type: force content-type for the request.
757
+ :type _content_type: str, Optional
758
+ :param _headers: set to override the headers for a single
759
+ request; this effectively ignores the headers
760
+ in the spec for a single request.
761
+ :type _headers: dict, optional
762
+ :param _host_index: set to override the host_index for a single
763
+ request; this effectively ignores the host_index
764
+ in the spec for a single request.
765
+ :type _host_index: int, optional
766
+ :return: Returns the result object.
767
+ """ # noqa: E501
768
+
769
+ _param = self._disable_service_levels_alert_config_serialize(
770
+ id=id,
771
+ body=body,
772
+ _request_auth=_request_auth,
773
+ _content_type=_content_type,
774
+ _headers=_headers,
775
+ _host_index=_host_index
776
+ )
777
+
778
+ _response_types_map: Dict[str, Optional[str]] = {
779
+ '204': None,
780
+ '404': "str",
781
+ }
782
+ response_data = self.api_client.call_api(
783
+ *_param,
784
+ _request_timeout=_request_timeout
785
+ )
786
+ return response_data.response
787
+
788
+
789
+ def _disable_service_levels_alert_config_serialize(
790
+ self,
791
+ id,
792
+ body,
793
+ _request_auth,
794
+ _content_type,
795
+ _headers,
796
+ _host_index,
797
+ ) -> RequestSerialized:
798
+
799
+ _host = None
800
+
801
+ _collection_formats: Dict[str, str] = {
802
+ }
803
+
804
+ _path_params: Dict[str, str] = {}
805
+ _query_params: List[Tuple[str, str]] = []
806
+ _header_params: Dict[str, Optional[str]] = _headers or {}
807
+ _form_params: List[Tuple[str, str]] = []
808
+ _files: Dict[
809
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
810
+ ] = {}
811
+ _body_params: Optional[bytes] = None
812
+
813
+ # process the path parameters
814
+ if id is not None:
815
+ _path_params['id'] = id
816
+ # process the query parameters
817
+ # process the header parameters
818
+ # process the form parameters
819
+ # process the body parameter
820
+ if body is not None:
821
+ _body_params = body
822
+
823
+
824
+ # set the HTTP header `Accept`
825
+ if 'Accept' not in _header_params:
826
+ _header_params['Accept'] = self.api_client.select_header_accept(
827
+ [
828
+ 'application/json'
829
+ ]
830
+ )
831
+
832
+ # set the HTTP header `Content-Type`
833
+ if _content_type:
834
+ _header_params['Content-Type'] = _content_type
835
+ else:
836
+ _default_content_type = (
837
+ self.api_client.select_header_content_type(
838
+ [
839
+ 'application/json'
840
+ ]
841
+ )
842
+ )
843
+ if _default_content_type is not None:
844
+ _header_params['Content-Type'] = _default_content_type
845
+
846
+ # authentication setting
847
+ _auth_settings: List[str] = [
848
+ 'ApiKeyAuth'
849
+ ]
850
+
851
+ return self.api_client.param_serialize(
852
+ method='PUT',
853
+ resource_path='/api/events/settings/global-alert-configs/service-levels/{id}/disable',
854
+ path_params=_path_params,
855
+ query_params=_query_params,
856
+ header_params=_header_params,
857
+ body=_body_params,
858
+ post_params=_form_params,
859
+ files=_files,
860
+ auth_settings=_auth_settings,
861
+ collection_formats=_collection_formats,
862
+ _host=_host,
863
+ _request_auth=_request_auth
864
+ )
865
+
866
+
867
+
868
+
869
+ @validate_call
870
+ def enable_service_levels_alert_config(
871
+ self,
872
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
873
+ body: Optional[StrictStr] = None,
874
+ _request_timeout: Union[
875
+ None,
876
+ Annotated[StrictFloat, Field(gt=0)],
877
+ Tuple[
878
+ Annotated[StrictFloat, Field(gt=0)],
879
+ Annotated[StrictFloat, Field(gt=0)]
880
+ ]
881
+ ] = None,
882
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
883
+ _content_type: Optional[StrictStr] = None,
884
+ _headers: Optional[Dict[StrictStr, Any]] = None,
885
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
886
+ ) -> None:
887
+ """Enable Service levels Alert Config
888
+
889
+
890
+ :param id: Service Levels Alert Configuration ID (required)
891
+ :type id: str
892
+ :param body:
893
+ :type body: str
894
+ :param _request_timeout: timeout setting for this request. If one
895
+ number provided, it will be total request
896
+ timeout. It can also be a pair (tuple) of
897
+ (connection, read) timeouts.
898
+ :type _request_timeout: int, tuple(int, int), optional
899
+ :param _request_auth: set to override the auth_settings for an a single
900
+ request; this effectively ignores the
901
+ authentication in the spec for a single request.
902
+ :type _request_auth: dict, optional
903
+ :param _content_type: force content-type for the request.
904
+ :type _content_type: str, Optional
905
+ :param _headers: set to override the headers for a single
906
+ request; this effectively ignores the headers
907
+ in the spec for a single request.
908
+ :type _headers: dict, optional
909
+ :param _host_index: set to override the host_index for a single
910
+ request; this effectively ignores the host_index
911
+ in the spec for a single request.
912
+ :type _host_index: int, optional
913
+ :return: Returns the result object.
914
+ """ # noqa: E501
915
+
916
+ _param = self._enable_service_levels_alert_config_serialize(
917
+ id=id,
918
+ body=body,
919
+ _request_auth=_request_auth,
920
+ _content_type=_content_type,
921
+ _headers=_headers,
922
+ _host_index=_host_index
923
+ )
924
+
925
+ _response_types_map: Dict[str, Optional[str]] = {
926
+ '204': None,
927
+ '404': "str",
928
+ }
929
+ response_data = self.api_client.call_api(
930
+ *_param,
931
+ _request_timeout=_request_timeout
932
+ )
933
+ response_data.read()
934
+ return self.api_client.response_deserialize(
935
+ response_data=response_data,
936
+ response_types_map=_response_types_map,
937
+ ).data
938
+
939
+
940
+ @validate_call
941
+ def enable_service_levels_alert_config_with_http_info(
942
+ self,
943
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
944
+ body: Optional[StrictStr] = None,
945
+ _request_timeout: Union[
946
+ None,
947
+ Annotated[StrictFloat, Field(gt=0)],
948
+ Tuple[
949
+ Annotated[StrictFloat, Field(gt=0)],
950
+ Annotated[StrictFloat, Field(gt=0)]
951
+ ]
952
+ ] = None,
953
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
954
+ _content_type: Optional[StrictStr] = None,
955
+ _headers: Optional[Dict[StrictStr, Any]] = None,
956
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
957
+ ) -> ApiResponse[None]:
958
+ """Enable Service levels Alert Config
959
+
960
+
961
+ :param id: Service Levels Alert Configuration ID (required)
962
+ :type id: str
963
+ :param body:
964
+ :type body: str
965
+ :param _request_timeout: timeout setting for this request. If one
966
+ number provided, it will be total request
967
+ timeout. It can also be a pair (tuple) of
968
+ (connection, read) timeouts.
969
+ :type _request_timeout: int, tuple(int, int), optional
970
+ :param _request_auth: set to override the auth_settings for an a single
971
+ request; this effectively ignores the
972
+ authentication in the spec for a single request.
973
+ :type _request_auth: dict, optional
974
+ :param _content_type: force content-type for the request.
975
+ :type _content_type: str, Optional
976
+ :param _headers: set to override the headers for a single
977
+ request; this effectively ignores the headers
978
+ in the spec for a single request.
979
+ :type _headers: dict, optional
980
+ :param _host_index: set to override the host_index for a single
981
+ request; this effectively ignores the host_index
982
+ in the spec for a single request.
983
+ :type _host_index: int, optional
984
+ :return: Returns the result object.
985
+ """ # noqa: E501
986
+
987
+ _param = self._enable_service_levels_alert_config_serialize(
988
+ id=id,
989
+ body=body,
990
+ _request_auth=_request_auth,
991
+ _content_type=_content_type,
992
+ _headers=_headers,
993
+ _host_index=_host_index
994
+ )
995
+
996
+ _response_types_map: Dict[str, Optional[str]] = {
997
+ '204': None,
998
+ '404': "str",
999
+ }
1000
+ response_data = self.api_client.call_api(
1001
+ *_param,
1002
+ _request_timeout=_request_timeout
1003
+ )
1004
+ response_data.read()
1005
+ return self.api_client.response_deserialize(
1006
+ response_data=response_data,
1007
+ response_types_map=_response_types_map,
1008
+ )
1009
+
1010
+
1011
+ @validate_call
1012
+ def enable_service_levels_alert_config_without_preload_content(
1013
+ self,
1014
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
1015
+ body: Optional[StrictStr] = None,
1016
+ _request_timeout: Union[
1017
+ None,
1018
+ Annotated[StrictFloat, Field(gt=0)],
1019
+ Tuple[
1020
+ Annotated[StrictFloat, Field(gt=0)],
1021
+ Annotated[StrictFloat, Field(gt=0)]
1022
+ ]
1023
+ ] = None,
1024
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1025
+ _content_type: Optional[StrictStr] = None,
1026
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1027
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1028
+ ) -> RESTResponseType:
1029
+ """Enable Service levels Alert Config
1030
+
1031
+
1032
+ :param id: Service Levels Alert Configuration ID (required)
1033
+ :type id: str
1034
+ :param body:
1035
+ :type body: str
1036
+ :param _request_timeout: timeout setting for this request. If one
1037
+ number provided, it will be total request
1038
+ timeout. It can also be a pair (tuple) of
1039
+ (connection, read) timeouts.
1040
+ :type _request_timeout: int, tuple(int, int), optional
1041
+ :param _request_auth: set to override the auth_settings for an a single
1042
+ request; this effectively ignores the
1043
+ authentication in the spec for a single request.
1044
+ :type _request_auth: dict, optional
1045
+ :param _content_type: force content-type for the request.
1046
+ :type _content_type: str, Optional
1047
+ :param _headers: set to override the headers for a single
1048
+ request; this effectively ignores the headers
1049
+ in the spec for a single request.
1050
+ :type _headers: dict, optional
1051
+ :param _host_index: set to override the host_index for a single
1052
+ request; this effectively ignores the host_index
1053
+ in the spec for a single request.
1054
+ :type _host_index: int, optional
1055
+ :return: Returns the result object.
1056
+ """ # noqa: E501
1057
+
1058
+ _param = self._enable_service_levels_alert_config_serialize(
1059
+ id=id,
1060
+ body=body,
1061
+ _request_auth=_request_auth,
1062
+ _content_type=_content_type,
1063
+ _headers=_headers,
1064
+ _host_index=_host_index
1065
+ )
1066
+
1067
+ _response_types_map: Dict[str, Optional[str]] = {
1068
+ '204': None,
1069
+ '404': "str",
1070
+ }
1071
+ response_data = self.api_client.call_api(
1072
+ *_param,
1073
+ _request_timeout=_request_timeout
1074
+ )
1075
+ return response_data.response
1076
+
1077
+
1078
+ def _enable_service_levels_alert_config_serialize(
1079
+ self,
1080
+ id,
1081
+ body,
1082
+ _request_auth,
1083
+ _content_type,
1084
+ _headers,
1085
+ _host_index,
1086
+ ) -> RequestSerialized:
1087
+
1088
+ _host = None
1089
+
1090
+ _collection_formats: Dict[str, str] = {
1091
+ }
1092
+
1093
+ _path_params: Dict[str, str] = {}
1094
+ _query_params: List[Tuple[str, str]] = []
1095
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1096
+ _form_params: List[Tuple[str, str]] = []
1097
+ _files: Dict[
1098
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1099
+ ] = {}
1100
+ _body_params: Optional[bytes] = None
1101
+
1102
+ # process the path parameters
1103
+ if id is not None:
1104
+ _path_params['id'] = id
1105
+ # process the query parameters
1106
+ # process the header parameters
1107
+ # process the form parameters
1108
+ # process the body parameter
1109
+ if body is not None:
1110
+ _body_params = body
1111
+
1112
+
1113
+ # set the HTTP header `Accept`
1114
+ if 'Accept' not in _header_params:
1115
+ _header_params['Accept'] = self.api_client.select_header_accept(
1116
+ [
1117
+ 'application/json'
1118
+ ]
1119
+ )
1120
+
1121
+ # set the HTTP header `Content-Type`
1122
+ if _content_type:
1123
+ _header_params['Content-Type'] = _content_type
1124
+ else:
1125
+ _default_content_type = (
1126
+ self.api_client.select_header_content_type(
1127
+ [
1128
+ 'application/json'
1129
+ ]
1130
+ )
1131
+ )
1132
+ if _default_content_type is not None:
1133
+ _header_params['Content-Type'] = _default_content_type
1134
+
1135
+ # authentication setting
1136
+ _auth_settings: List[str] = [
1137
+ 'ApiKeyAuth'
1138
+ ]
1139
+
1140
+ return self.api_client.param_serialize(
1141
+ method='PUT',
1142
+ resource_path='/api/events/settings/global-alert-configs/service-levels/{id}/enable',
1143
+ path_params=_path_params,
1144
+ query_params=_query_params,
1145
+ header_params=_header_params,
1146
+ body=_body_params,
1147
+ post_params=_form_params,
1148
+ files=_files,
1149
+ auth_settings=_auth_settings,
1150
+ collection_formats=_collection_formats,
1151
+ _host=_host,
1152
+ _request_auth=_request_auth
1153
+ )
1154
+
1155
+
1156
+
1157
+
1158
+ @validate_call
1159
+ def find_active_service_levels_alert_configs(
1160
+ self,
1161
+ slo_id: Annotated[Optional[StrictStr], Field(description="Service Levels Objective(SLO) Configuration ID")] = None,
1162
+ alert_ids: Annotated[Optional[Annotated[List[StrictStr], Field(min_length=0, max_length=1000)]], Field(description="List of Service Levels Alert Configuration IDs")] = None,
1163
+ _request_timeout: Union[
1164
+ None,
1165
+ Annotated[StrictFloat, Field(gt=0)],
1166
+ Tuple[
1167
+ Annotated[StrictFloat, Field(gt=0)],
1168
+ Annotated[StrictFloat, Field(gt=0)]
1169
+ ]
1170
+ ] = None,
1171
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1172
+ _content_type: Optional[StrictStr] = None,
1173
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1174
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1175
+ ) -> List[ServiceLevelseAlertConfigWithMetadata]:
1176
+ """All Service levels Alert Configs
1177
+
1178
+ Configs are sorted descending by their created date.
1179
+
1180
+ :param slo_id: Service Levels Objective(SLO) Configuration ID
1181
+ :type slo_id: str
1182
+ :param alert_ids: List of Service Levels Alert Configuration IDs
1183
+ :type alert_ids: List[str]
1184
+ :param _request_timeout: timeout setting for this request. If one
1185
+ number provided, it will be total request
1186
+ timeout. It can also be a pair (tuple) of
1187
+ (connection, read) timeouts.
1188
+ :type _request_timeout: int, tuple(int, int), optional
1189
+ :param _request_auth: set to override the auth_settings for an a single
1190
+ request; this effectively ignores the
1191
+ authentication in the spec for a single request.
1192
+ :type _request_auth: dict, optional
1193
+ :param _content_type: force content-type for the request.
1194
+ :type _content_type: str, Optional
1195
+ :param _headers: set to override the headers for a single
1196
+ request; this effectively ignores the headers
1197
+ in the spec for a single request.
1198
+ :type _headers: dict, optional
1199
+ :param _host_index: set to override the host_index for a single
1200
+ request; this effectively ignores the host_index
1201
+ in the spec for a single request.
1202
+ :type _host_index: int, optional
1203
+ :return: Returns the result object.
1204
+ """ # noqa: E501
1205
+
1206
+ _param = self._find_active_service_levels_alert_configs_serialize(
1207
+ slo_id=slo_id,
1208
+ alert_ids=alert_ids,
1209
+ _request_auth=_request_auth,
1210
+ _content_type=_content_type,
1211
+ _headers=_headers,
1212
+ _host_index=_host_index
1213
+ )
1214
+
1215
+ _response_types_map: Dict[str, Optional[str]] = {
1216
+ '200': "List[ServiceLevelseAlertConfigWithMetadata]",
1217
+ }
1218
+ response_data = self.api_client.call_api(
1219
+ *_param,
1220
+ _request_timeout=_request_timeout
1221
+ )
1222
+ response_data.read()
1223
+ return self.api_client.response_deserialize(
1224
+ response_data=response_data,
1225
+ response_types_map=_response_types_map,
1226
+ ).data
1227
+
1228
+
1229
+ @validate_call
1230
+ def find_active_service_levels_alert_configs_with_http_info(
1231
+ self,
1232
+ slo_id: Annotated[Optional[StrictStr], Field(description="Service Levels Objective(SLO) Configuration ID")] = None,
1233
+ alert_ids: Annotated[Optional[Annotated[List[StrictStr], Field(min_length=0, max_length=1000)]], Field(description="List of Service Levels Alert Configuration IDs")] = None,
1234
+ _request_timeout: Union[
1235
+ None,
1236
+ Annotated[StrictFloat, Field(gt=0)],
1237
+ Tuple[
1238
+ Annotated[StrictFloat, Field(gt=0)],
1239
+ Annotated[StrictFloat, Field(gt=0)]
1240
+ ]
1241
+ ] = None,
1242
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1243
+ _content_type: Optional[StrictStr] = None,
1244
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1245
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1246
+ ) -> ApiResponse[List[ServiceLevelseAlertConfigWithMetadata]]:
1247
+ """All Service levels Alert Configs
1248
+
1249
+ Configs are sorted descending by their created date.
1250
+
1251
+ :param slo_id: Service Levels Objective(SLO) Configuration ID
1252
+ :type slo_id: str
1253
+ :param alert_ids: List of Service Levels Alert Configuration IDs
1254
+ :type alert_ids: List[str]
1255
+ :param _request_timeout: timeout setting for this request. If one
1256
+ number provided, it will be total request
1257
+ timeout. It can also be a pair (tuple) of
1258
+ (connection, read) timeouts.
1259
+ :type _request_timeout: int, tuple(int, int), optional
1260
+ :param _request_auth: set to override the auth_settings for an a single
1261
+ request; this effectively ignores the
1262
+ authentication in the spec for a single request.
1263
+ :type _request_auth: dict, optional
1264
+ :param _content_type: force content-type for the request.
1265
+ :type _content_type: str, Optional
1266
+ :param _headers: set to override the headers for a single
1267
+ request; this effectively ignores the headers
1268
+ in the spec for a single request.
1269
+ :type _headers: dict, optional
1270
+ :param _host_index: set to override the host_index for a single
1271
+ request; this effectively ignores the host_index
1272
+ in the spec for a single request.
1273
+ :type _host_index: int, optional
1274
+ :return: Returns the result object.
1275
+ """ # noqa: E501
1276
+
1277
+ _param = self._find_active_service_levels_alert_configs_serialize(
1278
+ slo_id=slo_id,
1279
+ alert_ids=alert_ids,
1280
+ _request_auth=_request_auth,
1281
+ _content_type=_content_type,
1282
+ _headers=_headers,
1283
+ _host_index=_host_index
1284
+ )
1285
+
1286
+ _response_types_map: Dict[str, Optional[str]] = {
1287
+ '200': "List[ServiceLevelseAlertConfigWithMetadata]",
1288
+ }
1289
+ response_data = self.api_client.call_api(
1290
+ *_param,
1291
+ _request_timeout=_request_timeout
1292
+ )
1293
+ response_data.read()
1294
+ return self.api_client.response_deserialize(
1295
+ response_data=response_data,
1296
+ response_types_map=_response_types_map,
1297
+ )
1298
+
1299
+
1300
+ @validate_call
1301
+ def find_active_service_levels_alert_configs_without_preload_content(
1302
+ self,
1303
+ slo_id: Annotated[Optional[StrictStr], Field(description="Service Levels Objective(SLO) Configuration ID")] = None,
1304
+ alert_ids: Annotated[Optional[Annotated[List[StrictStr], Field(min_length=0, max_length=1000)]], Field(description="List of Service Levels Alert Configuration IDs")] = None,
1305
+ _request_timeout: Union[
1306
+ None,
1307
+ Annotated[StrictFloat, Field(gt=0)],
1308
+ Tuple[
1309
+ Annotated[StrictFloat, Field(gt=0)],
1310
+ Annotated[StrictFloat, Field(gt=0)]
1311
+ ]
1312
+ ] = None,
1313
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1314
+ _content_type: Optional[StrictStr] = None,
1315
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1316
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1317
+ ) -> RESTResponseType:
1318
+ """All Service levels Alert Configs
1319
+
1320
+ Configs are sorted descending by their created date.
1321
+
1322
+ :param slo_id: Service Levels Objective(SLO) Configuration ID
1323
+ :type slo_id: str
1324
+ :param alert_ids: List of Service Levels Alert Configuration IDs
1325
+ :type alert_ids: List[str]
1326
+ :param _request_timeout: timeout setting for this request. If one
1327
+ number provided, it will be total request
1328
+ timeout. It can also be a pair (tuple) of
1329
+ (connection, read) timeouts.
1330
+ :type _request_timeout: int, tuple(int, int), optional
1331
+ :param _request_auth: set to override the auth_settings for an a single
1332
+ request; this effectively ignores the
1333
+ authentication in the spec for a single request.
1334
+ :type _request_auth: dict, optional
1335
+ :param _content_type: force content-type for the request.
1336
+ :type _content_type: str, Optional
1337
+ :param _headers: set to override the headers for a single
1338
+ request; this effectively ignores the headers
1339
+ in the spec for a single request.
1340
+ :type _headers: dict, optional
1341
+ :param _host_index: set to override the host_index for a single
1342
+ request; this effectively ignores the host_index
1343
+ in the spec for a single request.
1344
+ :type _host_index: int, optional
1345
+ :return: Returns the result object.
1346
+ """ # noqa: E501
1347
+
1348
+ _param = self._find_active_service_levels_alert_configs_serialize(
1349
+ slo_id=slo_id,
1350
+ alert_ids=alert_ids,
1351
+ _request_auth=_request_auth,
1352
+ _content_type=_content_type,
1353
+ _headers=_headers,
1354
+ _host_index=_host_index
1355
+ )
1356
+
1357
+ _response_types_map: Dict[str, Optional[str]] = {
1358
+ '200': "List[ServiceLevelseAlertConfigWithMetadata]",
1359
+ }
1360
+ response_data = self.api_client.call_api(
1361
+ *_param,
1362
+ _request_timeout=_request_timeout
1363
+ )
1364
+ return response_data.response
1365
+
1366
+
1367
+ def _find_active_service_levels_alert_configs_serialize(
1368
+ self,
1369
+ slo_id,
1370
+ alert_ids,
1371
+ _request_auth,
1372
+ _content_type,
1373
+ _headers,
1374
+ _host_index,
1375
+ ) -> RequestSerialized:
1376
+
1377
+ _host = None
1378
+
1379
+ _collection_formats: Dict[str, str] = {
1380
+ 'alertIds': 'multi',
1381
+ }
1382
+
1383
+ _path_params: Dict[str, str] = {}
1384
+ _query_params: List[Tuple[str, str]] = []
1385
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1386
+ _form_params: List[Tuple[str, str]] = []
1387
+ _files: Dict[
1388
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1389
+ ] = {}
1390
+ _body_params: Optional[bytes] = None
1391
+
1392
+ # process the path parameters
1393
+ # process the query parameters
1394
+ if slo_id is not None:
1395
+
1396
+ _query_params.append(('sloId', slo_id))
1397
+
1398
+ if alert_ids is not None:
1399
+
1400
+ _query_params.append(('alertIds', alert_ids))
1401
+
1402
+ # process the header parameters
1403
+ # process the form parameters
1404
+ # process the body parameter
1405
+
1406
+
1407
+ # set the HTTP header `Accept`
1408
+ if 'Accept' not in _header_params:
1409
+ _header_params['Accept'] = self.api_client.select_header_accept(
1410
+ [
1411
+ 'application/json'
1412
+ ]
1413
+ )
1414
+
1415
+
1416
+ # authentication setting
1417
+ _auth_settings: List[str] = [
1418
+ 'ApiKeyAuth'
1419
+ ]
1420
+
1421
+ return self.api_client.param_serialize(
1422
+ method='GET',
1423
+ resource_path='/api/events/settings/global-alert-configs/service-levels',
1424
+ path_params=_path_params,
1425
+ query_params=_query_params,
1426
+ header_params=_header_params,
1427
+ body=_body_params,
1428
+ post_params=_form_params,
1429
+ files=_files,
1430
+ auth_settings=_auth_settings,
1431
+ collection_formats=_collection_formats,
1432
+ _host=_host,
1433
+ _request_auth=_request_auth
1434
+ )
1435
+
1436
+
1437
+
1438
+
1439
+ @validate_call
1440
+ def find_service_levels_alert_config(
1441
+ self,
1442
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
1443
+ valid_on: Annotated[Optional[StrictInt], Field(description="Service Levels Alert Version Creation Date")] = None,
1444
+ _request_timeout: Union[
1445
+ None,
1446
+ Annotated[StrictFloat, Field(gt=0)],
1447
+ Tuple[
1448
+ Annotated[StrictFloat, Field(gt=0)],
1449
+ Annotated[StrictFloat, Field(gt=0)]
1450
+ ]
1451
+ ] = None,
1452
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1453
+ _content_type: Optional[StrictStr] = None,
1454
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1455
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1456
+ ) -> ServiceLevelseAlertConfigWithMetadata:
1457
+ """Get Service levels Alert Config
1458
+
1459
+ Find a Service levels Alert Config by ID. This will deliver deleted configs too.
1460
+
1461
+ :param id: Service Levels Alert Configuration ID (required)
1462
+ :type id: str
1463
+ :param valid_on: Service Levels Alert Version Creation Date
1464
+ :type valid_on: int
1465
+ :param _request_timeout: timeout setting for this request. If one
1466
+ number provided, it will be total request
1467
+ timeout. It can also be a pair (tuple) of
1468
+ (connection, read) timeouts.
1469
+ :type _request_timeout: int, tuple(int, int), optional
1470
+ :param _request_auth: set to override the auth_settings for an a single
1471
+ request; this effectively ignores the
1472
+ authentication in the spec for a single request.
1473
+ :type _request_auth: dict, optional
1474
+ :param _content_type: force content-type for the request.
1475
+ :type _content_type: str, Optional
1476
+ :param _headers: set to override the headers for a single
1477
+ request; this effectively ignores the headers
1478
+ in the spec for a single request.
1479
+ :type _headers: dict, optional
1480
+ :param _host_index: set to override the host_index for a single
1481
+ request; this effectively ignores the host_index
1482
+ in the spec for a single request.
1483
+ :type _host_index: int, optional
1484
+ :return: Returns the result object.
1485
+ """ # noqa: E501
1486
+
1487
+ _param = self._find_service_levels_alert_config_serialize(
1488
+ id=id,
1489
+ valid_on=valid_on,
1490
+ _request_auth=_request_auth,
1491
+ _content_type=_content_type,
1492
+ _headers=_headers,
1493
+ _host_index=_host_index
1494
+ )
1495
+
1496
+ _response_types_map: Dict[str, Optional[str]] = {
1497
+ '200': "ServiceLevelseAlertConfigWithMetadata",
1498
+ '404': "str",
1499
+ }
1500
+ response_data = self.api_client.call_api(
1501
+ *_param,
1502
+ _request_timeout=_request_timeout
1503
+ )
1504
+ response_data.read()
1505
+ return self.api_client.response_deserialize(
1506
+ response_data=response_data,
1507
+ response_types_map=_response_types_map,
1508
+ ).data
1509
+
1510
+
1511
+ @validate_call
1512
+ def find_service_levels_alert_config_with_http_info(
1513
+ self,
1514
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
1515
+ valid_on: Annotated[Optional[StrictInt], Field(description="Service Levels Alert Version Creation Date")] = None,
1516
+ _request_timeout: Union[
1517
+ None,
1518
+ Annotated[StrictFloat, Field(gt=0)],
1519
+ Tuple[
1520
+ Annotated[StrictFloat, Field(gt=0)],
1521
+ Annotated[StrictFloat, Field(gt=0)]
1522
+ ]
1523
+ ] = None,
1524
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1525
+ _content_type: Optional[StrictStr] = None,
1526
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1527
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1528
+ ) -> ApiResponse[ServiceLevelseAlertConfigWithMetadata]:
1529
+ """Get Service levels Alert Config
1530
+
1531
+ Find a Service levels Alert Config by ID. This will deliver deleted configs too.
1532
+
1533
+ :param id: Service Levels Alert Configuration ID (required)
1534
+ :type id: str
1535
+ :param valid_on: Service Levels Alert Version Creation Date
1536
+ :type valid_on: int
1537
+ :param _request_timeout: timeout setting for this request. If one
1538
+ number provided, it will be total request
1539
+ timeout. It can also be a pair (tuple) of
1540
+ (connection, read) timeouts.
1541
+ :type _request_timeout: int, tuple(int, int), optional
1542
+ :param _request_auth: set to override the auth_settings for an a single
1543
+ request; this effectively ignores the
1544
+ authentication in the spec for a single request.
1545
+ :type _request_auth: dict, optional
1546
+ :param _content_type: force content-type for the request.
1547
+ :type _content_type: str, Optional
1548
+ :param _headers: set to override the headers for a single
1549
+ request; this effectively ignores the headers
1550
+ in the spec for a single request.
1551
+ :type _headers: dict, optional
1552
+ :param _host_index: set to override the host_index for a single
1553
+ request; this effectively ignores the host_index
1554
+ in the spec for a single request.
1555
+ :type _host_index: int, optional
1556
+ :return: Returns the result object.
1557
+ """ # noqa: E501
1558
+
1559
+ _param = self._find_service_levels_alert_config_serialize(
1560
+ id=id,
1561
+ valid_on=valid_on,
1562
+ _request_auth=_request_auth,
1563
+ _content_type=_content_type,
1564
+ _headers=_headers,
1565
+ _host_index=_host_index
1566
+ )
1567
+
1568
+ _response_types_map: Dict[str, Optional[str]] = {
1569
+ '200': "ServiceLevelseAlertConfigWithMetadata",
1570
+ '404': "str",
1571
+ }
1572
+ response_data = self.api_client.call_api(
1573
+ *_param,
1574
+ _request_timeout=_request_timeout
1575
+ )
1576
+ response_data.read()
1577
+ return self.api_client.response_deserialize(
1578
+ response_data=response_data,
1579
+ response_types_map=_response_types_map,
1580
+ )
1581
+
1582
+
1583
+ @validate_call
1584
+ def find_service_levels_alert_config_without_preload_content(
1585
+ self,
1586
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
1587
+ valid_on: Annotated[Optional[StrictInt], Field(description="Service Levels Alert Version Creation Date")] = None,
1588
+ _request_timeout: Union[
1589
+ None,
1590
+ Annotated[StrictFloat, Field(gt=0)],
1591
+ Tuple[
1592
+ Annotated[StrictFloat, Field(gt=0)],
1593
+ Annotated[StrictFloat, Field(gt=0)]
1594
+ ]
1595
+ ] = None,
1596
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1597
+ _content_type: Optional[StrictStr] = None,
1598
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1599
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1600
+ ) -> RESTResponseType:
1601
+ """Get Service levels Alert Config
1602
+
1603
+ Find a Service levels Alert Config by ID. This will deliver deleted configs too.
1604
+
1605
+ :param id: Service Levels Alert Configuration ID (required)
1606
+ :type id: str
1607
+ :param valid_on: Service Levels Alert Version Creation Date
1608
+ :type valid_on: int
1609
+ :param _request_timeout: timeout setting for this request. If one
1610
+ number provided, it will be total request
1611
+ timeout. It can also be a pair (tuple) of
1612
+ (connection, read) timeouts.
1613
+ :type _request_timeout: int, tuple(int, int), optional
1614
+ :param _request_auth: set to override the auth_settings for an a single
1615
+ request; this effectively ignores the
1616
+ authentication in the spec for a single request.
1617
+ :type _request_auth: dict, optional
1618
+ :param _content_type: force content-type for the request.
1619
+ :type _content_type: str, Optional
1620
+ :param _headers: set to override the headers for a single
1621
+ request; this effectively ignores the headers
1622
+ in the spec for a single request.
1623
+ :type _headers: dict, optional
1624
+ :param _host_index: set to override the host_index for a single
1625
+ request; this effectively ignores the host_index
1626
+ in the spec for a single request.
1627
+ :type _host_index: int, optional
1628
+ :return: Returns the result object.
1629
+ """ # noqa: E501
1630
+
1631
+ _param = self._find_service_levels_alert_config_serialize(
1632
+ id=id,
1633
+ valid_on=valid_on,
1634
+ _request_auth=_request_auth,
1635
+ _content_type=_content_type,
1636
+ _headers=_headers,
1637
+ _host_index=_host_index
1638
+ )
1639
+
1640
+ _response_types_map: Dict[str, Optional[str]] = {
1641
+ '200': "ServiceLevelseAlertConfigWithMetadata",
1642
+ '404': "str",
1643
+ }
1644
+ response_data = self.api_client.call_api(
1645
+ *_param,
1646
+ _request_timeout=_request_timeout
1647
+ )
1648
+ return response_data.response
1649
+
1650
+
1651
+ def _find_service_levels_alert_config_serialize(
1652
+ self,
1653
+ id,
1654
+ valid_on,
1655
+ _request_auth,
1656
+ _content_type,
1657
+ _headers,
1658
+ _host_index,
1659
+ ) -> RequestSerialized:
1660
+
1661
+ _host = None
1662
+
1663
+ _collection_formats: Dict[str, str] = {
1664
+ }
1665
+
1666
+ _path_params: Dict[str, str] = {}
1667
+ _query_params: List[Tuple[str, str]] = []
1668
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1669
+ _form_params: List[Tuple[str, str]] = []
1670
+ _files: Dict[
1671
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1672
+ ] = {}
1673
+ _body_params: Optional[bytes] = None
1674
+
1675
+ # process the path parameters
1676
+ if id is not None:
1677
+ _path_params['id'] = id
1678
+ # process the query parameters
1679
+ if valid_on is not None:
1680
+
1681
+ _query_params.append(('validOn', valid_on))
1682
+
1683
+ # process the header parameters
1684
+ # process the form parameters
1685
+ # process the body parameter
1686
+
1687
+
1688
+ # set the HTTP header `Accept`
1689
+ if 'Accept' not in _header_params:
1690
+ _header_params['Accept'] = self.api_client.select_header_accept(
1691
+ [
1692
+ 'application/json'
1693
+ ]
1694
+ )
1695
+
1696
+
1697
+ # authentication setting
1698
+ _auth_settings: List[str] = [
1699
+ 'ApiKeyAuth'
1700
+ ]
1701
+
1702
+ return self.api_client.param_serialize(
1703
+ method='GET',
1704
+ resource_path='/api/events/settings/global-alert-configs/service-levels/{id}',
1705
+ path_params=_path_params,
1706
+ query_params=_query_params,
1707
+ header_params=_header_params,
1708
+ body=_body_params,
1709
+ post_params=_form_params,
1710
+ files=_files,
1711
+ auth_settings=_auth_settings,
1712
+ collection_formats=_collection_formats,
1713
+ _host=_host,
1714
+ _request_auth=_request_auth
1715
+ )
1716
+
1717
+
1718
+
1719
+
1720
+ @validate_call
1721
+ def find_service_levels_alert_config_versions(
1722
+ self,
1723
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
1724
+ _request_timeout: Union[
1725
+ None,
1726
+ Annotated[StrictFloat, Field(gt=0)],
1727
+ Tuple[
1728
+ Annotated[StrictFloat, Field(gt=0)],
1729
+ Annotated[StrictFloat, Field(gt=0)]
1730
+ ]
1731
+ ] = None,
1732
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1733
+ _content_type: Optional[StrictStr] = None,
1734
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1735
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1736
+ ) -> List[ConfigVersion]:
1737
+ """Get versions of Service levels Alert Config
1738
+
1739
+ Find all versions of a Service levels Alert Config by ID. This will deliver deleted configs too. Configs are sorted descending by their created date.
1740
+
1741
+ :param id: Service Levels Alert Configuration ID (required)
1742
+ :type id: str
1743
+ :param _request_timeout: timeout setting for this request. If one
1744
+ number provided, it will be total request
1745
+ timeout. It can also be a pair (tuple) of
1746
+ (connection, read) timeouts.
1747
+ :type _request_timeout: int, tuple(int, int), optional
1748
+ :param _request_auth: set to override the auth_settings for an a single
1749
+ request; this effectively ignores the
1750
+ authentication in the spec for a single request.
1751
+ :type _request_auth: dict, optional
1752
+ :param _content_type: force content-type for the request.
1753
+ :type _content_type: str, Optional
1754
+ :param _headers: set to override the headers for a single
1755
+ request; this effectively ignores the headers
1756
+ in the spec for a single request.
1757
+ :type _headers: dict, optional
1758
+ :param _host_index: set to override the host_index for a single
1759
+ request; this effectively ignores the host_index
1760
+ in the spec for a single request.
1761
+ :type _host_index: int, optional
1762
+ :return: Returns the result object.
1763
+ """ # noqa: E501
1764
+
1765
+ _param = self._find_service_levels_alert_config_versions_serialize(
1766
+ id=id,
1767
+ _request_auth=_request_auth,
1768
+ _content_type=_content_type,
1769
+ _headers=_headers,
1770
+ _host_index=_host_index
1771
+ )
1772
+
1773
+ _response_types_map: Dict[str, Optional[str]] = {
1774
+ '200': "List[ConfigVersion]",
1775
+ '404': "str",
1776
+ }
1777
+ response_data = self.api_client.call_api(
1778
+ *_param,
1779
+ _request_timeout=_request_timeout
1780
+ )
1781
+ response_data.read()
1782
+ return self.api_client.response_deserialize(
1783
+ response_data=response_data,
1784
+ response_types_map=_response_types_map,
1785
+ ).data
1786
+
1787
+
1788
+ @validate_call
1789
+ def find_service_levels_alert_config_versions_with_http_info(
1790
+ self,
1791
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
1792
+ _request_timeout: Union[
1793
+ None,
1794
+ Annotated[StrictFloat, Field(gt=0)],
1795
+ Tuple[
1796
+ Annotated[StrictFloat, Field(gt=0)],
1797
+ Annotated[StrictFloat, Field(gt=0)]
1798
+ ]
1799
+ ] = None,
1800
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1801
+ _content_type: Optional[StrictStr] = None,
1802
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1803
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1804
+ ) -> ApiResponse[List[ConfigVersion]]:
1805
+ """Get versions of Service levels Alert Config
1806
+
1807
+ Find all versions of a Service levels Alert Config by ID. This will deliver deleted configs too. Configs are sorted descending by their created date.
1808
+
1809
+ :param id: Service Levels Alert Configuration ID (required)
1810
+ :type id: str
1811
+ :param _request_timeout: timeout setting for this request. If one
1812
+ number provided, it will be total request
1813
+ timeout. It can also be a pair (tuple) of
1814
+ (connection, read) timeouts.
1815
+ :type _request_timeout: int, tuple(int, int), optional
1816
+ :param _request_auth: set to override the auth_settings for an a single
1817
+ request; this effectively ignores the
1818
+ authentication in the spec for a single request.
1819
+ :type _request_auth: dict, optional
1820
+ :param _content_type: force content-type for the request.
1821
+ :type _content_type: str, Optional
1822
+ :param _headers: set to override the headers for a single
1823
+ request; this effectively ignores the headers
1824
+ in the spec for a single request.
1825
+ :type _headers: dict, optional
1826
+ :param _host_index: set to override the host_index for a single
1827
+ request; this effectively ignores the host_index
1828
+ in the spec for a single request.
1829
+ :type _host_index: int, optional
1830
+ :return: Returns the result object.
1831
+ """ # noqa: E501
1832
+
1833
+ _param = self._find_service_levels_alert_config_versions_serialize(
1834
+ id=id,
1835
+ _request_auth=_request_auth,
1836
+ _content_type=_content_type,
1837
+ _headers=_headers,
1838
+ _host_index=_host_index
1839
+ )
1840
+
1841
+ _response_types_map: Dict[str, Optional[str]] = {
1842
+ '200': "List[ConfigVersion]",
1843
+ '404': "str",
1844
+ }
1845
+ response_data = self.api_client.call_api(
1846
+ *_param,
1847
+ _request_timeout=_request_timeout
1848
+ )
1849
+ response_data.read()
1850
+ return self.api_client.response_deserialize(
1851
+ response_data=response_data,
1852
+ response_types_map=_response_types_map,
1853
+ )
1854
+
1855
+
1856
+ @validate_call
1857
+ def find_service_levels_alert_config_versions_without_preload_content(
1858
+ self,
1859
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
1860
+ _request_timeout: Union[
1861
+ None,
1862
+ Annotated[StrictFloat, Field(gt=0)],
1863
+ Tuple[
1864
+ Annotated[StrictFloat, Field(gt=0)],
1865
+ Annotated[StrictFloat, Field(gt=0)]
1866
+ ]
1867
+ ] = None,
1868
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1869
+ _content_type: Optional[StrictStr] = None,
1870
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1871
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1872
+ ) -> RESTResponseType:
1873
+ """Get versions of Service levels Alert Config
1874
+
1875
+ Find all versions of a Service levels Alert Config by ID. This will deliver deleted configs too. Configs are sorted descending by their created date.
1876
+
1877
+ :param id: Service Levels Alert Configuration ID (required)
1878
+ :type id: str
1879
+ :param _request_timeout: timeout setting for this request. If one
1880
+ number provided, it will be total request
1881
+ timeout. It can also be a pair (tuple) of
1882
+ (connection, read) timeouts.
1883
+ :type _request_timeout: int, tuple(int, int), optional
1884
+ :param _request_auth: set to override the auth_settings for an a single
1885
+ request; this effectively ignores the
1886
+ authentication in the spec for a single request.
1887
+ :type _request_auth: dict, optional
1888
+ :param _content_type: force content-type for the request.
1889
+ :type _content_type: str, Optional
1890
+ :param _headers: set to override the headers for a single
1891
+ request; this effectively ignores the headers
1892
+ in the spec for a single request.
1893
+ :type _headers: dict, optional
1894
+ :param _host_index: set to override the host_index for a single
1895
+ request; this effectively ignores the host_index
1896
+ in the spec for a single request.
1897
+ :type _host_index: int, optional
1898
+ :return: Returns the result object.
1899
+ """ # noqa: E501
1900
+
1901
+ _param = self._find_service_levels_alert_config_versions_serialize(
1902
+ id=id,
1903
+ _request_auth=_request_auth,
1904
+ _content_type=_content_type,
1905
+ _headers=_headers,
1906
+ _host_index=_host_index
1907
+ )
1908
+
1909
+ _response_types_map: Dict[str, Optional[str]] = {
1910
+ '200': "List[ConfigVersion]",
1911
+ '404': "str",
1912
+ }
1913
+ response_data = self.api_client.call_api(
1914
+ *_param,
1915
+ _request_timeout=_request_timeout
1916
+ )
1917
+ return response_data.response
1918
+
1919
+
1920
+ def _find_service_levels_alert_config_versions_serialize(
1921
+ self,
1922
+ id,
1923
+ _request_auth,
1924
+ _content_type,
1925
+ _headers,
1926
+ _host_index,
1927
+ ) -> RequestSerialized:
1928
+
1929
+ _host = None
1930
+
1931
+ _collection_formats: Dict[str, str] = {
1932
+ }
1933
+
1934
+ _path_params: Dict[str, str] = {}
1935
+ _query_params: List[Tuple[str, str]] = []
1936
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1937
+ _form_params: List[Tuple[str, str]] = []
1938
+ _files: Dict[
1939
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1940
+ ] = {}
1941
+ _body_params: Optional[bytes] = None
1942
+
1943
+ # process the path parameters
1944
+ if id is not None:
1945
+ _path_params['id'] = id
1946
+ # process the query parameters
1947
+ # process the header parameters
1948
+ # process the form parameters
1949
+ # process the body parameter
1950
+
1951
+
1952
+ # set the HTTP header `Accept`
1953
+ if 'Accept' not in _header_params:
1954
+ _header_params['Accept'] = self.api_client.select_header_accept(
1955
+ [
1956
+ 'application/json'
1957
+ ]
1958
+ )
1959
+
1960
+
1961
+ # authentication setting
1962
+ _auth_settings: List[str] = [
1963
+ 'ApiKeyAuth'
1964
+ ]
1965
+
1966
+ return self.api_client.param_serialize(
1967
+ method='GET',
1968
+ resource_path='/api/events/settings/global-alert-configs/service-levels/{id}/versions',
1969
+ path_params=_path_params,
1970
+ query_params=_query_params,
1971
+ header_params=_header_params,
1972
+ body=_body_params,
1973
+ post_params=_form_params,
1974
+ files=_files,
1975
+ auth_settings=_auth_settings,
1976
+ collection_formats=_collection_formats,
1977
+ _host=_host,
1978
+ _request_auth=_request_auth
1979
+ )
1980
+
1981
+
1982
+
1983
+
1984
+ @validate_call
1985
+ def restore_service_levels_alert_config(
1986
+ self,
1987
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
1988
+ created: Annotated[StrictInt, Field(description="Service Levels Alert Version Creation Date")],
1989
+ body: Optional[StrictStr] = None,
1990
+ _request_timeout: Union[
1991
+ None,
1992
+ Annotated[StrictFloat, Field(gt=0)],
1993
+ Tuple[
1994
+ Annotated[StrictFloat, Field(gt=0)],
1995
+ Annotated[StrictFloat, Field(gt=0)]
1996
+ ]
1997
+ ] = None,
1998
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1999
+ _content_type: Optional[StrictStr] = None,
2000
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2001
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2002
+ ) -> None:
2003
+ """Restore Service levels Alert Config
2004
+
2005
+
2006
+ :param id: Service Levels Alert Configuration ID (required)
2007
+ :type id: str
2008
+ :param created: Service Levels Alert Version Creation Date (required)
2009
+ :type created: int
2010
+ :param body:
2011
+ :type body: str
2012
+ :param _request_timeout: timeout setting for this request. If one
2013
+ number provided, it will be total request
2014
+ timeout. It can also be a pair (tuple) of
2015
+ (connection, read) timeouts.
2016
+ :type _request_timeout: int, tuple(int, int), optional
2017
+ :param _request_auth: set to override the auth_settings for an a single
2018
+ request; this effectively ignores the
2019
+ authentication in the spec for a single request.
2020
+ :type _request_auth: dict, optional
2021
+ :param _content_type: force content-type for the request.
2022
+ :type _content_type: str, Optional
2023
+ :param _headers: set to override the headers for a single
2024
+ request; this effectively ignores the headers
2025
+ in the spec for a single request.
2026
+ :type _headers: dict, optional
2027
+ :param _host_index: set to override the host_index for a single
2028
+ request; this effectively ignores the host_index
2029
+ in the spec for a single request.
2030
+ :type _host_index: int, optional
2031
+ :return: Returns the result object.
2032
+ """ # noqa: E501
2033
+
2034
+ _param = self._restore_service_levels_alert_config_serialize(
2035
+ id=id,
2036
+ created=created,
2037
+ body=body,
2038
+ _request_auth=_request_auth,
2039
+ _content_type=_content_type,
2040
+ _headers=_headers,
2041
+ _host_index=_host_index
2042
+ )
2043
+
2044
+ _response_types_map: Dict[str, Optional[str]] = {
2045
+ '204': None,
2046
+ '404': "str",
2047
+ }
2048
+ response_data = self.api_client.call_api(
2049
+ *_param,
2050
+ _request_timeout=_request_timeout
2051
+ )
2052
+ response_data.read()
2053
+ return self.api_client.response_deserialize(
2054
+ response_data=response_data,
2055
+ response_types_map=_response_types_map,
2056
+ ).data
2057
+
2058
+
2059
+ @validate_call
2060
+ def restore_service_levels_alert_config_with_http_info(
2061
+ self,
2062
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
2063
+ created: Annotated[StrictInt, Field(description="Service Levels Alert Version Creation Date")],
2064
+ body: Optional[StrictStr] = None,
2065
+ _request_timeout: Union[
2066
+ None,
2067
+ Annotated[StrictFloat, Field(gt=0)],
2068
+ Tuple[
2069
+ Annotated[StrictFloat, Field(gt=0)],
2070
+ Annotated[StrictFloat, Field(gt=0)]
2071
+ ]
2072
+ ] = None,
2073
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2074
+ _content_type: Optional[StrictStr] = None,
2075
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2076
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2077
+ ) -> ApiResponse[None]:
2078
+ """Restore Service levels Alert Config
2079
+
2080
+
2081
+ :param id: Service Levels Alert Configuration ID (required)
2082
+ :type id: str
2083
+ :param created: Service Levels Alert Version Creation Date (required)
2084
+ :type created: int
2085
+ :param body:
2086
+ :type body: str
2087
+ :param _request_timeout: timeout setting for this request. If one
2088
+ number provided, it will be total request
2089
+ timeout. It can also be a pair (tuple) of
2090
+ (connection, read) timeouts.
2091
+ :type _request_timeout: int, tuple(int, int), optional
2092
+ :param _request_auth: set to override the auth_settings for an a single
2093
+ request; this effectively ignores the
2094
+ authentication in the spec for a single request.
2095
+ :type _request_auth: dict, optional
2096
+ :param _content_type: force content-type for the request.
2097
+ :type _content_type: str, Optional
2098
+ :param _headers: set to override the headers for a single
2099
+ request; this effectively ignores the headers
2100
+ in the spec for a single request.
2101
+ :type _headers: dict, optional
2102
+ :param _host_index: set to override the host_index for a single
2103
+ request; this effectively ignores the host_index
2104
+ in the spec for a single request.
2105
+ :type _host_index: int, optional
2106
+ :return: Returns the result object.
2107
+ """ # noqa: E501
2108
+
2109
+ _param = self._restore_service_levels_alert_config_serialize(
2110
+ id=id,
2111
+ created=created,
2112
+ body=body,
2113
+ _request_auth=_request_auth,
2114
+ _content_type=_content_type,
2115
+ _headers=_headers,
2116
+ _host_index=_host_index
2117
+ )
2118
+
2119
+ _response_types_map: Dict[str, Optional[str]] = {
2120
+ '204': None,
2121
+ '404': "str",
2122
+ }
2123
+ response_data = self.api_client.call_api(
2124
+ *_param,
2125
+ _request_timeout=_request_timeout
2126
+ )
2127
+ response_data.read()
2128
+ return self.api_client.response_deserialize(
2129
+ response_data=response_data,
2130
+ response_types_map=_response_types_map,
2131
+ )
2132
+
2133
+
2134
+ @validate_call
2135
+ def restore_service_levels_alert_config_without_preload_content(
2136
+ self,
2137
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
2138
+ created: Annotated[StrictInt, Field(description="Service Levels Alert Version Creation Date")],
2139
+ body: Optional[StrictStr] = None,
2140
+ _request_timeout: Union[
2141
+ None,
2142
+ Annotated[StrictFloat, Field(gt=0)],
2143
+ Tuple[
2144
+ Annotated[StrictFloat, Field(gt=0)],
2145
+ Annotated[StrictFloat, Field(gt=0)]
2146
+ ]
2147
+ ] = None,
2148
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2149
+ _content_type: Optional[StrictStr] = None,
2150
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2151
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2152
+ ) -> RESTResponseType:
2153
+ """Restore Service levels Alert Config
2154
+
2155
+
2156
+ :param id: Service Levels Alert Configuration ID (required)
2157
+ :type id: str
2158
+ :param created: Service Levels Alert Version Creation Date (required)
2159
+ :type created: int
2160
+ :param body:
2161
+ :type body: str
2162
+ :param _request_timeout: timeout setting for this request. If one
2163
+ number provided, it will be total request
2164
+ timeout. It can also be a pair (tuple) of
2165
+ (connection, read) timeouts.
2166
+ :type _request_timeout: int, tuple(int, int), optional
2167
+ :param _request_auth: set to override the auth_settings for an a single
2168
+ request; this effectively ignores the
2169
+ authentication in the spec for a single request.
2170
+ :type _request_auth: dict, optional
2171
+ :param _content_type: force content-type for the request.
2172
+ :type _content_type: str, Optional
2173
+ :param _headers: set to override the headers for a single
2174
+ request; this effectively ignores the headers
2175
+ in the spec for a single request.
2176
+ :type _headers: dict, optional
2177
+ :param _host_index: set to override the host_index for a single
2178
+ request; this effectively ignores the host_index
2179
+ in the spec for a single request.
2180
+ :type _host_index: int, optional
2181
+ :return: Returns the result object.
2182
+ """ # noqa: E501
2183
+
2184
+ _param = self._restore_service_levels_alert_config_serialize(
2185
+ id=id,
2186
+ created=created,
2187
+ body=body,
2188
+ _request_auth=_request_auth,
2189
+ _content_type=_content_type,
2190
+ _headers=_headers,
2191
+ _host_index=_host_index
2192
+ )
2193
+
2194
+ _response_types_map: Dict[str, Optional[str]] = {
2195
+ '204': None,
2196
+ '404': "str",
2197
+ }
2198
+ response_data = self.api_client.call_api(
2199
+ *_param,
2200
+ _request_timeout=_request_timeout
2201
+ )
2202
+ return response_data.response
2203
+
2204
+
2205
+ def _restore_service_levels_alert_config_serialize(
2206
+ self,
2207
+ id,
2208
+ created,
2209
+ body,
2210
+ _request_auth,
2211
+ _content_type,
2212
+ _headers,
2213
+ _host_index,
2214
+ ) -> RequestSerialized:
2215
+
2216
+ _host = None
2217
+
2218
+ _collection_formats: Dict[str, str] = {
2219
+ }
2220
+
2221
+ _path_params: Dict[str, str] = {}
2222
+ _query_params: List[Tuple[str, str]] = []
2223
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2224
+ _form_params: List[Tuple[str, str]] = []
2225
+ _files: Dict[
2226
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2227
+ ] = {}
2228
+ _body_params: Optional[bytes] = None
2229
+
2230
+ # process the path parameters
2231
+ if id is not None:
2232
+ _path_params['id'] = id
2233
+ if created is not None:
2234
+ _path_params['created'] = created
2235
+ # process the query parameters
2236
+ # process the header parameters
2237
+ # process the form parameters
2238
+ # process the body parameter
2239
+ if body is not None:
2240
+ _body_params = body
2241
+
2242
+
2243
+ # set the HTTP header `Accept`
2244
+ if 'Accept' not in _header_params:
2245
+ _header_params['Accept'] = self.api_client.select_header_accept(
2246
+ [
2247
+ 'application/json'
2248
+ ]
2249
+ )
2250
+
2251
+ # set the HTTP header `Content-Type`
2252
+ if _content_type:
2253
+ _header_params['Content-Type'] = _content_type
2254
+ else:
2255
+ _default_content_type = (
2256
+ self.api_client.select_header_content_type(
2257
+ [
2258
+ 'application/json'
2259
+ ]
2260
+ )
2261
+ )
2262
+ if _default_content_type is not None:
2263
+ _header_params['Content-Type'] = _default_content_type
2264
+
2265
+ # authentication setting
2266
+ _auth_settings: List[str] = [
2267
+ 'ApiKeyAuth'
2268
+ ]
2269
+
2270
+ return self.api_client.param_serialize(
2271
+ method='PUT',
2272
+ resource_path='/api/events/settings/global-alert-configs/service-levels/{id}/restore/{created}',
2273
+ path_params=_path_params,
2274
+ query_params=_query_params,
2275
+ header_params=_header_params,
2276
+ body=_body_params,
2277
+ post_params=_form_params,
2278
+ files=_files,
2279
+ auth_settings=_auth_settings,
2280
+ collection_formats=_collection_formats,
2281
+ _host=_host,
2282
+ _request_auth=_request_auth
2283
+ )
2284
+
2285
+
2286
+
2287
+
2288
+ @validate_call
2289
+ def update_service_levels_alert_config(
2290
+ self,
2291
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
2292
+ service_levels_alert_config: Annotated[ServiceLevelsAlertConfig, Field(description="Update Request Body")],
2293
+ _request_timeout: Union[
2294
+ None,
2295
+ Annotated[StrictFloat, Field(gt=0)],
2296
+ Tuple[
2297
+ Annotated[StrictFloat, Field(gt=0)],
2298
+ Annotated[StrictFloat, Field(gt=0)]
2299
+ ]
2300
+ ] = None,
2301
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2302
+ _content_type: Optional[StrictStr] = None,
2303
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2304
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2305
+ ) -> ServiceLevelseAlertConfigWithMetadata:
2306
+ """Update Service levels Alert Config
2307
+
2308
+
2309
+ :param id: Service Levels Alert Configuration ID (required)
2310
+ :type id: str
2311
+ :param service_levels_alert_config: Update Request Body (required)
2312
+ :type service_levels_alert_config: ServiceLevelsAlertConfig
2313
+ :param _request_timeout: timeout setting for this request. If one
2314
+ number provided, it will be total request
2315
+ timeout. It can also be a pair (tuple) of
2316
+ (connection, read) timeouts.
2317
+ :type _request_timeout: int, tuple(int, int), optional
2318
+ :param _request_auth: set to override the auth_settings for an a single
2319
+ request; this effectively ignores the
2320
+ authentication in the spec for a single request.
2321
+ :type _request_auth: dict, optional
2322
+ :param _content_type: force content-type for the request.
2323
+ :type _content_type: str, Optional
2324
+ :param _headers: set to override the headers for a single
2325
+ request; this effectively ignores the headers
2326
+ in the spec for a single request.
2327
+ :type _headers: dict, optional
2328
+ :param _host_index: set to override the host_index for a single
2329
+ request; this effectively ignores the host_index
2330
+ in the spec for a single request.
2331
+ :type _host_index: int, optional
2332
+ :return: Returns the result object.
2333
+ """ # noqa: E501
2334
+
2335
+ _param = self._update_service_levels_alert_config_serialize(
2336
+ id=id,
2337
+ service_levels_alert_config=service_levels_alert_config,
2338
+ _request_auth=_request_auth,
2339
+ _content_type=_content_type,
2340
+ _headers=_headers,
2341
+ _host_index=_host_index
2342
+ )
2343
+
2344
+ _response_types_map: Dict[str, Optional[str]] = {
2345
+ '200': "ServiceLevelseAlertConfigWithMetadata",
2346
+ '204': None,
2347
+ '400': "List[str]",
2348
+ }
2349
+ response_data = self.api_client.call_api(
2350
+ *_param,
2351
+ _request_timeout=_request_timeout
2352
+ )
2353
+ response_data.read()
2354
+ return self.api_client.response_deserialize(
2355
+ response_data=response_data,
2356
+ response_types_map=_response_types_map,
2357
+ ).data
2358
+
2359
+
2360
+ @validate_call
2361
+ def update_service_levels_alert_config_with_http_info(
2362
+ self,
2363
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
2364
+ service_levels_alert_config: Annotated[ServiceLevelsAlertConfig, Field(description="Update Request Body")],
2365
+ _request_timeout: Union[
2366
+ None,
2367
+ Annotated[StrictFloat, Field(gt=0)],
2368
+ Tuple[
2369
+ Annotated[StrictFloat, Field(gt=0)],
2370
+ Annotated[StrictFloat, Field(gt=0)]
2371
+ ]
2372
+ ] = None,
2373
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2374
+ _content_type: Optional[StrictStr] = None,
2375
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2376
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2377
+ ) -> ApiResponse[ServiceLevelseAlertConfigWithMetadata]:
2378
+ """Update Service levels Alert Config
2379
+
2380
+
2381
+ :param id: Service Levels Alert Configuration ID (required)
2382
+ :type id: str
2383
+ :param service_levels_alert_config: Update Request Body (required)
2384
+ :type service_levels_alert_config: ServiceLevelsAlertConfig
2385
+ :param _request_timeout: timeout setting for this request. If one
2386
+ number provided, it will be total request
2387
+ timeout. It can also be a pair (tuple) of
2388
+ (connection, read) timeouts.
2389
+ :type _request_timeout: int, tuple(int, int), optional
2390
+ :param _request_auth: set to override the auth_settings for an a single
2391
+ request; this effectively ignores the
2392
+ authentication in the spec for a single request.
2393
+ :type _request_auth: dict, optional
2394
+ :param _content_type: force content-type for the request.
2395
+ :type _content_type: str, Optional
2396
+ :param _headers: set to override the headers for a single
2397
+ request; this effectively ignores the headers
2398
+ in the spec for a single request.
2399
+ :type _headers: dict, optional
2400
+ :param _host_index: set to override the host_index for a single
2401
+ request; this effectively ignores the host_index
2402
+ in the spec for a single request.
2403
+ :type _host_index: int, optional
2404
+ :return: Returns the result object.
2405
+ """ # noqa: E501
2406
+
2407
+ _param = self._update_service_levels_alert_config_serialize(
2408
+ id=id,
2409
+ service_levels_alert_config=service_levels_alert_config,
2410
+ _request_auth=_request_auth,
2411
+ _content_type=_content_type,
2412
+ _headers=_headers,
2413
+ _host_index=_host_index
2414
+ )
2415
+
2416
+ _response_types_map: Dict[str, Optional[str]] = {
2417
+ '200': "ServiceLevelseAlertConfigWithMetadata",
2418
+ '204': None,
2419
+ '400': "List[str]",
2420
+ }
2421
+ response_data = self.api_client.call_api(
2422
+ *_param,
2423
+ _request_timeout=_request_timeout
2424
+ )
2425
+ response_data.read()
2426
+ return self.api_client.response_deserialize(
2427
+ response_data=response_data,
2428
+ response_types_map=_response_types_map,
2429
+ )
2430
+
2431
+
2432
+ @validate_call
2433
+ def update_service_levels_alert_config_without_preload_content(
2434
+ self,
2435
+ id: Annotated[StrictStr, Field(description="Service Levels Alert Configuration ID")],
2436
+ service_levels_alert_config: Annotated[ServiceLevelsAlertConfig, Field(description="Update Request Body")],
2437
+ _request_timeout: Union[
2438
+ None,
2439
+ Annotated[StrictFloat, Field(gt=0)],
2440
+ Tuple[
2441
+ Annotated[StrictFloat, Field(gt=0)],
2442
+ Annotated[StrictFloat, Field(gt=0)]
2443
+ ]
2444
+ ] = None,
2445
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2446
+ _content_type: Optional[StrictStr] = None,
2447
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2448
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2449
+ ) -> RESTResponseType:
2450
+ """Update Service levels Alert Config
2451
+
2452
+
2453
+ :param id: Service Levels Alert Configuration ID (required)
2454
+ :type id: str
2455
+ :param service_levels_alert_config: Update Request Body (required)
2456
+ :type service_levels_alert_config: ServiceLevelsAlertConfig
2457
+ :param _request_timeout: timeout setting for this request. If one
2458
+ number provided, it will be total request
2459
+ timeout. It can also be a pair (tuple) of
2460
+ (connection, read) timeouts.
2461
+ :type _request_timeout: int, tuple(int, int), optional
2462
+ :param _request_auth: set to override the auth_settings for an a single
2463
+ request; this effectively ignores the
2464
+ authentication in the spec for a single request.
2465
+ :type _request_auth: dict, optional
2466
+ :param _content_type: force content-type for the request.
2467
+ :type _content_type: str, Optional
2468
+ :param _headers: set to override the headers for a single
2469
+ request; this effectively ignores the headers
2470
+ in the spec for a single request.
2471
+ :type _headers: dict, optional
2472
+ :param _host_index: set to override the host_index for a single
2473
+ request; this effectively ignores the host_index
2474
+ in the spec for a single request.
2475
+ :type _host_index: int, optional
2476
+ :return: Returns the result object.
2477
+ """ # noqa: E501
2478
+
2479
+ _param = self._update_service_levels_alert_config_serialize(
2480
+ id=id,
2481
+ service_levels_alert_config=service_levels_alert_config,
2482
+ _request_auth=_request_auth,
2483
+ _content_type=_content_type,
2484
+ _headers=_headers,
2485
+ _host_index=_host_index
2486
+ )
2487
+
2488
+ _response_types_map: Dict[str, Optional[str]] = {
2489
+ '200': "ServiceLevelseAlertConfigWithMetadata",
2490
+ '204': None,
2491
+ '400': "List[str]",
2492
+ }
2493
+ response_data = self.api_client.call_api(
2494
+ *_param,
2495
+ _request_timeout=_request_timeout
2496
+ )
2497
+ return response_data.response
2498
+
2499
+
2500
+ def _update_service_levels_alert_config_serialize(
2501
+ self,
2502
+ id,
2503
+ service_levels_alert_config,
2504
+ _request_auth,
2505
+ _content_type,
2506
+ _headers,
2507
+ _host_index,
2508
+ ) -> RequestSerialized:
2509
+
2510
+ _host = None
2511
+
2512
+ _collection_formats: Dict[str, str] = {
2513
+ }
2514
+
2515
+ _path_params: Dict[str, str] = {}
2516
+ _query_params: List[Tuple[str, str]] = []
2517
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2518
+ _form_params: List[Tuple[str, str]] = []
2519
+ _files: Dict[
2520
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2521
+ ] = {}
2522
+ _body_params: Optional[bytes] = None
2523
+
2524
+ # process the path parameters
2525
+ if id is not None:
2526
+ _path_params['id'] = id
2527
+ # process the query parameters
2528
+ # process the header parameters
2529
+ # process the form parameters
2530
+ # process the body parameter
2531
+ if service_levels_alert_config is not None:
2532
+ _body_params = service_levels_alert_config
2533
+
2534
+
2535
+ # set the HTTP header `Accept`
2536
+ if 'Accept' not in _header_params:
2537
+ _header_params['Accept'] = self.api_client.select_header_accept(
2538
+ [
2539
+ 'application/json'
2540
+ ]
2541
+ )
2542
+
2543
+ # set the HTTP header `Content-Type`
2544
+ if _content_type:
2545
+ _header_params['Content-Type'] = _content_type
2546
+ else:
2547
+ _default_content_type = (
2548
+ self.api_client.select_header_content_type(
2549
+ [
2550
+ 'application/json'
2551
+ ]
2552
+ )
2553
+ )
2554
+ if _default_content_type is not None:
2555
+ _header_params['Content-Type'] = _default_content_type
2556
+
2557
+ # authentication setting
2558
+ _auth_settings: List[str] = [
2559
+ 'ApiKeyAuth'
2560
+ ]
2561
+
2562
+ return self.api_client.param_serialize(
2563
+ method='POST',
2564
+ resource_path='/api/events/settings/global-alert-configs/service-levels/{id}',
2565
+ path_params=_path_params,
2566
+ query_params=_query_params,
2567
+ header_params=_header_params,
2568
+ body=_body_params,
2569
+ post_params=_form_params,
2570
+ files=_files,
2571
+ auth_settings=_auth_settings,
2572
+ collection_formats=_collection_formats,
2573
+ _host=_host,
2574
+ _request_auth=_request_auth
2575
+ )
2576
+
2577
+