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,1055 @@
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 Tasks
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Tasks 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
+ # Recommended tasks that will help improve the security of the subscription
26
+ # proactively
27
+ #
28
+ # @param filter [String] OData filter. Optional.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [Array<SecurityTask>] operation results.
33
+ #
34
+ def list(filter:nil, custom_headers:nil)
35
+ first_page = list_as_lazy(filter:filter, custom_headers:custom_headers)
36
+ first_page.get_all_items
37
+ end
38
+
39
+ #
40
+ # Recommended tasks that will help improve the security of the subscription
41
+ # proactively
42
+ #
43
+ # @param filter [String] OData filter. Optional.
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_with_http_info(filter:nil, custom_headers:nil)
50
+ list_async(filter:filter, custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Recommended tasks that will help improve the security of the subscription
55
+ # proactively
56
+ #
57
+ # @param filter [String] OData filter. Optional.
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(filter:nil, custom_headers:nil)
64
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
65
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
66
+ 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?
67
+
68
+
69
+ request_headers = {}
70
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
71
+
72
+ # Set Headers
73
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
74
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
75
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/tasks'
76
+
77
+ request_url = @base_url || @client.base_url
78
+
79
+ options = {
80
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
81
+ path_params: {'subscriptionId' => @client.subscription_id},
82
+ query_params: {'api-version' => @client.api_version,'$filter' => filter},
83
+ headers: request_headers.merge(custom_headers || {}),
84
+ base_url: request_url
85
+ }
86
+ promise = @client.make_request_async(:get, path_template, options)
87
+
88
+ promise = promise.then do |result|
89
+ http_response = result.response
90
+ status_code = http_response.status
91
+ response_content = http_response.body
92
+ unless status_code == 200
93
+ error_model = JSON.load(response_content)
94
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
95
+ end
96
+
97
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
98
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
99
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
100
+ # Deserialize Response
101
+ if status_code == 200
102
+ begin
103
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
104
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::SecurityTaskList.mapper()
105
+ result.body = @client.deserialize(result_mapper, parsed_response)
106
+ rescue Exception => e
107
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
108
+ end
109
+ end
110
+
111
+ result
112
+ end
113
+
114
+ promise.execute
115
+ end
116
+
117
+ #
118
+ # Recommended tasks that will help improve the security of the subscription
119
+ # proactively
120
+ #
121
+ # @param filter [String] OData filter. Optional.
122
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
123
+ # will be added to the HTTP request.
124
+ #
125
+ # @return [Array<SecurityTask>] operation results.
126
+ #
127
+ def list_by_home_region(filter:nil, custom_headers:nil)
128
+ first_page = list_by_home_region_as_lazy(filter:filter, custom_headers:custom_headers)
129
+ first_page.get_all_items
130
+ end
131
+
132
+ #
133
+ # Recommended tasks that will help improve the security of the subscription
134
+ # proactively
135
+ #
136
+ # @param filter [String] OData filter. Optional.
137
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
138
+ # will be added to the HTTP request.
139
+ #
140
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
141
+ #
142
+ def list_by_home_region_with_http_info(filter:nil, custom_headers:nil)
143
+ list_by_home_region_async(filter:filter, custom_headers:custom_headers).value!
144
+ end
145
+
146
+ #
147
+ # Recommended tasks that will help improve the security of the subscription
148
+ # proactively
149
+ #
150
+ # @param filter [String] OData filter. Optional.
151
+ # @param [Hash{String => String}] A hash of custom headers that will be added
152
+ # to the HTTP request.
153
+ #
154
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
155
+ #
156
+ def list_by_home_region_async(filter:nil, custom_headers:nil)
157
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
158
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
159
+ 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?
160
+ fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
161
+
162
+
163
+ request_headers = {}
164
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
165
+
166
+ # Set Headers
167
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
168
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
169
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks'
170
+
171
+ request_url = @base_url || @client.base_url
172
+
173
+ options = {
174
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
175
+ path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location},
176
+ query_params: {'api-version' => @client.api_version,'$filter' => filter},
177
+ headers: request_headers.merge(custom_headers || {}),
178
+ base_url: request_url
179
+ }
180
+ promise = @client.make_request_async(:get, path_template, options)
181
+
182
+ promise = promise.then do |result|
183
+ http_response = result.response
184
+ status_code = http_response.status
185
+ response_content = http_response.body
186
+ unless status_code == 200
187
+ error_model = JSON.load(response_content)
188
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
189
+ end
190
+
191
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
192
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
193
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
194
+ # Deserialize Response
195
+ if status_code == 200
196
+ begin
197
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
198
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::SecurityTaskList.mapper()
199
+ result.body = @client.deserialize(result_mapper, parsed_response)
200
+ rescue Exception => e
201
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
202
+ end
203
+ end
204
+
205
+ result
206
+ end
207
+
208
+ promise.execute
209
+ end
210
+
211
+ #
212
+ # Recommended tasks that will help improve the security of the subscription
213
+ # proactively
214
+ #
215
+ # @param task_name [String] Name of the task object, will be a GUID
216
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
217
+ # will be added to the HTTP request.
218
+ #
219
+ # @return [SecurityTask] operation results.
220
+ #
221
+ def get_subscription_level_task(task_name, custom_headers:nil)
222
+ response = get_subscription_level_task_async(task_name, custom_headers:custom_headers).value!
223
+ response.body unless response.nil?
224
+ end
225
+
226
+ #
227
+ # Recommended tasks that will help improve the security of the subscription
228
+ # proactively
229
+ #
230
+ # @param task_name [String] Name of the task object, will be a GUID
231
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
232
+ # will be added to the HTTP request.
233
+ #
234
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
235
+ #
236
+ def get_subscription_level_task_with_http_info(task_name, custom_headers:nil)
237
+ get_subscription_level_task_async(task_name, custom_headers:custom_headers).value!
238
+ end
239
+
240
+ #
241
+ # Recommended tasks that will help improve the security of the subscription
242
+ # proactively
243
+ #
244
+ # @param task_name [String] Name of the task object, will be a GUID
245
+ # @param [Hash{String => String}] A hash of custom headers that will be added
246
+ # to the HTTP request.
247
+ #
248
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
249
+ #
250
+ def get_subscription_level_task_async(task_name, custom_headers:nil)
251
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
252
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
253
+ 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?
254
+ fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
255
+ fail ArgumentError, 'task_name is nil' if task_name.nil?
256
+
257
+
258
+ request_headers = {}
259
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
260
+
261
+ # Set Headers
262
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
263
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
264
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}'
265
+
266
+ request_url = @base_url || @client.base_url
267
+
268
+ options = {
269
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
270
+ path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'taskName' => task_name},
271
+ query_params: {'api-version' => @client.api_version},
272
+ headers: request_headers.merge(custom_headers || {}),
273
+ base_url: request_url
274
+ }
275
+ promise = @client.make_request_async(:get, path_template, options)
276
+
277
+ promise = promise.then do |result|
278
+ http_response = result.response
279
+ status_code = http_response.status
280
+ response_content = http_response.body
281
+ unless status_code == 200
282
+ error_model = JSON.load(response_content)
283
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
284
+ end
285
+
286
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
287
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
288
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
289
+ # Deserialize Response
290
+ if status_code == 200
291
+ begin
292
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
293
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::SecurityTask.mapper()
294
+ result.body = @client.deserialize(result_mapper, parsed_response)
295
+ rescue Exception => e
296
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
297
+ end
298
+ end
299
+
300
+ result
301
+ end
302
+
303
+ promise.execute
304
+ end
305
+
306
+ #
307
+ # Recommended tasks that will help improve the security of the subscription
308
+ # proactively
309
+ #
310
+ # @param task_name [String] Name of the task object, will be a GUID
311
+ # @param task_update_action_type [Enum] Type of the action to do on the task.
312
+ # Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close'
313
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
314
+ # will be added to the HTTP request.
315
+ #
316
+ #
317
+ def update_subscription_level_task_state(task_name, task_update_action_type, custom_headers:nil)
318
+ response = update_subscription_level_task_state_async(task_name, task_update_action_type, custom_headers:custom_headers).value!
319
+ nil
320
+ end
321
+
322
+ #
323
+ # Recommended tasks that will help improve the security of the subscription
324
+ # proactively
325
+ #
326
+ # @param task_name [String] Name of the task object, will be a GUID
327
+ # @param task_update_action_type [Enum] Type of the action to do on the task.
328
+ # Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close'
329
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
330
+ # will be added to the HTTP request.
331
+ #
332
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
333
+ #
334
+ def update_subscription_level_task_state_with_http_info(task_name, task_update_action_type, custom_headers:nil)
335
+ update_subscription_level_task_state_async(task_name, task_update_action_type, custom_headers:custom_headers).value!
336
+ end
337
+
338
+ #
339
+ # Recommended tasks that will help improve the security of the subscription
340
+ # proactively
341
+ #
342
+ # @param task_name [String] Name of the task object, will be a GUID
343
+ # @param task_update_action_type [Enum] Type of the action to do on the task.
344
+ # Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close'
345
+ # @param [Hash{String => String}] A hash of custom headers that will be added
346
+ # to the HTTP request.
347
+ #
348
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
349
+ #
350
+ def update_subscription_level_task_state_async(task_name, task_update_action_type, custom_headers:nil)
351
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
352
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
353
+ 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?
354
+ fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
355
+ fail ArgumentError, 'task_name is nil' if task_name.nil?
356
+ fail ArgumentError, 'task_update_action_type is nil' if task_update_action_type.nil?
357
+
358
+
359
+ request_headers = {}
360
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
361
+
362
+ # Set Headers
363
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
364
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
365
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}/{taskUpdateActionType}'
366
+
367
+ request_url = @base_url || @client.base_url
368
+
369
+ options = {
370
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
371
+ path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'taskName' => task_name,'taskUpdateActionType' => task_update_action_type},
372
+ query_params: {'api-version' => @client.api_version},
373
+ headers: request_headers.merge(custom_headers || {}),
374
+ base_url: request_url
375
+ }
376
+ promise = @client.make_request_async(:post, path_template, options)
377
+
378
+ promise = promise.then do |result|
379
+ http_response = result.response
380
+ status_code = http_response.status
381
+ response_content = http_response.body
382
+ unless status_code == 204
383
+ error_model = JSON.load(response_content)
384
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
385
+ end
386
+
387
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
388
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
389
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
390
+
391
+ result
392
+ end
393
+
394
+ promise.execute
395
+ end
396
+
397
+ #
398
+ # Recommended tasks that will help improve the security of the subscription
399
+ # proactively
400
+ #
401
+ # @param resource_group_name [String] The name of the resource group within the
402
+ # user's subscription. The name is case insensitive.
403
+ # @param filter [String] OData filter. Optional.
404
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
405
+ # will be added to the HTTP request.
406
+ #
407
+ # @return [Array<SecurityTask>] operation results.
408
+ #
409
+ def list_by_resource_group(resource_group_name, filter:nil, custom_headers:nil)
410
+ first_page = list_by_resource_group_as_lazy(resource_group_name, filter:filter, custom_headers:custom_headers)
411
+ first_page.get_all_items
412
+ end
413
+
414
+ #
415
+ # Recommended tasks that will help improve the security of the subscription
416
+ # proactively
417
+ #
418
+ # @param resource_group_name [String] The name of the resource group within the
419
+ # user's subscription. The name is case insensitive.
420
+ # @param filter [String] OData filter. Optional.
421
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
422
+ # will be added to the HTTP request.
423
+ #
424
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
425
+ #
426
+ def list_by_resource_group_with_http_info(resource_group_name, filter:nil, custom_headers:nil)
427
+ list_by_resource_group_async(resource_group_name, filter:filter, custom_headers:custom_headers).value!
428
+ end
429
+
430
+ #
431
+ # Recommended tasks that will help improve the security of the subscription
432
+ # proactively
433
+ #
434
+ # @param resource_group_name [String] The name of the resource group within the
435
+ # user's subscription. The name is case insensitive.
436
+ # @param filter [String] OData filter. Optional.
437
+ # @param [Hash{String => String}] A hash of custom headers that will be added
438
+ # to the HTTP request.
439
+ #
440
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
441
+ #
442
+ def list_by_resource_group_async(resource_group_name, filter:nil, custom_headers:nil)
443
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
444
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
445
+ 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?
446
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
447
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
448
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
449
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
450
+ fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
451
+
452
+
453
+ request_headers = {}
454
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
455
+
456
+ # Set Headers
457
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
458
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
459
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks'
460
+
461
+ request_url = @base_url || @client.base_url
462
+
463
+ options = {
464
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
465
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'ascLocation' => @client.asc_location},
466
+ query_params: {'api-version' => @client.api_version,'$filter' => filter},
467
+ headers: request_headers.merge(custom_headers || {}),
468
+ base_url: request_url
469
+ }
470
+ promise = @client.make_request_async(:get, path_template, options)
471
+
472
+ promise = promise.then do |result|
473
+ http_response = result.response
474
+ status_code = http_response.status
475
+ response_content = http_response.body
476
+ unless status_code == 200
477
+ error_model = JSON.load(response_content)
478
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
479
+ end
480
+
481
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
482
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
483
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
484
+ # Deserialize Response
485
+ if status_code == 200
486
+ begin
487
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
488
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::SecurityTaskList.mapper()
489
+ result.body = @client.deserialize(result_mapper, parsed_response)
490
+ rescue Exception => e
491
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
492
+ end
493
+ end
494
+
495
+ result
496
+ end
497
+
498
+ promise.execute
499
+ end
500
+
501
+ #
502
+ # Recommended tasks that will help improve the security of the subscription
503
+ # proactively
504
+ #
505
+ # @param resource_group_name [String] The name of the resource group within the
506
+ # user's subscription. The name is case insensitive.
507
+ # @param task_name [String] Name of the task object, will be a GUID
508
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
509
+ # will be added to the HTTP request.
510
+ #
511
+ # @return [SecurityTask] operation results.
512
+ #
513
+ def get_resource_group_level_task(resource_group_name, task_name, custom_headers:nil)
514
+ response = get_resource_group_level_task_async(resource_group_name, task_name, custom_headers:custom_headers).value!
515
+ response.body unless response.nil?
516
+ end
517
+
518
+ #
519
+ # Recommended tasks that will help improve the security of the subscription
520
+ # proactively
521
+ #
522
+ # @param resource_group_name [String] The name of the resource group within the
523
+ # user's subscription. The name is case insensitive.
524
+ # @param task_name [String] Name of the task object, will be a GUID
525
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
526
+ # will be added to the HTTP request.
527
+ #
528
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
529
+ #
530
+ def get_resource_group_level_task_with_http_info(resource_group_name, task_name, custom_headers:nil)
531
+ get_resource_group_level_task_async(resource_group_name, task_name, custom_headers:custom_headers).value!
532
+ end
533
+
534
+ #
535
+ # Recommended tasks that will help improve the security of the subscription
536
+ # proactively
537
+ #
538
+ # @param resource_group_name [String] The name of the resource group within the
539
+ # user's subscription. The name is case insensitive.
540
+ # @param task_name [String] Name of the task object, will be a GUID
541
+ # @param [Hash{String => String}] A hash of custom headers that will be added
542
+ # to the HTTP request.
543
+ #
544
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
545
+ #
546
+ def get_resource_group_level_task_async(resource_group_name, task_name, custom_headers:nil)
547
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
548
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
549
+ 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?
550
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
551
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
552
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
553
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
554
+ fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
555
+ fail ArgumentError, 'task_name is nil' if task_name.nil?
556
+
557
+
558
+ request_headers = {}
559
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
560
+
561
+ # Set Headers
562
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
563
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
564
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}'
565
+
566
+ request_url = @base_url || @client.base_url
567
+
568
+ options = {
569
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
570
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'ascLocation' => @client.asc_location,'taskName' => task_name},
571
+ query_params: {'api-version' => @client.api_version},
572
+ headers: request_headers.merge(custom_headers || {}),
573
+ base_url: request_url
574
+ }
575
+ promise = @client.make_request_async(:get, path_template, options)
576
+
577
+ promise = promise.then do |result|
578
+ http_response = result.response
579
+ status_code = http_response.status
580
+ response_content = http_response.body
581
+ unless status_code == 200
582
+ error_model = JSON.load(response_content)
583
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
584
+ end
585
+
586
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
587
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
588
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
589
+ # Deserialize Response
590
+ if status_code == 200
591
+ begin
592
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
593
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::SecurityTask.mapper()
594
+ result.body = @client.deserialize(result_mapper, parsed_response)
595
+ rescue Exception => e
596
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
597
+ end
598
+ end
599
+
600
+ result
601
+ end
602
+
603
+ promise.execute
604
+ end
605
+
606
+ #
607
+ # Recommended tasks that will help improve the security of the subscription
608
+ # proactively
609
+ #
610
+ # @param resource_group_name [String] The name of the resource group within the
611
+ # user's subscription. The name is case insensitive.
612
+ # @param task_name [String] Name of the task object, will be a GUID
613
+ # @param task_update_action_type [Enum] Type of the action to do on the task.
614
+ # Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close'
615
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
616
+ # will be added to the HTTP request.
617
+ #
618
+ #
619
+ def update_resource_group_level_task_state(resource_group_name, task_name, task_update_action_type, custom_headers:nil)
620
+ response = update_resource_group_level_task_state_async(resource_group_name, task_name, task_update_action_type, custom_headers:custom_headers).value!
621
+ nil
622
+ end
623
+
624
+ #
625
+ # Recommended tasks that will help improve the security of the subscription
626
+ # proactively
627
+ #
628
+ # @param resource_group_name [String] The name of the resource group within the
629
+ # user's subscription. The name is case insensitive.
630
+ # @param task_name [String] Name of the task object, will be a GUID
631
+ # @param task_update_action_type [Enum] Type of the action to do on the task.
632
+ # Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close'
633
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
634
+ # will be added to the HTTP request.
635
+ #
636
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
637
+ #
638
+ def update_resource_group_level_task_state_with_http_info(resource_group_name, task_name, task_update_action_type, custom_headers:nil)
639
+ update_resource_group_level_task_state_async(resource_group_name, task_name, task_update_action_type, custom_headers:custom_headers).value!
640
+ end
641
+
642
+ #
643
+ # Recommended tasks that will help improve the security of the subscription
644
+ # proactively
645
+ #
646
+ # @param resource_group_name [String] The name of the resource group within the
647
+ # user's subscription. The name is case insensitive.
648
+ # @param task_name [String] Name of the task object, will be a GUID
649
+ # @param task_update_action_type [Enum] Type of the action to do on the task.
650
+ # Possible values include: 'Activate', 'Dismiss', 'Start', 'Resolve', 'Close'
651
+ # @param [Hash{String => String}] A hash of custom headers that will be added
652
+ # to the HTTP request.
653
+ #
654
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
655
+ #
656
+ def update_resource_group_level_task_state_async(resource_group_name, task_name, task_update_action_type, custom_headers:nil)
657
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
658
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
659
+ 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?
660
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
661
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
662
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
663
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
664
+ fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
665
+ fail ArgumentError, 'task_name is nil' if task_name.nil?
666
+ fail ArgumentError, 'task_update_action_type is nil' if task_update_action_type.nil?
667
+
668
+
669
+ request_headers = {}
670
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
671
+
672
+ # Set Headers
673
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
674
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
675
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}/{taskUpdateActionType}'
676
+
677
+ request_url = @base_url || @client.base_url
678
+
679
+ options = {
680
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
681
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'ascLocation' => @client.asc_location,'taskName' => task_name,'taskUpdateActionType' => task_update_action_type},
682
+ query_params: {'api-version' => @client.api_version},
683
+ headers: request_headers.merge(custom_headers || {}),
684
+ base_url: request_url
685
+ }
686
+ promise = @client.make_request_async(:post, path_template, options)
687
+
688
+ promise = promise.then do |result|
689
+ http_response = result.response
690
+ status_code = http_response.status
691
+ response_content = http_response.body
692
+ unless status_code == 204
693
+ error_model = JSON.load(response_content)
694
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
695
+ end
696
+
697
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
698
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
699
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
700
+
701
+ result
702
+ end
703
+
704
+ promise.execute
705
+ end
706
+
707
+ #
708
+ # Recommended tasks that will help improve the security of the subscription
709
+ # proactively
710
+ #
711
+ # @param next_page_link [String] The NextLink from the previous successful call
712
+ # to List operation.
713
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
714
+ # will be added to the HTTP request.
715
+ #
716
+ # @return [SecurityTaskList] operation results.
717
+ #
718
+ def list_next(next_page_link, custom_headers:nil)
719
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
720
+ response.body unless response.nil?
721
+ end
722
+
723
+ #
724
+ # Recommended tasks that will help improve the security of the subscription
725
+ # proactively
726
+ #
727
+ # @param next_page_link [String] The NextLink from the previous successful call
728
+ # to List operation.
729
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
730
+ # will be added to the HTTP request.
731
+ #
732
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
733
+ #
734
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
735
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
736
+ end
737
+
738
+ #
739
+ # Recommended tasks that will help improve the security of the subscription
740
+ # proactively
741
+ #
742
+ # @param next_page_link [String] The NextLink from the previous successful call
743
+ # to List operation.
744
+ # @param [Hash{String => String}] A hash of custom headers that will be added
745
+ # to the HTTP request.
746
+ #
747
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
748
+ #
749
+ def list_next_async(next_page_link, custom_headers:nil)
750
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
751
+
752
+
753
+ request_headers = {}
754
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
755
+
756
+ # Set Headers
757
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
758
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
759
+ path_template = '{nextLink}'
760
+
761
+ request_url = @base_url || @client.base_url
762
+
763
+ options = {
764
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
765
+ skip_encoding_path_params: {'nextLink' => next_page_link},
766
+ headers: request_headers.merge(custom_headers || {}),
767
+ base_url: request_url
768
+ }
769
+ promise = @client.make_request_async(:get, path_template, options)
770
+
771
+ promise = promise.then do |result|
772
+ http_response = result.response
773
+ status_code = http_response.status
774
+ response_content = http_response.body
775
+ unless status_code == 200
776
+ error_model = JSON.load(response_content)
777
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
778
+ end
779
+
780
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
781
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
782
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
783
+ # Deserialize Response
784
+ if status_code == 200
785
+ begin
786
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
787
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::SecurityTaskList.mapper()
788
+ result.body = @client.deserialize(result_mapper, parsed_response)
789
+ rescue Exception => e
790
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
791
+ end
792
+ end
793
+
794
+ result
795
+ end
796
+
797
+ promise.execute
798
+ end
799
+
800
+ #
801
+ # Recommended tasks that will help improve the security of the subscription
802
+ # proactively
803
+ #
804
+ # @param next_page_link [String] The NextLink from the previous successful call
805
+ # to List operation.
806
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
807
+ # will be added to the HTTP request.
808
+ #
809
+ # @return [SecurityTaskList] operation results.
810
+ #
811
+ def list_by_home_region_next(next_page_link, custom_headers:nil)
812
+ response = list_by_home_region_next_async(next_page_link, custom_headers:custom_headers).value!
813
+ response.body unless response.nil?
814
+ end
815
+
816
+ #
817
+ # Recommended tasks that will help improve the security of the subscription
818
+ # proactively
819
+ #
820
+ # @param next_page_link [String] The NextLink from the previous successful call
821
+ # to List operation.
822
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
823
+ # will be added to the HTTP request.
824
+ #
825
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
826
+ #
827
+ def list_by_home_region_next_with_http_info(next_page_link, custom_headers:nil)
828
+ list_by_home_region_next_async(next_page_link, custom_headers:custom_headers).value!
829
+ end
830
+
831
+ #
832
+ # Recommended tasks that will help improve the security of the subscription
833
+ # proactively
834
+ #
835
+ # @param next_page_link [String] The NextLink from the previous successful call
836
+ # to List operation.
837
+ # @param [Hash{String => String}] A hash of custom headers that will be added
838
+ # to the HTTP request.
839
+ #
840
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
841
+ #
842
+ def list_by_home_region_next_async(next_page_link, custom_headers:nil)
843
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
844
+
845
+
846
+ request_headers = {}
847
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
848
+
849
+ # Set Headers
850
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
851
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
852
+ path_template = '{nextLink}'
853
+
854
+ request_url = @base_url || @client.base_url
855
+
856
+ options = {
857
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
858
+ skip_encoding_path_params: {'nextLink' => next_page_link},
859
+ headers: request_headers.merge(custom_headers || {}),
860
+ base_url: request_url
861
+ }
862
+ promise = @client.make_request_async(:get, path_template, options)
863
+
864
+ promise = promise.then do |result|
865
+ http_response = result.response
866
+ status_code = http_response.status
867
+ response_content = http_response.body
868
+ unless status_code == 200
869
+ error_model = JSON.load(response_content)
870
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
871
+ end
872
+
873
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
874
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
875
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
876
+ # Deserialize Response
877
+ if status_code == 200
878
+ begin
879
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
880
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::SecurityTaskList.mapper()
881
+ result.body = @client.deserialize(result_mapper, parsed_response)
882
+ rescue Exception => e
883
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
884
+ end
885
+ end
886
+
887
+ result
888
+ end
889
+
890
+ promise.execute
891
+ end
892
+
893
+ #
894
+ # Recommended tasks that will help improve the security of the subscription
895
+ # proactively
896
+ #
897
+ # @param next_page_link [String] The NextLink from the previous successful call
898
+ # to List operation.
899
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
900
+ # will be added to the HTTP request.
901
+ #
902
+ # @return [SecurityTaskList] operation results.
903
+ #
904
+ def list_by_resource_group_next(next_page_link, custom_headers:nil)
905
+ response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
906
+ response.body unless response.nil?
907
+ end
908
+
909
+ #
910
+ # Recommended tasks that will help improve the security of the subscription
911
+ # proactively
912
+ #
913
+ # @param next_page_link [String] The NextLink from the previous successful call
914
+ # to List operation.
915
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
916
+ # will be added to the HTTP request.
917
+ #
918
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
919
+ #
920
+ def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil)
921
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value!
922
+ end
923
+
924
+ #
925
+ # Recommended tasks that will help improve the security of the subscription
926
+ # proactively
927
+ #
928
+ # @param next_page_link [String] The NextLink from the previous successful call
929
+ # to List operation.
930
+ # @param [Hash{String => String}] A hash of custom headers that will be added
931
+ # to the HTTP request.
932
+ #
933
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
934
+ #
935
+ def list_by_resource_group_next_async(next_page_link, custom_headers:nil)
936
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
937
+
938
+
939
+ request_headers = {}
940
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
941
+
942
+ # Set Headers
943
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
944
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
945
+ path_template = '{nextLink}'
946
+
947
+ request_url = @base_url || @client.base_url
948
+
949
+ options = {
950
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
951
+ skip_encoding_path_params: {'nextLink' => next_page_link},
952
+ headers: request_headers.merge(custom_headers || {}),
953
+ base_url: request_url
954
+ }
955
+ promise = @client.make_request_async(:get, path_template, options)
956
+
957
+ promise = promise.then do |result|
958
+ http_response = result.response
959
+ status_code = http_response.status
960
+ response_content = http_response.body
961
+ unless status_code == 200
962
+ error_model = JSON.load(response_content)
963
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
964
+ end
965
+
966
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
967
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
968
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
969
+ # Deserialize Response
970
+ if status_code == 200
971
+ begin
972
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
973
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::SecurityTaskList.mapper()
974
+ result.body = @client.deserialize(result_mapper, parsed_response)
975
+ rescue Exception => e
976
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
977
+ end
978
+ end
979
+
980
+ result
981
+ end
982
+
983
+ promise.execute
984
+ end
985
+
986
+ #
987
+ # Recommended tasks that will help improve the security of the subscription
988
+ # proactively
989
+ #
990
+ # @param filter [String] OData filter. Optional.
991
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
992
+ # will be added to the HTTP request.
993
+ #
994
+ # @return [SecurityTaskList] which provide lazy access to pages of the
995
+ # response.
996
+ #
997
+ def list_as_lazy(filter:nil, custom_headers:nil)
998
+ response = list_async(filter:filter, custom_headers:custom_headers).value!
999
+ unless response.nil?
1000
+ page = response.body
1001
+ page.next_method = Proc.new do |next_page_link|
1002
+ list_next_async(next_page_link, custom_headers:custom_headers)
1003
+ end
1004
+ page
1005
+ end
1006
+ end
1007
+
1008
+ #
1009
+ # Recommended tasks that will help improve the security of the subscription
1010
+ # proactively
1011
+ #
1012
+ # @param filter [String] OData filter. Optional.
1013
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1014
+ # will be added to the HTTP request.
1015
+ #
1016
+ # @return [SecurityTaskList] which provide lazy access to pages of the
1017
+ # response.
1018
+ #
1019
+ def list_by_home_region_as_lazy(filter:nil, custom_headers:nil)
1020
+ response = list_by_home_region_async(filter:filter, custom_headers:custom_headers).value!
1021
+ unless response.nil?
1022
+ page = response.body
1023
+ page.next_method = Proc.new do |next_page_link|
1024
+ list_by_home_region_next_async(next_page_link, custom_headers:custom_headers)
1025
+ end
1026
+ page
1027
+ end
1028
+ end
1029
+
1030
+ #
1031
+ # Recommended tasks that will help improve the security of the subscription
1032
+ # proactively
1033
+ #
1034
+ # @param resource_group_name [String] The name of the resource group within the
1035
+ # user's subscription. The name is case insensitive.
1036
+ # @param filter [String] OData filter. Optional.
1037
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1038
+ # will be added to the HTTP request.
1039
+ #
1040
+ # @return [SecurityTaskList] which provide lazy access to pages of the
1041
+ # response.
1042
+ #
1043
+ def list_by_resource_group_as_lazy(resource_group_name, filter:nil, custom_headers:nil)
1044
+ response = list_by_resource_group_async(resource_group_name, filter:filter, custom_headers:custom_headers).value!
1045
+ unless response.nil?
1046
+ page = response.body
1047
+ page.next_method = Proc.new do |next_page_link|
1048
+ list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers)
1049
+ end
1050
+ page
1051
+ end
1052
+ end
1053
+
1054
+ end
1055
+ end