azure_mgmt_security_insights 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (331) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights.rb +254 -0
  4. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/actions.rb +255 -0
  5. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/alert_rule_templates.rb +365 -0
  6. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/alert_rules.rb +966 -0
  7. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/bookmark_operations.rb +154 -0
  8. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/bookmark_relations.rb +651 -0
  9. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/bookmarks.rb +602 -0
  10. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/case_comments.rb +155 -0
  11. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/case_relations.rb +652 -0
  12. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/cases.rb +752 -0
  13. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/cases_aggregations.rb +140 -0
  14. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/comments.rb +287 -0
  15. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/data_connectors.rb +603 -0
  16. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/data_connectors_check_requirements_operations.rb +150 -0
  17. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/entities.rb +492 -0
  18. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/entities_relations.rb +287 -0
  19. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/entity_queries.rb +364 -0
  20. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/entity_relations.rb +144 -0
  21. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/incident_comments.rb +652 -0
  22. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/incident_relations.rb +651 -0
  23. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/incidents.rb +976 -0
  24. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/aadcheck_requirements.rb +61 -0
  25. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/aaddata_connector.rb +109 -0
  26. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/aatpcheck_requirements.rb +62 -0
  27. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/aatpdata_connector.rb +109 -0
  28. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/account_entity.rb +261 -0
  29. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/action_properties_base.rb +47 -0
  30. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/action_request.rb +93 -0
  31. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/action_response.rb +96 -0
  32. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/actions_list.rb +99 -0
  33. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/aggregations.rb +82 -0
  34. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/aggregations_kind.rb +49 -0
  35. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/alert_rule.rb +95 -0
  36. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/alert_rule_kind.rb +17 -0
  37. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/alert_rule_kind1.rb +47 -0
  38. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/alert_rule_template.rb +84 -0
  39. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/alert_rule_template_data_source.rb +66 -0
  40. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/alert_rule_template_properties_base.rb +115 -0
  41. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/alert_rule_templates_list.rb +101 -0
  42. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/alert_rules_list.rb +101 -0
  43. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/alert_severity.rb +18 -0
  44. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/alert_status.rb +19 -0
  45. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/alerts_data_type_of_data_connector.rb +48 -0
  46. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/alerts_data_type_of_data_connector_alerts.rb +43 -0
  47. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/asccheck_requirements.rb +62 -0
  48. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/ascdata_connector.rb +110 -0
  49. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/attack_tactic.rb +27 -0
  50. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/aws_cloud_trail_check_requirements.rb +50 -0
  51. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/aws_cloud_trail_data_connector.rb +110 -0
  52. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/aws_cloud_trail_data_connector_data_types.rb +48 -0
  53. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/aws_cloud_trail_data_connector_data_types_logs.rb +43 -0
  54. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/azure_resource_entity.rb +136 -0
  55. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/bookmark.rb +191 -0
  56. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/bookmark_expand_parameters.rb +71 -0
  57. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/bookmark_expand_response.rb +60 -0
  58. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/bookmark_expand_response_value.rb +57 -0
  59. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/bookmark_list.rb +99 -0
  60. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/case_comment.rb +98 -0
  61. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/case_comment_list.rb +99 -0
  62. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/case_list.rb +99 -0
  63. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/case_model.rb +293 -0
  64. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/case_relation.rb +123 -0
  65. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/case_relation_list.rb +99 -0
  66. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/case_severity.rb +19 -0
  67. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/case_status.rb +18 -0
  68. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/cases_aggregation.rb +103 -0
  69. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/cases_aggregation_by_severity_properties.rb +96 -0
  70. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/cases_aggregation_by_status_properties.rb +83 -0
  71. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/client_info.rb +79 -0
  72. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/close_reason.rb +19 -0
  73. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/cloud_application_entity.rb +150 -0
  74. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/confidence_level.rb +17 -0
  75. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/confidence_score_status.rb +18 -0
  76. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/data_connector.rb +102 -0
  77. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/data_connector_authorization_state.rb +16 -0
  78. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/data_connector_data_type_common.rb +47 -0
  79. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/data_connector_kind.rb +24 -0
  80. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/data_connector_kind1.rb +51 -0
  81. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/data_connector_license_state.rb +17 -0
  82. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/data_connector_list.rb +101 -0
  83. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/data_connector_requirements_state.rb +59 -0
  84. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/data_connector_tenant_id.rb +46 -0
  85. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/data_connector_with_alerts_properties.rb +48 -0
  86. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/data_connectors_check_requirements.rb +54 -0
  87. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/data_type_state.rb +16 -0
  88. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/dns_entity.rb +170 -0
  89. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/elevation_token.rb +17 -0
  90. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/entities_matching_method.rb +17 -0
  91. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/entity.rb +98 -0
  92. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/entity_analytics.rb +97 -0
  93. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/entity_common_properties.rb +70 -0
  94. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/entity_expand_parameters.rb +71 -0
  95. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/entity_expand_response.rb +60 -0
  96. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/entity_expand_response_value.rb +57 -0
  97. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/entity_kind.rb +31 -0
  98. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/entity_kind1.rb +50 -0
  99. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/entity_list.rb +101 -0
  100. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/entity_query.rb +159 -0
  101. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/entity_query_list.rb +99 -0
  102. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/entity_type.rb +31 -0
  103. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/event_grouping_aggregation_kind.rb +16 -0
  104. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/event_grouping_settings.rb +47 -0
  105. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/expansion_result_aggregation.rb +85 -0
  106. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/expansion_results_metadata.rb +56 -0
  107. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/eyes_on.rb +97 -0
  108. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/file_entity.rb +170 -0
  109. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/file_hash_algorithm.rb +19 -0
  110. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/file_hash_entity.rb +137 -0
  111. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/fusion_alert_rule.rb +179 -0
  112. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/fusion_alert_rule_template.rb +188 -0
  113. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/geo_location.rb +126 -0
  114. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/grouping_configuration.rb +101 -0
  115. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/grouping_entity_type.rb +18 -0
  116. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/host_entity.rb +224 -0
  117. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/hunting_bookmark.rb +244 -0
  118. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident.rb +291 -0
  119. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_additional_data.rb +111 -0
  120. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_alert_list.rb +55 -0
  121. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_bookmark_list.rb +55 -0
  122. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_classification.rb +18 -0
  123. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_classification_reason.rb +18 -0
  124. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_comment.rb +118 -0
  125. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_comment_list.rb +99 -0
  126. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_configuration.rb +60 -0
  127. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_entities_response.rb +78 -0
  128. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_entities_results_metadata.rb +63 -0
  129. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_info.rb +80 -0
  130. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_label.rb +59 -0
  131. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_label_type.rb +16 -0
  132. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_list.rb +99 -0
  133. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_owner_info.rb +80 -0
  134. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_severity.rb +18 -0
  135. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/incident_status.rb +17 -0
  136. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/io_tdevice_entity.rb +218 -0
  137. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/ip_entity.rb +160 -0
  138. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/kill_chain_intent.rb +28 -0
  139. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/malware_entity.rb +178 -0
  140. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/mcascheck_requirements.rb +62 -0
  141. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/mcasdata_connector.rb +109 -0
  142. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/mcasdata_connector_data_types.rb +58 -0
  143. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/mcasdata_connector_data_types_discovery_logs.rb +43 -0
  144. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/mdatpcheck_requirements.rb +62 -0
  145. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/mdatpdata_connector.rb +110 -0
  146. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/microsoft_security_incident_creation_alert_rule.rb +221 -0
  147. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/microsoft_security_incident_creation_alert_rule_common_properties.rb +112 -0
  148. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/microsoft_security_incident_creation_alert_rule_template.rb +234 -0
  149. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/microsoft_security_product_name.rb +21 -0
  150. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/office_atpcheck_requirements.rb +62 -0
  151. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/office_atpdata_connector.rb +110 -0
  152. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/office_consent.rb +85 -0
  153. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/office_consent_list.rb +99 -0
  154. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/office_data_connector.rb +109 -0
  155. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/office_data_connector_data_types.rb +73 -0
  156. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/office_data_connector_data_types_exchange.rb +43 -0
  157. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/office_data_connector_data_types_share_point.rb +43 -0
  158. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/office_data_connector_data_types_teams.rb +43 -0
  159. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/operation.rb +58 -0
  160. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/operation_display.rb +79 -0
  161. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/operations_list.rb +98 -0
  162. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/osfamily.rb +18 -0
  163. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/process_entity.rb +221 -0
  164. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/registry_hive.rb +24 -0
  165. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/registry_key_entity.rb +141 -0
  166. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/registry_value_entity.rb +163 -0
  167. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/registry_value_kind.rb +22 -0
  168. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/relation.rb +117 -0
  169. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/relation_base.rb +86 -0
  170. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/relation_list.rb +99 -0
  171. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/relation_node.rb +89 -0
  172. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/relation_node_kind.rb +16 -0
  173. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/relation_types.rb +15 -0
  174. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/relations_model_input.rb +114 -0
  175. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/resource.rb +80 -0
  176. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/resource_with_etag.rb +82 -0
  177. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/scheduled_alert_rule.rb +285 -0
  178. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/scheduled_alert_rule_common_properties.rb +119 -0
  179. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/scheduled_alert_rule_template.rb +260 -0
  180. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/security_alert.rb +462 -0
  181. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/security_alert_properties_confidence_reasons_item.rb +60 -0
  182. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/security_group_entity.rb +150 -0
  183. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/setting_kind.rb +17 -0
  184. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/setting_list.rb +57 -0
  185. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/settings.rb +95 -0
  186. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/settings_kind.rb +47 -0
  187. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/source.rb +16 -0
  188. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/template_status.rb +17 -0
  189. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence.rb +108 -0
  190. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_append_tags_request_body.rb +54 -0
  191. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_arm_stix_query.rb +227 -0
  192. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_arm_stix_sort_by.rb +17 -0
  193. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_arm_stix_sort_by1.rb +58 -0
  194. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_granular_marking_model.rb +76 -0
  195. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_indicator_model.rb +410 -0
  196. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_indicator_without_read_only_fields.rb +382 -0
  197. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_kill_chain_phase.rb +57 -0
  198. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_metric.rb +106 -0
  199. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_metric_entity.rb +57 -0
  200. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_metric_resource.rb +47 -0
  201. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_metric_resource_list.rb +56 -0
  202. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_resource.rb +93 -0
  203. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_resource_kind.rb +15 -0
  204. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_resource_kind1.rb +48 -0
  205. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/threat_intelligence_resource_list.rb +102 -0
  206. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/ti_taxii_check_requirements.rb +61 -0
  207. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/ti_taxii_data_connector.rb +175 -0
  208. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/ti_taxii_data_connector_data_types.rb +48 -0
  209. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/ti_taxii_data_connector_data_types_taxii_client.rb +43 -0
  210. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/ticheck_requirements.rb +61 -0
  211. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/tidata_connector.rb +109 -0
  212. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/tidata_connector_data_types.rb +49 -0
  213. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/tidata_connector_data_types_indicators.rb +43 -0
  214. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/trigger_operator.rb +18 -0
  215. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/ueba.rb +105 -0
  216. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/ueba_data_sources.rb +18 -0
  217. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/url_entity.rb +124 -0
  218. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/user_info.rb +70 -0
  219. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/watchlist.rb +256 -0
  220. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/watchlist_item.rb +185 -0
  221. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/models/watchlist_list.rb +99 -0
  222. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/module_definition.rb +9 -0
  223. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/office_consents.rb +468 -0
  224. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/operations.rb +219 -0
  225. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/product_settings.rb +487 -0
  226. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/security_insights.rb +384 -0
  227. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/threat_intelligence_indicator.rb +494 -0
  228. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/threat_intelligence_indicator_metrics.rb +139 -0
  229. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/threat_intelligence_indicator_upsert.rb +167 -0
  230. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/threat_intelligence_indicators.rb +283 -0
  231. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/threat_intelligence_indicators_list.rb +267 -0
  232. data/lib/2019-01-01-preview/generated/azure_mgmt_security_insights/watchlists.rb +814 -0
  233. data/lib/2020-01-01/generated/azure_mgmt_security_insights.rb +116 -0
  234. data/lib/2020-01-01/generated/azure_mgmt_security_insights/actions.rb +246 -0
  235. data/lib/2020-01-01/generated/azure_mgmt_security_insights/alert_rule_templates.rb +349 -0
  236. data/lib/2020-01-01/generated/azure_mgmt_security_insights/alert_rules.rb +915 -0
  237. data/lib/2020-01-01/generated/azure_mgmt_security_insights/bookmarks.rb +572 -0
  238. data/lib/2020-01-01/generated/azure_mgmt_security_insights/data_connectors.rb +573 -0
  239. data/lib/2020-01-01/generated/azure_mgmt_security_insights/incident_comments.rb +512 -0
  240. data/lib/2020-01-01/generated/azure_mgmt_security_insights/incidents.rb +604 -0
  241. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/aaddata_connector.rb +109 -0
  242. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/aatpdata_connector.rb +109 -0
  243. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/action_properties_base.rb +47 -0
  244. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/action_request.rb +93 -0
  245. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/action_response.rb +96 -0
  246. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/actions_list.rb +99 -0
  247. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/alert_rule.rb +79 -0
  248. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/alert_rule_kind.rb +17 -0
  249. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/alert_rule_template.rb +71 -0
  250. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/alert_rule_template_data_source.rb +66 -0
  251. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/alert_rule_templates_list.rb +101 -0
  252. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/alert_rules_list.rb +101 -0
  253. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/alert_severity.rb +18 -0
  254. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/alerts_data_type_of_data_connector.rb +47 -0
  255. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/ascdata_connector.rb +110 -0
  256. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/attack_tactic.rb +26 -0
  257. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/aws_cloud_trail_data_connector.rb +110 -0
  258. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/aws_cloud_trail_data_connector_data_types.rb +48 -0
  259. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/aws_cloud_trail_data_connector_data_types_logs.rb +43 -0
  260. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/bookmark.rb +191 -0
  261. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/bookmark_list.rb +99 -0
  262. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/case_severity.rb +19 -0
  263. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/client_info.rb +79 -0
  264. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/data_connector.rb +79 -0
  265. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/data_connector_data_type_common.rb +47 -0
  266. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/data_connector_kind.rb +22 -0
  267. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/data_connector_list.rb +101 -0
  268. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/data_connector_tenant_id.rb +46 -0
  269. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/data_connector_with_alerts_properties.rb +48 -0
  270. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/data_type_state.rb +16 -0
  271. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/error_additional_info.rb +59 -0
  272. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/error_response.rb +117 -0
  273. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/fusion_alert_rule.rb +179 -0
  274. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/fusion_alert_rule_template.rb +188 -0
  275. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/incident.rb +291 -0
  276. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/incident_additional_data.rb +111 -0
  277. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/incident_classification.rb +18 -0
  278. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/incident_classification_reason.rb +18 -0
  279. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/incident_comment.rb +98 -0
  280. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/incident_comment_list.rb +99 -0
  281. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/incident_info.rb +80 -0
  282. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/incident_label.rb +59 -0
  283. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/incident_label_type.rb +16 -0
  284. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/incident_list.rb +99 -0
  285. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/incident_owner_info.rb +80 -0
  286. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/incident_severity.rb +18 -0
  287. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/incident_status.rb +17 -0
  288. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/license_status.rb +16 -0
  289. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/mcasdata_connector.rb +109 -0
  290. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/mcasdata_connector_data_types.rb +58 -0
  291. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/mdatpdata_connector.rb +110 -0
  292. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/microsoft_security_incident_creation_alert_rule.rb +220 -0
  293. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/microsoft_security_incident_creation_alert_rule_common_properties.rb +111 -0
  294. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/microsoft_security_incident_creation_alert_rule_template.rb +233 -0
  295. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/microsoft_security_product_name.rb +19 -0
  296. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/office_consent.rb +85 -0
  297. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/office_consent_list.rb +67 -0
  298. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/office_data_connector.rb +109 -0
  299. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/office_data_connector_data_types.rb +61 -0
  300. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/office_data_connector_data_types_exchange.rb +43 -0
  301. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/office_data_connector_data_types_share_point.rb +43 -0
  302. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/operation.rb +58 -0
  303. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/operation_display.rb +79 -0
  304. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/operations_list.rb +98 -0
  305. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/resource.rb +80 -0
  306. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/resource_with_etag.rb +82 -0
  307. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/scheduled_alert_rule.rb +260 -0
  308. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/scheduled_alert_rule_common_properties.rb +107 -0
  309. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/scheduled_alert_rule_template.rb +248 -0
  310. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/setting_kind.rb +16 -0
  311. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/settings.rb +79 -0
  312. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/status_in_mcas.rb +16 -0
  313. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/template_status.rb +17 -0
  314. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/threat_intelligence.rb +108 -0
  315. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/tidata_connector.rb +109 -0
  316. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/tidata_connector_data_types.rb +48 -0
  317. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/tidata_connector_data_types_indicators.rb +43 -0
  318. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/toggle_settings.rb +96 -0
  319. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/trigger_operator.rb +18 -0
  320. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/ueba_settings.rb +125 -0
  321. data/lib/2020-01-01/generated/azure_mgmt_security_insights/models/user_info.rb +70 -0
  322. data/lib/2020-01-01/generated/azure_mgmt_security_insights/module_definition.rb +9 -0
  323. data/lib/2020-01-01/generated/azure_mgmt_security_insights/operations.rb +219 -0
  324. data/lib/2020-01-01/generated/azure_mgmt_security_insights/security_insights.rb +159 -0
  325. data/lib/azure_mgmt_security_insights.rb +7 -0
  326. data/lib/module_definition.rb +7 -0
  327. data/lib/profiles/latest/modules/securityinsights_profile_module.rb +399 -0
  328. data/lib/profiles/latest/securityinsights_latest_profile_client.rb +40 -0
  329. data/lib/profiles/latest/securityinsights_module_definition.rb +8 -0
  330. data/lib/version.rb +7 -0
  331. metadata +446 -0
@@ -0,0 +1,150 @@
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::SecurityInsights::Mgmt::V2019_01_01_preview
7
+ #
8
+ # API spec for Microsoft.SecurityInsights (Azure Security Insights) resource
9
+ # provider
10
+ #
11
+ class DataConnectorsCheckRequirementsOperations
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the DataConnectorsCheckRequirementsOperations class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [SecurityInsights] reference to the SecurityInsights
23
+ attr_reader :client
24
+
25
+ #
26
+ # Get requirements state for a data connector type.
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 workspace_name [String] The name of the workspace.
31
+ # @param operational_insights_resource_provider [String] The namespace of
32
+ # workspaces resource provider- Microsoft.OperationalInsights.
33
+ # @param data_connectors_check_requirements [DataConnectorsCheckRequirements]
34
+ # The parameters for requirements check message
35
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
+ # will be added to the HTTP request.
37
+ #
38
+ # @return [DataConnectorRequirementsState] operation results.
39
+ #
40
+ def post(resource_group_name, workspace_name, operational_insights_resource_provider, data_connectors_check_requirements, custom_headers:nil)
41
+ response = post_async(resource_group_name, workspace_name, operational_insights_resource_provider, data_connectors_check_requirements, custom_headers:custom_headers).value!
42
+ response.body unless response.nil?
43
+ end
44
+
45
+ #
46
+ # Get requirements state for a data connector type.
47
+ #
48
+ # @param resource_group_name [String] The name of the resource group within the
49
+ # user's subscription. The name is case insensitive.
50
+ # @param workspace_name [String] The name of the workspace.
51
+ # @param operational_insights_resource_provider [String] The namespace of
52
+ # workspaces resource provider- Microsoft.OperationalInsights.
53
+ # @param data_connectors_check_requirements [DataConnectorsCheckRequirements]
54
+ # The parameters for requirements check message
55
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
56
+ # will be added to the HTTP request.
57
+ #
58
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
59
+ #
60
+ def post_with_http_info(resource_group_name, workspace_name, operational_insights_resource_provider, data_connectors_check_requirements, custom_headers:nil)
61
+ post_async(resource_group_name, workspace_name, operational_insights_resource_provider, data_connectors_check_requirements, custom_headers:custom_headers).value!
62
+ end
63
+
64
+ #
65
+ # Get requirements state for a data connector type.
66
+ #
67
+ # @param resource_group_name [String] The name of the resource group within the
68
+ # user's subscription. The name is case insensitive.
69
+ # @param workspace_name [String] The name of the workspace.
70
+ # @param operational_insights_resource_provider [String] The namespace of
71
+ # workspaces resource provider- Microsoft.OperationalInsights.
72
+ # @param data_connectors_check_requirements [DataConnectorsCheckRequirements]
73
+ # The parameters for requirements check message
74
+ # @param [Hash{String => String}] A hash of custom headers that will be added
75
+ # to the HTTP request.
76
+ #
77
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
78
+ #
79
+ def post_async(resource_group_name, workspace_name, operational_insights_resource_provider, data_connectors_check_requirements, custom_headers:nil)
80
+ @client.api_version = '2019-01-01-preview'
81
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
82
+ 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?
83
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
84
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
85
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
86
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
87
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
88
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '90'" if !workspace_name.nil? && workspace_name.length > 90
89
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
90
+ fail ArgumentError, 'operational_insights_resource_provider is nil' if operational_insights_resource_provider.nil?
91
+ fail ArgumentError, 'data_connectors_check_requirements is nil' if data_connectors_check_requirements.nil?
92
+
93
+
94
+ request_headers = {}
95
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
96
+
97
+ # Set Headers
98
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
99
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
100
+
101
+ # Serialize Request
102
+ request_mapper = Azure::SecurityInsights::Mgmt::V2019_01_01_preview::Models::DataConnectorsCheckRequirements.mapper()
103
+ request_content = @client.serialize(request_mapper, data_connectors_check_requirements)
104
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
105
+
106
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/dataConnectorsCheckRequirements'
107
+
108
+ request_url = @base_url || @client.base_url
109
+
110
+ options = {
111
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
112
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'operationalInsightsResourceProvider' => operational_insights_resource_provider},
113
+ query_params: {'api-version' => @client.api_version},
114
+ body: request_content,
115
+ headers: request_headers.merge(custom_headers || {}),
116
+ base_url: request_url
117
+ }
118
+ promise = @client.make_request_async(:post, path_template, options)
119
+
120
+ promise = promise.then do |result|
121
+ http_response = result.response
122
+ status_code = http_response.status
123
+ response_content = http_response.body
124
+ unless status_code == 200
125
+ error_model = JSON.load(response_content)
126
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
127
+ end
128
+
129
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
130
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
131
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
132
+ # Deserialize Response
133
+ if status_code == 200
134
+ begin
135
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
136
+ result_mapper = Azure::SecurityInsights::Mgmt::V2019_01_01_preview::Models::DataConnectorRequirementsState.mapper()
137
+ result.body = @client.deserialize(result_mapper, parsed_response)
138
+ rescue Exception => e
139
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
140
+ end
141
+ end
142
+
143
+ result
144
+ end
145
+
146
+ promise.execute
147
+ end
148
+
149
+ end
150
+ end
@@ -0,0 +1,492 @@
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::SecurityInsights::Mgmt::V2019_01_01_preview
7
+ #
8
+ # API spec for Microsoft.SecurityInsights (Azure Security Insights) resource
9
+ # provider
10
+ #
11
+ class Entities
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the Entities class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [SecurityInsights] reference to the SecurityInsights
23
+ attr_reader :client
24
+
25
+ #
26
+ # Gets all entities.
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 operational_insights_resource_provider [String] The namespace of
31
+ # workspaces resource provider- Microsoft.OperationalInsights.
32
+ # @param workspace_name [String] The name of the workspace.
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<Entity>] operation results.
37
+ #
38
+ def list(resource_group_name, operational_insights_resource_provider, workspace_name, custom_headers:nil)
39
+ first_page = list_as_lazy(resource_group_name, operational_insights_resource_provider, workspace_name, custom_headers:custom_headers)
40
+ first_page.get_all_items
41
+ end
42
+
43
+ #
44
+ # Gets all entities.
45
+ #
46
+ # @param resource_group_name [String] The name of the resource group within the
47
+ # user's subscription. The name is case insensitive.
48
+ # @param operational_insights_resource_provider [String] The namespace of
49
+ # workspaces resource provider- Microsoft.OperationalInsights.
50
+ # @param workspace_name [String] The name of the workspace.
51
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
52
+ # will be added to the HTTP request.
53
+ #
54
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
55
+ #
56
+ def list_with_http_info(resource_group_name, operational_insights_resource_provider, workspace_name, custom_headers:nil)
57
+ list_async(resource_group_name, operational_insights_resource_provider, workspace_name, custom_headers:custom_headers).value!
58
+ end
59
+
60
+ #
61
+ # Gets all entities.
62
+ #
63
+ # @param resource_group_name [String] The name of the resource group within the
64
+ # user's subscription. The name is case insensitive.
65
+ # @param operational_insights_resource_provider [String] The namespace of
66
+ # workspaces resource provider- Microsoft.OperationalInsights.
67
+ # @param workspace_name [String] The name of the workspace.
68
+ # @param [Hash{String => String}] A hash of custom headers that will be added
69
+ # to the HTTP request.
70
+ #
71
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
72
+ #
73
+ def list_async(resource_group_name, operational_insights_resource_provider, workspace_name, custom_headers:nil)
74
+ @client.api_version = '2019-01-01-preview'
75
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
76
+ 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?
77
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
78
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
79
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
80
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
81
+ fail ArgumentError, 'operational_insights_resource_provider is nil' if operational_insights_resource_provider.nil?
82
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
83
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '90'" if !workspace_name.nil? && workspace_name.length > 90
84
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
85
+
86
+
87
+ request_headers = {}
88
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
89
+
90
+ # Set Headers
91
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
92
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
93
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities'
94
+
95
+ request_url = @base_url || @client.base_url
96
+
97
+ options = {
98
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
99
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'operationalInsightsResourceProvider' => operational_insights_resource_provider,'workspaceName' => workspace_name},
100
+ query_params: {'api-version' => @client.api_version},
101
+ headers: request_headers.merge(custom_headers || {}),
102
+ base_url: request_url
103
+ }
104
+ promise = @client.make_request_async(:get, path_template, options)
105
+
106
+ promise = promise.then do |result|
107
+ http_response = result.response
108
+ status_code = http_response.status
109
+ response_content = http_response.body
110
+ unless status_code == 200
111
+ error_model = JSON.load(response_content)
112
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
113
+ end
114
+
115
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
116
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
117
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
118
+ # Deserialize Response
119
+ if status_code == 200
120
+ begin
121
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
122
+ result_mapper = Azure::SecurityInsights::Mgmt::V2019_01_01_preview::Models::EntityList.mapper()
123
+ result.body = @client.deserialize(result_mapper, parsed_response)
124
+ rescue Exception => e
125
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
126
+ end
127
+ end
128
+
129
+ result
130
+ end
131
+
132
+ promise.execute
133
+ end
134
+
135
+ #
136
+ # Gets an entity.
137
+ #
138
+ # @param resource_group_name [String] The name of the resource group within the
139
+ # user's subscription. The name is case insensitive.
140
+ # @param operational_insights_resource_provider [String] The namespace of
141
+ # workspaces resource provider- Microsoft.OperationalInsights.
142
+ # @param workspace_name [String] The name of the workspace.
143
+ # @param entity_id [String] entity ID
144
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
145
+ # will be added to the HTTP request.
146
+ #
147
+ # @return [Entity] operation results.
148
+ #
149
+ def get(resource_group_name, operational_insights_resource_provider, workspace_name, entity_id, custom_headers:nil)
150
+ response = get_async(resource_group_name, operational_insights_resource_provider, workspace_name, entity_id, custom_headers:custom_headers).value!
151
+ response.body unless response.nil?
152
+ end
153
+
154
+ #
155
+ # Gets an entity.
156
+ #
157
+ # @param resource_group_name [String] The name of the resource group within the
158
+ # user's subscription. The name is case insensitive.
159
+ # @param operational_insights_resource_provider [String] The namespace of
160
+ # workspaces resource provider- Microsoft.OperationalInsights.
161
+ # @param workspace_name [String] The name of the workspace.
162
+ # @param entity_id [String] entity ID
163
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
164
+ # will be added to the HTTP request.
165
+ #
166
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
167
+ #
168
+ def get_with_http_info(resource_group_name, operational_insights_resource_provider, workspace_name, entity_id, custom_headers:nil)
169
+ get_async(resource_group_name, operational_insights_resource_provider, workspace_name, entity_id, custom_headers:custom_headers).value!
170
+ end
171
+
172
+ #
173
+ # Gets an entity.
174
+ #
175
+ # @param resource_group_name [String] The name of the resource group within the
176
+ # user's subscription. The name is case insensitive.
177
+ # @param operational_insights_resource_provider [String] The namespace of
178
+ # workspaces resource provider- Microsoft.OperationalInsights.
179
+ # @param workspace_name [String] The name of the workspace.
180
+ # @param entity_id [String] entity ID
181
+ # @param [Hash{String => String}] A hash of custom headers that will be added
182
+ # to the HTTP request.
183
+ #
184
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
185
+ #
186
+ def get_async(resource_group_name, operational_insights_resource_provider, workspace_name, entity_id, custom_headers:nil)
187
+ @client.api_version = '2019-01-01-preview'
188
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
189
+ 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?
190
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
191
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
192
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
193
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
194
+ fail ArgumentError, 'operational_insights_resource_provider is nil' if operational_insights_resource_provider.nil?
195
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
196
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '90'" if !workspace_name.nil? && workspace_name.length > 90
197
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
198
+ fail ArgumentError, 'entity_id is nil' if entity_id.nil?
199
+
200
+
201
+ request_headers = {}
202
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
203
+
204
+ # Set Headers
205
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
206
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
207
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}'
208
+
209
+ request_url = @base_url || @client.base_url
210
+
211
+ options = {
212
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
213
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'operationalInsightsResourceProvider' => operational_insights_resource_provider,'workspaceName' => workspace_name,'entityId' => entity_id},
214
+ query_params: {'api-version' => @client.api_version},
215
+ headers: request_headers.merge(custom_headers || {}),
216
+ base_url: request_url
217
+ }
218
+ promise = @client.make_request_async(:get, path_template, options)
219
+
220
+ promise = promise.then do |result|
221
+ http_response = result.response
222
+ status_code = http_response.status
223
+ response_content = http_response.body
224
+ unless status_code == 200
225
+ error_model = JSON.load(response_content)
226
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
227
+ end
228
+
229
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
230
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
231
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
232
+ # Deserialize Response
233
+ if status_code == 200
234
+ begin
235
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
236
+ result_mapper = Azure::SecurityInsights::Mgmt::V2019_01_01_preview::Models::Entity.mapper()
237
+ result.body = @client.deserialize(result_mapper, parsed_response)
238
+ rescue Exception => e
239
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
240
+ end
241
+ end
242
+
243
+ result
244
+ end
245
+
246
+ promise.execute
247
+ end
248
+
249
+ #
250
+ # Expands an entity.
251
+ #
252
+ # @param resource_group_name [String] The name of the resource group within the
253
+ # user's subscription. The name is case insensitive.
254
+ # @param operational_insights_resource_provider [String] The namespace of
255
+ # workspaces resource provider- Microsoft.OperationalInsights.
256
+ # @param workspace_name [String] The name of the workspace.
257
+ # @param entity_id [String] entity ID
258
+ # @param parameters [EntityExpandParameters] The parameters required to execute
259
+ # an expand operation on the given entity.
260
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
261
+ # will be added to the HTTP request.
262
+ #
263
+ # @return [EntityExpandResponse] operation results.
264
+ #
265
+ def expand(resource_group_name, operational_insights_resource_provider, workspace_name, entity_id, parameters, custom_headers:nil)
266
+ response = expand_async(resource_group_name, operational_insights_resource_provider, workspace_name, entity_id, parameters, custom_headers:custom_headers).value!
267
+ response.body unless response.nil?
268
+ end
269
+
270
+ #
271
+ # Expands an entity.
272
+ #
273
+ # @param resource_group_name [String] The name of the resource group within the
274
+ # user's subscription. The name is case insensitive.
275
+ # @param operational_insights_resource_provider [String] The namespace of
276
+ # workspaces resource provider- Microsoft.OperationalInsights.
277
+ # @param workspace_name [String] The name of the workspace.
278
+ # @param entity_id [String] entity ID
279
+ # @param parameters [EntityExpandParameters] The parameters required to execute
280
+ # an expand operation on the given entity.
281
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
282
+ # will be added to the HTTP request.
283
+ #
284
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
285
+ #
286
+ def expand_with_http_info(resource_group_name, operational_insights_resource_provider, workspace_name, entity_id, parameters, custom_headers:nil)
287
+ expand_async(resource_group_name, operational_insights_resource_provider, workspace_name, entity_id, parameters, custom_headers:custom_headers).value!
288
+ end
289
+
290
+ #
291
+ # Expands an entity.
292
+ #
293
+ # @param resource_group_name [String] The name of the resource group within the
294
+ # user's subscription. The name is case insensitive.
295
+ # @param operational_insights_resource_provider [String] The namespace of
296
+ # workspaces resource provider- Microsoft.OperationalInsights.
297
+ # @param workspace_name [String] The name of the workspace.
298
+ # @param entity_id [String] entity ID
299
+ # @param parameters [EntityExpandParameters] The parameters required to execute
300
+ # an expand operation on the given entity.
301
+ # @param [Hash{String => String}] A hash of custom headers that will be added
302
+ # to the HTTP request.
303
+ #
304
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
305
+ #
306
+ def expand_async(resource_group_name, operational_insights_resource_provider, workspace_name, entity_id, parameters, custom_headers:nil)
307
+ @client.api_version = '2019-01-01-preview'
308
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
309
+ 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?
310
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
311
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
312
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
313
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
314
+ fail ArgumentError, 'operational_insights_resource_provider is nil' if operational_insights_resource_provider.nil?
315
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
316
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '90'" if !workspace_name.nil? && workspace_name.length > 90
317
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
318
+ fail ArgumentError, 'entity_id is nil' if entity_id.nil?
319
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
320
+
321
+
322
+ request_headers = {}
323
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
324
+
325
+ # Set Headers
326
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
327
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
328
+
329
+ # Serialize Request
330
+ request_mapper = Azure::SecurityInsights::Mgmt::V2019_01_01_preview::Models::EntityExpandParameters.mapper()
331
+ request_content = @client.serialize(request_mapper, parameters)
332
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
333
+
334
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/entities/{entityId}/expand'
335
+
336
+ request_url = @base_url || @client.base_url
337
+
338
+ options = {
339
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
340
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'operationalInsightsResourceProvider' => operational_insights_resource_provider,'workspaceName' => workspace_name,'entityId' => entity_id},
341
+ query_params: {'api-version' => @client.api_version},
342
+ body: request_content,
343
+ headers: request_headers.merge(custom_headers || {}),
344
+ base_url: request_url
345
+ }
346
+ promise = @client.make_request_async(:post, path_template, options)
347
+
348
+ promise = promise.then do |result|
349
+ http_response = result.response
350
+ status_code = http_response.status
351
+ response_content = http_response.body
352
+ unless status_code == 200
353
+ error_model = JSON.load(response_content)
354
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
355
+ end
356
+
357
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
358
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
359
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
360
+ # Deserialize Response
361
+ if status_code == 200
362
+ begin
363
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
364
+ result_mapper = Azure::SecurityInsights::Mgmt::V2019_01_01_preview::Models::EntityExpandResponse.mapper()
365
+ result.body = @client.deserialize(result_mapper, parsed_response)
366
+ rescue Exception => e
367
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
368
+ end
369
+ end
370
+
371
+ result
372
+ end
373
+
374
+ promise.execute
375
+ end
376
+
377
+ #
378
+ # Gets all entities.
379
+ #
380
+ # @param next_page_link [String] The NextLink from the previous successful call
381
+ # to List operation.
382
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
383
+ # will be added to the HTTP request.
384
+ #
385
+ # @return [EntityList] operation results.
386
+ #
387
+ def list_next(next_page_link, custom_headers:nil)
388
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
389
+ response.body unless response.nil?
390
+ end
391
+
392
+ #
393
+ # Gets all entities.
394
+ #
395
+ # @param next_page_link [String] The NextLink from the previous successful call
396
+ # to List operation.
397
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
398
+ # will be added to the HTTP request.
399
+ #
400
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
401
+ #
402
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
403
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
404
+ end
405
+
406
+ #
407
+ # Gets all entities.
408
+ #
409
+ # @param next_page_link [String] The NextLink from the previous successful call
410
+ # to List operation.
411
+ # @param [Hash{String => String}] A hash of custom headers that will be added
412
+ # to the HTTP request.
413
+ #
414
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
415
+ #
416
+ def list_next_async(next_page_link, custom_headers:nil)
417
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
418
+
419
+
420
+ request_headers = {}
421
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
422
+
423
+ # Set Headers
424
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
425
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
426
+ path_template = '{nextLink}'
427
+
428
+ request_url = @base_url || @client.base_url
429
+
430
+ options = {
431
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
432
+ skip_encoding_path_params: {'nextLink' => next_page_link},
433
+ headers: request_headers.merge(custom_headers || {}),
434
+ base_url: request_url
435
+ }
436
+ promise = @client.make_request_async(:get, path_template, options)
437
+
438
+ promise = promise.then do |result|
439
+ http_response = result.response
440
+ status_code = http_response.status
441
+ response_content = http_response.body
442
+ unless status_code == 200
443
+ error_model = JSON.load(response_content)
444
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
445
+ end
446
+
447
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
448
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
449
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
450
+ # Deserialize Response
451
+ if status_code == 200
452
+ begin
453
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
454
+ result_mapper = Azure::SecurityInsights::Mgmt::V2019_01_01_preview::Models::EntityList.mapper()
455
+ result.body = @client.deserialize(result_mapper, parsed_response)
456
+ rescue Exception => e
457
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
458
+ end
459
+ end
460
+
461
+ result
462
+ end
463
+
464
+ promise.execute
465
+ end
466
+
467
+ #
468
+ # Gets all entities.
469
+ #
470
+ # @param resource_group_name [String] The name of the resource group within the
471
+ # user's subscription. The name is case insensitive.
472
+ # @param operational_insights_resource_provider [String] The namespace of
473
+ # workspaces resource provider- Microsoft.OperationalInsights.
474
+ # @param workspace_name [String] The name of the workspace.
475
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
476
+ # will be added to the HTTP request.
477
+ #
478
+ # @return [EntityList] which provide lazy access to pages of the response.
479
+ #
480
+ def list_as_lazy(resource_group_name, operational_insights_resource_provider, workspace_name, custom_headers:nil)
481
+ response = list_async(resource_group_name, operational_insights_resource_provider, workspace_name, custom_headers:custom_headers).value!
482
+ unless response.nil?
483
+ page = response.body
484
+ page.next_method = Proc.new do |next_page_link|
485
+ list_next_async(next_page_link, custom_headers:custom_headers)
486
+ end
487
+ page
488
+ end
489
+ end
490
+
491
+ end
492
+ end