azure_mgmt_monitor 0.17.2 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-04-01/generated/azure_mgmt_monitor.rb +11 -8
  3. data/lib/2015-04-01/generated/azure_mgmt_monitor/activity_logs.rb +28 -19
  4. data/lib/2015-04-01/generated/azure_mgmt_monitor/autoscale_settings.rb +16 -0
  5. data/lib/2015-04-01/generated/azure_mgmt_monitor/event_categories.rb +2 -0
  6. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/metric_trigger.rb +35 -1
  7. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/recurrence.rb +9 -9
  8. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/recurrence_frequency.rb +22 -0
  9. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/recurrent_schedule.rb +1 -1
  10. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/scale_rule_metric_dimension.rb +80 -0
  11. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/scale_rule_metric_dimension_operation_type.rb +16 -0
  12. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/time_aggregation_type.rb +1 -0
  13. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/time_window.rb +1 -1
  14. data/lib/2015-04-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  15. data/lib/2015-04-01/generated/azure_mgmt_monitor/operations.rb +2 -0
  16. data/lib/2015-04-01/generated/azure_mgmt_monitor/tenant_activity_logs.rb +4 -0
  17. data/lib/2015-05-01/generated/azure_mgmt_monitor.rb +106 -0
  18. data/lib/2015-05-01/generated/azure_mgmt_monitor/analytics_items.rb +585 -0
  19. data/lib/2015-05-01/generated/azure_mgmt_monitor/annotations.rb +505 -0
  20. data/lib/2015-05-01/generated/azure_mgmt_monitor/apikeys.rb +473 -0
  21. data/lib/2015-05-01/generated/azure_mgmt_monitor/application_insights_management_client.rb +193 -0
  22. data/lib/2015-05-01/generated/azure_mgmt_monitor/component_available_features.rb +130 -0
  23. data/lib/2015-05-01/generated/azure_mgmt_monitor/component_current_billing_features.rb +252 -0
  24. data/lib/2015-05-01/generated/azure_mgmt_monitor/component_feature_capabilities.rb +130 -0
  25. data/lib/2015-05-01/generated/azure_mgmt_monitor/component_quota_status.rb +133 -0
  26. data/lib/2015-05-01/generated/azure_mgmt_monitor/components.rb +1134 -0
  27. data/lib/2015-05-01/generated/azure_mgmt_monitor/export_configurations.rb +646 -0
  28. data/lib/2015-05-01/generated/azure_mgmt_monitor/favorites.rb +653 -0
  29. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/annotation.rb +103 -0
  30. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/annotation_error.rb +70 -0
  31. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/annotations_list_result.rb +56 -0
  32. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/apikey_request.rb +84 -0
  33. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component.rb +261 -0
  34. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_analytics_item.rb +146 -0
  35. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_analytics_item_properties.rb +49 -0
  36. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_apikey.rb +121 -0
  37. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_apikey_list_result.rb +57 -0
  38. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_available_features.rb +58 -0
  39. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_billing_features.rb +70 -0
  40. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_data_volume_cap.rb +106 -0
  41. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_export_configuration.rb +277 -0
  42. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_export_request.rb +143 -0
  43. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_favorite.rb +182 -0
  44. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_feature.rb +153 -0
  45. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_feature_capabilities.rb +228 -0
  46. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_feature_capability.rb +108 -0
  47. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_list_result.rb +102 -0
  48. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_proactive_detection_configuration.rb +117 -0
  49. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_proactive_detection_configuration_rule_definitions.rb +130 -0
  50. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_quota_status.rb +74 -0
  51. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_component_web_test_location.rb +61 -0
  52. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_insights_web_test_locations_list_result.rb +58 -0
  53. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/application_type.rb +16 -0
  54. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/category_type.rb +18 -0
  55. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/component_purge_body.rb +67 -0
  56. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/component_purge_body_filters.rb +85 -0
  57. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/component_purge_response.rb +47 -0
  58. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/component_purge_status_response.rb +47 -0
  59. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/components_resource.rb +101 -0
  60. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/error_field_contract.rb +68 -0
  61. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/error_response.rb +58 -0
  62. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/favorite_source_type.rb +22 -0
  63. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/favorite_type.rb +16 -0
  64. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/flow_type.rb +15 -0
  65. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/inner_error.rb +57 -0
  66. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/item_scope.rb +16 -0
  67. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/item_scope_path.rb +16 -0
  68. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/item_type.rb +18 -0
  69. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/item_type_parameter.rb +19 -0
  70. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/link_properties.rb +68 -0
  71. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/operation.rb +58 -0
  72. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/operation_display.rb +69 -0
  73. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/operation_list_result.rb +101 -0
  74. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/purge_state.rb +16 -0
  75. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/request_source.rb +15 -0
  76. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/shared_type_kind.rb +16 -0
  77. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/tags_resource.rb +55 -0
  78. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/web_test.rb +249 -0
  79. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/web_test_geolocation.rb +47 -0
  80. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/web_test_kind.rb +16 -0
  81. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/web_test_list_result.rb +101 -0
  82. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/web_test_properties_configuration.rb +47 -0
  83. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/webtests_resource.rb +101 -0
  84. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/work_item_configuration.rb +91 -0
  85. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/work_item_configuration_error.rb +70 -0
  86. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/work_item_configurations_list_result.rb +57 -0
  87. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/work_item_create_configuration.rb +87 -0
  88. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/workbook.rb +228 -0
  89. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/workbook_error.rb +79 -0
  90. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/workbook_resource.rb +101 -0
  91. data/lib/2015-05-01/generated/azure_mgmt_monitor/models/workbooks_list_result.rb +56 -0
  92. data/lib/2015-05-01/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  93. data/lib/2015-05-01/generated/azure_mgmt_monitor/operations.rb +220 -0
  94. data/lib/2015-05-01/generated/azure_mgmt_monitor/proactive_detection_configurations.rb +392 -0
  95. data/lib/2015-05-01/generated/azure_mgmt_monitor/web_test_locations.rb +133 -0
  96. data/lib/2015-05-01/generated/azure_mgmt_monitor/web_tests.rb +1103 -0
  97. data/lib/2015-05-01/generated/azure_mgmt_monitor/work_item_configurations.rb +708 -0
  98. data/lib/2015-05-01/generated/azure_mgmt_monitor/workbooks.rb +589 -0
  99. data/lib/2016-03-01/generated/azure_mgmt_monitor.rb +14 -14
  100. data/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rule_incidents.rb +4 -0
  101. data/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rules.rb +33 -21
  102. data/lib/2016-03-01/generated/azure_mgmt_monitor/log_profiles.rb +10 -0
  103. data/lib/2016-03-01/generated/azure_mgmt_monitor/metric_definitions.rb +2 -0
  104. data/lib/2016-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +5 -5
  105. data/lib/2016-09-01/generated/azure_mgmt_monitor/metrics.rb +2 -0
  106. data/lib/2016-09-01/generated/azure_mgmt_monitor/monitor_client.rb +1 -1
  107. data/lib/2016-09-01/generated/azure_mgmt_monitor/service_diagnostic_settings_operations.rb +6 -0
  108. data/lib/2017-04-01/generated/azure_mgmt_monitor/action_groups.rb +14 -0
  109. data/lib/2017-04-01/generated/azure_mgmt_monitor/activity_log_alerts.rb +12 -0
  110. data/lib/2017-04-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  111. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor.rb +16 -11
  112. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/diagnostic_settings_category_operations.rb +4 -0
  113. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/diagnostic_settings_operations.rb +8 -0
  114. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/metric_definitions.rb +2 -0
  115. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/metrics.rb +2 -0
  116. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/diagnostic_settings_resource.rb +19 -5
  117. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/response.rb +1 -1
  118. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/subscription_diagnostic_settings_resource.rb +150 -0
  119. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/subscription_diagnostic_settings_resource_collection.rb +57 -0
  120. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/subscription_log_settings.rb +59 -0
  121. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/subscription_proxy_only_resource.rb +82 -0
  122. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +10 -5
  123. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/subscription_diagnostic_settings_operations.rb +405 -0
  124. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor.rb +34 -0
  125. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/application_insights_management_client.rb +146 -0
  126. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/component_current_pricing_plan.rb +377 -0
  127. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/easubscription_list_migration_date.rb +113 -0
  128. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/easubscription_migrate_to_new_pricing_model.rb +102 -0
  129. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/easubscription_rollback_to_legacy_pricing_model.rb +102 -0
  130. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/models/application_insights_component_pricing_plan.rb +143 -0
  131. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/models/easubscription_migration_date.rb +58 -0
  132. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/models/resource.rb +80 -0
  133. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  134. data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/metric_baseline.rb +4 -0
  135. data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/baseline_response.rb +1 -1
  136. data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/calculate_baseline_response.rb +1 -1
  137. data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  138. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor.rb +32 -0
  139. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/metric_namespaces.rb +120 -0
  140. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  141. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/models/metric_namespace.rb +81 -0
  142. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/models/metric_namespace_collection.rb +55 -0
  143. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/models/metric_namespace_name.rb +46 -0
  144. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  145. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +128 -0
  146. data/lib/2018-01-01/generated/azure_mgmt_monitor/metric_definitions.rb +2 -0
  147. data/lib/2018-01-01/generated/azure_mgmt_monitor/metrics.rb +2 -0
  148. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metric.rb +2 -1
  149. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metric_definition.rb +3 -2
  150. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metric_value.rb +3 -4
  151. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/response.rb +1 -1
  152. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/unit.rb +4 -0
  153. data/lib/2018-01-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  154. data/lib/2018-03-01/generated/azure_mgmt_monitor.rb +25 -17
  155. data/lib/2018-03-01/generated/azure_mgmt_monitor/action_groups.rb +14 -0
  156. data/lib/2018-03-01/generated/azure_mgmt_monitor/metric_alerts.rb +22 -10
  157. data/lib/2018-03-01/generated/azure_mgmt_monitor/metric_alerts_status.rb +4 -0
  158. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/dynamic_metric_criteria.rb +175 -0
  159. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/dynamic_threshold_failing_periods.rb +61 -0
  160. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/dynamic_threshold_operator.rb +17 -0
  161. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/dynamic_threshold_sensitivity.rb +17 -0
  162. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_action.rb +3 -3
  163. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_criteria.rb +2 -0
  164. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_multiple_resource_multiple_metric_criteria.rb +90 -0
  165. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_resource.rb +27 -1
  166. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_resource_patch.rb +27 -1
  167. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_criteria.rb +56 -31
  168. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_dimension.rb +2 -1
  169. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/multi_metric_criteria.rb +142 -0
  170. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/operator.rb +20 -0
  171. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/webtest_location_availability_criteria.rb +98 -0
  172. data/lib/2018-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +5 -5
  173. data/lib/2018-04-16/generated/azure_mgmt_monitor.rb +8 -5
  174. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/action.rb +1 -0
  175. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/alerting_action.rb +2 -2
  176. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/az_ns_action_group.rb +1 -1
  177. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/criteria.rb +66 -0
  178. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/dimension.rb +79 -0
  179. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/log_search_rule_resource.rb +4 -3
  180. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/log_to_metric_action.rb +71 -0
  181. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/source.rb +3 -2
  182. data/lib/2018-04-16/generated/azure_mgmt_monitor/monitor_client.rb +1 -1
  183. data/lib/2018-04-16/generated/azure_mgmt_monitor/scheduled_query_rules.rb +12 -0
  184. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor.rb +44 -0
  185. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/guest_diagnostics_settings.rb +614 -0
  186. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/guest_diagnostics_settings_association.rb +634 -0
  187. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/data_source.rb +80 -0
  188. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/data_source_configuration.rb +98 -0
  189. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  190. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/etw_event_configuration.rb +69 -0
  191. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/etw_provider_configuration.rb +67 -0
  192. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/event_log_configuration.rb +58 -0
  193. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/guest_diagnostic_settings_association_list.rb +68 -0
  194. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/guest_diagnostic_settings_association_resource.rb +98 -0
  195. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/guest_diagnostic_settings_association_resource_patch.rb +66 -0
  196. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/guest_diagnostic_settings_list.rb +68 -0
  197. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/guest_diagnostic_settings_patch_resource.rb +98 -0
  198. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/guest_diagnostic_settings_resource.rb +130 -0
  199. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/performance_counter_configuration.rb +69 -0
  200. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/resource.rb +110 -0
  201. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/models/sink_configuration.rb +48 -0
  202. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  203. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +136 -0
  204. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor.rb +36 -0
  205. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/application_insights_management_client.rb +131 -0
  206. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/category_type.rb +18 -0
  207. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/error_field_contract.rb +68 -0
  208. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/resource.rb +123 -0
  209. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/shared_type_kind.rb +16 -0
  210. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/workbook.rb +185 -0
  211. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/workbook_error.rb +79 -0
  212. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/workbook_update_parameters.rb +122 -0
  213. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/models/workbooks_list_result.rb +55 -0
  214. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  215. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/workbooks.rb +609 -0
  216. data/lib/2018-09-01/generated/azure_mgmt_monitor.rb +54 -0
  217. data/lib/2018-09-01/generated/azure_mgmt_monitor/action_groups.rb +707 -0
  218. data/lib/2018-09-01/generated/azure_mgmt_monitor/metric_baseline.rb +294 -0
  219. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/action_group_list.rb +67 -0
  220. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/action_group_patch_body.rb +68 -0
  221. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/action_group_resource.rb +326 -0
  222. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/arm_role_receiver.rb +58 -0
  223. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/automation_runbook_receiver.rb +102 -0
  224. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/azure_app_push_receiver.rb +58 -0
  225. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/azure_function_receiver.rb +80 -0
  226. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/baseline.rb +86 -0
  227. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/baseline_metadata_value.rb +58 -0
  228. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/baseline_response.rb +171 -0
  229. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/calculate_baseline_response.rb +85 -0
  230. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/email_receiver.rb +72 -0
  231. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/enable_request.rb +46 -0
  232. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  233. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/itsm_receiver.rb +94 -0
  234. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/localizable_string.rb +57 -0
  235. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/logic_app_receiver.rb +69 -0
  236. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/receiver_status.rb +17 -0
  237. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/resource.rb +110 -0
  238. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/result_type.rb +16 -0
  239. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/sensitivity.rb +17 -0
  240. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/sms_receiver.rb +83 -0
  241. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/time_series_information.rb +93 -0
  242. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/voice_receiver.rb +69 -0
  243. data/lib/2018-09-01/generated/azure_mgmt_monitor/models/webhook_receiver.rb +58 -0
  244. data/lib/2018-09-01/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  245. data/lib/2018-09-01/generated/azure_mgmt_monitor/monitor_management_client.rb +135 -0
  246. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor.rb +36 -0
  247. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/data_container.rb +47 -0
  248. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/data_status.rb +16 -0
  249. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/error.rb +57 -0
  250. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/onboarding_status.rb +17 -0
  251. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/proxy_resource.rb +71 -0
  252. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/response_with_error.rb +47 -0
  253. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/vminsights_onboarding_status.rb +123 -0
  254. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/models/workspace_info.rb +69 -0
  255. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  256. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +128 -0
  257. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/vminsights.rb +120 -0
  258. data/lib/2019-03-01/generated/azure_mgmt_monitor.rb +54 -0
  259. data/lib/2019-03-01/generated/azure_mgmt_monitor/action_groups.rb +707 -0
  260. data/lib/2019-03-01/generated/azure_mgmt_monitor/baselines.rb +186 -0
  261. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/action_group_list.rb +67 -0
  262. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/action_group_patch_body.rb +68 -0
  263. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/action_group_resource.rb +326 -0
  264. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/arm_role_receiver.rb +69 -0
  265. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/automation_runbook_receiver.rb +113 -0
  266. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/azure_app_push_receiver.rb +58 -0
  267. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/azure_function_receiver.rb +91 -0
  268. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/baseline_metadata.rb +57 -0
  269. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/baseline_sensitivity.rb +17 -0
  270. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/email_receiver.rb +83 -0
  271. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/enable_request.rb +46 -0
  272. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  273. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/itsm_receiver.rb +94 -0
  274. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/logic_app_receiver.rb +80 -0
  275. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/metric_baselines_response.rb +55 -0
  276. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/metric_single_dimension.rb +57 -0
  277. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/receiver_status.rb +17 -0
  278. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/resource.rb +110 -0
  279. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/result_type.rb +16 -0
  280. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/single_baseline.rb +85 -0
  281. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/single_metric_baseline.rb +129 -0
  282. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/sms_receiver.rb +83 -0
  283. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/time_series_baseline.rb +127 -0
  284. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/voice_receiver.rb +69 -0
  285. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/webhook_receiver.rb +69 -0
  286. data/lib/2019-03-01/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  287. data/lib/2019-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +135 -0
  288. data/lib/2019-06-01/generated/azure_mgmt_monitor.rb +45 -0
  289. data/lib/2019-06-01/generated/azure_mgmt_monitor/action_groups.rb +707 -0
  290. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/action_group_list.rb +67 -0
  291. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/action_group_patch_body.rb +68 -0
  292. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/action_group_resource.rb +326 -0
  293. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/arm_role_receiver.rb +69 -0
  294. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/automation_runbook_receiver.rb +113 -0
  295. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/azure_app_push_receiver.rb +58 -0
  296. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/azure_function_receiver.rb +91 -0
  297. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/email_receiver.rb +83 -0
  298. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/enable_request.rb +46 -0
  299. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  300. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/itsm_receiver.rb +94 -0
  301. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/logic_app_receiver.rb +80 -0
  302. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/receiver_status.rb +17 -0
  303. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/resource.rb +110 -0
  304. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/sms_receiver.rb +83 -0
  305. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/voice_receiver.rb +69 -0
  306. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/webhook_receiver.rb +115 -0
  307. data/lib/2019-06-01/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  308. data/lib/2019-06-01/generated/azure_mgmt_monitor/monitor_management_client.rb +131 -0
  309. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor.rb +49 -0
  310. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/azure_monitor_private_link_scope.rb +123 -0
  311. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/azure_monitor_private_link_scope_list_result.rb +102 -0
  312. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/error_additional_info.rb +59 -0
  313. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  314. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/error_response_common.rb +93 -0
  315. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/operation_status.rb +102 -0
  316. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_endpoint_connection.rb +100 -0
  317. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_endpoint_connection_list_result.rb +100 -0
  318. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_endpoint_property.rb +46 -0
  319. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_link_resource.rb +95 -0
  320. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_link_resource_list_result.rb +100 -0
  321. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_link_scopes_resource.rb +101 -0
  322. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_link_service_connection_state_property.rb +71 -0
  323. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/proxy_resource.rb +71 -0
  324. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/scoped_resource.rb +85 -0
  325. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/scoped_resource_list_result.rb +100 -0
  326. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/tags_resource.rb +55 -0
  327. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  328. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +148 -0
  329. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_endpoint_connections.rb +641 -0
  330. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_link_resources.rb +346 -0
  331. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_link_scope_operation_status.rb +122 -0
  332. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_link_scoped_resources.rb +638 -0
  333. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_link_scopes.rb +889 -0
  334. data/lib/azure_mgmt_monitor.rb +16 -5
  335. data/lib/profiles/latest/modules/monitor_profile_module.rb +575 -159
  336. data/lib/profiles/v2019_03_01_hybrid/modules/monitor_profile_module.rb +327 -0
  337. data/lib/profiles/v2019_03_01_hybrid/monitor_module_definition.rb +8 -0
  338. data/lib/profiles/v2019_03_01_hybrid/monitor_v2019_03_01_hybrid_profile_client.rb +40 -0
  339. data/lib/version.rb +1 -1
  340. metadata +277 -5
@@ -0,0 +1,130 @@
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::V2015_05_01
7
+ #
8
+ # Composite Swagger for Application Insights Management Client
9
+ #
10
+ class ComponentFeatureCapabilities
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ComponentFeatureCapabilities class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ApplicationInsightsManagementClient] reference to the ApplicationInsightsManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Returns feature capabilities of the application insights component.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group. The name
28
+ # is case insensitive.
29
+ # @param resource_name [String] The name of the Application Insights component
30
+ # resource.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [ApplicationInsightsComponentFeatureCapabilities] operation results.
35
+ #
36
+ def get(resource_group_name, resource_name, custom_headers:nil)
37
+ response = get_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
38
+ response.body unless response.nil?
39
+ end
40
+
41
+ #
42
+ # Returns feature capabilities of the application insights component.
43
+ #
44
+ # @param resource_group_name [String] The name of the resource group. The name
45
+ # is case insensitive.
46
+ # @param resource_name [String] The name of the Application Insights component
47
+ # resource.
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 get_with_http_info(resource_group_name, resource_name, custom_headers:nil)
54
+ get_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Returns feature capabilities of the application insights component.
59
+ #
60
+ # @param resource_group_name [String] The name of the resource group. The name
61
+ # is case insensitive.
62
+ # @param resource_name [String] The name of the Application Insights component
63
+ # resource.
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 get_async(resource_group_name, resource_name, custom_headers:nil)
70
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
71
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
72
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
73
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
74
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
75
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
76
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
77
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
78
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
79
+
80
+
81
+ request_headers = {}
82
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
83
+
84
+ # Set Headers
85
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
86
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
87
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/featurecapabilities'
88
+
89
+ request_url = @base_url || @client.base_url
90
+
91
+ options = {
92
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
93
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id,'resourceName' => resource_name},
94
+ query_params: {'api-version' => @client.api_version},
95
+ headers: request_headers.merge(custom_headers || {}),
96
+ base_url: request_url
97
+ }
98
+ promise = @client.make_request_async(:get, path_template, options)
99
+
100
+ promise = promise.then do |result|
101
+ http_response = result.response
102
+ status_code = http_response.status
103
+ response_content = http_response.body
104
+ unless status_code == 200
105
+ error_model = JSON.load(response_content)
106
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
107
+ end
108
+
109
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
110
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
111
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
112
+ # Deserialize Response
113
+ if status_code == 200
114
+ begin
115
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
116
+ result_mapper = Azure::Monitor::Mgmt::V2015_05_01::Models::ApplicationInsightsComponentFeatureCapabilities.mapper()
117
+ result.body = @client.deserialize(result_mapper, parsed_response)
118
+ rescue Exception => e
119
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
120
+ end
121
+ end
122
+
123
+ result
124
+ end
125
+
126
+ promise.execute
127
+ end
128
+
129
+ end
130
+ end
@@ -0,0 +1,133 @@
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::V2015_05_01
7
+ #
8
+ # Composite Swagger for Application Insights Management Client
9
+ #
10
+ class ComponentQuotaStatus
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ComponentQuotaStatus class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ApplicationInsightsManagementClient] reference to the ApplicationInsightsManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Returns daily data volume cap (quota) status for an Application Insights
26
+ # component.
27
+ #
28
+ # @param resource_group_name [String] The name of the resource group. The name
29
+ # is case insensitive.
30
+ # @param resource_name [String] The name of the Application Insights component
31
+ # resource.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [ApplicationInsightsComponentQuotaStatus] operation results.
36
+ #
37
+ def get(resource_group_name, resource_name, custom_headers:nil)
38
+ response = get_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # Returns daily data volume cap (quota) status for an Application Insights
44
+ # component.
45
+ #
46
+ # @param resource_group_name [String] The name of the resource group. The name
47
+ # is case insensitive.
48
+ # @param resource_name [String] The name of the Application Insights component
49
+ # resource.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def get_with_http_info(resource_group_name, resource_name, custom_headers:nil)
56
+ get_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Returns daily data volume cap (quota) status for an Application Insights
61
+ # component.
62
+ #
63
+ # @param resource_group_name [String] The name of the resource group. The name
64
+ # is case insensitive.
65
+ # @param resource_name [String] The name of the Application Insights component
66
+ # resource.
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def get_async(resource_group_name, resource_name, custom_headers:nil)
73
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
74
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
75
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
76
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
77
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
78
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
79
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
80
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
81
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
82
+
83
+
84
+ request_headers = {}
85
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
86
+
87
+ # Set Headers
88
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
89
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
90
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/quotastatus'
91
+
92
+ request_url = @base_url || @client.base_url
93
+
94
+ options = {
95
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
96
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id,'resourceName' => resource_name},
97
+ query_params: {'api-version' => @client.api_version},
98
+ headers: request_headers.merge(custom_headers || {}),
99
+ base_url: request_url
100
+ }
101
+ promise = @client.make_request_async(:get, 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
108
+ error_model = JSON.load(response_content)
109
+ fail MsRestAzure::AzureOperationError.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::V2015_05_01::Models::ApplicationInsightsComponentQuotaStatus.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
+
126
+ result
127
+ end
128
+
129
+ promise.execute
130
+ end
131
+
132
+ end
133
+ end
@@ -0,0 +1,1134 @@
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::V2015_05_01
7
+ #
8
+ # Composite Swagger for Application Insights Management Client
9
+ #
10
+ class Components
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Components class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ApplicationInsightsManagementClient] reference to the ApplicationInsightsManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets a list of all Application Insights components within a subscription.
26
+ #
27
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
28
+ # will be added to the HTTP request.
29
+ #
30
+ # @return [Array<ApplicationInsightsComponent>] operation results.
31
+ #
32
+ def list(custom_headers:nil)
33
+ first_page = list_as_lazy(custom_headers:custom_headers)
34
+ first_page.get_all_items
35
+ end
36
+
37
+ #
38
+ # Gets a list of all Application Insights components within a subscription.
39
+ #
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
+ #
45
+ def list_with_http_info(custom_headers:nil)
46
+ list_async(custom_headers:custom_headers).value!
47
+ end
48
+
49
+ #
50
+ # Gets a list of all Application Insights components within a subscription.
51
+ #
52
+ # @param [Hash{String => String}] A hash of custom headers that will be added
53
+ # to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
+ #
57
+ def list_async(custom_headers:nil)
58
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
59
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
60
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
61
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
62
+
63
+
64
+ request_headers = {}
65
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
66
+
67
+ # Set Headers
68
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
69
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
70
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Insights/components'
71
+
72
+ request_url = @base_url || @client.base_url
73
+
74
+ options = {
75
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
76
+ path_params: {'subscriptionId' => @client.subscription_id},
77
+ query_params: {'api-version' => @client.api_version},
78
+ headers: request_headers.merge(custom_headers || {}),
79
+ base_url: request_url
80
+ }
81
+ promise = @client.make_request_async(:get, path_template, options)
82
+
83
+ promise = promise.then do |result|
84
+ http_response = result.response
85
+ status_code = http_response.status
86
+ response_content = http_response.body
87
+ unless status_code == 200
88
+ error_model = JSON.load(response_content)
89
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
90
+ end
91
+
92
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
93
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
94
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
95
+ # Deserialize Response
96
+ if status_code == 200
97
+ begin
98
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
99
+ result_mapper = Azure::Monitor::Mgmt::V2015_05_01::Models::ApplicationInsightsComponentListResult.mapper()
100
+ result.body = @client.deserialize(result_mapper, parsed_response)
101
+ rescue Exception => e
102
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
103
+ end
104
+ end
105
+
106
+ result
107
+ end
108
+
109
+ promise.execute
110
+ end
111
+
112
+ #
113
+ # Gets a list of Application Insights components within a resource group.
114
+ #
115
+ # @param resource_group_name [String] The name of the resource group. The name
116
+ # is case insensitive.
117
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
118
+ # will be added to the HTTP request.
119
+ #
120
+ # @return [Array<ApplicationInsightsComponent>] operation results.
121
+ #
122
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
123
+ first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers)
124
+ first_page.get_all_items
125
+ end
126
+
127
+ #
128
+ # Gets a list of Application Insights components within a resource group.
129
+ #
130
+ # @param resource_group_name [String] The name of the resource group. The name
131
+ # is case insensitive.
132
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
133
+ # will be added to the HTTP request.
134
+ #
135
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
136
+ #
137
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
138
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
139
+ end
140
+
141
+ #
142
+ # Gets a list of Application Insights components within a resource group.
143
+ #
144
+ # @param resource_group_name [String] The name of the resource group. The name
145
+ # is case insensitive.
146
+ # @param [Hash{String => String}] A hash of custom headers that will be added
147
+ # to the HTTP request.
148
+ #
149
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
150
+ #
151
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
152
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
153
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
154
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
155
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
156
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
157
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
158
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
159
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
160
+
161
+
162
+ request_headers = {}
163
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
164
+
165
+ # Set Headers
166
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
167
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
168
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components'
169
+
170
+ request_url = @base_url || @client.base_url
171
+
172
+ options = {
173
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
174
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
175
+ query_params: {'api-version' => @client.api_version},
176
+ headers: request_headers.merge(custom_headers || {}),
177
+ base_url: request_url
178
+ }
179
+ promise = @client.make_request_async(:get, path_template, options)
180
+
181
+ promise = promise.then do |result|
182
+ http_response = result.response
183
+ status_code = http_response.status
184
+ response_content = http_response.body
185
+ unless status_code == 200
186
+ error_model = JSON.load(response_content)
187
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
188
+ end
189
+
190
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
191
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
192
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
193
+ # Deserialize Response
194
+ if status_code == 200
195
+ begin
196
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
197
+ result_mapper = Azure::Monitor::Mgmt::V2015_05_01::Models::ApplicationInsightsComponentListResult.mapper()
198
+ result.body = @client.deserialize(result_mapper, parsed_response)
199
+ rescue Exception => e
200
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
201
+ end
202
+ end
203
+
204
+ result
205
+ end
206
+
207
+ promise.execute
208
+ end
209
+
210
+ #
211
+ # Deletes an Application Insights component.
212
+ #
213
+ # @param resource_group_name [String] The name of the resource group. The name
214
+ # is case insensitive.
215
+ # @param resource_name [String] The name of the Application Insights component
216
+ # resource.
217
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
218
+ # will be added to the HTTP request.
219
+ #
220
+ #
221
+ def delete(resource_group_name, resource_name, custom_headers:nil)
222
+ response = delete_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
223
+ nil
224
+ end
225
+
226
+ #
227
+ # Deletes an Application Insights component.
228
+ #
229
+ # @param resource_group_name [String] The name of the resource group. The name
230
+ # is case insensitive.
231
+ # @param resource_name [String] The name of the Application Insights component
232
+ # resource.
233
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
234
+ # will be added to the HTTP request.
235
+ #
236
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
237
+ #
238
+ def delete_with_http_info(resource_group_name, resource_name, custom_headers:nil)
239
+ delete_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
240
+ end
241
+
242
+ #
243
+ # Deletes an Application Insights component.
244
+ #
245
+ # @param resource_group_name [String] The name of the resource group. The name
246
+ # is case insensitive.
247
+ # @param resource_name [String] The name of the Application Insights component
248
+ # resource.
249
+ # @param [Hash{String => String}] A hash of custom headers that will be added
250
+ # to the HTTP request.
251
+ #
252
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
253
+ #
254
+ def delete_async(resource_group_name, resource_name, custom_headers:nil)
255
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
256
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
257
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
258
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
259
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
260
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
261
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
262
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
263
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
264
+
265
+
266
+ request_headers = {}
267
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
268
+
269
+ # Set Headers
270
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
271
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
272
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'
273
+
274
+ request_url = @base_url || @client.base_url
275
+
276
+ options = {
277
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
278
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id,'resourceName' => resource_name},
279
+ query_params: {'api-version' => @client.api_version},
280
+ headers: request_headers.merge(custom_headers || {}),
281
+ base_url: request_url
282
+ }
283
+ promise = @client.make_request_async(:delete, path_template, options)
284
+
285
+ promise = promise.then do |result|
286
+ http_response = result.response
287
+ status_code = http_response.status
288
+ response_content = http_response.body
289
+ unless status_code == 200 || status_code == 204
290
+ error_model = JSON.load(response_content)
291
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
292
+ end
293
+
294
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
295
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
296
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
297
+
298
+ result
299
+ end
300
+
301
+ promise.execute
302
+ end
303
+
304
+ #
305
+ # Returns an Application Insights component.
306
+ #
307
+ # @param resource_group_name [String] The name of the resource group. The name
308
+ # is case insensitive.
309
+ # @param resource_name [String] The name of the Application Insights component
310
+ # resource.
311
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
312
+ # will be added to the HTTP request.
313
+ #
314
+ # @return [ApplicationInsightsComponent] operation results.
315
+ #
316
+ def get(resource_group_name, resource_name, custom_headers:nil)
317
+ response = get_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
318
+ response.body unless response.nil?
319
+ end
320
+
321
+ #
322
+ # Returns an Application Insights component.
323
+ #
324
+ # @param resource_group_name [String] The name of the resource group. The name
325
+ # is case insensitive.
326
+ # @param resource_name [String] The name of the Application Insights component
327
+ # resource.
328
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
329
+ # will be added to the HTTP request.
330
+ #
331
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
332
+ #
333
+ def get_with_http_info(resource_group_name, resource_name, custom_headers:nil)
334
+ get_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
335
+ end
336
+
337
+ #
338
+ # Returns an Application Insights component.
339
+ #
340
+ # @param resource_group_name [String] The name of the resource group. The name
341
+ # is case insensitive.
342
+ # @param resource_name [String] The name of the Application Insights component
343
+ # resource.
344
+ # @param [Hash{String => String}] A hash of custom headers that will be added
345
+ # to the HTTP request.
346
+ #
347
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
348
+ #
349
+ def get_async(resource_group_name, resource_name, custom_headers:nil)
350
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
351
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
352
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
353
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
354
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
355
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
356
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
357
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
358
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
359
+
360
+
361
+ request_headers = {}
362
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
363
+
364
+ # Set Headers
365
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
366
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
367
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'
368
+
369
+ request_url = @base_url || @client.base_url
370
+
371
+ options = {
372
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
373
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id,'resourceName' => resource_name},
374
+ query_params: {'api-version' => @client.api_version},
375
+ headers: request_headers.merge(custom_headers || {}),
376
+ base_url: request_url
377
+ }
378
+ promise = @client.make_request_async(:get, path_template, options)
379
+
380
+ promise = promise.then do |result|
381
+ http_response = result.response
382
+ status_code = http_response.status
383
+ response_content = http_response.body
384
+ unless status_code == 200
385
+ error_model = JSON.load(response_content)
386
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
387
+ end
388
+
389
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
390
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
391
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
392
+ # Deserialize Response
393
+ if status_code == 200
394
+ begin
395
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
396
+ result_mapper = Azure::Monitor::Mgmt::V2015_05_01::Models::ApplicationInsightsComponent.mapper()
397
+ result.body = @client.deserialize(result_mapper, parsed_response)
398
+ rescue Exception => e
399
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
400
+ end
401
+ end
402
+
403
+ result
404
+ end
405
+
406
+ promise.execute
407
+ end
408
+
409
+ #
410
+ # Creates (or updates) an Application Insights component. Note: You cannot
411
+ # specify a different value for InstrumentationKey nor AppId in the Put
412
+ # operation.
413
+ #
414
+ # @param resource_group_name [String] The name of the resource group. The name
415
+ # is case insensitive.
416
+ # @param resource_name [String] The name of the Application Insights component
417
+ # resource.
418
+ # @param insight_properties [ApplicationInsightsComponent] Properties that need
419
+ # to be specified to create an Application Insights component.
420
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
421
+ # will be added to the HTTP request.
422
+ #
423
+ # @return [ApplicationInsightsComponent] operation results.
424
+ #
425
+ def create_or_update(resource_group_name, resource_name, insight_properties, custom_headers:nil)
426
+ response = create_or_update_async(resource_group_name, resource_name, insight_properties, custom_headers:custom_headers).value!
427
+ response.body unless response.nil?
428
+ end
429
+
430
+ #
431
+ # Creates (or updates) an Application Insights component. Note: You cannot
432
+ # specify a different value for InstrumentationKey nor AppId in the Put
433
+ # operation.
434
+ #
435
+ # @param resource_group_name [String] The name of the resource group. The name
436
+ # is case insensitive.
437
+ # @param resource_name [String] The name of the Application Insights component
438
+ # resource.
439
+ # @param insight_properties [ApplicationInsightsComponent] Properties that need
440
+ # to be specified to create an Application Insights component.
441
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
442
+ # will be added to the HTTP request.
443
+ #
444
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
445
+ #
446
+ def create_or_update_with_http_info(resource_group_name, resource_name, insight_properties, custom_headers:nil)
447
+ create_or_update_async(resource_group_name, resource_name, insight_properties, custom_headers:custom_headers).value!
448
+ end
449
+
450
+ #
451
+ # Creates (or updates) an Application Insights component. Note: You cannot
452
+ # specify a different value for InstrumentationKey nor AppId in the Put
453
+ # operation.
454
+ #
455
+ # @param resource_group_name [String] The name of the resource group. The name
456
+ # is case insensitive.
457
+ # @param resource_name [String] The name of the Application Insights component
458
+ # resource.
459
+ # @param insight_properties [ApplicationInsightsComponent] Properties that need
460
+ # to be specified to create an Application Insights component.
461
+ # @param [Hash{String => String}] A hash of custom headers that will be added
462
+ # to the HTTP request.
463
+ #
464
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
465
+ #
466
+ def create_or_update_async(resource_group_name, resource_name, insight_properties, custom_headers:nil)
467
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
468
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
469
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
470
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
471
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
472
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
473
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
474
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
475
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
476
+ fail ArgumentError, 'insight_properties is nil' if insight_properties.nil?
477
+
478
+
479
+ request_headers = {}
480
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
481
+
482
+ # Set Headers
483
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
484
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
485
+
486
+ # Serialize Request
487
+ request_mapper = Azure::Monitor::Mgmt::V2015_05_01::Models::ApplicationInsightsComponent.mapper()
488
+ request_content = @client.serialize(request_mapper, insight_properties)
489
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
490
+
491
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'
492
+
493
+ request_url = @base_url || @client.base_url
494
+
495
+ options = {
496
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
497
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id,'resourceName' => resource_name},
498
+ query_params: {'api-version' => @client.api_version},
499
+ body: request_content,
500
+ headers: request_headers.merge(custom_headers || {}),
501
+ base_url: request_url
502
+ }
503
+ promise = @client.make_request_async(:put, path_template, options)
504
+
505
+ promise = promise.then do |result|
506
+ http_response = result.response
507
+ status_code = http_response.status
508
+ response_content = http_response.body
509
+ unless status_code == 200
510
+ error_model = JSON.load(response_content)
511
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
512
+ end
513
+
514
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
515
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
516
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
517
+ # Deserialize Response
518
+ if status_code == 200
519
+ begin
520
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
521
+ result_mapper = Azure::Monitor::Mgmt::V2015_05_01::Models::ApplicationInsightsComponent.mapper()
522
+ result.body = @client.deserialize(result_mapper, parsed_response)
523
+ rescue Exception => e
524
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
525
+ end
526
+ end
527
+
528
+ result
529
+ end
530
+
531
+ promise.execute
532
+ end
533
+
534
+ #
535
+ # Updates an existing component's tags. To update other fields use the
536
+ # CreateOrUpdate method.
537
+ #
538
+ # @param resource_group_name [String] The name of the resource group. The name
539
+ # is case insensitive.
540
+ # @param resource_name [String] The name of the Application Insights component
541
+ # resource.
542
+ # @param component_tags [TagsResource] Updated tag information to set into the
543
+ # component instance.
544
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
545
+ # will be added to the HTTP request.
546
+ #
547
+ # @return [ApplicationInsightsComponent] operation results.
548
+ #
549
+ def update_tags(resource_group_name, resource_name, component_tags, custom_headers:nil)
550
+ response = update_tags_async(resource_group_name, resource_name, component_tags, custom_headers:custom_headers).value!
551
+ response.body unless response.nil?
552
+ end
553
+
554
+ #
555
+ # Updates an existing component's tags. To update other fields use the
556
+ # CreateOrUpdate method.
557
+ #
558
+ # @param resource_group_name [String] The name of the resource group. The name
559
+ # is case insensitive.
560
+ # @param resource_name [String] The name of the Application Insights component
561
+ # resource.
562
+ # @param component_tags [TagsResource] Updated tag information to set into the
563
+ # component instance.
564
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
565
+ # will be added to the HTTP request.
566
+ #
567
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
568
+ #
569
+ def update_tags_with_http_info(resource_group_name, resource_name, component_tags, custom_headers:nil)
570
+ update_tags_async(resource_group_name, resource_name, component_tags, custom_headers:custom_headers).value!
571
+ end
572
+
573
+ #
574
+ # Updates an existing component's tags. To update other fields use the
575
+ # CreateOrUpdate method.
576
+ #
577
+ # @param resource_group_name [String] The name of the resource group. The name
578
+ # is case insensitive.
579
+ # @param resource_name [String] The name of the Application Insights component
580
+ # resource.
581
+ # @param component_tags [TagsResource] Updated tag information to set into the
582
+ # component instance.
583
+ # @param [Hash{String => String}] A hash of custom headers that will be added
584
+ # to the HTTP request.
585
+ #
586
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
587
+ #
588
+ def update_tags_async(resource_group_name, resource_name, component_tags, custom_headers:nil)
589
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
590
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
591
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
592
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
593
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
594
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
595
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
596
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
597
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
598
+ fail ArgumentError, 'component_tags is nil' if component_tags.nil?
599
+
600
+
601
+ request_headers = {}
602
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
603
+
604
+ # Set Headers
605
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
606
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
607
+
608
+ # Serialize Request
609
+ request_mapper = Azure::Monitor::Mgmt::V2015_05_01::Models::TagsResource.mapper()
610
+ request_content = @client.serialize(request_mapper, component_tags)
611
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
612
+
613
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'
614
+
615
+ request_url = @base_url || @client.base_url
616
+
617
+ options = {
618
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
619
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id,'resourceName' => resource_name},
620
+ query_params: {'api-version' => @client.api_version},
621
+ body: request_content,
622
+ headers: request_headers.merge(custom_headers || {}),
623
+ base_url: request_url
624
+ }
625
+ promise = @client.make_request_async(:patch, path_template, options)
626
+
627
+ promise = promise.then do |result|
628
+ http_response = result.response
629
+ status_code = http_response.status
630
+ response_content = http_response.body
631
+ unless status_code == 200
632
+ error_model = JSON.load(response_content)
633
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
634
+ end
635
+
636
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
637
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
638
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
639
+ # Deserialize Response
640
+ if status_code == 200
641
+ begin
642
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
643
+ result_mapper = Azure::Monitor::Mgmt::V2015_05_01::Models::ApplicationInsightsComponent.mapper()
644
+ result.body = @client.deserialize(result_mapper, parsed_response)
645
+ rescue Exception => e
646
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
647
+ end
648
+ end
649
+
650
+ result
651
+ end
652
+
653
+ promise.execute
654
+ end
655
+
656
+ #
657
+ # Purges data in an Application Insights component by a set of user-defined
658
+ # filters.
659
+ #
660
+ # In order to manage system resources, purge requests are throttled at 50
661
+ # requests per hour. You should batch the execution of purge requests by
662
+ # sending a single command whose predicate includes all user identities that
663
+ # require purging. Use the in operator to specify multiple identities. You
664
+ # should run the query prior to using for a purge request to verify that the
665
+ # results are expected.
666
+ #
667
+ # @param resource_group_name [String] The name of the resource group. The name
668
+ # is case insensitive.
669
+ # @param resource_name [String] The name of the Application Insights component
670
+ # resource.
671
+ # @param body [ComponentPurgeBody] Describes the body of a request to purge
672
+ # data in a single table of an Application Insights component
673
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
674
+ # will be added to the HTTP request.
675
+ #
676
+ # @return [ComponentPurgeResponse] operation results.
677
+ #
678
+ def purge(resource_group_name, resource_name, body, custom_headers:nil)
679
+ response = purge_async(resource_group_name, resource_name, body, custom_headers:custom_headers).value!
680
+ response.body unless response.nil?
681
+ end
682
+
683
+ #
684
+ # Purges data in an Application Insights component by a set of user-defined
685
+ # filters.
686
+ #
687
+ # In order to manage system resources, purge requests are throttled at 50
688
+ # requests per hour. You should batch the execution of purge requests by
689
+ # sending a single command whose predicate includes all user identities that
690
+ # require purging. Use the in operator to specify multiple identities. You
691
+ # should run the query prior to using for a purge request to verify that the
692
+ # results are expected.
693
+ #
694
+ # @param resource_group_name [String] The name of the resource group. The name
695
+ # is case insensitive.
696
+ # @param resource_name [String] The name of the Application Insights component
697
+ # resource.
698
+ # @param body [ComponentPurgeBody] Describes the body of a request to purge
699
+ # data in a single table of an Application Insights component
700
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
701
+ # will be added to the HTTP request.
702
+ #
703
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
704
+ #
705
+ def purge_with_http_info(resource_group_name, resource_name, body, custom_headers:nil)
706
+ purge_async(resource_group_name, resource_name, body, custom_headers:custom_headers).value!
707
+ end
708
+
709
+ #
710
+ # Purges data in an Application Insights component by a set of user-defined
711
+ # filters.
712
+ #
713
+ # In order to manage system resources, purge requests are throttled at 50
714
+ # requests per hour. You should batch the execution of purge requests by
715
+ # sending a single command whose predicate includes all user identities that
716
+ # require purging. Use the in operator to specify multiple identities. You
717
+ # should run the query prior to using for a purge request to verify that the
718
+ # results are expected.
719
+ #
720
+ # @param resource_group_name [String] The name of the resource group. The name
721
+ # is case insensitive.
722
+ # @param resource_name [String] The name of the Application Insights component
723
+ # resource.
724
+ # @param body [ComponentPurgeBody] Describes the body of a request to purge
725
+ # data in a single table of an Application Insights component
726
+ # @param [Hash{String => String}] A hash of custom headers that will be added
727
+ # to the HTTP request.
728
+ #
729
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
730
+ #
731
+ def purge_async(resource_group_name, resource_name, body, custom_headers:nil)
732
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
733
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
734
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
735
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
736
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
737
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
738
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
739
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
740
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
741
+ fail ArgumentError, 'body is nil' if body.nil?
742
+
743
+
744
+ request_headers = {}
745
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
746
+
747
+ # Set Headers
748
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
749
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
750
+
751
+ # Serialize Request
752
+ request_mapper = Azure::Monitor::Mgmt::V2015_05_01::Models::ComponentPurgeBody.mapper()
753
+ request_content = @client.serialize(request_mapper, body)
754
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
755
+
756
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/purge'
757
+
758
+ request_url = @base_url || @client.base_url
759
+
760
+ options = {
761
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
762
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id,'resourceName' => resource_name},
763
+ query_params: {'api-version' => @client.api_version},
764
+ body: request_content,
765
+ headers: request_headers.merge(custom_headers || {}),
766
+ base_url: request_url
767
+ }
768
+ promise = @client.make_request_async(:post, path_template, options)
769
+
770
+ promise = promise.then do |result|
771
+ http_response = result.response
772
+ status_code = http_response.status
773
+ response_content = http_response.body
774
+ unless status_code == 202
775
+ error_model = JSON.load(response_content)
776
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
777
+ end
778
+
779
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
780
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
781
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
782
+ # Deserialize Response
783
+ if status_code == 202
784
+ begin
785
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
786
+ result_mapper = Azure::Monitor::Mgmt::V2015_05_01::Models::ComponentPurgeResponse.mapper()
787
+ result.body = @client.deserialize(result_mapper, parsed_response)
788
+ rescue Exception => e
789
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
790
+ end
791
+ end
792
+
793
+ result
794
+ end
795
+
796
+ promise.execute
797
+ end
798
+
799
+ #
800
+ # Get status for an ongoing purge operation.
801
+ #
802
+ # @param resource_group_name [String] The name of the resource group. The name
803
+ # is case insensitive.
804
+ # @param resource_name [String] The name of the Application Insights component
805
+ # resource.
806
+ # @param purge_id [String] In a purge status request, this is the Id of the
807
+ # operation the status of which is returned.
808
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
809
+ # will be added to the HTTP request.
810
+ #
811
+ # @return [ComponentPurgeStatusResponse] operation results.
812
+ #
813
+ def get_purge_status(resource_group_name, resource_name, purge_id, custom_headers:nil)
814
+ response = get_purge_status_async(resource_group_name, resource_name, purge_id, custom_headers:custom_headers).value!
815
+ response.body unless response.nil?
816
+ end
817
+
818
+ #
819
+ # Get status for an ongoing purge operation.
820
+ #
821
+ # @param resource_group_name [String] The name of the resource group. The name
822
+ # is case insensitive.
823
+ # @param resource_name [String] The name of the Application Insights component
824
+ # resource.
825
+ # @param purge_id [String] In a purge status request, this is the Id of the
826
+ # operation the status of which is returned.
827
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
828
+ # will be added to the HTTP request.
829
+ #
830
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
831
+ #
832
+ def get_purge_status_with_http_info(resource_group_name, resource_name, purge_id, custom_headers:nil)
833
+ get_purge_status_async(resource_group_name, resource_name, purge_id, custom_headers:custom_headers).value!
834
+ end
835
+
836
+ #
837
+ # Get status for an ongoing purge operation.
838
+ #
839
+ # @param resource_group_name [String] The name of the resource group. The name
840
+ # is case insensitive.
841
+ # @param resource_name [String] The name of the Application Insights component
842
+ # resource.
843
+ # @param purge_id [String] In a purge status request, this is the Id of the
844
+ # operation the status of which is returned.
845
+ # @param [Hash{String => String}] A hash of custom headers that will be added
846
+ # to the HTTP request.
847
+ #
848
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
849
+ #
850
+ def get_purge_status_async(resource_group_name, resource_name, purge_id, custom_headers:nil)
851
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
852
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
853
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
854
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
855
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
856
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
857
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
858
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
859
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
860
+ fail ArgumentError, 'purge_id is nil' if purge_id.nil?
861
+
862
+
863
+ request_headers = {}
864
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
865
+
866
+ # Set Headers
867
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
868
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
869
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/operations/{purgeId}'
870
+
871
+ request_url = @base_url || @client.base_url
872
+
873
+ options = {
874
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
875
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id,'resourceName' => resource_name,'purgeId' => purge_id},
876
+ query_params: {'api-version' => @client.api_version},
877
+ headers: request_headers.merge(custom_headers || {}),
878
+ base_url: request_url
879
+ }
880
+ promise = @client.make_request_async(:get, path_template, options)
881
+
882
+ promise = promise.then do |result|
883
+ http_response = result.response
884
+ status_code = http_response.status
885
+ response_content = http_response.body
886
+ unless status_code == 200
887
+ error_model = JSON.load(response_content)
888
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
889
+ end
890
+
891
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
892
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
893
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
894
+ # Deserialize Response
895
+ if status_code == 200
896
+ begin
897
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
898
+ result_mapper = Azure::Monitor::Mgmt::V2015_05_01::Models::ComponentPurgeStatusResponse.mapper()
899
+ result.body = @client.deserialize(result_mapper, parsed_response)
900
+ rescue Exception => e
901
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
902
+ end
903
+ end
904
+
905
+ result
906
+ end
907
+
908
+ promise.execute
909
+ end
910
+
911
+ #
912
+ # Gets a list of all Application Insights components within a subscription.
913
+ #
914
+ # @param next_page_link [String] The NextLink from the previous successful call
915
+ # to List operation.
916
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
917
+ # will be added to the HTTP request.
918
+ #
919
+ # @return [ApplicationInsightsComponentListResult] operation results.
920
+ #
921
+ def list_next(next_page_link, custom_headers:nil)
922
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
923
+ response.body unless response.nil?
924
+ end
925
+
926
+ #
927
+ # Gets a list of all Application Insights components within a subscription.
928
+ #
929
+ # @param next_page_link [String] The NextLink from the previous successful call
930
+ # to List operation.
931
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
932
+ # will be added to the HTTP request.
933
+ #
934
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
935
+ #
936
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
937
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
938
+ end
939
+
940
+ #
941
+ # Gets a list of all Application Insights components within a subscription.
942
+ #
943
+ # @param next_page_link [String] The NextLink from the previous successful call
944
+ # to List operation.
945
+ # @param [Hash{String => String}] A hash of custom headers that will be added
946
+ # to the HTTP request.
947
+ #
948
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
949
+ #
950
+ def list_next_async(next_page_link, custom_headers:nil)
951
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
952
+
953
+
954
+ request_headers = {}
955
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
956
+
957
+ # Set Headers
958
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
959
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
960
+ path_template = '{nextLink}'
961
+
962
+ request_url = @base_url || @client.base_url
963
+
964
+ options = {
965
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
966
+ skip_encoding_path_params: {'nextLink' => next_page_link},
967
+ headers: request_headers.merge(custom_headers || {}),
968
+ base_url: request_url
969
+ }
970
+ promise = @client.make_request_async(:get, path_template, options)
971
+
972
+ promise = promise.then do |result|
973
+ http_response = result.response
974
+ status_code = http_response.status
975
+ response_content = http_response.body
976
+ unless status_code == 200
977
+ error_model = JSON.load(response_content)
978
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
979
+ end
980
+
981
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
982
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
983
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
984
+ # Deserialize Response
985
+ if status_code == 200
986
+ begin
987
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
988
+ result_mapper = Azure::Monitor::Mgmt::V2015_05_01::Models::ApplicationInsightsComponentListResult.mapper()
989
+ result.body = @client.deserialize(result_mapper, parsed_response)
990
+ rescue Exception => e
991
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
992
+ end
993
+ end
994
+
995
+ result
996
+ end
997
+
998
+ promise.execute
999
+ end
1000
+
1001
+ #
1002
+ # Gets a list of Application Insights components within a resource group.
1003
+ #
1004
+ # @param next_page_link [String] The NextLink from the previous successful call
1005
+ # to List operation.
1006
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1007
+ # will be added to the HTTP request.
1008
+ #
1009
+ # @return [ApplicationInsightsComponentListResult] operation results.
1010
+ #
1011
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
1012
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1013
+ response.body unless response.nil?
1014
+ end
1015
+
1016
+ #
1017
+ # Gets a list of Application Insights components within a resource group.
1018
+ #
1019
+ # @param next_page_link [String] The NextLink from the previous successful call
1020
+ # to List operation.
1021
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1022
+ # will be added to the HTTP request.
1023
+ #
1024
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1025
+ #
1026
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
1027
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
1028
+ end
1029
+
1030
+ #
1031
+ # Gets a list of Application Insights components within a resource group.
1032
+ #
1033
+ # @param next_page_link [String] The NextLink from the previous successful call
1034
+ # to List operation.
1035
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1036
+ # to the HTTP request.
1037
+ #
1038
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1039
+ #
1040
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
1041
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1042
+
1043
+
1044
+ request_headers = {}
1045
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1046
+
1047
+ # Set Headers
1048
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1049
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1050
+ path_template = '{nextLink}'
1051
+
1052
+ request_url = @base_url || @client.base_url
1053
+
1054
+ options = {
1055
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1056
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1057
+ headers: request_headers.merge(custom_headers || {}),
1058
+ base_url: request_url
1059
+ }
1060
+ promise = @client.make_request_async(:get, path_template, options)
1061
+
1062
+ promise = promise.then do |result|
1063
+ http_response = result.response
1064
+ status_code = http_response.status
1065
+ response_content = http_response.body
1066
+ unless status_code == 200
1067
+ error_model = JSON.load(response_content)
1068
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1069
+ end
1070
+
1071
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1072
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1073
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1074
+ # Deserialize Response
1075
+ if status_code == 200
1076
+ begin
1077
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1078
+ result_mapper = Azure::Monitor::Mgmt::V2015_05_01::Models::ApplicationInsightsComponentListResult.mapper()
1079
+ result.body = @client.deserialize(result_mapper, parsed_response)
1080
+ rescue Exception => e
1081
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1082
+ end
1083
+ end
1084
+
1085
+ result
1086
+ end
1087
+
1088
+ promise.execute
1089
+ end
1090
+
1091
+ #
1092
+ # Gets a list of all Application Insights components within a subscription.
1093
+ #
1094
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1095
+ # will be added to the HTTP request.
1096
+ #
1097
+ # @return [ApplicationInsightsComponentListResult] which provide lazy access to
1098
+ # pages of the response.
1099
+ #
1100
+ def list_as_lazy(custom_headers:nil)
1101
+ response = list_async(custom_headers:custom_headers).value!
1102
+ unless response.nil?
1103
+ page = response.body
1104
+ page.next_method = Proc.new do |next_page_link|
1105
+ list_next_async(next_page_link, custom_headers:custom_headers)
1106
+ end
1107
+ page
1108
+ end
1109
+ end
1110
+
1111
+ #
1112
+ # Gets a list of Application Insights components within a resource group.
1113
+ #
1114
+ # @param resource_group_name [String] The name of the resource group. The name
1115
+ # is case insensitive.
1116
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1117
+ # will be added to the HTTP request.
1118
+ #
1119
+ # @return [ApplicationInsightsComponentListResult] which provide lazy access to
1120
+ # pages of the response.
1121
+ #
1122
+ def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil)
1123
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
1124
+ unless response.nil?
1125
+ page = response.body
1126
+ page.next_method = Proc.new do |next_page_link|
1127
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1128
+ end
1129
+ page
1130
+ end
1131
+ end
1132
+
1133
+ end
1134
+ end