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