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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2534804e0a286075da29db8327bb7ba2c6b12a6405f23d0b90ee4aadbe02c7d7
4
- data.tar.gz: 4a2ae1f48a7024fb386997ecfa622599df8ad0f3fdf84b6f91fcb6a1412bc218
3
+ metadata.gz: 35d886374e993cb312503c365b00b91e4a6b7f3cde406ced6b61edda4a5404c2
4
+ data.tar.gz: f3641f70d180ccc7a4f755b28acc73c563e510cb2b41892874a9bc7f68ba7a65
5
5
  SHA512:
6
- metadata.gz: 46d877af6c2a2ee009bf70ce4ce0812428f40e621be70d49028905a88cdec1dbd1710819dd6c19cd49ceac328464f0bdfc45954d0d6dcd8d4328deafe4bab947
7
- data.tar.gz: ef85a690d927e155c2a5700854f6a38d30bdab0fb55a1302a35a65a302d1338e4f5b1fcfc0cdd31010adf096a4d96209dafcfeb9cf3a7c81fa232d45c0f81b5a
6
+ metadata.gz: d6a7f99dbfc24ce3d058a51f0e7cf31365ccb7d583128127ab38e9966307cc8c6f4e7d3a04c0fcbeb6abcb6d0a51e59cc488b4cbd4b3d06081d0957e8a21956e
7
+ data.tar.gz: ed6464e67a2b03f738e9246a2873373a75a068605e45c7d71528c75d60c0ddce7a0c02fb4778a09c581a5e9b14b1eec04fc0505c17008531a59b55155cdfb2e8
@@ -0,0 +1,109 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2015-06-01-preview/generated/azure_mgmt_security/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::Security::Mgmt::V2015_06_01_preview
23
+ autoload :AdaptiveNetworkHardenings, '2015-06-01-preview/generated/azure_mgmt_security/adaptive_network_hardenings.rb'
24
+ autoload :Alerts, '2015-06-01-preview/generated/azure_mgmt_security/alerts.rb'
25
+ autoload :AllowedConnections, '2015-06-01-preview/generated/azure_mgmt_security/allowed_connections.rb'
26
+ autoload :AdaptiveApplicationControls, '2015-06-01-preview/generated/azure_mgmt_security/adaptive_application_controls.rb'
27
+ autoload :DiscoveredSecuritySolutions, '2015-06-01-preview/generated/azure_mgmt_security/discovered_security_solutions.rb'
28
+ autoload :ExternalSecuritySolutions, '2015-06-01-preview/generated/azure_mgmt_security/external_security_solutions.rb'
29
+ autoload :JitNetworkAccessPolicies, '2015-06-01-preview/generated/azure_mgmt_security/jit_network_access_policies.rb'
30
+ autoload :Locations, '2015-06-01-preview/generated/azure_mgmt_security/locations.rb'
31
+ autoload :Operations, '2015-06-01-preview/generated/azure_mgmt_security/operations.rb'
32
+ autoload :Tasks, '2015-06-01-preview/generated/azure_mgmt_security/tasks.rb'
33
+ autoload :Topology, '2015-06-01-preview/generated/azure_mgmt_security/topology.rb'
34
+ autoload :SecurityCenter, '2015-06-01-preview/generated/azure_mgmt_security/security_center.rb'
35
+
36
+ module Models
37
+ autoload :ExternalSecuritySolutionList, '2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution_list.rb'
38
+ autoload :Rule, '2015-06-01-preview/generated/azure_mgmt_security/models/rule.rb'
39
+ autoload :EffectiveNetworkSecurityGroups, '2015-06-01-preview/generated/azure_mgmt_security/models/effective_network_security_groups.rb'
40
+ autoload :SecurityTaskList, '2015-06-01-preview/generated/azure_mgmt_security/models/security_task_list.rb'
41
+ autoload :AdaptiveNetworkHardeningsList, '2015-06-01-preview/generated/azure_mgmt_security/models/adaptive_network_hardenings_list.rb'
42
+ autoload :TopologyList, '2015-06-01-preview/generated/azure_mgmt_security/models/topology_list.rb'
43
+ autoload :AdaptiveNetworkHardeningEnforceRequest, '2015-06-01-preview/generated/azure_mgmt_security/models/adaptive_network_hardening_enforce_request.rb'
44
+ autoload :SecurityTaskParameters, '2015-06-01-preview/generated/azure_mgmt_security/models/security_task_parameters.rb'
45
+ autoload :TopologyResource, '2015-06-01-preview/generated/azure_mgmt_security/models/topology_resource.rb'
46
+ autoload :AlertConfidenceReason, '2015-06-01-preview/generated/azure_mgmt_security/models/alert_confidence_reason.rb'
47
+ autoload :TopologySingleResource, '2015-06-01-preview/generated/azure_mgmt_security/models/topology_single_resource.rb'
48
+ autoload :AlertList, '2015-06-01-preview/generated/azure_mgmt_security/models/alert_list.rb'
49
+ autoload :ConnectedWorkspace, '2015-06-01-preview/generated/azure_mgmt_security/models/connected_workspace.rb'
50
+ autoload :ConnectableResource, '2015-06-01-preview/generated/azure_mgmt_security/models/connectable_resource.rb'
51
+ autoload :AadSolutionProperties, '2015-06-01-preview/generated/azure_mgmt_security/models/aad_solution_properties.rb'
52
+ autoload :AllowedConnectionsList, '2015-06-01-preview/generated/azure_mgmt_security/models/allowed_connections_list.rb'
53
+ autoload :TopologySingleResourceChild, '2015-06-01-preview/generated/azure_mgmt_security/models/topology_single_resource_child.rb'
54
+ autoload :AppWhitelistingIssueSummary, '2015-06-01-preview/generated/azure_mgmt_security/models/app_whitelisting_issue_summary.rb'
55
+ autoload :ExternalSecuritySolutionKind1, '2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution_kind1.rb'
56
+ autoload :PublisherInfo, '2015-06-01-preview/generated/azure_mgmt_security/models/publisher_info.rb'
57
+ autoload :ExternalSecuritySolutionProperties, '2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution_properties.rb'
58
+ autoload :PathRecommendation, '2015-06-01-preview/generated/azure_mgmt_security/models/path_recommendation.rb'
59
+ autoload :AadConnectivityState1, '2015-06-01-preview/generated/azure_mgmt_security/models/aad_connectivity_state1.rb'
60
+ autoload :AppWhitelistingGroups, '2015-06-01-preview/generated/azure_mgmt_security/models/app_whitelisting_groups.rb'
61
+ autoload :JitNetworkAccessPortRule, '2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_port_rule.rb'
62
+ autoload :DiscoveredSecuritySolution, '2015-06-01-preview/generated/azure_mgmt_security/models/discovered_security_solution.rb'
63
+ autoload :JitNetworkAccessPolicyVirtualMachine, '2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy_virtual_machine.rb'
64
+ autoload :ExternalSecuritySolution, '2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution.rb'
65
+ autoload :JitNetworkAccessRequestPort, '2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_request_port.rb'
66
+ autoload :Resource, '2015-06-01-preview/generated/azure_mgmt_security/models/resource.rb'
67
+ autoload :JitNetworkAccessRequestVirtualMachine, '2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_request_virtual_machine.rb'
68
+ autoload :TopologySingleResourceParent, '2015-06-01-preview/generated/azure_mgmt_security/models/topology_single_resource_parent.rb'
69
+ autoload :JitNetworkAccessRequest, '2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_request.rb'
70
+ autoload :AllowedConnectionsResource, '2015-06-01-preview/generated/azure_mgmt_security/models/allowed_connections_resource.rb'
71
+ autoload :JitNetworkAccessPolicy, '2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy.rb'
72
+ autoload :VmRecommendation, '2015-06-01-preview/generated/azure_mgmt_security/models/vm_recommendation.rb'
73
+ autoload :JitNetworkAccessPoliciesList, '2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policies_list.rb'
74
+ autoload :AppWhitelistingGroup, '2015-06-01-preview/generated/azure_mgmt_security/models/app_whitelisting_group.rb'
75
+ autoload :JitNetworkAccessPolicyInitiatePort, '2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_port.rb'
76
+ autoload :DiscoveredSecuritySolutionList, '2015-06-01-preview/generated/azure_mgmt_security/models/discovered_security_solution_list.rb'
77
+ autoload :JitNetworkAccessPolicyInitiateVirtualMachine, '2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_virtual_machine.rb'
78
+ autoload :AlertEntity, '2015-06-01-preview/generated/azure_mgmt_security/models/alert_entity.rb'
79
+ autoload :JitNetworkAccessPolicyInitiateRequest, '2015-06-01-preview/generated/azure_mgmt_security/models/jit_network_access_policy_initiate_request.rb'
80
+ autoload :Location, '2015-06-01-preview/generated/azure_mgmt_security/models/location.rb'
81
+ autoload :Kind, '2015-06-01-preview/generated/azure_mgmt_security/models/kind.rb'
82
+ autoload :AppWhitelistingPutGroupData, '2015-06-01-preview/generated/azure_mgmt_security/models/app_whitelisting_put_group_data.rb'
83
+ autoload :AscLocationList, '2015-06-01-preview/generated/azure_mgmt_security/models/asc_location_list.rb'
84
+ autoload :ConnectedResource, '2015-06-01-preview/generated/azure_mgmt_security/models/connected_resource.rb'
85
+ autoload :OperationDisplay, '2015-06-01-preview/generated/azure_mgmt_security/models/operation_display.rb'
86
+ autoload :OperationList, '2015-06-01-preview/generated/azure_mgmt_security/models/operation_list.rb'
87
+ autoload :UserRecommendation, '2015-06-01-preview/generated/azure_mgmt_security/models/user_recommendation.rb'
88
+ autoload :Operation, '2015-06-01-preview/generated/azure_mgmt_security/models/operation.rb'
89
+ autoload :AdaptiveNetworkHardening, '2015-06-01-preview/generated/azure_mgmt_security/models/adaptive_network_hardening.rb'
90
+ autoload :AscLocation, '2015-06-01-preview/generated/azure_mgmt_security/models/asc_location.rb'
91
+ autoload :Alert, '2015-06-01-preview/generated/azure_mgmt_security/models/alert.rb'
92
+ autoload :CefSolutionProperties, '2015-06-01-preview/generated/azure_mgmt_security/models/cef_solution_properties.rb'
93
+ autoload :CefExternalSecuritySolution, '2015-06-01-preview/generated/azure_mgmt_security/models/cef_external_security_solution.rb'
94
+ autoload :AtaSolutionProperties, '2015-06-01-preview/generated/azure_mgmt_security/models/ata_solution_properties.rb'
95
+ autoload :AtaExternalSecuritySolution, '2015-06-01-preview/generated/azure_mgmt_security/models/ata_external_security_solution.rb'
96
+ autoload :AadExternalSecuritySolution, '2015-06-01-preview/generated/azure_mgmt_security/models/aad_external_security_solution.rb'
97
+ autoload :SecurityTask, '2015-06-01-preview/generated/azure_mgmt_security/models/security_task.rb'
98
+ autoload :Direction, '2015-06-01-preview/generated/azure_mgmt_security/models/direction.rb'
99
+ autoload :TransportProtocol, '2015-06-01-preview/generated/azure_mgmt_security/models/transport_protocol.rb'
100
+ autoload :ReportedSeverity, '2015-06-01-preview/generated/azure_mgmt_security/models/reported_severity.rb'
101
+ autoload :SecurityFamily, '2015-06-01-preview/generated/azure_mgmt_security/models/security_family.rb'
102
+ autoload :AadConnectivityState, '2015-06-01-preview/generated/azure_mgmt_security/models/aad_connectivity_state.rb'
103
+ autoload :ExternalSecuritySolutionKind, '2015-06-01-preview/generated/azure_mgmt_security/models/external_security_solution_kind.rb'
104
+ autoload :Protocol, '2015-06-01-preview/generated/azure_mgmt_security/models/protocol.rb'
105
+ autoload :Status, '2015-06-01-preview/generated/azure_mgmt_security/models/status.rb'
106
+ autoload :StatusReason, '2015-06-01-preview/generated/azure_mgmt_security/models/status_reason.rb'
107
+ autoload :ConnectionType, '2015-06-01-preview/generated/azure_mgmt_security/models/connection_type.rb'
108
+ end
109
+ end
@@ -0,0 +1,313 @@
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 AdaptiveApplicationControls
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the AdaptiveApplicationControls 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
+ # Gets a list of application control VM/server groups for the subscription.
26
+ #
27
+ # @param include_path_recommendations [Boolean] Include the policy rules
28
+ # @param summary [Boolean] Return output in a summarized form
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [AppWhitelistingGroups] operation results.
33
+ #
34
+ def list(include_path_recommendations:nil, summary:nil, custom_headers:nil)
35
+ response = list_async(include_path_recommendations:include_path_recommendations, summary:summary, custom_headers:custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # Gets a list of application control VM/server groups for the subscription.
41
+ #
42
+ # @param include_path_recommendations [Boolean] Include the policy rules
43
+ # @param summary [Boolean] Return output in a summarized form
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(include_path_recommendations:nil, summary:nil, custom_headers:nil)
50
+ list_async(include_path_recommendations:include_path_recommendations, summary:summary, custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Gets a list of application control VM/server groups for the subscription.
55
+ #
56
+ # @param include_path_recommendations [Boolean] Include the policy rules
57
+ # @param summary [Boolean] Return output in a summarized form
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(include_path_recommendations:nil, summary:nil, custom_headers:nil)
64
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
65
+ 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?
66
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.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/applicationWhitelistings'
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,'includePathRecommendations' => include_path_recommendations,'summary' => summary},
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::AppWhitelistingGroups.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
+ # Gets an application control VM/server group.
119
+ #
120
+ # @param group_name [String] Name of an application control VM/server group
121
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
122
+ # will be added to the HTTP request.
123
+ #
124
+ # @return [AppWhitelistingGroup] operation results.
125
+ #
126
+ def get(group_name, custom_headers:nil)
127
+ response = get_async(group_name, custom_headers:custom_headers).value!
128
+ response.body unless response.nil?
129
+ end
130
+
131
+ #
132
+ # Gets an application control VM/server group.
133
+ #
134
+ # @param group_name [String] Name of an application control VM/server group
135
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
136
+ # will be added to the HTTP request.
137
+ #
138
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
139
+ #
140
+ def get_with_http_info(group_name, custom_headers:nil)
141
+ get_async(group_name, custom_headers:custom_headers).value!
142
+ end
143
+
144
+ #
145
+ # Gets an application control VM/server group.
146
+ #
147
+ # @param group_name [String] Name of an application control VM/server group
148
+ # @param [Hash{String => String}] A hash of custom headers that will be added
149
+ # to the HTTP request.
150
+ #
151
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
152
+ #
153
+ def get_async(group_name, custom_headers:nil)
154
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
155
+ 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?
156
+ fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
157
+ fail ArgumentError, 'group_name is nil' if group_name.nil?
158
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
159
+
160
+
161
+ request_headers = {}
162
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
163
+
164
+ # Set Headers
165
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
166
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
167
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}'
168
+
169
+ request_url = @base_url || @client.base_url
170
+
171
+ options = {
172
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
173
+ path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'groupName' => group_name},
174
+ query_params: {'api-version' => @client.api_version},
175
+ headers: request_headers.merge(custom_headers || {}),
176
+ base_url: request_url
177
+ }
178
+ promise = @client.make_request_async(:get, path_template, options)
179
+
180
+ promise = promise.then do |result|
181
+ http_response = result.response
182
+ status_code = http_response.status
183
+ response_content = http_response.body
184
+ unless status_code == 200
185
+ error_model = JSON.load(response_content)
186
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
187
+ end
188
+
189
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
190
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
191
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
192
+ # Deserialize Response
193
+ if status_code == 200
194
+ begin
195
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
196
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AppWhitelistingGroup.mapper()
197
+ result.body = @client.deserialize(result_mapper, parsed_response)
198
+ rescue Exception => e
199
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
200
+ end
201
+ end
202
+
203
+ result
204
+ end
205
+
206
+ promise.execute
207
+ end
208
+
209
+ #
210
+ # Update an application control VM/server group
211
+ #
212
+ # @param group_name [String] Name of an application control VM/server group
213
+ # @param body [AppWhitelistingPutGroupData] The updated VM/server group data
214
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
215
+ # will be added to the HTTP request.
216
+ #
217
+ # @return [AppWhitelistingGroup] operation results.
218
+ #
219
+ def put(group_name, body, custom_headers:nil)
220
+ response = put_async(group_name, body, custom_headers:custom_headers).value!
221
+ response.body unless response.nil?
222
+ end
223
+
224
+ #
225
+ # Update an application control VM/server group
226
+ #
227
+ # @param group_name [String] Name of an application control VM/server group
228
+ # @param body [AppWhitelistingPutGroupData] The updated VM/server group data
229
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
230
+ # will be added to the HTTP request.
231
+ #
232
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
233
+ #
234
+ def put_with_http_info(group_name, body, custom_headers:nil)
235
+ put_async(group_name, body, custom_headers:custom_headers).value!
236
+ end
237
+
238
+ #
239
+ # Update an application control VM/server group
240
+ #
241
+ # @param group_name [String] Name of an application control VM/server group
242
+ # @param body [AppWhitelistingPutGroupData] The updated VM/server group data
243
+ # @param [Hash{String => String}] A hash of custom headers that will be added
244
+ # to the HTTP request.
245
+ #
246
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
247
+ #
248
+ def put_async(group_name, body, custom_headers:nil)
249
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
250
+ 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?
251
+ fail ArgumentError, '@client.asc_location is nil' if @client.asc_location.nil?
252
+ fail ArgumentError, 'group_name is nil' if group_name.nil?
253
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
254
+ fail ArgumentError, 'body is nil' if body.nil?
255
+
256
+
257
+ request_headers = {}
258
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
259
+
260
+ # Set Headers
261
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
262
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
263
+
264
+ # Serialize Request
265
+ request_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AppWhitelistingPutGroupData.mapper()
266
+ request_content = @client.serialize(request_mapper, body)
267
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
268
+
269
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/applicationWhitelistings/{groupName}'
270
+
271
+ request_url = @base_url || @client.base_url
272
+
273
+ options = {
274
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
275
+ path_params: {'subscriptionId' => @client.subscription_id,'ascLocation' => @client.asc_location,'groupName' => group_name},
276
+ query_params: {'api-version' => @client.api_version},
277
+ body: request_content,
278
+ headers: request_headers.merge(custom_headers || {}),
279
+ base_url: request_url
280
+ }
281
+ promise = @client.make_request_async(:put, path_template, options)
282
+
283
+ promise = promise.then do |result|
284
+ http_response = result.response
285
+ status_code = http_response.status
286
+ response_content = http_response.body
287
+ unless status_code == 200
288
+ error_model = JSON.load(response_content)
289
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
290
+ end
291
+
292
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
293
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
294
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
295
+ # Deserialize Response
296
+ if status_code == 200
297
+ begin
298
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
299
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AppWhitelistingGroup.mapper()
300
+ result.body = @client.deserialize(result_mapper, parsed_response)
301
+ rescue Exception => e
302
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
303
+ end
304
+ end
305
+
306
+ result
307
+ end
308
+
309
+ promise.execute
310
+ end
311
+
312
+ end
313
+ end
@@ -0,0 +1,539 @@
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 AdaptiveNetworkHardenings
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the AdaptiveNetworkHardenings 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
+ # Gets a list of Adaptive Network Hardenings resources in scope of an extended
26
+ # resource.
27
+ #
28
+ # @param resource_group_name [String] The name of the resource group within the
29
+ # user's subscription. The name is case insensitive.
30
+ # @param resource_namespace [String] The Namespace of the resource.
31
+ # @param resource_type [String] The type of the resource.
32
+ # @param resource_name [String] Name of the resource.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [Array<AdaptiveNetworkHardening>] operation results.
37
+ #
38
+ def list_by_extended_resource(resource_group_name, resource_namespace, resource_type, resource_name, custom_headers:nil)
39
+ first_page = list_by_extended_resource_as_lazy(resource_group_name, resource_namespace, resource_type, resource_name, custom_headers:custom_headers)
40
+ first_page.get_all_items
41
+ end
42
+
43
+ #
44
+ # Gets a list of Adaptive Network Hardenings resources in scope of an extended
45
+ # resource.
46
+ #
47
+ # @param resource_group_name [String] The name of the resource group within the
48
+ # user's subscription. The name is case insensitive.
49
+ # @param resource_namespace [String] The Namespace of the resource.
50
+ # @param resource_type [String] The type of the resource.
51
+ # @param resource_name [String] Name of the resource.
52
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
+ # will be added to the HTTP request.
54
+ #
55
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
56
+ #
57
+ def list_by_extended_resource_with_http_info(resource_group_name, resource_namespace, resource_type, resource_name, custom_headers:nil)
58
+ list_by_extended_resource_async(resource_group_name, resource_namespace, resource_type, resource_name, custom_headers:custom_headers).value!
59
+ end
60
+
61
+ #
62
+ # Gets a list of Adaptive Network Hardenings resources in scope of an extended
63
+ # resource.
64
+ #
65
+ # @param resource_group_name [String] The name of the resource group within the
66
+ # user's subscription. The name is case insensitive.
67
+ # @param resource_namespace [String] The Namespace of the resource.
68
+ # @param resource_type [String] The type of the resource.
69
+ # @param resource_name [String] Name of the resource.
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def list_by_extended_resource_async(resource_group_name, resource_namespace, resource_type, resource_name, custom_headers:nil)
76
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
77
+ 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?
78
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
79
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
80
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
81
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
82
+ fail ArgumentError, 'resource_namespace is nil' if resource_namespace.nil?
83
+ fail ArgumentError, 'resource_type is nil' if resource_type.nil?
84
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
85
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
86
+
87
+
88
+ request_headers = {}
89
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
90
+
91
+ # Set Headers
92
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
93
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
94
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings'
95
+
96
+ request_url = @base_url || @client.base_url
97
+
98
+ options = {
99
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
100
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceNamespace' => resource_namespace,'resourceType' => resource_type,'resourceName' => resource_name},
101
+ query_params: {'api-version' => @client.api_version},
102
+ headers: request_headers.merge(custom_headers || {}),
103
+ base_url: request_url
104
+ }
105
+ promise = @client.make_request_async(:get, path_template, options)
106
+
107
+ promise = promise.then do |result|
108
+ http_response = result.response
109
+ status_code = http_response.status
110
+ response_content = http_response.body
111
+ unless status_code == 200
112
+ error_model = JSON.load(response_content)
113
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
114
+ end
115
+
116
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
117
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
118
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
119
+ # Deserialize Response
120
+ if status_code == 200
121
+ begin
122
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
123
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AdaptiveNetworkHardeningsList.mapper()
124
+ result.body = @client.deserialize(result_mapper, parsed_response)
125
+ rescue Exception => e
126
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
127
+ end
128
+ end
129
+
130
+ result
131
+ end
132
+
133
+ promise.execute
134
+ end
135
+
136
+ #
137
+ # Gets a single Adaptive Network Hardening resource
138
+ #
139
+ # @param resource_group_name [String] The name of the resource group within the
140
+ # user's subscription. The name is case insensitive.
141
+ # @param resource_namespace [String] The Namespace of the resource.
142
+ # @param resource_type [String] The type of the resource.
143
+ # @param resource_name [String] Name of the resource.
144
+ # @param adaptive_network_hardening_resource_name [String] The name of the
145
+ # Adaptive Network Hardening resource.
146
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
147
+ # will be added to the HTTP request.
148
+ #
149
+ # @return [AdaptiveNetworkHardening] operation results.
150
+ #
151
+ def get(resource_group_name, resource_namespace, resource_type, resource_name, adaptive_network_hardening_resource_name, custom_headers:nil)
152
+ response = get_async(resource_group_name, resource_namespace, resource_type, resource_name, adaptive_network_hardening_resource_name, custom_headers:custom_headers).value!
153
+ response.body unless response.nil?
154
+ end
155
+
156
+ #
157
+ # Gets a single Adaptive Network Hardening resource
158
+ #
159
+ # @param resource_group_name [String] The name of the resource group within the
160
+ # user's subscription. The name is case insensitive.
161
+ # @param resource_namespace [String] The Namespace of the resource.
162
+ # @param resource_type [String] The type of the resource.
163
+ # @param resource_name [String] Name of the resource.
164
+ # @param adaptive_network_hardening_resource_name [String] The name of the
165
+ # Adaptive Network Hardening resource.
166
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
167
+ # will be added to the HTTP request.
168
+ #
169
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
170
+ #
171
+ def get_with_http_info(resource_group_name, resource_namespace, resource_type, resource_name, adaptive_network_hardening_resource_name, custom_headers:nil)
172
+ get_async(resource_group_name, resource_namespace, resource_type, resource_name, adaptive_network_hardening_resource_name, custom_headers:custom_headers).value!
173
+ end
174
+
175
+ #
176
+ # Gets a single Adaptive Network Hardening resource
177
+ #
178
+ # @param resource_group_name [String] The name of the resource group within the
179
+ # user's subscription. The name is case insensitive.
180
+ # @param resource_namespace [String] The Namespace of the resource.
181
+ # @param resource_type [String] The type of the resource.
182
+ # @param resource_name [String] Name of the resource.
183
+ # @param adaptive_network_hardening_resource_name [String] The name of the
184
+ # Adaptive Network Hardening resource.
185
+ # @param [Hash{String => String}] A hash of custom headers that will be added
186
+ # to the HTTP request.
187
+ #
188
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
189
+ #
190
+ def get_async(resource_group_name, resource_namespace, resource_type, resource_name, adaptive_network_hardening_resource_name, custom_headers:nil)
191
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
192
+ 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?
193
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
194
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
195
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
196
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
197
+ fail ArgumentError, 'resource_namespace is nil' if resource_namespace.nil?
198
+ fail ArgumentError, 'resource_type is nil' if resource_type.nil?
199
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
200
+ fail ArgumentError, 'adaptive_network_hardening_resource_name is nil' if adaptive_network_hardening_resource_name.nil?
201
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
202
+
203
+
204
+ request_headers = {}
205
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
206
+
207
+ # Set Headers
208
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
209
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
210
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName}'
211
+
212
+ request_url = @base_url || @client.base_url
213
+
214
+ options = {
215
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
216
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceNamespace' => resource_namespace,'resourceType' => resource_type,'resourceName' => resource_name,'adaptiveNetworkHardeningResourceName' => adaptive_network_hardening_resource_name},
217
+ query_params: {'api-version' => @client.api_version},
218
+ headers: request_headers.merge(custom_headers || {}),
219
+ base_url: request_url
220
+ }
221
+ promise = @client.make_request_async(:get, path_template, options)
222
+
223
+ promise = promise.then do |result|
224
+ http_response = result.response
225
+ status_code = http_response.status
226
+ response_content = http_response.body
227
+ unless status_code == 200
228
+ error_model = JSON.load(response_content)
229
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
230
+ end
231
+
232
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
233
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
234
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
235
+ # Deserialize Response
236
+ if status_code == 200
237
+ begin
238
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
239
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AdaptiveNetworkHardening.mapper()
240
+ result.body = @client.deserialize(result_mapper, parsed_response)
241
+ rescue Exception => e
242
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
243
+ end
244
+ end
245
+
246
+ result
247
+ end
248
+
249
+ promise.execute
250
+ end
251
+
252
+ #
253
+ # Enforces the given rules on the NSG(s) listed in the request
254
+ #
255
+ # @param resource_group_name [String] The name of the resource group within the
256
+ # user's subscription. The name is case insensitive.
257
+ # @param resource_namespace [String] The Namespace of the resource.
258
+ # @param resource_type [String] The type of the resource.
259
+ # @param resource_name [String] Name of the resource.
260
+ # @param adaptive_network_hardening_resource_name [String] The name of the
261
+ # Adaptive Network Hardening resource.
262
+ # @param body [AdaptiveNetworkHardeningEnforceRequest]
263
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
264
+ # will be added to the HTTP request.
265
+ #
266
+ def enforce(resource_group_name, resource_namespace, resource_type, resource_name, adaptive_network_hardening_resource_name, body, custom_headers:nil)
267
+ response = enforce_async(resource_group_name, resource_namespace, resource_type, resource_name, adaptive_network_hardening_resource_name, body, custom_headers:custom_headers).value!
268
+ nil
269
+ end
270
+
271
+ #
272
+ # @param resource_group_name [String] The name of the resource group within the
273
+ # user's subscription. The name is case insensitive.
274
+ # @param resource_namespace [String] The Namespace of the resource.
275
+ # @param resource_type [String] The type of the resource.
276
+ # @param resource_name [String] Name of the resource.
277
+ # @param adaptive_network_hardening_resource_name [String] The name of the
278
+ # Adaptive Network Hardening resource.
279
+ # @param body [AdaptiveNetworkHardeningEnforceRequest]
280
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
281
+ # will be added to the HTTP request.
282
+ #
283
+ # @return [Concurrent::Promise] promise which provides async access to http
284
+ # response.
285
+ #
286
+ def enforce_async(resource_group_name, resource_namespace, resource_type, resource_name, adaptive_network_hardening_resource_name, body, custom_headers:nil)
287
+ # Send request
288
+ promise = begin_enforce_async(resource_group_name, resource_namespace, resource_type, resource_name, adaptive_network_hardening_resource_name, body, custom_headers:custom_headers)
289
+
290
+ promise = promise.then do |response|
291
+ # Defining deserialization method.
292
+ deserialize_method = lambda do |parsed_response|
293
+ end
294
+
295
+ # Waiting for response.
296
+ @client.get_long_running_operation_result(response, deserialize_method)
297
+ end
298
+
299
+ promise
300
+ end
301
+
302
+ #
303
+ # Enforces the given rules on the NSG(s) listed in the request
304
+ #
305
+ # @param resource_group_name [String] The name of the resource group within the
306
+ # user's subscription. The name is case insensitive.
307
+ # @param resource_namespace [String] The Namespace of the resource.
308
+ # @param resource_type [String] The type of the resource.
309
+ # @param resource_name [String] Name of the resource.
310
+ # @param adaptive_network_hardening_resource_name [String] The name of the
311
+ # Adaptive Network Hardening resource.
312
+ # @param body [AdaptiveNetworkHardeningEnforceRequest]
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 begin_enforce(resource_group_name, resource_namespace, resource_type, resource_name, adaptive_network_hardening_resource_name, body, custom_headers:nil)
318
+ response = begin_enforce_async(resource_group_name, resource_namespace, resource_type, resource_name, adaptive_network_hardening_resource_name, body, custom_headers:custom_headers).value!
319
+ nil
320
+ end
321
+
322
+ #
323
+ # Enforces the given rules on the NSG(s) listed in the request
324
+ #
325
+ # @param resource_group_name [String] The name of the resource group within the
326
+ # user's subscription. The name is case insensitive.
327
+ # @param resource_namespace [String] The Namespace of the resource.
328
+ # @param resource_type [String] The type of the resource.
329
+ # @param resource_name [String] Name of the resource.
330
+ # @param adaptive_network_hardening_resource_name [String] The name of the
331
+ # Adaptive Network Hardening resource.
332
+ # @param body [AdaptiveNetworkHardeningEnforceRequest]
333
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
334
+ # will be added to the HTTP request.
335
+ #
336
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
337
+ #
338
+ def begin_enforce_with_http_info(resource_group_name, resource_namespace, resource_type, resource_name, adaptive_network_hardening_resource_name, body, custom_headers:nil)
339
+ begin_enforce_async(resource_group_name, resource_namespace, resource_type, resource_name, adaptive_network_hardening_resource_name, body, custom_headers:custom_headers).value!
340
+ end
341
+
342
+ #
343
+ # Enforces the given rules on the NSG(s) listed in the request
344
+ #
345
+ # @param resource_group_name [String] The name of the resource group within the
346
+ # user's subscription. The name is case insensitive.
347
+ # @param resource_namespace [String] The Namespace of the resource.
348
+ # @param resource_type [String] The type of the resource.
349
+ # @param resource_name [String] Name of the resource.
350
+ # @param adaptive_network_hardening_resource_name [String] The name of the
351
+ # Adaptive Network Hardening resource.
352
+ # @param body [AdaptiveNetworkHardeningEnforceRequest]
353
+ # @param [Hash{String => String}] A hash of custom headers that will be added
354
+ # to the HTTP request.
355
+ #
356
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
357
+ #
358
+ def begin_enforce_async(resource_group_name, resource_namespace, resource_type, resource_name, adaptive_network_hardening_resource_name, body, custom_headers:nil)
359
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
360
+ 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?
361
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
362
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
363
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
364
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
365
+ fail ArgumentError, 'resource_namespace is nil' if resource_namespace.nil?
366
+ fail ArgumentError, 'resource_type is nil' if resource_type.nil?
367
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
368
+ fail ArgumentError, 'adaptive_network_hardening_resource_name is nil' if adaptive_network_hardening_resource_name.nil?
369
+ adaptive_network_hardening_enforce_action = 'enforce'
370
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
371
+ fail ArgumentError, 'body is nil' if body.nil?
372
+
373
+
374
+ request_headers = {}
375
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
376
+
377
+ # Set Headers
378
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
379
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
380
+
381
+ # Serialize Request
382
+ request_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AdaptiveNetworkHardeningEnforceRequest.mapper()
383
+ request_content = @client.serialize(request_mapper, body)
384
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
385
+
386
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Security/adaptiveNetworkHardenings/{adaptiveNetworkHardeningResourceName}/{adaptiveNetworkHardeningEnforceAction}'
387
+
388
+ request_url = @base_url || @client.base_url
389
+
390
+ options = {
391
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
392
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceNamespace' => resource_namespace,'resourceType' => resource_type,'resourceName' => resource_name,'adaptiveNetworkHardeningResourceName' => adaptive_network_hardening_resource_name,'adaptiveNetworkHardeningEnforceAction' => adaptive_network_hardening_enforce_action},
393
+ query_params: {'api-version' => @client.api_version},
394
+ body: request_content,
395
+ headers: request_headers.merge(custom_headers || {}),
396
+ base_url: request_url
397
+ }
398
+ promise = @client.make_request_async(:post, path_template, options)
399
+
400
+ promise = promise.then do |result|
401
+ http_response = result.response
402
+ status_code = http_response.status
403
+ response_content = http_response.body
404
+ unless status_code == 200 || status_code == 202
405
+ error_model = JSON.load(response_content)
406
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
407
+ end
408
+
409
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
410
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
411
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
412
+
413
+ result
414
+ end
415
+
416
+ promise.execute
417
+ end
418
+
419
+ #
420
+ # Gets a list of Adaptive Network Hardenings resources in scope of an extended
421
+ # resource.
422
+ #
423
+ # @param next_page_link [String] The NextLink from the previous successful call
424
+ # to List operation.
425
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
426
+ # will be added to the HTTP request.
427
+ #
428
+ # @return [AdaptiveNetworkHardeningsList] operation results.
429
+ #
430
+ def list_by_extended_resource_next(next_page_link, custom_headers:nil)
431
+ response = list_by_extended_resource_next_async(next_page_link, custom_headers:custom_headers).value!
432
+ response.body unless response.nil?
433
+ end
434
+
435
+ #
436
+ # Gets a list of Adaptive Network Hardenings resources in scope of an extended
437
+ # resource.
438
+ #
439
+ # @param next_page_link [String] The NextLink from the previous successful call
440
+ # to List operation.
441
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
442
+ # will be added to the HTTP request.
443
+ #
444
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
445
+ #
446
+ def list_by_extended_resource_next_with_http_info(next_page_link, custom_headers:nil)
447
+ list_by_extended_resource_next_async(next_page_link, custom_headers:custom_headers).value!
448
+ end
449
+
450
+ #
451
+ # Gets a list of Adaptive Network Hardenings resources in scope of an extended
452
+ # resource.
453
+ #
454
+ # @param next_page_link [String] The NextLink from the previous successful call
455
+ # to List operation.
456
+ # @param [Hash{String => String}] A hash of custom headers that will be added
457
+ # to the HTTP request.
458
+ #
459
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
460
+ #
461
+ def list_by_extended_resource_next_async(next_page_link, custom_headers:nil)
462
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
463
+
464
+
465
+ request_headers = {}
466
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
467
+
468
+ # Set Headers
469
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
470
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
471
+ path_template = '{nextLink}'
472
+
473
+ request_url = @base_url || @client.base_url
474
+
475
+ options = {
476
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
477
+ skip_encoding_path_params: {'nextLink' => next_page_link},
478
+ headers: request_headers.merge(custom_headers || {}),
479
+ base_url: request_url
480
+ }
481
+ promise = @client.make_request_async(:get, path_template, options)
482
+
483
+ promise = promise.then do |result|
484
+ http_response = result.response
485
+ status_code = http_response.status
486
+ response_content = http_response.body
487
+ unless status_code == 200
488
+ error_model = JSON.load(response_content)
489
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
490
+ end
491
+
492
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
493
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
494
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
495
+ # Deserialize Response
496
+ if status_code == 200
497
+ begin
498
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
499
+ result_mapper = Azure::Security::Mgmt::V2015_06_01_preview::Models::AdaptiveNetworkHardeningsList.mapper()
500
+ result.body = @client.deserialize(result_mapper, parsed_response)
501
+ rescue Exception => e
502
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
503
+ end
504
+ end
505
+
506
+ result
507
+ end
508
+
509
+ promise.execute
510
+ end
511
+
512
+ #
513
+ # Gets a list of Adaptive Network Hardenings resources in scope of an extended
514
+ # resource.
515
+ #
516
+ # @param resource_group_name [String] The name of the resource group within the
517
+ # user's subscription. The name is case insensitive.
518
+ # @param resource_namespace [String] The Namespace of the resource.
519
+ # @param resource_type [String] The type of the resource.
520
+ # @param resource_name [String] Name of the resource.
521
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
522
+ # will be added to the HTTP request.
523
+ #
524
+ # @return [AdaptiveNetworkHardeningsList] which provide lazy access to pages of
525
+ # the response.
526
+ #
527
+ def list_by_extended_resource_as_lazy(resource_group_name, resource_namespace, resource_type, resource_name, custom_headers:nil)
528
+ response = list_by_extended_resource_async(resource_group_name, resource_namespace, resource_type, resource_name, custom_headers:custom_headers).value!
529
+ unless response.nil?
530
+ page = response.body
531
+ page.next_method = Proc.new do |next_page_link|
532
+ list_by_extended_resource_next_async(next_page_link, custom_headers:custom_headers)
533
+ end
534
+ page
535
+ end
536
+ end
537
+
538
+ end
539
+ end