azure_mgmt_security 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 (249) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-06-01-preview/generated/azure_mgmt_security.rb +109 -0
  3. data/lib/2015-06-01-preview/generated/azure_mgmt_security/adaptive_application_controls.rb +313 -0
  4. data/lib/2015-06-01-preview/generated/azure_mgmt_security/adaptive_network_hardenings.rb +539 -0
  5. data/lib/2015-06-01-preview/generated/azure_mgmt_security/alerts.rb +1280 -0
  6. data/lib/2015-06-01-preview/generated/azure_mgmt_security/allowed_connections.rb +535 -0
  7. data/lib/2015-06-01-preview/generated/azure_mgmt_security/discovered_security_solutions.rb +532 -0
  8. data/lib/2015-06-01-preview/generated/azure_mgmt_security/external_security_solutions.rb +525 -0
  9. data/lib/2015-06-01-preview/generated/azure_mgmt_security/jit_network_access_policies.rb +1295 -0
  10. data/lib/2015-06-01-preview/generated/azure_mgmt_security/locations.rb +330 -0
  11. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/aad_connectivity_state.rb +17 -0
  12. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/aad_connectivity_state1.rb +48 -0
  13. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/aad_external_security_solution.rb +99 -0
  14. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/aad_solution_properties.rb +83 -0
  15. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/adaptive_network_hardening.rb +116 -0
  16. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/adaptive_network_hardening_enforce_request.rb +77 -0
  17. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/adaptive_network_hardenings_list.rb +99 -0
  18. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/alert.rb +375 -0
  19. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/alert_confidence_reason.rb +59 -0
  20. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/alert_entity.rb +66 -0
  21. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/alert_list.rb +99 -0
  22. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/allowed_connections_list.rb +100 -0
  23. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/allowed_connections_resource.rb +118 -0
  24. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/app_whitelisting_group.rb +191 -0
  25. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/app_whitelisting_groups.rb +56 -0
  26. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/app_whitelisting_issue_summary.rb +61 -0
  27. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/app_whitelisting_put_group_data.rb +86 -0
  28. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/asc_location.rb +73 -0
  29. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/asc_location_list.rb +100 -0
  30. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/ata_external_security_solution.rb +98 -0
  31. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/ata_solution_properties.rb +87 -0
  32. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/cef_external_security_solution.rb +98 -0
  33. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/cef_solution_properties.rb +109 -0
  34. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/connectable_resource.rb +91 -0
  35. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/connected_resource.rb +71 -0
  36. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/connected_workspace.rb +47 -0
  37. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/connection_type.rb +16 -0
  38. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/direction.rb +16 -0
  39. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/discovered_security_solution.rb +129 -0
  40. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/discovered_security_solution_list.rb +99 -0
  41. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/effective_network_security_groups.rb +66 -0
  42. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution.rb +98 -0
  43. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution_kind.rb +17 -0
  44. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution_kind1.rb +47 -0
  45. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution_list.rb +101 -0
  46. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution_properties.rb +88 -0
  47. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policies_list.rb +99 -0
  48. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy.rb +149 -0
  49. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_port.rb +70 -0
  50. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_request.rb +57 -0
  51. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_virtual_machine.rb +70 -0
  52. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy_virtual_machine.rb +81 -0
  53. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_port_rule.rb +103 -0
  54. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_request.rb +78 -0
  55. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_request_port.rb +128 -0
  56. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_request_virtual_machine.rb +69 -0
  57. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/kind.rb +46 -0
  58. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/location.rb +47 -0
  59. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/operation.rb +71 -0
  60. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/operation_display.rb +84 -0
  61. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/operation_list.rb +99 -0
  62. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/path_recommendation.rb +156 -0
  63. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/protocol.rb +17 -0
  64. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/publisher_info.rb +84 -0
  65. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/reported_severity.rb +18 -0
  66. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/resource.rb +80 -0
  67. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/rule.rb +111 -0
  68. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/security_family.rb +18 -0
  69. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/security_task.rb +123 -0
  70. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/security_task_list.rb +100 -0
  71. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/security_task_parameters.rb +67 -0
  72. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/status.rb +16 -0
  73. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/status_reason.rb +17 -0
  74. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/topology_list.rb +100 -0
  75. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/topology_resource.rb +118 -0
  76. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/topology_single_resource.rb +154 -0
  77. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/topology_single_resource_child.rb +49 -0
  78. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/topology_single_resource_parent.rb +49 -0
  79. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/transport_protocol.rb +16 -0
  80. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/user_recommendation.rb +58 -0
  81. data/lib/2015-06-01-preview/generated/azure_mgmt_security/models/vm_recommendation.rb +69 -0
  82. data/lib/2015-06-01-preview/generated/azure_mgmt_security/module_definition.rb +9 -0
  83. data/lib/2015-06-01-preview/generated/azure_mgmt_security/operations.rb +218 -0
  84. data/lib/2015-06-01-preview/generated/azure_mgmt_security/security_center.rb +175 -0
  85. data/lib/2015-06-01-preview/generated/azure_mgmt_security/tasks.rb +1055 -0
  86. data/lib/2015-06-01-preview/generated/azure_mgmt_security/topology.rb +530 -0
  87. data/lib/2017-08-01-preview/generated/azure_mgmt_security.rb +72 -13
  88. data/lib/2017-08-01-preview/generated/azure_mgmt_security/advanced_threat_protection.rb +222 -0
  89. data/lib/2017-08-01-preview/generated/azure_mgmt_security/auto_provisioning_settings.rb +12 -4
  90. data/lib/2017-08-01-preview/generated/azure_mgmt_security/compliances.rb +9 -3
  91. data/lib/2017-08-01-preview/generated/azure_mgmt_security/device_security_groups.rb +523 -0
  92. data/lib/2017-08-01-preview/generated/azure_mgmt_security/information_protection_policies.rb +447 -0
  93. data/lib/2017-08-01-preview/generated/azure_mgmt_security/io_tsecurity_solutions.rb +230 -0
  94. data/lib/2017-08-01-preview/generated/azure_mgmt_security/io_tsecurity_solutions_analytics.rb +227 -0
  95. data/lib/2017-08-01-preview/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_aggregated_alert.rb +224 -0
  96. data/lib/2017-08-01-preview/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_aggregated_alerts.rb +243 -0
  97. data/lib/2017-08-01-preview/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_recommendation.rb +133 -0
  98. data/lib/2017-08-01-preview/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_recommendations.rb +243 -0
  99. data/lib/2017-08-01-preview/generated/azure_mgmt_security/io_tsecurity_solutions_resource_group.rb +242 -0
  100. data/lib/2017-08-01-preview/generated/azure_mgmt_security/iot_security_solution.rb +459 -0
  101. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/advanced_threat_protection_setting.rb +74 -0
  102. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/allowlist_custom_alert_rule.rb +99 -0
  103. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/asc_location.rb +73 -0
  104. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/custom_alert_rule.rb +81 -0
  105. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/data_export_setting.rb +81 -0
  106. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/data_source.rb +15 -0
  107. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/denylist_custom_alert_rule.rb +99 -0
  108. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/device_security_group.rb +146 -0
  109. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/device_security_group_list.rb +100 -0
  110. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/export_data.rb +15 -0
  111. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/information_protection_keyword.rb +80 -0
  112. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/information_protection_policy.rb +116 -0
  113. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/information_protection_policy_list.rb +100 -0
  114. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/information_type.rb +114 -0
  115. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_aggregated_alert.rb +238 -0
  116. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_aggregated_alert_list.rb +100 -0
  117. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_aggregated_recommendation.rb +212 -0
  118. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_aggregated_recommendation_list.rb +101 -0
  119. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_alerted_device.rb +60 -0
  120. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_alerted_devices_list.rb +68 -0
  121. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_device_alert.rb +73 -0
  122. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_device_alerts_list.rb +67 -0
  123. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_device_recommendation.rb +73 -0
  124. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_device_recommendations_list.rb +68 -0
  125. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_solution_analytics_model.rb +149 -0
  126. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_solution_analytics_model_list.rb +68 -0
  127. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.rb +61 -0
  128. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_solution_model.rb +248 -0
  129. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tsecurity_solutions_list.rb +99 -0
  130. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/io_tseverity_metrics.rb +68 -0
  131. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/list_custom_alert_rule.rb +82 -0
  132. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/recommendation_config_status.rb +16 -0
  133. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/recommendation_configuration_properties.rb +79 -0
  134. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/recommendation_type.rb +30 -0
  135. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/reported_severity.rb +18 -0
  136. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/security_contact.rb +1 -1
  137. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/security_solution_status.rb +16 -0
  138. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/sensitivity_label.rb +68 -0
  139. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/setting.rb +70 -0
  140. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/setting_kind.rb +16 -0
  141. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/setting_resource.rb +75 -0
  142. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/settings_list.rb +99 -0
  143. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/tags_resource.rb +55 -0
  144. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/threshold_custom_alert_rule.rb +92 -0
  145. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/time_window_custom_alert_rule.rb +115 -0
  146. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/update_iot_security_solution_data.rb +84 -0
  147. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/user_defined_resources_properties.rb +68 -0
  148. data/lib/2017-08-01-preview/generated/azure_mgmt_security/models/value_type.rb +16 -0
  149. data/lib/2017-08-01-preview/generated/azure_mgmt_security/pricings.rb +23 -7
  150. data/lib/2017-08-01-preview/generated/azure_mgmt_security/security_center.rb +200 -0
  151. data/lib/2017-08-01-preview/generated/azure_mgmt_security/security_contacts.rb +18 -6
  152. data/lib/2017-08-01-preview/generated/azure_mgmt_security/settings.rb +420 -0
  153. data/lib/2017-08-01-preview/generated/azure_mgmt_security/workspace_settings.rb +38 -16
  154. data/lib/2017-08-01/generated/azure_mgmt_security.rb +33 -0
  155. data/lib/2017-08-01/generated/azure_mgmt_security/compliance_results.rb +329 -0
  156. data/lib/2017-08-01/generated/azure_mgmt_security/models/asc_location.rb +73 -0
  157. data/lib/2017-08-01/generated/azure_mgmt_security/models/compliance_result.rb +76 -0
  158. data/lib/2017-08-01/generated/azure_mgmt_security/models/compliance_result_list.rb +99 -0
  159. data/lib/2017-08-01/generated/azure_mgmt_security/models/resource.rb +80 -0
  160. data/lib/2017-08-01/generated/azure_mgmt_security/models/resource_status.rb +18 -0
  161. data/lib/2017-08-01/generated/azure_mgmt_security/module_definition.rb +9 -0
  162. data/lib/2017-08-01/generated/azure_mgmt_security/security_center.rb +128 -0
  163. data/lib/2018-06-01/generated/azure_mgmt_security.rb +33 -0
  164. data/lib/2018-06-01/generated/azure_mgmt_security/models/asc_location.rb +73 -0
  165. data/lib/2018-06-01/generated/azure_mgmt_security/models/pricing.rb +90 -0
  166. data/lib/2018-06-01/generated/azure_mgmt_security/models/pricing_list.rb +55 -0
  167. data/lib/2018-06-01/generated/azure_mgmt_security/models/pricing_tier.rb +16 -0
  168. data/lib/2018-06-01/generated/azure_mgmt_security/models/resource.rb +80 -0
  169. data/lib/2018-06-01/generated/azure_mgmt_security/module_definition.rb +9 -0
  170. data/lib/2018-06-01/generated/azure_mgmt_security/pricings.rb +332 -0
  171. data/lib/{2017-08-01-preview/generated/azure_mgmt_security/security_management_client.rb → 2018-06-01/generated/azure_mgmt_security/security_center.rb} +5 -21
  172. data/lib/2019-01-01-preview/generated/azure_mgmt_security.rb +42 -0
  173. data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/asc_location.rb +73 -0
  174. data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/regulatory_compliance_assessment.rb +166 -0
  175. data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/regulatory_compliance_assessment_list.rb +99 -0
  176. data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/regulatory_compliance_control.rb +126 -0
  177. data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/regulatory_compliance_control_list.rb +100 -0
  178. data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/regulatory_compliance_standard.rb +127 -0
  179. data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/regulatory_compliance_standard_list.rb +99 -0
  180. data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/resource.rb +80 -0
  181. data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/server_vulnerability_assessment.rb +76 -0
  182. data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/server_vulnerability_assessments_list.rb +55 -0
  183. data/lib/2019-01-01-preview/generated/azure_mgmt_security/models/state.rb +18 -0
  184. data/lib/2019-01-01-preview/generated/azure_mgmt_security/module_definition.rb +9 -0
  185. data/lib/2019-01-01-preview/generated/azure_mgmt_security/regulatory_compliance_assessments.rb +359 -0
  186. data/lib/2019-01-01-preview/generated/azure_mgmt_security/regulatory_compliance_controls.rb +343 -0
  187. data/lib/2019-01-01-preview/generated/azure_mgmt_security/regulatory_compliance_standards.rb +320 -0
  188. data/lib/2019-01-01-preview/generated/azure_mgmt_security/security_center.rb +145 -0
  189. data/lib/2019-01-01-preview/generated/azure_mgmt_security/server_vulnerability_assessment_operations.rb +462 -0
  190. data/lib/2019-01-01/generated/azure_mgmt_security.rb +41 -0
  191. data/lib/2019-01-01/generated/azure_mgmt_security/alerts.rb +1280 -0
  192. data/lib/2019-01-01/generated/azure_mgmt_security/models/alert.rb +375 -0
  193. data/lib/2019-01-01/generated/azure_mgmt_security/models/alert_confidence_reason.rb +59 -0
  194. data/lib/2019-01-01/generated/azure_mgmt_security/models/alert_entity.rb +66 -0
  195. data/lib/2019-01-01/generated/azure_mgmt_security/models/alert_list.rb +99 -0
  196. data/lib/2019-01-01/generated/azure_mgmt_security/models/asc_location.rb +73 -0
  197. data/lib/2019-01-01/generated/azure_mgmt_security/models/data_export_setting.rb +81 -0
  198. data/lib/2019-01-01/generated/azure_mgmt_security/models/reported_severity.rb +18 -0
  199. data/lib/2019-01-01/generated/azure_mgmt_security/models/resource.rb +80 -0
  200. data/lib/2019-01-01/generated/azure_mgmt_security/models/setting.rb +70 -0
  201. data/lib/2019-01-01/generated/azure_mgmt_security/models/setting_kind.rb +16 -0
  202. data/lib/2019-01-01/generated/azure_mgmt_security/models/setting_resource.rb +75 -0
  203. data/lib/2019-01-01/generated/azure_mgmt_security/models/settings_list.rb +99 -0
  204. data/lib/2019-01-01/generated/azure_mgmt_security/module_definition.rb +9 -0
  205. data/lib/2019-01-01/generated/azure_mgmt_security/security_center.rb +139 -0
  206. data/lib/2019-01-01/generated/azure_mgmt_security/settings.rb +420 -0
  207. data/lib/2019-08-01/generated/azure_mgmt_security.rb +63 -0
  208. data/lib/2019-08-01/generated/azure_mgmt_security/io_tsecurity_solutions.rb +230 -0
  209. data/lib/2019-08-01/generated/azure_mgmt_security/io_tsecurity_solutions_analytics.rb +227 -0
  210. data/lib/2019-08-01/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_aggregated_alert.rb +224 -0
  211. data/lib/2019-08-01/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_aggregated_alerts.rb +243 -0
  212. data/lib/2019-08-01/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_recommendation.rb +133 -0
  213. data/lib/2019-08-01/generated/azure_mgmt_security/io_tsecurity_solutions_analytics_recommendations.rb +243 -0
  214. data/lib/2019-08-01/generated/azure_mgmt_security/io_tsecurity_solutions_resource_group.rb +242 -0
  215. data/lib/2019-08-01/generated/azure_mgmt_security/iot_security_solution.rb +459 -0
  216. data/lib/2019-08-01/generated/azure_mgmt_security/models/asc_location.rb +73 -0
  217. data/lib/2019-08-01/generated/azure_mgmt_security/models/data_source.rb +15 -0
  218. data/lib/2019-08-01/generated/azure_mgmt_security/models/export_data.rb +15 -0
  219. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_aggregated_alert.rb +238 -0
  220. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_aggregated_alert_list.rb +100 -0
  221. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_aggregated_recommendation.rb +212 -0
  222. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_aggregated_recommendation_list.rb +101 -0
  223. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_alerted_device.rb +60 -0
  224. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_alerted_devices_list.rb +56 -0
  225. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_device_alert.rb +73 -0
  226. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_device_alerts_list.rb +67 -0
  227. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_device_recommendation.rb +73 -0
  228. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_device_recommendations_list.rb +56 -0
  229. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_solution_analytics_model.rb +149 -0
  230. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_solution_analytics_model_list.rb +68 -0
  231. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_solution_analytics_model_properties_devices_metrics_item.rb +61 -0
  232. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_solution_model.rb +248 -0
  233. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tsecurity_solutions_list.rb +99 -0
  234. data/lib/2019-08-01/generated/azure_mgmt_security/models/io_tseverity_metrics.rb +68 -0
  235. data/lib/2019-08-01/generated/azure_mgmt_security/models/recommendation_config_status.rb +16 -0
  236. data/lib/2019-08-01/generated/azure_mgmt_security/models/recommendation_configuration_properties.rb +79 -0
  237. data/lib/2019-08-01/generated/azure_mgmt_security/models/recommendation_type.rb +30 -0
  238. data/lib/2019-08-01/generated/azure_mgmt_security/models/reported_severity.rb +18 -0
  239. data/lib/2019-08-01/generated/azure_mgmt_security/models/resource.rb +80 -0
  240. data/lib/2019-08-01/generated/azure_mgmt_security/models/security_solution_status.rb +16 -0
  241. data/lib/2019-08-01/generated/azure_mgmt_security/models/tags_resource.rb +55 -0
  242. data/lib/2019-08-01/generated/azure_mgmt_security/models/update_iot_security_solution_data.rb +84 -0
  243. data/lib/2019-08-01/generated/azure_mgmt_security/models/user_defined_resources_properties.rb +68 -0
  244. data/lib/2019-08-01/generated/azure_mgmt_security/module_definition.rb +9 -0
  245. data/lib/2019-08-01/generated/azure_mgmt_security/security_center.rb +164 -0
  246. data/lib/azure_mgmt_security.rb +6 -0
  247. data/lib/profiles/latest/modules/security_profile_module.rb +652 -40
  248. data/lib/version.rb +1 -1
  249. metadata +242 -6
@@ -0,0 +1,1280 @@
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::Security::Mgmt::V2015_06_01_preview
7
+ #
8
+ # API spec for Microsoft.Security (Azure Security Center) resource provider
9
+ #
10
+ class Alerts
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Alerts class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [SecurityCenter] reference to the SecurityCenter
22
+ attr_reader :client
23
+
24
+ #
25
+ # List all the alerts that are associated with the subscription
26
+ #
27
+ # @param filter [String] OData filter. Optional.
28
+ # @param select [String] OData select. Optional.
29
+ # @param expand [String] OData expand. Optional.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [Array<Alert>] operation results.
34
+ #
35
+ def list(filter:nil, select:nil, expand:nil, custom_headers:nil)
36
+ first_page = list_as_lazy(filter:filter, select:select, expand:expand, custom_headers:custom_headers)
37
+ first_page.get_all_items
38
+ end
39
+
40
+ #
41
+ # List all the alerts that are associated with the subscription
42
+ #
43
+ # @param filter [String] OData filter. Optional.
44
+ # @param select [String] OData select. Optional.
45
+ # @param expand [String] OData expand. Optional.
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def list_with_http_info(filter:nil, select:nil, expand:nil, custom_headers:nil)
52
+ list_async(filter:filter, select:select, expand:expand, custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # List all the alerts that are associated with the subscription
57
+ #
58
+ # @param filter [String] OData filter. Optional.
59
+ # @param select [String] OData select. Optional.
60
+ # @param expand [String] OData expand. Optional.
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def list_async(filter:nil, select:nil, expand:nil, custom_headers:nil)
67
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
68
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
69
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil?
70
+
71
+
72
+ request_headers = {}
73
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
74
+
75
+ # Set Headers
76
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
77
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
78
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/alerts'
79
+
80
+ request_url = @base_url || @client.base_url
81
+
82
+ options = {
83
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
84
+ path_params: {'subscriptionId' => @client.subscription_id},
85
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$select' => select,'$expand' => expand},
86
+ headers: request_headers.merge(custom_headers || {}),
87
+ base_url: request_url
88
+ }
89
+ promise = @client.make_request_async(:get, path_template, options)
90
+
91
+ promise = promise.then do |result|
92
+ http_response = result.response
93
+ status_code = http_response.status
94
+ response_content = http_response.body
95
+ unless status_code == 200
96
+ error_model = JSON.load(response_content)
97
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
98
+ end
99
+
100
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
101
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
102
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
103
+ # Deserialize Response
104
+ if status_code == 200
105
+ begin
106
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
107
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper()
108
+ result.body = @client.deserialize(result_mapper, parsed_response)
109
+ rescue Exception => e
110
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
111
+ end
112
+ end
113
+
114
+ result
115
+ end
116
+
117
+ promise.execute
118
+ end
119
+
120
+ #
121
+ # List all the alerts that are associated with the resource group
122
+ #
123
+ # @param resource_group_name [String] The name of the resource group within the
124
+ # user's subscription. The name is case insensitive.
125
+ # @param filter [String] OData filter. Optional.
126
+ # @param select [String] OData select. Optional.
127
+ # @param expand [String] OData expand. Optional.
128
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
129
+ # will be added to the HTTP request.
130
+ #
131
+ # @return [Array<Alert>] operation results.
132
+ #
133
+ def list_by_resource_group(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil)
134
+ first_page = list_by_resource_group_as_lazy(resource_group_name, filter:filter, select:select, expand:expand, custom_headers:custom_headers)
135
+ first_page.get_all_items
136
+ end
137
+
138
+ #
139
+ # List all the alerts that are associated with the resource group
140
+ #
141
+ # @param resource_group_name [String] The name of the resource group within the
142
+ # user's subscription. The name is case insensitive.
143
+ # @param filter [String] OData filter. Optional.
144
+ # @param select [String] OData select. Optional.
145
+ # @param expand [String] OData expand. Optional.
146
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
147
+ # will be added to the HTTP request.
148
+ #
149
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
150
+ #
151
+ def list_by_resource_group_with_http_info(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil)
152
+ list_by_resource_group_async(resource_group_name, filter:filter, select:select, expand:expand, custom_headers:custom_headers).value!
153
+ end
154
+
155
+ #
156
+ # List all the alerts that are associated with the resource group
157
+ #
158
+ # @param resource_group_name [String] The name of the resource group within the
159
+ # user's subscription. The name is case insensitive.
160
+ # @param filter [String] OData filter. Optional.
161
+ # @param select [String] OData select. Optional.
162
+ # @param expand [String] OData expand. Optional.
163
+ # @param [Hash{String => String}] A hash of custom headers that will be added
164
+ # to the HTTP request.
165
+ #
166
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
167
+ #
168
+ def list_by_resource_group_async(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil)
169
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
170
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
171
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil?
172
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
173
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
174
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
175
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
176
+
177
+
178
+ request_headers = {}
179
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
180
+
181
+ # Set Headers
182
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
183
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
184
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/alerts'
185
+
186
+ request_url = @base_url || @client.base_url
187
+
188
+ options = {
189
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
190
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
191
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$select' => select,'$expand' => expand},
192
+ headers: request_headers.merge(custom_headers || {}),
193
+ base_url: request_url
194
+ }
195
+ promise = @client.make_request_async(:get, path_template, options)
196
+
197
+ promise = promise.then do |result|
198
+ http_response = result.response
199
+ status_code = http_response.status
200
+ response_content = http_response.body
201
+ unless status_code == 200
202
+ error_model = JSON.load(response_content)
203
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
204
+ end
205
+
206
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
207
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
208
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
209
+ # Deserialize Response
210
+ if status_code == 200
211
+ begin
212
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
213
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper()
214
+ result.body = @client.deserialize(result_mapper, parsed_response)
215
+ rescue Exception => e
216
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
217
+ end
218
+ end
219
+
220
+ result
221
+ end
222
+
223
+ promise.execute
224
+ end
225
+
226
+ #
227
+ # List all the alerts that are associated with the subscription that are stored
228
+ # in a specific location
229
+ #
230
+ # @param filter [String] OData filter. Optional.
231
+ # @param select [String] OData select. Optional.
232
+ # @param expand [String] OData expand. Optional.
233
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
234
+ # will be added to the HTTP request.
235
+ #
236
+ # @return [Array<Alert>] operation results.
237
+ #
238
+ def list_subscription_level_alerts_by_region(filter:nil, select:nil, expand:nil, custom_headers:nil)
239
+ first_page = list_subscription_level_alerts_by_region_as_lazy(filter:filter, select:select, expand:expand, custom_headers:custom_headers)
240
+ first_page.get_all_items
241
+ end
242
+
243
+ #
244
+ # List all the alerts that are associated with the subscription that are stored
245
+ # in a specific location
246
+ #
247
+ # @param filter [String] OData filter. Optional.
248
+ # @param select [String] OData select. Optional.
249
+ # @param expand [String] OData expand. Optional.
250
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
251
+ # will be added to the HTTP request.
252
+ #
253
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
254
+ #
255
+ def list_subscription_level_alerts_by_region_with_http_info(filter:nil, select:nil, expand:nil, custom_headers:nil)
256
+ list_subscription_level_alerts_by_region_async(filter:filter, select:select, expand:expand, custom_headers:custom_headers).value!
257
+ end
258
+
259
+ #
260
+ # List all the alerts that are associated with the subscription that are stored
261
+ # in a specific location
262
+ #
263
+ # @param filter [String] OData filter. Optional.
264
+ # @param select [String] OData select. Optional.
265
+ # @param expand [String] OData expand. Optional.
266
+ # @param [Hash{String => String}] A hash of custom headers that will be added
267
+ # to the HTTP request.
268
+ #
269
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
270
+ #
271
+ def list_subscription_level_alerts_by_region_async(filter:nil, select:nil, expand:nil, custom_headers:nil)
272
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
273
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
274
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil?
275
+ fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
276
+
277
+
278
+ request_headers = {}
279
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
280
+
281
+ # Set Headers
282
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
283
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
284
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts'
285
+
286
+ request_url = @base_url || @client.base_url
287
+
288
+ options = {
289
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
290
+ path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location},
291
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$select' => select,'$expand' => expand},
292
+ headers: request_headers.merge(custom_headers || {}),
293
+ base_url: request_url
294
+ }
295
+ promise = @client.make_request_async(:get, path_template, options)
296
+
297
+ promise = promise.then do |result|
298
+ http_response = result.response
299
+ status_code = http_response.status
300
+ response_content = http_response.body
301
+ unless status_code == 200
302
+ error_model = JSON.load(response_content)
303
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
304
+ end
305
+
306
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
307
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
308
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
309
+ # Deserialize Response
310
+ if status_code == 200
311
+ begin
312
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
313
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper()
314
+ result.body = @client.deserialize(result_mapper, parsed_response)
315
+ rescue Exception => e
316
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
317
+ end
318
+ end
319
+
320
+ result
321
+ end
322
+
323
+ promise.execute
324
+ end
325
+
326
+ #
327
+ # List all the alerts that are associated with the resource group that are
328
+ # stored in a specific location
329
+ #
330
+ # @param resource_group_name [String] The name of the resource group within the
331
+ # user's subscription. The name is case insensitive.
332
+ # @param filter [String] OData filter. Optional.
333
+ # @param select [String] OData select. Optional.
334
+ # @param expand [String] OData expand. Optional.
335
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
336
+ # will be added to the HTTP request.
337
+ #
338
+ # @return [Array<Alert>] operation results.
339
+ #
340
+ def list_resource_group_level_alerts_by_region(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil)
341
+ first_page = list_resource_group_level_alerts_by_region_as_lazy(resource_group_name, filter:filter, select:select, expand:expand, custom_headers:custom_headers)
342
+ first_page.get_all_items
343
+ end
344
+
345
+ #
346
+ # List all the alerts that are associated with the resource group that are
347
+ # stored in a specific location
348
+ #
349
+ # @param resource_group_name [String] The name of the resource group within the
350
+ # user's subscription. The name is case insensitive.
351
+ # @param filter [String] OData filter. Optional.
352
+ # @param select [String] OData select. Optional.
353
+ # @param expand [String] OData expand. Optional.
354
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
355
+ # will be added to the HTTP request.
356
+ #
357
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
358
+ #
359
+ def list_resource_group_level_alerts_by_region_with_http_info(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil)
360
+ list_resource_group_level_alerts_by_region_async(resource_group_name, filter:filter, select:select, expand:expand, custom_headers:custom_headers).value!
361
+ end
362
+
363
+ #
364
+ # List all the alerts that are associated with the resource group that are
365
+ # stored in a specific location
366
+ #
367
+ # @param resource_group_name [String] The name of the resource group within the
368
+ # user's subscription. The name is case insensitive.
369
+ # @param filter [String] OData filter. Optional.
370
+ # @param select [String] OData select. Optional.
371
+ # @param expand [String] OData expand. Optional.
372
+ # @param [Hash{String => String}] A hash of custom headers that will be added
373
+ # to the HTTP request.
374
+ #
375
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
376
+ #
377
+ def list_resource_group_level_alerts_by_region_async(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil)
378
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
379
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
380
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil?
381
+ fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
382
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
383
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
384
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
385
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
386
+
387
+
388
+ request_headers = {}
389
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
390
+
391
+ # Set Headers
392
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
393
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
394
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts'
395
+
396
+ request_url = @base_url || @client.base_url
397
+
398
+ options = {
399
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
400
+ path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'resourceGroupName' => resource_group_name},
401
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$select' => select,'$expand' => expand},
402
+ headers: request_headers.merge(custom_headers || {}),
403
+ base_url: request_url
404
+ }
405
+ promise = @client.make_request_async(:get, path_template, options)
406
+
407
+ promise = promise.then do |result|
408
+ http_response = result.response
409
+ status_code = http_response.status
410
+ response_content = http_response.body
411
+ unless status_code == 200
412
+ error_model = JSON.load(response_content)
413
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
414
+ end
415
+
416
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
417
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
418
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
419
+ # Deserialize Response
420
+ if status_code == 200
421
+ begin
422
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
423
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper()
424
+ result.body = @client.deserialize(result_mapper, parsed_response)
425
+ rescue Exception => e
426
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
427
+ end
428
+ end
429
+
430
+ result
431
+ end
432
+
433
+ promise.execute
434
+ end
435
+
436
+ #
437
+ # Get an alert that is associated with a subscription
438
+ #
439
+ # @param alert_name [String] Name of the alert object
440
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
441
+ # will be added to the HTTP request.
442
+ #
443
+ # @return [Alert] operation results.
444
+ #
445
+ def get_subscription_level_alert(alert_name, custom_headers:nil)
446
+ response = get_subscription_level_alert_async(alert_name, custom_headers:custom_headers).value!
447
+ response.body unless response.nil?
448
+ end
449
+
450
+ #
451
+ # Get an alert that is associated with a subscription
452
+ #
453
+ # @param alert_name [String] Name of the alert object
454
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
455
+ # will be added to the HTTP request.
456
+ #
457
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
458
+ #
459
+ def get_subscription_level_alert_with_http_info(alert_name, custom_headers:nil)
460
+ get_subscription_level_alert_async(alert_name, custom_headers:custom_headers).value!
461
+ end
462
+
463
+ #
464
+ # Get an alert that is associated with a subscription
465
+ #
466
+ # @param alert_name [String] Name of the alert object
467
+ # @param [Hash{String => String}] A hash of custom headers that will be added
468
+ # to the HTTP request.
469
+ #
470
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
471
+ #
472
+ def get_subscription_level_alert_async(alert_name, custom_headers:nil)
473
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
474
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
475
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil?
476
+ fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
477
+ fail ArgumentError, 'alert_name is nil' if alert_name.nil?
478
+
479
+
480
+ request_headers = {}
481
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
482
+
483
+ # Set Headers
484
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
485
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
486
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}'
487
+
488
+ request_url = @base_url || @client.base_url
489
+
490
+ options = {
491
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
492
+ path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'alertName' => alert_name},
493
+ query_params: {'api-version' => @client.api_version},
494
+ headers: request_headers.merge(custom_headers || {}),
495
+ base_url: request_url
496
+ }
497
+ promise = @client.make_request_async(:get, path_template, options)
498
+
499
+ promise = promise.then do |result|
500
+ http_response = result.response
501
+ status_code = http_response.status
502
+ response_content = http_response.body
503
+ unless status_code == 200
504
+ error_model = JSON.load(response_content)
505
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
506
+ end
507
+
508
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
509
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
510
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
511
+ # Deserialize Response
512
+ if status_code == 200
513
+ begin
514
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
515
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::Alert.mapper()
516
+ result.body = @client.deserialize(result_mapper, parsed_response)
517
+ rescue Exception => e
518
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
519
+ end
520
+ end
521
+
522
+ result
523
+ end
524
+
525
+ promise.execute
526
+ end
527
+
528
+ #
529
+ # Get an alert that is associated a resource group or a resource in a resource
530
+ # group
531
+ #
532
+ # @param alert_name [String] Name of the alert object
533
+ # @param resource_group_name [String] The name of the resource group within the
534
+ # user's subscription. The name is case insensitive.
535
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
536
+ # will be added to the HTTP request.
537
+ #
538
+ # @return [Alert] operation results.
539
+ #
540
+ def get_resource_group_level_alerts(alert_name, resource_group_name, custom_headers:nil)
541
+ response = get_resource_group_level_alerts_async(alert_name, resource_group_name, custom_headers:custom_headers).value!
542
+ response.body unless response.nil?
543
+ end
544
+
545
+ #
546
+ # Get an alert that is associated a resource group or a resource in a resource
547
+ # group
548
+ #
549
+ # @param alert_name [String] Name of the alert object
550
+ # @param resource_group_name [String] The name of the resource group within the
551
+ # user's subscription. The name is case insensitive.
552
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
553
+ # will be added to the HTTP request.
554
+ #
555
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
556
+ #
557
+ def get_resource_group_level_alerts_with_http_info(alert_name, resource_group_name, custom_headers:nil)
558
+ get_resource_group_level_alerts_async(alert_name, resource_group_name, custom_headers:custom_headers).value!
559
+ end
560
+
561
+ #
562
+ # Get an alert that is associated a resource group or a resource in a resource
563
+ # group
564
+ #
565
+ # @param alert_name [String] Name of the alert object
566
+ # @param resource_group_name [String] The name of the resource group within the
567
+ # user's subscription. The name is case insensitive.
568
+ # @param [Hash{String => String}] A hash of custom headers that will be added
569
+ # to the HTTP request.
570
+ #
571
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
572
+ #
573
+ def get_resource_group_level_alerts_async(alert_name, resource_group_name, custom_headers:nil)
574
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
575
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
576
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil?
577
+ fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
578
+ fail ArgumentError, 'alert_name is nil' if alert_name.nil?
579
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
580
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
581
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
582
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
583
+
584
+
585
+ request_headers = {}
586
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
587
+
588
+ # Set Headers
589
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
590
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
591
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}'
592
+
593
+ request_url = @base_url || @client.base_url
594
+
595
+ options = {
596
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
597
+ path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'alertName' => alert_name,'resourceGroupName' => resource_group_name},
598
+ query_params: {'api-version' => @client.api_version},
599
+ headers: request_headers.merge(custom_headers || {}),
600
+ base_url: request_url
601
+ }
602
+ promise = @client.make_request_async(:get, path_template, options)
603
+
604
+ promise = promise.then do |result|
605
+ http_response = result.response
606
+ status_code = http_response.status
607
+ response_content = http_response.body
608
+ unless status_code == 200
609
+ error_model = JSON.load(response_content)
610
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
611
+ end
612
+
613
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
614
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
615
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
616
+ # Deserialize Response
617
+ if status_code == 200
618
+ begin
619
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
620
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::Alert.mapper()
621
+ result.body = @client.deserialize(result_mapper, parsed_response)
622
+ rescue Exception => e
623
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
624
+ end
625
+ end
626
+
627
+ result
628
+ end
629
+
630
+ promise.execute
631
+ end
632
+
633
+ #
634
+ # Update the alert's state
635
+ #
636
+ # @param alert_name [String] Name of the alert object
637
+ # @param alert_update_action_type [Enum] Type of the action to do on the alert.
638
+ # Possible values include: 'Dismiss', 'Reactivate'
639
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
640
+ # will be added to the HTTP request.
641
+ #
642
+ #
643
+ def update_subscription_level_alert_state(alert_name, alert_update_action_type, custom_headers:nil)
644
+ response = update_subscription_level_alert_state_async(alert_name, alert_update_action_type, custom_headers:custom_headers).value!
645
+ nil
646
+ end
647
+
648
+ #
649
+ # Update the alert's state
650
+ #
651
+ # @param alert_name [String] Name of the alert object
652
+ # @param alert_update_action_type [Enum] Type of the action to do on the alert.
653
+ # Possible values include: 'Dismiss', 'Reactivate'
654
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
655
+ # will be added to the HTTP request.
656
+ #
657
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
658
+ #
659
+ def update_subscription_level_alert_state_with_http_info(alert_name, alert_update_action_type, custom_headers:nil)
660
+ update_subscription_level_alert_state_async(alert_name, alert_update_action_type, custom_headers:custom_headers).value!
661
+ end
662
+
663
+ #
664
+ # Update the alert's state
665
+ #
666
+ # @param alert_name [String] Name of the alert object
667
+ # @param alert_update_action_type [Enum] Type of the action to do on the alert.
668
+ # Possible values include: 'Dismiss', 'Reactivate'
669
+ # @param [Hash{String => String}] A hash of custom headers that will be added
670
+ # to the HTTP request.
671
+ #
672
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
673
+ #
674
+ def update_subscription_level_alert_state_async(alert_name, alert_update_action_type, custom_headers:nil)
675
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
676
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
677
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil?
678
+ fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
679
+ fail ArgumentError, 'alert_name is nil' if alert_name.nil?
680
+ fail ArgumentError, 'alert_update_action_type is nil' if alert_update_action_type.nil?
681
+
682
+
683
+ request_headers = {}
684
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
685
+
686
+ # Set Headers
687
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
688
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
689
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}'
690
+
691
+ request_url = @base_url || @client.base_url
692
+
693
+ options = {
694
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
695
+ path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'alertName' => alert_name,'alertUpdateActionType' => alert_update_action_type},
696
+ query_params: {'api-version' => @client.api_version},
697
+ headers: request_headers.merge(custom_headers || {}),
698
+ base_url: request_url
699
+ }
700
+ promise = @client.make_request_async(:post, path_template, options)
701
+
702
+ promise = promise.then do |result|
703
+ http_response = result.response
704
+ status_code = http_response.status
705
+ response_content = http_response.body
706
+ unless status_code == 204
707
+ error_model = JSON.load(response_content)
708
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
709
+ end
710
+
711
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
712
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
713
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
714
+
715
+ result
716
+ end
717
+
718
+ promise.execute
719
+ end
720
+
721
+ #
722
+ # Update the alert's state
723
+ #
724
+ # @param alert_name [String] Name of the alert object
725
+ # @param alert_update_action_type [Enum] Type of the action to do on the alert.
726
+ # Possible values include: 'Dismiss', 'Reactivate'
727
+ # @param resource_group_name [String] The name of the resource group within the
728
+ # user's subscription. The name is case insensitive.
729
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
730
+ # will be added to the HTTP request.
731
+ #
732
+ #
733
+ def update_resource_group_level_alert_state(alert_name, alert_update_action_type, resource_group_name, custom_headers:nil)
734
+ response = update_resource_group_level_alert_state_async(alert_name, alert_update_action_type, resource_group_name, custom_headers:custom_headers).value!
735
+ nil
736
+ end
737
+
738
+ #
739
+ # Update the alert's state
740
+ #
741
+ # @param alert_name [String] Name of the alert object
742
+ # @param alert_update_action_type [Enum] Type of the action to do on the alert.
743
+ # Possible values include: 'Dismiss', 'Reactivate'
744
+ # @param resource_group_name [String] The name of the resource group within the
745
+ # user's subscription. The name is case insensitive.
746
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
747
+ # will be added to the HTTP request.
748
+ #
749
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
750
+ #
751
+ def update_resource_group_level_alert_state_with_http_info(alert_name, alert_update_action_type, resource_group_name, custom_headers:nil)
752
+ update_resource_group_level_alert_state_async(alert_name, alert_update_action_type, resource_group_name, custom_headers:custom_headers).value!
753
+ end
754
+
755
+ #
756
+ # Update the alert's state
757
+ #
758
+ # @param alert_name [String] Name of the alert object
759
+ # @param alert_update_action_type [Enum] Type of the action to do on the alert.
760
+ # Possible values include: 'Dismiss', 'Reactivate'
761
+ # @param resource_group_name [String] The name of the resource group within the
762
+ # user's subscription. The name is case insensitive.
763
+ # @param [Hash{String => String}] A hash of custom headers that will be added
764
+ # to the HTTP request.
765
+ #
766
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
767
+ #
768
+ def update_resource_group_level_alert_state_async(alert_name, alert_update_action_type, resource_group_name, custom_headers:nil)
769
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
770
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
771
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !@client.subscription_id.nil? && @client.subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil?
772
+ fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
773
+ fail ArgumentError, 'alert_name is nil' if alert_name.nil?
774
+ fail ArgumentError, 'alert_update_action_type is nil' if alert_update_action_type.nil?
775
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
776
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
777
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
778
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
779
+
780
+
781
+ request_headers = {}
782
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
783
+
784
+ # Set Headers
785
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
786
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
787
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/alerts/{alertName}/{alertUpdateActionType}'
788
+
789
+ request_url = @base_url || @client.base_url
790
+
791
+ options = {
792
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
793
+ path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'alertName' => alert_name,'alertUpdateActionType' => alert_update_action_type,'resourceGroupName' => resource_group_name},
794
+ query_params: {'api-version' => @client.api_version},
795
+ headers: request_headers.merge(custom_headers || {}),
796
+ base_url: request_url
797
+ }
798
+ promise = @client.make_request_async(:post, path_template, options)
799
+
800
+ promise = promise.then do |result|
801
+ http_response = result.response
802
+ status_code = http_response.status
803
+ response_content = http_response.body
804
+ unless status_code == 204
805
+ error_model = JSON.load(response_content)
806
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
807
+ end
808
+
809
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
810
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
811
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
812
+
813
+ result
814
+ end
815
+
816
+ promise.execute
817
+ end
818
+
819
+ #
820
+ # List all the alerts that are associated with the subscription
821
+ #
822
+ # @param next_page_link [String] The NextLink from the previous successful call
823
+ # to List operation.
824
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
825
+ # will be added to the HTTP request.
826
+ #
827
+ # @return [AlertList] operation results.
828
+ #
829
+ def list_next(next_page_link, custom_headers:nil)
830
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
831
+ response.body unless response.nil?
832
+ end
833
+
834
+ #
835
+ # List all the alerts that are associated with the subscription
836
+ #
837
+ # @param next_page_link [String] The NextLink from the previous successful call
838
+ # to List operation.
839
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
840
+ # will be added to the HTTP request.
841
+ #
842
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
843
+ #
844
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
845
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
846
+ end
847
+
848
+ #
849
+ # List all the alerts that are associated with the subscription
850
+ #
851
+ # @param next_page_link [String] The NextLink from the previous successful call
852
+ # to List operation.
853
+ # @param [Hash{String => String}] A hash of custom headers that will be added
854
+ # to the HTTP request.
855
+ #
856
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
857
+ #
858
+ def list_next_async(next_page_link, custom_headers:nil)
859
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
860
+
861
+
862
+ request_headers = {}
863
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
864
+
865
+ # Set Headers
866
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
867
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
868
+ path_template = '{nextLink}'
869
+
870
+ request_url = @base_url || @client.base_url
871
+
872
+ options = {
873
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
874
+ skip_encoding_path_params: {'nextLink' => next_page_link},
875
+ headers: request_headers.merge(custom_headers || {}),
876
+ base_url: request_url
877
+ }
878
+ promise = @client.make_request_async(:get, path_template, options)
879
+
880
+ promise = promise.then do |result|
881
+ http_response = result.response
882
+ status_code = http_response.status
883
+ response_content = http_response.body
884
+ unless status_code == 200
885
+ error_model = JSON.load(response_content)
886
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
887
+ end
888
+
889
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
890
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
891
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
892
+ # Deserialize Response
893
+ if status_code == 200
894
+ begin
895
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
896
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper()
897
+ result.body = @client.deserialize(result_mapper, parsed_response)
898
+ rescue Exception => e
899
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
900
+ end
901
+ end
902
+
903
+ result
904
+ end
905
+
906
+ promise.execute
907
+ end
908
+
909
+ #
910
+ # List all the alerts that are associated with the resource group
911
+ #
912
+ # @param next_page_link [String] The NextLink from the previous successful call
913
+ # to List operation.
914
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
915
+ # will be added to the HTTP request.
916
+ #
917
+ # @return [AlertList] operation results.
918
+ #
919
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
920
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
921
+ response.body unless response.nil?
922
+ end
923
+
924
+ #
925
+ # List all the alerts that are associated with the resource group
926
+ #
927
+ # @param next_page_link [String] The NextLink from the previous successful call
928
+ # to List operation.
929
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
930
+ # will be added to the HTTP request.
931
+ #
932
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
933
+ #
934
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
935
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
936
+ end
937
+
938
+ #
939
+ # List all the alerts that are associated with the resource group
940
+ #
941
+ # @param next_page_link [String] The NextLink from the previous successful call
942
+ # to List operation.
943
+ # @param [Hash{String => String}] A hash of custom headers that will be added
944
+ # to the HTTP request.
945
+ #
946
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
947
+ #
948
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
949
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
950
+
951
+
952
+ request_headers = {}
953
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
954
+
955
+ # Set Headers
956
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
957
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
958
+ path_template = '{nextLink}'
959
+
960
+ request_url = @base_url || @client.base_url
961
+
962
+ options = {
963
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
964
+ skip_encoding_path_params: {'nextLink' => next_page_link},
965
+ headers: request_headers.merge(custom_headers || {}),
966
+ base_url: request_url
967
+ }
968
+ promise = @client.make_request_async(:get, path_template, options)
969
+
970
+ promise = promise.then do |result|
971
+ http_response = result.response
972
+ status_code = http_response.status
973
+ response_content = http_response.body
974
+ unless status_code == 200
975
+ error_model = JSON.load(response_content)
976
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
977
+ end
978
+
979
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
980
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
981
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
982
+ # Deserialize Response
983
+ if status_code == 200
984
+ begin
985
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
986
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper()
987
+ result.body = @client.deserialize(result_mapper, parsed_response)
988
+ rescue Exception => e
989
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
990
+ end
991
+ end
992
+
993
+ result
994
+ end
995
+
996
+ promise.execute
997
+ end
998
+
999
+ #
1000
+ # List all the alerts that are associated with the subscription that are stored
1001
+ # in a specific location
1002
+ #
1003
+ # @param next_page_link [String] The NextLink from the previous successful call
1004
+ # to List operation.
1005
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1006
+ # will be added to the HTTP request.
1007
+ #
1008
+ # @return [AlertList] operation results.
1009
+ #
1010
+ def list_subscription_level_alerts_by_region_next(next_page_link, custom_headers:nil)
1011
+ response = list_subscription_level_alerts_by_region_next_async(next_page_link, custom_headers:custom_headers).value!
1012
+ response.body unless response.nil?
1013
+ end
1014
+
1015
+ #
1016
+ # List all the alerts that are associated with the subscription that are stored
1017
+ # in a specific location
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_subscription_level_alerts_by_region_next_with_http_info(next_page_link, custom_headers:nil)
1027
+ list_subscription_level_alerts_by_region_next_async(next_page_link, custom_headers:custom_headers).value!
1028
+ end
1029
+
1030
+ #
1031
+ # List all the alerts that are associated with the subscription that are stored
1032
+ # in a specific location
1033
+ #
1034
+ # @param next_page_link [String] The NextLink from the previous successful call
1035
+ # to List operation.
1036
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1037
+ # to the HTTP request.
1038
+ #
1039
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1040
+ #
1041
+ def list_subscription_level_alerts_by_region_next_async(next_page_link, custom_headers:nil)
1042
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1043
+
1044
+
1045
+ request_headers = {}
1046
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1047
+
1048
+ # Set Headers
1049
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1050
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1051
+ path_template = '{nextLink}'
1052
+
1053
+ request_url = @base_url || @client.base_url
1054
+
1055
+ options = {
1056
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1057
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1058
+ headers: request_headers.merge(custom_headers || {}),
1059
+ base_url: request_url
1060
+ }
1061
+ promise = @client.make_request_async(:get, path_template, options)
1062
+
1063
+ promise = promise.then do |result|
1064
+ http_response = result.response
1065
+ status_code = http_response.status
1066
+ response_content = http_response.body
1067
+ unless status_code == 200
1068
+ error_model = JSON.load(response_content)
1069
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1070
+ end
1071
+
1072
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1073
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1074
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1075
+ # Deserialize Response
1076
+ if status_code == 200
1077
+ begin
1078
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1079
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper()
1080
+ result.body = @client.deserialize(result_mapper, parsed_response)
1081
+ rescue Exception => e
1082
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1083
+ end
1084
+ end
1085
+
1086
+ result
1087
+ end
1088
+
1089
+ promise.execute
1090
+ end
1091
+
1092
+ #
1093
+ # List all the alerts that are associated with the resource group that are
1094
+ # stored in a specific location
1095
+ #
1096
+ # @param next_page_link [String] The NextLink from the previous successful call
1097
+ # to List operation.
1098
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1099
+ # will be added to the HTTP request.
1100
+ #
1101
+ # @return [AlertList] operation results.
1102
+ #
1103
+ def list_resource_group_level_alerts_by_region_next(next_page_link, custom_headers:nil)
1104
+ response = list_resource_group_level_alerts_by_region_next_async(next_page_link, custom_headers:custom_headers).value!
1105
+ response.body unless response.nil?
1106
+ end
1107
+
1108
+ #
1109
+ # List all the alerts that are associated with the resource group that are
1110
+ # stored in a specific location
1111
+ #
1112
+ # @param next_page_link [String] The NextLink from the previous successful call
1113
+ # to List operation.
1114
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1115
+ # will be added to the HTTP request.
1116
+ #
1117
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1118
+ #
1119
+ def list_resource_group_level_alerts_by_region_next_with_http_info(next_page_link, custom_headers:nil)
1120
+ list_resource_group_level_alerts_by_region_next_async(next_page_link, custom_headers:custom_headers).value!
1121
+ end
1122
+
1123
+ #
1124
+ # List all the alerts that are associated with the resource group that are
1125
+ # stored in a specific location
1126
+ #
1127
+ # @param next_page_link [String] The NextLink from the previous successful call
1128
+ # to List operation.
1129
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1130
+ # to the HTTP request.
1131
+ #
1132
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1133
+ #
1134
+ def list_resource_group_level_alerts_by_region_next_async(next_page_link, custom_headers:nil)
1135
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1136
+
1137
+
1138
+ request_headers = {}
1139
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1140
+
1141
+ # Set Headers
1142
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1143
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1144
+ path_template = '{nextLink}'
1145
+
1146
+ request_url = @base_url || @client.base_url
1147
+
1148
+ options = {
1149
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1150
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1151
+ headers: request_headers.merge(custom_headers || {}),
1152
+ base_url: request_url
1153
+ }
1154
+ promise = @client.make_request_async(:get, path_template, options)
1155
+
1156
+ promise = promise.then do |result|
1157
+ http_response = result.response
1158
+ status_code = http_response.status
1159
+ response_content = http_response.body
1160
+ unless status_code == 200
1161
+ error_model = JSON.load(response_content)
1162
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1163
+ end
1164
+
1165
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1166
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1167
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1168
+ # Deserialize Response
1169
+ if status_code == 200
1170
+ begin
1171
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1172
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AlertList.mapper()
1173
+ result.body = @client.deserialize(result_mapper, parsed_response)
1174
+ rescue Exception => e
1175
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1176
+ end
1177
+ end
1178
+
1179
+ result
1180
+ end
1181
+
1182
+ promise.execute
1183
+ end
1184
+
1185
+ #
1186
+ # List all the alerts that are associated with the subscription
1187
+ #
1188
+ # @param filter [String] OData filter. Optional.
1189
+ # @param select [String] OData select. Optional.
1190
+ # @param expand [String] OData expand. Optional.
1191
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1192
+ # will be added to the HTTP request.
1193
+ #
1194
+ # @return [AlertList] which provide lazy access to pages of the response.
1195
+ #
1196
+ def list_as_lazy(filter:nil, select:nil, expand:nil, custom_headers:nil)
1197
+ response = list_async(filter:filter, select:select, expand:expand, custom_headers:custom_headers).value!
1198
+ unless response.nil?
1199
+ page = response.body
1200
+ page.next_method = Proc.new do |next_page_link|
1201
+ list_next_async(next_page_link, custom_headers:custom_headers)
1202
+ end
1203
+ page
1204
+ end
1205
+ end
1206
+
1207
+ #
1208
+ # List all the alerts that are associated with the resource group
1209
+ #
1210
+ # @param resource_group_name [String] The name of the resource group within the
1211
+ # user's subscription. The name is case insensitive.
1212
+ # @param filter [String] OData filter. Optional.
1213
+ # @param select [String] OData select. Optional.
1214
+ # @param expand [String] OData expand. Optional.
1215
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1216
+ # will be added to the HTTP request.
1217
+ #
1218
+ # @return [AlertList] which provide lazy access to pages of the response.
1219
+ #
1220
+ def list_by_resource_group_as_lazy(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil)
1221
+ response = list_by_resource_group_async(resource_group_name, filter:filter, select:select, expand:expand, custom_headers:custom_headers).value!
1222
+ unless response.nil?
1223
+ page = response.body
1224
+ page.next_method = Proc.new do |next_page_link|
1225
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1226
+ end
1227
+ page
1228
+ end
1229
+ end
1230
+
1231
+ #
1232
+ # List all the alerts that are associated with the subscription that are stored
1233
+ # in a specific location
1234
+ #
1235
+ # @param filter [String] OData filter. Optional.
1236
+ # @param select [String] OData select. Optional.
1237
+ # @param expand [String] OData expand. Optional.
1238
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1239
+ # will be added to the HTTP request.
1240
+ #
1241
+ # @return [AlertList] which provide lazy access to pages of the response.
1242
+ #
1243
+ def list_subscription_level_alerts_by_region_as_lazy(filter:nil, select:nil, expand:nil, custom_headers:nil)
1244
+ response = list_subscription_level_alerts_by_region_async(filter:filter, select:select, expand:expand, custom_headers:custom_headers).value!
1245
+ unless response.nil?
1246
+ page = response.body
1247
+ page.next_method = Proc.new do |next_page_link|
1248
+ list_subscription_level_alerts_by_region_next_async(next_page_link, custom_headers:custom_headers)
1249
+ end
1250
+ page
1251
+ end
1252
+ end
1253
+
1254
+ #
1255
+ # List all the alerts that are associated with the resource group that are
1256
+ # stored in a specific location
1257
+ #
1258
+ # @param resource_group_name [String] The name of the resource group within the
1259
+ # user's subscription. The name is case insensitive.
1260
+ # @param filter [String] OData filter. Optional.
1261
+ # @param select [String] OData select. Optional.
1262
+ # @param expand [String] OData expand. Optional.
1263
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1264
+ # will be added to the HTTP request.
1265
+ #
1266
+ # @return [AlertList] which provide lazy access to pages of the response.
1267
+ #
1268
+ def list_resource_group_level_alerts_by_region_as_lazy(resource_group_name, filter:nil, select:nil, expand:nil, custom_headers:nil)
1269
+ response = list_resource_group_level_alerts_by_region_async(resource_group_name, filter:filter, select:select, expand:expand, custom_headers:custom_headers).value!
1270
+ unless response.nil?
1271
+ page = response.body
1272
+ page.next_method = Proc.new do |next_page_link|
1273
+ list_resource_group_level_alerts_by_region_next_async(next_page_link, custom_headers:custom_headers)
1274
+ end
1275
+ page
1276
+ end
1277
+ end
1278
+
1279
+ end
1280
+ end