azure_mgmt_monitor 0.17.1 → 0.17.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-04-01/generated/azure_mgmt_monitor/activity_logs.rb +4 -0
  3. data/lib/2015-04-01/generated/azure_mgmt_monitor/autoscale_settings.rb +16 -0
  4. data/lib/2015-04-01/generated/azure_mgmt_monitor/event_categories.rb +2 -0
  5. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/autoscale_setting_resource_collection.rb +1 -1
  6. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/event_data_collection.rb +1 -1
  7. data/lib/2015-04-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  8. data/lib/2015-04-01/generated/azure_mgmt_monitor/operations.rb +2 -0
  9. data/lib/2015-04-01/generated/azure_mgmt_monitor/tenant_activity_logs.rb +4 -0
  10. data/lib/2015-05-01/generated/azure_mgmt_monitor.rb +106 -0
  11. data/lib/2015-05-01/generated/azure_mgmt_monitor/analytics_items.rb +585 -0
  12. data/lib/2015-05-01/generated/azure_mgmt_monitor/annotations.rb +505 -0
  13. data/lib/2015-05-01/generated/azure_mgmt_monitor/apikeys.rb +473 -0
  14. data/lib/2015-05-01/generated/azure_mgmt_monitor/application_insights_management_client.rb +193 -0
  15. data/lib/2015-05-01/generated/azure_mgmt_monitor/component_available_features.rb +130 -0
  16. data/lib/2015-05-01/generated/azure_mgmt_monitor/component_current_billing_features.rb +252 -0
  17. data/lib/2015-05-01/generated/azure_mgmt_monitor/component_feature_capabilities.rb +130 -0
  18. data/lib/2015-05-01/generated/azure_mgmt_monitor/component_quota_status.rb +133 -0
  19. data/lib/2015-05-01/generated/azure_mgmt_monitor/components.rb +1134 -0
  20. data/lib/2015-05-01/generated/azure_mgmt_monitor/export_configurations.rb +646 -0
  21. data/lib/2015-05-01/generated/azure_mgmt_monitor/favorites.rb +653 -0
  22. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/annotation.rb +103 -0
  23. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/annotation_error.rb +70 -0
  24. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/annotations_list_result.rb +56 -0
  25. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/apikey_request.rb +84 -0
  26. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component.rb +261 -0
  27. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_analytics_item.rb +146 -0
  28. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_analytics_item_properties.rb +49 -0
  29. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_apikey.rb +121 -0
  30. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_apikey_list_result.rb +57 -0
  31. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_available_features.rb +58 -0
  32. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_billing_features.rb +70 -0
  33. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_data_volume_cap.rb +106 -0
  34. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_export_configuration.rb +277 -0
  35. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_export_request.rb +143 -0
  36. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_favorite.rb +182 -0
  37. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_feature.rb +153 -0
  38. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_feature_capabilities.rb +228 -0
  39. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_feature_capability.rb +108 -0
  40. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_list_result.rb +102 -0
  41. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_proactive_detection_configuration.rb +117 -0
  42. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_proactive_detection_configuration_rule_definitions.rb +130 -0
  43. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_quota_status.rb +74 -0
  44. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_web_test_location.rb +61 -0
  45. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_web_test_locations_list_result.rb +58 -0
  46. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_type.rb +16 -0
  47. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/category_type.rb +18 -0
  48. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/component_purge_body.rb +67 -0
  49. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/component_purge_body_filters.rb +85 -0
  50. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/component_purge_response.rb +47 -0
  51. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/component_purge_status_response.rb +47 -0
  52. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/components_resource.rb +101 -0
  53. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/error_field_contract.rb +68 -0
  54. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/error_response.rb +58 -0
  55. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/favorite_source_type.rb +22 -0
  56. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/favorite_type.rb +16 -0
  57. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/flow_type.rb +15 -0
  58. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/inner_error.rb +57 -0
  59. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/item_scope.rb +16 -0
  60. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/item_scope_path.rb +16 -0
  61. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/item_type.rb +18 -0
  62. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/item_type_parameter.rb +19 -0
  63. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/link_properties.rb +68 -0
  64. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/operation.rb +58 -0
  65. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/operation_display.rb +69 -0
  66. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/operation_list_result.rb +101 -0
  67. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/purge_state.rb +16 -0
  68. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/request_source.rb +15 -0
  69. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/shared_type_kind.rb +16 -0
  70. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/tags_resource.rb +55 -0
  71. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/web_test.rb +249 -0
  72. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/web_test_geolocation.rb +47 -0
  73. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/web_test_kind.rb +16 -0
  74. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/web_test_list_result.rb +101 -0
  75. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/web_test_properties_configuration.rb +47 -0
  76. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/webtests_resource.rb +101 -0
  77. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/work_item_configuration.rb +91 -0
  78. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/work_item_configuration_error.rb +70 -0
  79. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/work_item_configurations_list_result.rb +57 -0
  80. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/work_item_create_configuration.rb +87 -0
  81. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/workbook.rb +228 -0
  82. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/workbook_error.rb +79 -0
  83. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/workbook_resource.rb +101 -0
  84. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/workbooks_list_result.rb +56 -0
  85. data/lib/2015-05-01/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  86. data/lib/2015-05-01/generated/azure_mgmt_monitor/operations.rb +220 -0
  87. data/lib/2015-05-01/generated/azure_mgmt_monitor/proactive_detection_configurations.rb +392 -0
  88. data/lib/2015-05-01/generated/azure_mgmt_monitor/web_test_locations.rb +133 -0
  89. data/lib/2015-05-01/generated/azure_mgmt_monitor/web_tests.rb +1103 -0
  90. data/lib/2015-05-01/generated/azure_mgmt_monitor/work_item_configurations.rb +708 -0
  91. data/lib/2015-05-01/generated/azure_mgmt_monitor/workbooks.rb +589 -0
  92. data/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rule_incidents.rb +4 -0
  93. data/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rules.rb +12 -0
  94. data/lib/2016-03-01/generated/azure_mgmt_monitor/log_profiles.rb +10 -0
  95. data/lib/2016-03-01/generated/azure_mgmt_monitor/metric_definitions.rb +2 -0
  96. data/lib/2016-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  97. data/lib/2016-09-01/generated/azure_mgmt_monitor/metrics.rb +2 -0
  98. data/lib/2016-09-01/generated/azure_mgmt_monitor/monitor_client.rb +1 -1
  99. data/lib/2016-09-01/generated/azure_mgmt_monitor/service_diagnostic_settings_operations.rb +6 -0
  100. data/lib/2017-04-01/generated/azure_mgmt_monitor/action_groups.rb +14 -0
  101. data/lib/2017-04-01/generated/azure_mgmt_monitor/activity_log_alerts.rb +12 -0
  102. data/lib/2017-04-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  103. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/diagnostic_settings_category_operations.rb +4 -0
  104. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/diagnostic_settings_operations.rb +8 -0
  105. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/metric_definitions.rb +2 -0
  106. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/metrics.rb +2 -0
  107. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  108. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor.rb +34 -0
  109. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/application_insights_management_client.rb +146 -0
  110. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/component_current_pricing_plan.rb +377 -0
  111. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/easubscription_list_migration_date.rb +113 -0
  112. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/easubscription_migrate_to_new_pricing_model.rb +102 -0
  113. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/easubscription_rollback_to_legacy_pricing_model.rb +102 -0
  114. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/models/application_insights_component_pricing_plan.rb +143 -0
  115. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/models/easubscription_migration_date.rb +58 -0
  116. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/models/resource.rb +80 -0
  117. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  118. data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/metric_baseline.rb +4 -0
  119. data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  120. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor.rb +32 -0
  121. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/metric_namespaces.rb +120 -0
  122. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  123. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/models/metric_namespace.rb +81 -0
  124. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/models/metric_namespace_collection.rb +55 -0
  125. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/models/metric_namespace_name.rb +46 -0
  126. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  127. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +128 -0
  128. data/lib/2018-01-01/generated/azure_mgmt_monitor/metric_definitions.rb +2 -0
  129. data/lib/2018-01-01/generated/azure_mgmt_monitor/metrics.rb +2 -0
  130. data/lib/2018-01-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  131. data/lib/2018-03-01/generated/azure_mgmt_monitor/action_groups.rb +14 -0
  132. data/lib/2018-03-01/generated/azure_mgmt_monitor/metric_alerts.rb +12 -0
  133. data/lib/2018-03-01/generated/azure_mgmt_monitor/metric_alerts_status.rb +4 -0
  134. data/lib/2018-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  135. data/lib/2018-04-16/generated/azure_mgmt_monitor/monitor_client.rb +1 -1
  136. data/lib/2018-04-16/generated/azure_mgmt_monitor/scheduled_query_rules.rb +12 -0
  137. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor.rb +44 -0
  138. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/guest_diagnostics_settings.rb +614 -0
  139. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/guest_diagnostics_settings_association.rb +634 -0
  140. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/data_source.rb +80 -0
  141. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/data_source_configuration.rb +98 -0
  142. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  143. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/etw_event_configuration.rb +69 -0
  144. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/etw_provider_configuration.rb +67 -0
  145. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/event_log_configuration.rb +58 -0
  146. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/guest_diagnostic_settings_association_list.rb +68 -0
  147. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/guest_diagnostic_settings_association_resource.rb +98 -0
  148. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/guest_diagnostic_settings_association_resource_patch.rb +66 -0
  149. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/guest_diagnostic_settings_list.rb +68 -0
  150. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/guest_diagnostic_settings_patch_resource.rb +98 -0
  151. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/guest_diagnostic_settings_resource.rb +130 -0
  152. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/performance_counter_configuration.rb +69 -0
  153. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/resource.rb +110 -0
  154. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/sink_configuration.rb +48 -0
  155. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  156. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +136 -0
  157. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor.rb +36 -0
  158. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/application_insights_management_client.rb +131 -0
  159. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/category_type.rb +18 -0
  160. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/error_field_contract.rb +68 -0
  161. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/resource.rb +123 -0
  162. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/shared_type_kind.rb +16 -0
  163. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/workbook.rb +185 -0
  164. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/workbook_error.rb +79 -0
  165. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/workbook_update_parameters.rb +122 -0
  166. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/workbooks_list_result.rb +55 -0
  167. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  168. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/workbooks.rb +609 -0
  169. data/lib/2018-09-01/generated/azure_mgmt_monitor.rb +54 -0
  170. data/lib/2018-09-01/generated/azure_mgmt_monitor/action_groups.rb +707 -0
  171. data/lib/2018-09-01/generated/azure_mgmt_monitor/metric_baseline.rb +294 -0
  172. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/action_group_list.rb +67 -0
  173. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/action_group_patch_body.rb +68 -0
  174. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/action_group_resource.rb +326 -0
  175. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/arm_role_receiver.rb +58 -0
  176. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/automation_runbook_receiver.rb +102 -0
  177. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/azure_app_push_receiver.rb +58 -0
  178. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/azure_function_receiver.rb +80 -0
  179. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/baseline.rb +86 -0
  180. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/baseline_metadata_value.rb +58 -0
  181. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/baseline_response.rb +171 -0
  182. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/calculate_baseline_response.rb +85 -0
  183. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/email_receiver.rb +72 -0
  184. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/enable_request.rb +46 -0
  185. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  186. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/itsm_receiver.rb +94 -0
  187. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/localizable_string.rb +57 -0
  188. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/logic_app_receiver.rb +69 -0
  189. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/receiver_status.rb +17 -0
  190. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/resource.rb +110 -0
  191. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/result_type.rb +16 -0
  192. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/sensitivity.rb +17 -0
  193. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/sms_receiver.rb +83 -0
  194. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/time_series_information.rb +93 -0
  195. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/voice_receiver.rb +69 -0
  196. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/webhook_receiver.rb +58 -0
  197. data/lib/2018-09-01/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  198. data/lib/2018-09-01/generated/azure_mgmt_monitor/monitor_management_client.rb +135 -0
  199. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor.rb +36 -0
  200. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/data_container.rb +47 -0
  201. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/data_status.rb +16 -0
  202. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/error.rb +57 -0
  203. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/onboarding_status.rb +17 -0
  204. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/proxy_resource.rb +71 -0
  205. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/response_with_error.rb +47 -0
  206. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/vminsights_onboarding_status.rb +123 -0
  207. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/workspace_info.rb +69 -0
  208. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  209. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +128 -0
  210. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/vminsights.rb +120 -0
  211. data/lib/2019-03-01/generated/azure_mgmt_monitor.rb +45 -0
  212. data/lib/2019-03-01/generated/azure_mgmt_monitor/action_groups.rb +707 -0
  213. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/action_group_list.rb +67 -0
  214. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/action_group_patch_body.rb +68 -0
  215. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/action_group_resource.rb +326 -0
  216. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/arm_role_receiver.rb +69 -0
  217. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/automation_runbook_receiver.rb +113 -0
  218. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/azure_app_push_receiver.rb +58 -0
  219. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/azure_function_receiver.rb +91 -0
  220. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/email_receiver.rb +83 -0
  221. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/enable_request.rb +46 -0
  222. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  223. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/itsm_receiver.rb +94 -0
  224. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/logic_app_receiver.rb +80 -0
  225. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/receiver_status.rb +17 -0
  226. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/resource.rb +110 -0
  227. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/sms_receiver.rb +83 -0
  228. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/voice_receiver.rb +69 -0
  229. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/webhook_receiver.rb +69 -0
  230. data/lib/2019-03-01/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  231. data/lib/2019-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +131 -0
  232. data/lib/azure_mgmt_monitor.rb +12 -3
  233. data/lib/profiles/latest/modules/monitor_profile_module.rb +332 -106
  234. data/lib/profiles/v2019_03_01_hybrid/modules/monitor_profile_module.rb +297 -0
  235. data/lib/profiles/v2019_03_01_hybrid/monitor_module_definition.rb +8 -0
  236. data/lib/profiles/v2019_03_01_hybrid/monitor_v2019_03_01_hybrid_profile_client.rb +40 -0
  237. data/lib/version.rb +1 -1
  238. metadata +203 -5
@@ -0,0 +1,120 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Monitor::Mgmt::V2018_11_27_preview
7
+ #
8
+ # API to manage VM Insights Onboarding
9
+ #
10
+ class VMInsights
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the VMInsights class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [MonitorManagementClient] reference to the MonitorManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Retrieves the VM Insights onboarding status for the specified resource or
26
+ # resource scope.
27
+ #
28
+ # @param resource_uri [String] The fully qualified Azure Resource manager
29
+ # identifier of the resource, or scope, whose status to retrieve.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [VMInsightsOnboardingStatus] operation results.
34
+ #
35
+ def get_onboarding_status(resource_uri, custom_headers:nil)
36
+ response = get_onboarding_status_async(resource_uri, custom_headers:custom_headers).value!
37
+ response.body unless response.nil?
38
+ end
39
+
40
+ #
41
+ # Retrieves the VM Insights onboarding status for the specified resource or
42
+ # resource scope.
43
+ #
44
+ # @param resource_uri [String] The fully qualified Azure Resource manager
45
+ # identifier of the resource, or scope, whose status to retrieve.
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def get_onboarding_status_with_http_info(resource_uri, custom_headers:nil)
52
+ get_onboarding_status_async(resource_uri, custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # Retrieves the VM Insights onboarding status for the specified resource or
57
+ # resource scope.
58
+ #
59
+ # @param resource_uri [String] The fully qualified Azure Resource manager
60
+ # identifier of the resource, or scope, whose status to retrieve.
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def get_onboarding_status_async(resource_uri, custom_headers:nil)
67
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
68
+ fail ArgumentError, 'resource_uri is nil' if resource_uri.nil?
69
+
70
+
71
+ request_headers = {}
72
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
73
+
74
+ # Set Headers
75
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
76
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
77
+ path_template = '{resourceUri}/providers/Microsoft.Insights/vmInsightsOnboardingStatuses/default'
78
+
79
+ request_url = @base_url || @client.base_url
80
+
81
+ options = {
82
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
83
+ skip_encoding_path_params: {'resourceUri' => resource_uri},
84
+ query_params: {'api-version' => @client.api_version},
85
+ headers: request_headers.merge(custom_headers || {}),
86
+ base_url: request_url
87
+ }
88
+ promise = @client.make_request_async(:get, path_template, options)
89
+
90
+ promise = promise.then do |result|
91
+ http_response = result.response
92
+ status_code = http_response.status
93
+ response_content = http_response.body
94
+ unless status_code == 200
95
+ error_model = JSON.load(response_content)
96
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
97
+ end
98
+
99
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
100
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
101
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
102
+ # Deserialize Response
103
+ if status_code == 200
104
+ begin
105
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
106
+ result_mapper = Azure::Monitor::Mgmt::V2018_11_27_preview::Models::VMInsightsOnboardingStatus.mapper()
107
+ result.body = @client.deserialize(result_mapper, parsed_response)
108
+ rescue Exception => e
109
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
110
+ end
111
+ end
112
+
113
+ result
114
+ end
115
+
116
+ promise.execute
117
+ end
118
+
119
+ end
120
+ end
@@ -0,0 +1,45 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2019-03-01/generated/azure_mgmt_monitor/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::Monitor::Mgmt::V2019_03_01
23
+ autoload :ActionGroups, '2019-03-01/generated/azure_mgmt_monitor/action_groups.rb'
24
+ autoload :MonitorManagementClient, '2019-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb'
25
+
26
+ module Models
27
+ autoload :LogicAppReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/logic_app_receiver.rb'
28
+ autoload :Resource, '2019-03-01/generated/azure_mgmt_monitor/models/resource.rb'
29
+ autoload :AzureFunctionReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/azure_function_receiver.rb'
30
+ autoload :SmsReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/sms_receiver.rb'
31
+ autoload :ArmRoleReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/arm_role_receiver.rb'
32
+ autoload :ItsmReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/itsm_receiver.rb'
33
+ autoload :AzureAppPushReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/azure_app_push_receiver.rb'
34
+ autoload :VoiceReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/voice_receiver.rb'
35
+ autoload :ActionGroupList, '2019-03-01/generated/azure_mgmt_monitor/models/action_group_list.rb'
36
+ autoload :WebhookReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/webhook_receiver.rb'
37
+ autoload :EnableRequest, '2019-03-01/generated/azure_mgmt_monitor/models/enable_request.rb'
38
+ autoload :EmailReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/email_receiver.rb'
39
+ autoload :ErrorResponse, '2019-03-01/generated/azure_mgmt_monitor/models/error_response.rb'
40
+ autoload :AutomationRunbookReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/automation_runbook_receiver.rb'
41
+ autoload :ActionGroupPatchBody, '2019-03-01/generated/azure_mgmt_monitor/models/action_group_patch_body.rb'
42
+ autoload :ActionGroupResource, '2019-03-01/generated/azure_mgmt_monitor/models/action_group_resource.rb'
43
+ autoload :ReceiverStatus, '2019-03-01/generated/azure_mgmt_monitor/models/receiver_status.rb'
44
+ end
45
+ end
@@ -0,0 +1,707 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Monitor::Mgmt::V2019_03_01
7
+ #
8
+ # ActionGroups
9
+ #
10
+ class ActionGroups
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ActionGroups class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [MonitorManagementClient] reference to the MonitorManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Create a new action group or update an existing one.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group.
28
+ # @param action_group_name [String] The name of the action group.
29
+ # @param action_group [ActionGroupResource] The action group to create or use
30
+ # for the update.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [ActionGroupResource] operation results.
35
+ #
36
+ def create_or_update(resource_group_name, action_group_name, action_group, custom_headers:nil)
37
+ response = create_or_update_async(resource_group_name, action_group_name, action_group, custom_headers:custom_headers).value!
38
+ response.body unless response.nil?
39
+ end
40
+
41
+ #
42
+ # Create a new action group or update an existing one.
43
+ #
44
+ # @param resource_group_name [String] The name of the resource group.
45
+ # @param action_group_name [String] The name of the action group.
46
+ # @param action_group [ActionGroupResource] The action group to create or use
47
+ # for the update.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def create_or_update_with_http_info(resource_group_name, action_group_name, action_group, custom_headers:nil)
54
+ create_or_update_async(resource_group_name, action_group_name, action_group, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Create a new action group or update an existing one.
59
+ #
60
+ # @param resource_group_name [String] The name of the resource group.
61
+ # @param action_group_name [String] The name of the action group.
62
+ # @param action_group [ActionGroupResource] The action group to create or use
63
+ # for the update.
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def create_or_update_async(resource_group_name, action_group_name, action_group, custom_headers:nil)
70
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
71
+ fail ArgumentError, 'action_group_name is nil' if action_group_name.nil?
72
+ fail ArgumentError, 'action_group is nil' if action_group.nil?
73
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
74
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
75
+
76
+
77
+ request_headers = {}
78
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
79
+
80
+ # Set Headers
81
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
82
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
83
+
84
+ # Serialize Request
85
+ request_mapper = Azure::Monitor::Mgmt::V2019_03_01::Models::ActionGroupResource.mapper()
86
+ request_content = @client.serialize(request_mapper, action_group)
87
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
88
+
89
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'
90
+
91
+ request_url = @base_url || @client.base_url
92
+
93
+ options = {
94
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
95
+ path_params: {'resourceGroupName' => resource_group_name,'actionGroupName' => action_group_name,'subscriptionId' => @client.subscription_id},
96
+ query_params: {'api-version' => @client.api_version},
97
+ body: request_content,
98
+ headers: request_headers.merge(custom_headers || {}),
99
+ base_url: request_url
100
+ }
101
+ promise = @client.make_request_async(:put, path_template, options)
102
+
103
+ promise = promise.then do |result|
104
+ http_response = result.response
105
+ status_code = http_response.status
106
+ response_content = http_response.body
107
+ unless status_code == 200 || status_code == 201
108
+ error_model = JSON.load(response_content)
109
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
110
+ end
111
+
112
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
113
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
114
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
115
+ # Deserialize Response
116
+ if status_code == 200
117
+ begin
118
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
119
+ result_mapper = Azure::Monitor::Mgmt::V2019_03_01::Models::ActionGroupResource.mapper()
120
+ result.body = @client.deserialize(result_mapper, parsed_response)
121
+ rescue Exception => e
122
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
123
+ end
124
+ end
125
+ # Deserialize Response
126
+ if status_code == 201
127
+ begin
128
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
129
+ result_mapper = Azure::Monitor::Mgmt::V2019_03_01::Models::ActionGroupResource.mapper()
130
+ result.body = @client.deserialize(result_mapper, parsed_response)
131
+ rescue Exception => e
132
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
133
+ end
134
+ end
135
+
136
+ result
137
+ end
138
+
139
+ promise.execute
140
+ end
141
+
142
+ #
143
+ # Get an action group.
144
+ #
145
+ # @param resource_group_name [String] The name of the resource group.
146
+ # @param action_group_name [String] The name of the action group.
147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
148
+ # will be added to the HTTP request.
149
+ #
150
+ # @return [ActionGroupResource] operation results.
151
+ #
152
+ def get(resource_group_name, action_group_name, custom_headers:nil)
153
+ response = get_async(resource_group_name, action_group_name, custom_headers:custom_headers).value!
154
+ response.body unless response.nil?
155
+ end
156
+
157
+ #
158
+ # Get an action group.
159
+ #
160
+ # @param resource_group_name [String] The name of the resource group.
161
+ # @param action_group_name [String] The name of the action group.
162
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
163
+ # will be added to the HTTP request.
164
+ #
165
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
166
+ #
167
+ def get_with_http_info(resource_group_name, action_group_name, custom_headers:nil)
168
+ get_async(resource_group_name, action_group_name, custom_headers:custom_headers).value!
169
+ end
170
+
171
+ #
172
+ # Get an action group.
173
+ #
174
+ # @param resource_group_name [String] The name of the resource group.
175
+ # @param action_group_name [String] The name of the action group.
176
+ # @param [Hash{String => String}] A hash of custom headers that will be added
177
+ # to the HTTP request.
178
+ #
179
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
180
+ #
181
+ def get_async(resource_group_name, action_group_name, custom_headers:nil)
182
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
183
+ fail ArgumentError, 'action_group_name is nil' if action_group_name.nil?
184
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
185
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
186
+
187
+
188
+ request_headers = {}
189
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
190
+
191
+ # Set Headers
192
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
193
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
194
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'
195
+
196
+ request_url = @base_url || @client.base_url
197
+
198
+ options = {
199
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
200
+ path_params: {'resourceGroupName' => resource_group_name,'actionGroupName' => action_group_name,'subscriptionId' => @client.subscription_id},
201
+ query_params: {'api-version' => @client.api_version},
202
+ headers: request_headers.merge(custom_headers || {}),
203
+ base_url: request_url
204
+ }
205
+ promise = @client.make_request_async(:get, path_template, options)
206
+
207
+ promise = promise.then do |result|
208
+ http_response = result.response
209
+ status_code = http_response.status
210
+ response_content = http_response.body
211
+ unless status_code == 200
212
+ error_model = JSON.load(response_content)
213
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
214
+ end
215
+
216
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
217
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
218
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
219
+ # Deserialize Response
220
+ if status_code == 200
221
+ begin
222
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
223
+ result_mapper = Azure::Monitor::Mgmt::V2019_03_01::Models::ActionGroupResource.mapper()
224
+ result.body = @client.deserialize(result_mapper, parsed_response)
225
+ rescue Exception => e
226
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
227
+ end
228
+ end
229
+
230
+ result
231
+ end
232
+
233
+ promise.execute
234
+ end
235
+
236
+ #
237
+ # Delete an action group.
238
+ #
239
+ # @param resource_group_name [String] The name of the resource group.
240
+ # @param action_group_name [String] The name of the action group.
241
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
242
+ # will be added to the HTTP request.
243
+ #
244
+ #
245
+ def delete(resource_group_name, action_group_name, custom_headers:nil)
246
+ response = delete_async(resource_group_name, action_group_name, custom_headers:custom_headers).value!
247
+ nil
248
+ end
249
+
250
+ #
251
+ # Delete an action group.
252
+ #
253
+ # @param resource_group_name [String] The name of the resource group.
254
+ # @param action_group_name [String] The name of the action group.
255
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
256
+ # will be added to the HTTP request.
257
+ #
258
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
259
+ #
260
+ def delete_with_http_info(resource_group_name, action_group_name, custom_headers:nil)
261
+ delete_async(resource_group_name, action_group_name, custom_headers:custom_headers).value!
262
+ end
263
+
264
+ #
265
+ # Delete an action group.
266
+ #
267
+ # @param resource_group_name [String] The name of the resource group.
268
+ # @param action_group_name [String] The name of the action group.
269
+ # @param [Hash{String => String}] A hash of custom headers that will be added
270
+ # to the HTTP request.
271
+ #
272
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
273
+ #
274
+ def delete_async(resource_group_name, action_group_name, custom_headers:nil)
275
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
276
+ fail ArgumentError, 'action_group_name is nil' if action_group_name.nil?
277
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
278
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
279
+
280
+
281
+ request_headers = {}
282
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
283
+
284
+ # Set Headers
285
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
286
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
287
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'
288
+
289
+ request_url = @base_url || @client.base_url
290
+
291
+ options = {
292
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
293
+ path_params: {'resourceGroupName' => resource_group_name,'actionGroupName' => action_group_name,'subscriptionId' => @client.subscription_id},
294
+ query_params: {'api-version' => @client.api_version},
295
+ headers: request_headers.merge(custom_headers || {}),
296
+ base_url: request_url
297
+ }
298
+ promise = @client.make_request_async(:delete, path_template, options)
299
+
300
+ promise = promise.then do |result|
301
+ http_response = result.response
302
+ status_code = http_response.status
303
+ response_content = http_response.body
304
+ unless status_code == 200 || status_code == 204
305
+ error_model = JSON.load(response_content)
306
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
307
+ end
308
+
309
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
310
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
311
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
312
+
313
+ result
314
+ end
315
+
316
+ promise.execute
317
+ end
318
+
319
+ #
320
+ # Updates an existing action group's tags. To update other fields use the
321
+ # CreateOrUpdate method.
322
+ #
323
+ # @param resource_group_name [String] The name of the resource group.
324
+ # @param action_group_name [String] The name of the action group.
325
+ # @param action_group_patch [ActionGroupPatchBody] Parameters supplied to the
326
+ # operation.
327
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
328
+ # will be added to the HTTP request.
329
+ #
330
+ # @return [ActionGroupResource] operation results.
331
+ #
332
+ def update(resource_group_name, action_group_name, action_group_patch, custom_headers:nil)
333
+ response = update_async(resource_group_name, action_group_name, action_group_patch, custom_headers:custom_headers).value!
334
+ response.body unless response.nil?
335
+ end
336
+
337
+ #
338
+ # Updates an existing action group's tags. To update other fields use the
339
+ # CreateOrUpdate method.
340
+ #
341
+ # @param resource_group_name [String] The name of the resource group.
342
+ # @param action_group_name [String] The name of the action group.
343
+ # @param action_group_patch [ActionGroupPatchBody] Parameters supplied to the
344
+ # operation.
345
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
346
+ # will be added to the HTTP request.
347
+ #
348
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
349
+ #
350
+ def update_with_http_info(resource_group_name, action_group_name, action_group_patch, custom_headers:nil)
351
+ update_async(resource_group_name, action_group_name, action_group_patch, custom_headers:custom_headers).value!
352
+ end
353
+
354
+ #
355
+ # Updates an existing action group's tags. To update other fields use the
356
+ # CreateOrUpdate method.
357
+ #
358
+ # @param resource_group_name [String] The name of the resource group.
359
+ # @param action_group_name [String] The name of the action group.
360
+ # @param action_group_patch [ActionGroupPatchBody] Parameters supplied to the
361
+ # operation.
362
+ # @param [Hash{String => String}] A hash of custom headers that will be added
363
+ # to the HTTP request.
364
+ #
365
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
366
+ #
367
+ def update_async(resource_group_name, action_group_name, action_group_patch, custom_headers:nil)
368
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
369
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
370
+ fail ArgumentError, 'action_group_name is nil' if action_group_name.nil?
371
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
372
+ fail ArgumentError, 'action_group_patch is nil' if action_group_patch.nil?
373
+
374
+
375
+ request_headers = {}
376
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
377
+
378
+ # Set Headers
379
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
380
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
381
+
382
+ # Serialize Request
383
+ request_mapper = Azure::Monitor::Mgmt::V2019_03_01::Models::ActionGroupPatchBody.mapper()
384
+ request_content = @client.serialize(request_mapper, action_group_patch)
385
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
386
+
387
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}'
388
+
389
+ request_url = @base_url || @client.base_url
390
+
391
+ options = {
392
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
393
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'actionGroupName' => action_group_name},
394
+ query_params: {'api-version' => @client.api_version},
395
+ body: request_content,
396
+ headers: request_headers.merge(custom_headers || {}),
397
+ base_url: request_url
398
+ }
399
+ promise = @client.make_request_async(:patch, path_template, options)
400
+
401
+ promise = promise.then do |result|
402
+ http_response = result.response
403
+ status_code = http_response.status
404
+ response_content = http_response.body
405
+ unless status_code == 200
406
+ error_model = JSON.load(response_content)
407
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
408
+ end
409
+
410
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
411
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
412
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
413
+ # Deserialize Response
414
+ if status_code == 200
415
+ begin
416
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
417
+ result_mapper = Azure::Monitor::Mgmt::V2019_03_01::Models::ActionGroupResource.mapper()
418
+ result.body = @client.deserialize(result_mapper, parsed_response)
419
+ rescue Exception => e
420
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
421
+ end
422
+ end
423
+
424
+ result
425
+ end
426
+
427
+ promise.execute
428
+ end
429
+
430
+ #
431
+ # Get a list of all action groups in a subscription.
432
+ #
433
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
434
+ # will be added to the HTTP request.
435
+ #
436
+ # @return [ActionGroupList] operation results.
437
+ #
438
+ def list_by_subscription_id(custom_headers:nil)
439
+ response = list_by_subscription_id_async(custom_headers:custom_headers).value!
440
+ response.body unless response.nil?
441
+ end
442
+
443
+ #
444
+ # Get a list of all action groups in a subscription.
445
+ #
446
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
447
+ # will be added to the HTTP request.
448
+ #
449
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
450
+ #
451
+ def list_by_subscription_id_with_http_info(custom_headers:nil)
452
+ list_by_subscription_id_async(custom_headers:custom_headers).value!
453
+ end
454
+
455
+ #
456
+ # Get a list of all action groups in a subscription.
457
+ #
458
+ # @param [Hash{String => String}] A hash of custom headers that will be added
459
+ # to the HTTP request.
460
+ #
461
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
462
+ #
463
+ def list_by_subscription_id_async(custom_headers:nil)
464
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
465
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
466
+
467
+
468
+ request_headers = {}
469
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
470
+
471
+ # Set Headers
472
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
473
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
474
+ path_template = 'subscriptions/{subscriptionId}/providers/microsoft.insights/actionGroups'
475
+
476
+ request_url = @base_url || @client.base_url
477
+
478
+ options = {
479
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
480
+ path_params: {'subscriptionId' => @client.subscription_id},
481
+ query_params: {'api-version' => @client.api_version},
482
+ headers: request_headers.merge(custom_headers || {}),
483
+ base_url: request_url
484
+ }
485
+ promise = @client.make_request_async(:get, path_template, options)
486
+
487
+ promise = promise.then do |result|
488
+ http_response = result.response
489
+ status_code = http_response.status
490
+ response_content = http_response.body
491
+ unless status_code == 200
492
+ error_model = JSON.load(response_content)
493
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
494
+ end
495
+
496
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
497
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
498
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
499
+ # Deserialize Response
500
+ if status_code == 200
501
+ begin
502
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
503
+ result_mapper = Azure::Monitor::Mgmt::V2019_03_01::Models::ActionGroupList.mapper()
504
+ result.body = @client.deserialize(result_mapper, parsed_response)
505
+ rescue Exception => e
506
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
507
+ end
508
+ end
509
+
510
+ result
511
+ end
512
+
513
+ promise.execute
514
+ end
515
+
516
+ #
517
+ # Get a list of all action groups in a resource group.
518
+ #
519
+ # @param resource_group_name [String] The name of the resource group.
520
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
521
+ # will be added to the HTTP request.
522
+ #
523
+ # @return [ActionGroupList] operation results.
524
+ #
525
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
526
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
527
+ response.body unless response.nil?
528
+ end
529
+
530
+ #
531
+ # Get a list of all action groups in a resource group.
532
+ #
533
+ # @param resource_group_name [String] The name of the resource group.
534
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
535
+ # will be added to the HTTP request.
536
+ #
537
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
538
+ #
539
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
540
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
541
+ end
542
+
543
+ #
544
+ # Get a list of all action groups in a resource group.
545
+ #
546
+ # @param resource_group_name [String] The name of the resource group.
547
+ # @param [Hash{String => String}] A hash of custom headers that will be added
548
+ # to the HTTP request.
549
+ #
550
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
551
+ #
552
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
553
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
554
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
555
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
556
+
557
+
558
+ request_headers = {}
559
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
560
+
561
+ # Set Headers
562
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
563
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
564
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups'
565
+
566
+ request_url = @base_url || @client.base_url
567
+
568
+ options = {
569
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
570
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
571
+ query_params: {'api-version' => @client.api_version},
572
+ headers: request_headers.merge(custom_headers || {}),
573
+ base_url: request_url
574
+ }
575
+ promise = @client.make_request_async(:get, path_template, options)
576
+
577
+ promise = promise.then do |result|
578
+ http_response = result.response
579
+ status_code = http_response.status
580
+ response_content = http_response.body
581
+ unless status_code == 200
582
+ error_model = JSON.load(response_content)
583
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
584
+ end
585
+
586
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
587
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
588
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
589
+ # Deserialize Response
590
+ if status_code == 200
591
+ begin
592
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
593
+ result_mapper = Azure::Monitor::Mgmt::V2019_03_01::Models::ActionGroupList.mapper()
594
+ result.body = @client.deserialize(result_mapper, parsed_response)
595
+ rescue Exception => e
596
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
597
+ end
598
+ end
599
+
600
+ result
601
+ end
602
+
603
+ promise.execute
604
+ end
605
+
606
+ #
607
+ # Enable a receiver in an action group. This changes the receiver's status from
608
+ # Disabled to Enabled. This operation is only supported for Email or SMS
609
+ # receivers.
610
+ #
611
+ # @param resource_group_name [String] The name of the resource group.
612
+ # @param action_group_name [String] The name of the action group.
613
+ # @param enable_request [EnableRequest] The receiver to re-enable.
614
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
615
+ # will be added to the HTTP request.
616
+ #
617
+ #
618
+ def enable_receiver(resource_group_name, action_group_name, enable_request, custom_headers:nil)
619
+ response = enable_receiver_async(resource_group_name, action_group_name, enable_request, custom_headers:custom_headers).value!
620
+ nil
621
+ end
622
+
623
+ #
624
+ # Enable a receiver in an action group. This changes the receiver's status from
625
+ # Disabled to Enabled. This operation is only supported for Email or SMS
626
+ # receivers.
627
+ #
628
+ # @param resource_group_name [String] The name of the resource group.
629
+ # @param action_group_name [String] The name of the action group.
630
+ # @param enable_request [EnableRequest] The receiver to re-enable.
631
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
632
+ # will be added to the HTTP request.
633
+ #
634
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
635
+ #
636
+ def enable_receiver_with_http_info(resource_group_name, action_group_name, enable_request, custom_headers:nil)
637
+ enable_receiver_async(resource_group_name, action_group_name, enable_request, custom_headers:custom_headers).value!
638
+ end
639
+
640
+ #
641
+ # Enable a receiver in an action group. This changes the receiver's status from
642
+ # Disabled to Enabled. This operation is only supported for Email or SMS
643
+ # receivers.
644
+ #
645
+ # @param resource_group_name [String] The name of the resource group.
646
+ # @param action_group_name [String] The name of the action group.
647
+ # @param enable_request [EnableRequest] The receiver to re-enable.
648
+ # @param [Hash{String => String}] A hash of custom headers that will be added
649
+ # to the HTTP request.
650
+ #
651
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
652
+ #
653
+ def enable_receiver_async(resource_group_name, action_group_name, enable_request, custom_headers:nil)
654
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
655
+ fail ArgumentError, 'action_group_name is nil' if action_group_name.nil?
656
+ fail ArgumentError, 'enable_request is nil' if enable_request.nil?
657
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
658
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
659
+
660
+
661
+ request_headers = {}
662
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
663
+
664
+ # Set Headers
665
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
666
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
667
+
668
+ # Serialize Request
669
+ request_mapper = Azure::Monitor::Mgmt::V2019_03_01::Models::EnableRequest.mapper()
670
+ request_content = @client.serialize(request_mapper, enable_request)
671
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
672
+
673
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}/subscribe'
674
+
675
+ request_url = @base_url || @client.base_url
676
+
677
+ options = {
678
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
679
+ path_params: {'resourceGroupName' => resource_group_name,'actionGroupName' => action_group_name,'subscriptionId' => @client.subscription_id},
680
+ query_params: {'api-version' => @client.api_version},
681
+ body: request_content,
682
+ headers: request_headers.merge(custom_headers || {}),
683
+ base_url: request_url
684
+ }
685
+ promise = @client.make_request_async(:post, path_template, options)
686
+
687
+ promise = promise.then do |result|
688
+ http_response = result.response
689
+ status_code = http_response.status
690
+ response_content = http_response.body
691
+ unless status_code == 200 || status_code == 409
692
+ error_model = JSON.load(response_content)
693
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
694
+ end
695
+
696
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
697
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
698
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
699
+
700
+ result
701
+ end
702
+
703
+ promise.execute
704
+ end
705
+
706
+ end
707
+ end