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,384 @@
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
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class SecurityInsights < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] API version for the operation
21
+ attr_reader :api_version
22
+
23
+ # @return [String] Azure subscription ID
24
+ attr_accessor :subscription_id
25
+
26
+ # @return [String] The preferred language for the response.
27
+ attr_accessor :accept_language
28
+
29
+ # @return [Integer] The retry timeout in seconds for Long Running
30
+ # Operations. Default value is 30.
31
+ attr_accessor :long_running_operation_retry_timeout
32
+
33
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
34
+ # generated. When set to true a unique x-ms-client-request-id value is
35
+ # generated and included in each request. Default is true.
36
+ attr_accessor :generate_client_request_id
37
+
38
+ # @return [Operations] operations
39
+ attr_reader :operations
40
+
41
+ # @return [AlertRules] alert_rules
42
+ attr_reader :alert_rules
43
+
44
+ # @return [Actions] actions
45
+ attr_reader :actions
46
+
47
+ # @return [AlertRuleTemplates] alert_rule_templates
48
+ attr_reader :alert_rule_templates
49
+
50
+ # @return [Cases] cases
51
+ attr_reader :cases
52
+
53
+ # @return [Comments] comments
54
+ attr_reader :comments
55
+
56
+ # @return [CaseComments] case_comments
57
+ attr_reader :case_comments
58
+
59
+ # @return [Bookmarks] bookmarks
60
+ attr_reader :bookmarks
61
+
62
+ # @return [CaseRelations] case_relations
63
+ attr_reader :case_relations
64
+
65
+ # @return [BookmarkRelations] bookmark_relations
66
+ attr_reader :bookmark_relations
67
+
68
+ # @return [BookmarkOperations] bookmark_operations
69
+ attr_reader :bookmark_operations
70
+
71
+ # @return [DataConnectors] data_connectors
72
+ attr_reader :data_connectors
73
+
74
+ # @return [DataConnectorsCheckRequirementsOperations]
75
+ # data_connectors_check_requirements_operations
76
+ attr_reader :data_connectors_check_requirements_operations
77
+
78
+ # @return [Entities] entities
79
+ attr_reader :entities
80
+
81
+ # @return [EntitiesRelations] entities_relations
82
+ attr_reader :entities_relations
83
+
84
+ # @return [EntityRelations] entity_relations
85
+ attr_reader :entity_relations
86
+
87
+ # @return [OfficeConsents] office_consents
88
+ attr_reader :office_consents
89
+
90
+ # @return [ProductSettings] product_settings
91
+ attr_reader :product_settings
92
+
93
+ # @return [CasesAggregations] cases_aggregations
94
+ attr_reader :cases_aggregations
95
+
96
+ # @return [EntityQueries] entity_queries
97
+ attr_reader :entity_queries
98
+
99
+ # @return [Incidents] incidents
100
+ attr_reader :incidents
101
+
102
+ # @return [IncidentComments] incident_comments
103
+ attr_reader :incident_comments
104
+
105
+ # @return [IncidentRelations] incident_relations
106
+ attr_reader :incident_relations
107
+
108
+ # @return [Watchlists] watchlists
109
+ attr_reader :watchlists
110
+
111
+ # @return [ThreatIntelligenceIndicators] threat_intelligence_indicators
112
+ attr_reader :threat_intelligence_indicators
113
+
114
+ # @return [ThreatIntelligenceIndicator] threat_intelligence_indicator
115
+ attr_reader :threat_intelligence_indicator
116
+
117
+ # @return [ThreatIntelligenceIndicatorUpsert]
118
+ # threat_intelligence_indicator_upsert
119
+ attr_reader :threat_intelligence_indicator_upsert
120
+
121
+ # @return [ThreatIntelligenceIndicatorsList]
122
+ # threat_intelligence_indicators_list
123
+ attr_reader :threat_intelligence_indicators_list
124
+
125
+ # @return [ThreatIntelligenceIndicatorMetrics]
126
+ # threat_intelligence_indicator_metrics
127
+ attr_reader :threat_intelligence_indicator_metrics
128
+
129
+ #
130
+ # Creates initializes a new instance of the SecurityInsights class.
131
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
132
+ # @param base_url [String] the base URI of the service.
133
+ # @param options [Array] filters to be applied to the HTTP requests.
134
+ #
135
+ def initialize(credentials = nil, base_url = nil, options = nil)
136
+ super(credentials, options)
137
+ @base_url = base_url || 'https://management.azure.com'
138
+
139
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
140
+ @credentials = credentials
141
+
142
+ @operations = Operations.new(self)
143
+ @alert_rules = AlertRules.new(self)
144
+ @actions = Actions.new(self)
145
+ @alert_rule_templates = AlertRuleTemplates.new(self)
146
+ @cases = Cases.new(self)
147
+ @comments = Comments.new(self)
148
+ @case_comments = CaseComments.new(self)
149
+ @bookmarks = Bookmarks.new(self)
150
+ @case_relations = CaseRelations.new(self)
151
+ @bookmark_relations = BookmarkRelations.new(self)
152
+ @bookmark_operations = BookmarkOperations.new(self)
153
+ @data_connectors = DataConnectors.new(self)
154
+ @data_connectors_check_requirements_operations = DataConnectorsCheckRequirementsOperations.new(self)
155
+ @entities = Entities.new(self)
156
+ @entities_relations = EntitiesRelations.new(self)
157
+ @entity_relations = EntityRelations.new(self)
158
+ @office_consents = OfficeConsents.new(self)
159
+ @product_settings = ProductSettings.new(self)
160
+ @cases_aggregations = CasesAggregations.new(self)
161
+ @entity_queries = EntityQueries.new(self)
162
+ @incidents = Incidents.new(self)
163
+ @incident_comments = IncidentComments.new(self)
164
+ @incident_relations = IncidentRelations.new(self)
165
+ @watchlists = Watchlists.new(self)
166
+ @threat_intelligence_indicators = ThreatIntelligenceIndicators.new(self)
167
+ @threat_intelligence_indicator = ThreatIntelligenceIndicator.new(self)
168
+ @threat_intelligence_indicator_upsert = ThreatIntelligenceIndicatorUpsert.new(self)
169
+ @threat_intelligence_indicators_list = ThreatIntelligenceIndicatorsList.new(self)
170
+ @threat_intelligence_indicator_metrics = ThreatIntelligenceIndicatorMetrics.new(self)
171
+ @api_version = '2019-01-01-preview'
172
+ @accept_language = 'en-US'
173
+ @long_running_operation_retry_timeout = 30
174
+ @generate_client_request_id = true
175
+ add_telemetry
176
+ end
177
+
178
+ #
179
+ # Makes a request and returns the body of the response.
180
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
181
+ # @param path [String] the path, relative to {base_url}.
182
+ # @param options [Hash{String=>String}] specifying any request options like :body.
183
+ # @return [Hash{String=>String}] containing the body of the response.
184
+ # Example:
185
+ #
186
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
187
+ # path = "/path"
188
+ # options = {
189
+ # body: request_content,
190
+ # query_params: {'api-version' => '2016-02-01'}
191
+ # }
192
+ # result = @client.make_request(:put, path, options)
193
+ #
194
+ def make_request(method, path, options = {})
195
+ result = make_request_with_http_info(method, path, options)
196
+ result.body unless result.nil?
197
+ end
198
+
199
+ #
200
+ # Makes a request and returns the operation response.
201
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
202
+ # @param path [String] the path, relative to {base_url}.
203
+ # @param options [Hash{String=>String}] specifying any request options like :body.
204
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
205
+ #
206
+ def make_request_with_http_info(method, path, options = {})
207
+ result = make_request_async(method, path, options).value!
208
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
209
+ result
210
+ end
211
+
212
+ #
213
+ # Makes a request asynchronously.
214
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
215
+ # @param path [String] the path, relative to {base_url}.
216
+ # @param options [Hash{String=>String}] specifying any request options like :body.
217
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
218
+ #
219
+ def make_request_async(method, path, options = {})
220
+ fail ArgumentError, 'method is nil' if method.nil?
221
+ fail ArgumentError, 'path is nil' if path.nil?
222
+
223
+ request_url = options[:base_url] || @base_url
224
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
225
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
226
+ end
227
+
228
+ request_headers = @request_headers
229
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
230
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
231
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
232
+
233
+ super(request_url, method, path, options)
234
+ end
235
+
236
+ #
237
+ # Create a threat intelligence.
238
+ #
239
+ # @param resource_group_name [String] The name of the resource group within the
240
+ # user's subscription. The name is case insensitive.
241
+ # @param operational_insights_resource_provider [String] The namespace of
242
+ # workspaces resource provider- Microsoft.OperationalInsights.
243
+ # @param workspace_name [String] The name of the workspace.
244
+ # @param threat_intelligence_indicator_object_to_upsert
245
+ # [ThreatIntelligenceIndicatorWithoutReadOnlyFields] The threat intelligence
246
+ # entity properties for upsert
247
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
248
+ # will be added to the HTTP request.
249
+ #
250
+ # @return [ThreatIntelligenceResource] operation results.
251
+ #
252
+ def create_threat_intelligence(resource_group_name, operational_insights_resource_provider, workspace_name, threat_intelligence_indicator_object_to_upsert, custom_headers:nil)
253
+ response = create_threat_intelligence_async(resource_group_name, operational_insights_resource_provider, workspace_name, threat_intelligence_indicator_object_to_upsert, custom_headers:custom_headers).value!
254
+ response.body unless response.nil?
255
+ end
256
+
257
+ #
258
+ # Create a threat intelligence.
259
+ #
260
+ # @param resource_group_name [String] The name of the resource group within the
261
+ # user's subscription. The name is case insensitive.
262
+ # @param operational_insights_resource_provider [String] The namespace of
263
+ # workspaces resource provider- Microsoft.OperationalInsights.
264
+ # @param workspace_name [String] The name of the workspace.
265
+ # @param threat_intelligence_indicator_object_to_upsert
266
+ # [ThreatIntelligenceIndicatorWithoutReadOnlyFields] The threat intelligence
267
+ # entity properties for upsert
268
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
269
+ # will be added to the HTTP request.
270
+ #
271
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
272
+ #
273
+ def create_threat_intelligence_with_http_info(resource_group_name, operational_insights_resource_provider, workspace_name, threat_intelligence_indicator_object_to_upsert, custom_headers:nil)
274
+ create_threat_intelligence_async(resource_group_name, operational_insights_resource_provider, workspace_name, threat_intelligence_indicator_object_to_upsert, custom_headers:custom_headers).value!
275
+ end
276
+
277
+ #
278
+ # Create a threat intelligence.
279
+ #
280
+ # @param resource_group_name [String] The name of the resource group within the
281
+ # user's subscription. The name is case insensitive.
282
+ # @param operational_insights_resource_provider [String] The namespace of
283
+ # workspaces resource provider- Microsoft.OperationalInsights.
284
+ # @param workspace_name [String] The name of the workspace.
285
+ # @param threat_intelligence_indicator_object_to_upsert
286
+ # [ThreatIntelligenceIndicatorWithoutReadOnlyFields] The threat intelligence
287
+ # entity properties for upsert
288
+ # @param [Hash{String => String}] A hash of custom headers that will be added
289
+ # to the HTTP request.
290
+ #
291
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
292
+ #
293
+ def create_threat_intelligence_async(resource_group_name, operational_insights_resource_provider, workspace_name, threat_intelligence_indicator_object_to_upsert, custom_headers:nil)
294
+ api_version = '2019-01-01-preview'
295
+ fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
296
+ fail ArgumentError, "'subscription_id' should satisfy the constraint - 'Pattern': '^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'" if !subscription_id.nil? && subscription_id.match(Regexp.new('^^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$$')).nil?
297
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
298
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
299
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
300
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
301
+ fail ArgumentError, 'operational_insights_resource_provider is nil' if operational_insights_resource_provider.nil?
302
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
303
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '90'" if !workspace_name.nil? && workspace_name.length > 90
304
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
305
+ fail ArgumentError, 'threat_intelligence_indicator_object_to_upsert is nil' if threat_intelligence_indicator_object_to_upsert.nil?
306
+
307
+
308
+ request_headers = {}
309
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
310
+
311
+ # Set Headers
312
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
313
+ request_headers['accept-language'] = accept_language unless accept_language.nil?
314
+
315
+ # Serialize Request
316
+ request_mapper = Azure::SecurityInsights::Mgmt::V2019_01_01_preview::Models::ThreatIntelligenceIndicatorWithoutReadOnlyFields.mapper()
317
+ request_content = self.serialize(request_mapper, threat_intelligence_indicator_object_to_upsert)
318
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
319
+
320
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/createIndicator'
321
+
322
+ request_url = @base_url || self.base_url
323
+
324
+ options = {
325
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
326
+ path_params: {'subscriptionId' => subscription_id,'resourceGroupName' => resource_group_name,'operationalInsightsResourceProvider' => operational_insights_resource_provider,'workspaceName' => workspace_name},
327
+ query_params: {'api-version' => api_version},
328
+ body: request_content,
329
+ headers: request_headers.merge(custom_headers || {}),
330
+ base_url: request_url
331
+ }
332
+ promise = self.make_request_async(:post, path_template, options)
333
+
334
+ promise = promise.then do |result|
335
+ http_response = result.response
336
+ status_code = http_response.status
337
+ response_content = http_response.body
338
+ unless status_code == 200 || status_code == 201
339
+ error_model = JSON.load(response_content)
340
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
341
+ end
342
+
343
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
344
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
345
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
346
+ # Deserialize Response
347
+ if status_code == 200
348
+ begin
349
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
350
+ result_mapper = Azure::SecurityInsights::Mgmt::V2019_01_01_preview::Models::ThreatIntelligenceResource.mapper()
351
+ result.body = self.deserialize(result_mapper, parsed_response)
352
+ rescue Exception => e
353
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
354
+ end
355
+ end
356
+ # Deserialize Response
357
+ if status_code == 201
358
+ begin
359
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
360
+ result_mapper = Azure::SecurityInsights::Mgmt::V2019_01_01_preview::Models::ThreatIntelligenceResource.mapper()
361
+ result.body = self.deserialize(result_mapper, parsed_response)
362
+ rescue Exception => e
363
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
364
+ end
365
+ end
366
+
367
+ result
368
+ end
369
+
370
+ promise.execute
371
+ end
372
+
373
+
374
+ private
375
+ #
376
+ # Adds telemetry information.
377
+ #
378
+ def add_telemetry
379
+ sdk_information = 'azure_mgmt_security_insights'
380
+ sdk_information = "#{sdk_information}/0.17.0"
381
+ add_user_agent_information(sdk_information)
382
+ end
383
+ end
384
+ end
@@ -0,0 +1,494 @@
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 ThreatIntelligenceIndicator
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the ThreatIntelligenceIndicator 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 a threat intelligence indicator.
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 name [String] Threat Intelligence Identifier
34
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
+ # will be added to the HTTP request.
36
+ #
37
+ # @return [ThreatIntelligenceResource] operation results.
38
+ #
39
+ def get(resource_group_name, operational_insights_resource_provider, workspace_name, name, custom_headers:nil)
40
+ response = get_async(resource_group_name, operational_insights_resource_provider, workspace_name, name, custom_headers:custom_headers).value!
41
+ response.body unless response.nil?
42
+ end
43
+
44
+ #
45
+ # Gets a threat intelligence indicator.
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 operational_insights_resource_provider [String] The namespace of
50
+ # workspaces resource provider- Microsoft.OperationalInsights.
51
+ # @param workspace_name [String] The name of the workspace.
52
+ # @param name [String] Threat Intelligence Identifier
53
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
54
+ # will be added to the HTTP request.
55
+ #
56
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
57
+ #
58
+ def get_with_http_info(resource_group_name, operational_insights_resource_provider, workspace_name, name, custom_headers:nil)
59
+ get_async(resource_group_name, operational_insights_resource_provider, workspace_name, name, custom_headers:custom_headers).value!
60
+ end
61
+
62
+ #
63
+ # Gets a threat intelligence indicator.
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 operational_insights_resource_provider [String] The namespace of
68
+ # workspaces resource provider- Microsoft.OperationalInsights.
69
+ # @param workspace_name [String] The name of the workspace.
70
+ # @param name [String] Threat Intelligence Identifier
71
+ # @param [Hash{String => String}] A hash of custom headers that will be added
72
+ # to the HTTP request.
73
+ #
74
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
75
+ #
76
+ def get_async(resource_group_name, operational_insights_resource_provider, workspace_name, name, custom_headers:nil)
77
+ @client.api_version = '2019-01-01-preview'
78
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
79
+ 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?
80
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
81
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
82
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
83
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
84
+ fail ArgumentError, 'operational_insights_resource_provider is nil' if operational_insights_resource_provider.nil?
85
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
86
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '90'" if !workspace_name.nil? && workspace_name.length > 90
87
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
88
+ fail ArgumentError, 'name is nil' if name.nil?
89
+
90
+
91
+ request_headers = {}
92
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
93
+
94
+ # Set Headers
95
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
96
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
97
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/{name}'
98
+
99
+ request_url = @base_url || @client.base_url
100
+
101
+ options = {
102
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
103
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'operationalInsightsResourceProvider' => operational_insights_resource_provider,'workspaceName' => workspace_name,'name' => name},
104
+ query_params: {'api-version' => @client.api_version},
105
+ headers: request_headers.merge(custom_headers || {}),
106
+ base_url: request_url
107
+ }
108
+ promise = @client.make_request_async(:get, path_template, options)
109
+
110
+ promise = promise.then do |result|
111
+ http_response = result.response
112
+ status_code = http_response.status
113
+ response_content = http_response.body
114
+ unless status_code == 200
115
+ error_model = JSON.load(response_content)
116
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
117
+ end
118
+
119
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
120
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
121
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
122
+ # Deserialize Response
123
+ if status_code == 200
124
+ begin
125
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
126
+ result_mapper = Azure::SecurityInsights::Mgmt::V2019_01_01_preview::Models::ThreatIntelligenceResource.mapper()
127
+ result.body = @client.deserialize(result_mapper, parsed_response)
128
+ rescue Exception => e
129
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
130
+ end
131
+ end
132
+
133
+ result
134
+ end
135
+
136
+ promise.execute
137
+ end
138
+
139
+ #
140
+ # Delete a threat intelligence.
141
+ #
142
+ # @param resource_group_name [String] The name of the resource group within the
143
+ # user's subscription. The name is case insensitive.
144
+ # @param operational_insights_resource_provider [String] The namespace of
145
+ # workspaces resource provider- Microsoft.OperationalInsights.
146
+ # @param workspace_name [String] The name of the workspace.
147
+ # @param name [String] Threat Intelligence Identifier
148
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
149
+ # will be added to the HTTP request.
150
+ #
151
+ #
152
+ def delete(resource_group_name, operational_insights_resource_provider, workspace_name, name, custom_headers:nil)
153
+ response = delete_async(resource_group_name, operational_insights_resource_provider, workspace_name, name, custom_headers:custom_headers).value!
154
+ nil
155
+ end
156
+
157
+ #
158
+ # Delete a threat intelligence.
159
+ #
160
+ # @param resource_group_name [String] The name of the resource group within the
161
+ # user's subscription. The name is case insensitive.
162
+ # @param operational_insights_resource_provider [String] The namespace of
163
+ # workspaces resource provider- Microsoft.OperationalInsights.
164
+ # @param workspace_name [String] The name of the workspace.
165
+ # @param name [String] Threat Intelligence Identifier
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 delete_with_http_info(resource_group_name, operational_insights_resource_provider, workspace_name, name, custom_headers:nil)
172
+ delete_async(resource_group_name, operational_insights_resource_provider, workspace_name, name, custom_headers:custom_headers).value!
173
+ end
174
+
175
+ #
176
+ # Delete a threat intelligence.
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 operational_insights_resource_provider [String] The namespace of
181
+ # workspaces resource provider- Microsoft.OperationalInsights.
182
+ # @param workspace_name [String] The name of the workspace.
183
+ # @param name [String] Threat Intelligence Identifier
184
+ # @param [Hash{String => String}] A hash of custom headers that will be added
185
+ # to the HTTP request.
186
+ #
187
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
188
+ #
189
+ def delete_async(resource_group_name, operational_insights_resource_provider, workspace_name, name, custom_headers:nil)
190
+ @client.api_version = '2019-01-01-preview'
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, 'operational_insights_resource_provider is nil' if operational_insights_resource_provider.nil?
198
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
199
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '90'" if !workspace_name.nil? && workspace_name.length > 90
200
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
201
+ fail ArgumentError, 'name is nil' if name.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/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/{name}'
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,'operationalInsightsResourceProvider' => operational_insights_resource_provider,'workspaceName' => workspace_name,'name' => 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(:delete, 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 || status_code == 204
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
+
236
+ result
237
+ end
238
+
239
+ promise.execute
240
+ end
241
+
242
+ #
243
+ # Append tags to a threat intelligence.
244
+ #
245
+ # @param resource_group_name [String] The name of the resource group within the
246
+ # user's subscription. The name is case insensitive.
247
+ # @param operational_insights_resource_provider [String] The namespace of
248
+ # workspaces resource provider- Microsoft.OperationalInsights.
249
+ # @param workspace_name [String] The name of the workspace.
250
+ # @param name [String] Threat Intelligence Identifier
251
+ # @param threat_intelligence_append_tags_request_body
252
+ # [ThreatIntelligenceAppendTagsRequestBody] The threat intelligence append tags
253
+ # request body
254
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
255
+ # will be added to the HTTP request.
256
+ #
257
+ #
258
+ def append_tags(resource_group_name, operational_insights_resource_provider, workspace_name, name, threat_intelligence_append_tags_request_body, custom_headers:nil)
259
+ response = append_tags_async(resource_group_name, operational_insights_resource_provider, workspace_name, name, threat_intelligence_append_tags_request_body, custom_headers:custom_headers).value!
260
+ nil
261
+ end
262
+
263
+ #
264
+ # Append tags to a threat intelligence.
265
+ #
266
+ # @param resource_group_name [String] The name of the resource group within the
267
+ # user's subscription. The name is case insensitive.
268
+ # @param operational_insights_resource_provider [String] The namespace of
269
+ # workspaces resource provider- Microsoft.OperationalInsights.
270
+ # @param workspace_name [String] The name of the workspace.
271
+ # @param name [String] Threat Intelligence Identifier
272
+ # @param threat_intelligence_append_tags_request_body
273
+ # [ThreatIntelligenceAppendTagsRequestBody] The threat intelligence append tags
274
+ # request body
275
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
276
+ # will be added to the HTTP request.
277
+ #
278
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
279
+ #
280
+ def append_tags_with_http_info(resource_group_name, operational_insights_resource_provider, workspace_name, name, threat_intelligence_append_tags_request_body, custom_headers:nil)
281
+ append_tags_async(resource_group_name, operational_insights_resource_provider, workspace_name, name, threat_intelligence_append_tags_request_body, custom_headers:custom_headers).value!
282
+ end
283
+
284
+ #
285
+ # Append tags to a threat intelligence.
286
+ #
287
+ # @param resource_group_name [String] The name of the resource group within the
288
+ # user's subscription. The name is case insensitive.
289
+ # @param operational_insights_resource_provider [String] The namespace of
290
+ # workspaces resource provider- Microsoft.OperationalInsights.
291
+ # @param workspace_name [String] The name of the workspace.
292
+ # @param name [String] Threat Intelligence Identifier
293
+ # @param threat_intelligence_append_tags_request_body
294
+ # [ThreatIntelligenceAppendTagsRequestBody] The threat intelligence append tags
295
+ # request body
296
+ # @param [Hash{String => String}] A hash of custom headers that will be added
297
+ # to the HTTP request.
298
+ #
299
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
300
+ #
301
+ def append_tags_async(resource_group_name, operational_insights_resource_provider, workspace_name, name, threat_intelligence_append_tags_request_body, custom_headers:nil)
302
+ @client.api_version = '2019-01-01-preview'
303
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
304
+ 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?
305
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
306
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
307
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
308
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
309
+ fail ArgumentError, 'operational_insights_resource_provider is nil' if operational_insights_resource_provider.nil?
310
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
311
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '90'" if !workspace_name.nil? && workspace_name.length > 90
312
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
313
+ fail ArgumentError, 'name is nil' if name.nil?
314
+ fail ArgumentError, 'threat_intelligence_append_tags_request_body is nil' if threat_intelligence_append_tags_request_body.nil?
315
+
316
+
317
+ request_headers = {}
318
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
319
+
320
+ # Set Headers
321
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
322
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
323
+
324
+ # Serialize Request
325
+ request_mapper = Azure::SecurityInsights::Mgmt::V2019_01_01_preview::Models::ThreatIntelligenceAppendTagsRequestBody.mapper()
326
+ request_content = @client.serialize(request_mapper, threat_intelligence_append_tags_request_body)
327
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
328
+
329
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/{name}/appendTags'
330
+
331
+ request_url = @base_url || @client.base_url
332
+
333
+ options = {
334
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
335
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'operationalInsightsResourceProvider' => operational_insights_resource_provider,'workspaceName' => workspace_name,'name' => name},
336
+ query_params: {'api-version' => @client.api_version},
337
+ body: request_content,
338
+ headers: request_headers.merge(custom_headers || {}),
339
+ base_url: request_url
340
+ }
341
+ promise = @client.make_request_async(:post, path_template, options)
342
+
343
+ promise = promise.then do |result|
344
+ http_response = result.response
345
+ status_code = http_response.status
346
+ response_content = http_response.body
347
+ unless status_code == 200
348
+ error_model = JSON.load(response_content)
349
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
350
+ end
351
+
352
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
353
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
354
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
355
+
356
+ result
357
+ end
358
+
359
+ promise.execute
360
+ end
361
+
362
+ #
363
+ # Replace tags to a threat intelligence.
364
+ #
365
+ # @param resource_group_name [String] The name of the resource group within the
366
+ # user's subscription. The name is case insensitive.
367
+ # @param operational_insights_resource_provider [String] The namespace of
368
+ # workspaces resource provider- Microsoft.OperationalInsights.
369
+ # @param workspace_name [String] The name of the workspace.
370
+ # @param name [String] Threat Intelligence Identifier
371
+ # @param threat_intelligence_replace_tags_model
372
+ # [ThreatIntelligenceIndicatorWithoutReadOnlyFields] The threat intelligence
373
+ # entity properties for updating tags
374
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
375
+ # will be added to the HTTP request.
376
+ #
377
+ # @return [ThreatIntelligenceResource] operation results.
378
+ #
379
+ def replace_tags(resource_group_name, operational_insights_resource_provider, workspace_name, name, threat_intelligence_replace_tags_model, custom_headers:nil)
380
+ response = replace_tags_async(resource_group_name, operational_insights_resource_provider, workspace_name, name, threat_intelligence_replace_tags_model, custom_headers:custom_headers).value!
381
+ response.body unless response.nil?
382
+ end
383
+
384
+ #
385
+ # Replace tags to a threat intelligence.
386
+ #
387
+ # @param resource_group_name [String] The name of the resource group within the
388
+ # user's subscription. The name is case insensitive.
389
+ # @param operational_insights_resource_provider [String] The namespace of
390
+ # workspaces resource provider- Microsoft.OperationalInsights.
391
+ # @param workspace_name [String] The name of the workspace.
392
+ # @param name [String] Threat Intelligence Identifier
393
+ # @param threat_intelligence_replace_tags_model
394
+ # [ThreatIntelligenceIndicatorWithoutReadOnlyFields] The threat intelligence
395
+ # entity properties for updating tags
396
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
397
+ # will be added to the HTTP request.
398
+ #
399
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
400
+ #
401
+ def replace_tags_with_http_info(resource_group_name, operational_insights_resource_provider, workspace_name, name, threat_intelligence_replace_tags_model, custom_headers:nil)
402
+ replace_tags_async(resource_group_name, operational_insights_resource_provider, workspace_name, name, threat_intelligence_replace_tags_model, custom_headers:custom_headers).value!
403
+ end
404
+
405
+ #
406
+ # Replace tags to a threat intelligence.
407
+ #
408
+ # @param resource_group_name [String] The name of the resource group within the
409
+ # user's subscription. The name is case insensitive.
410
+ # @param operational_insights_resource_provider [String] The namespace of
411
+ # workspaces resource provider- Microsoft.OperationalInsights.
412
+ # @param workspace_name [String] The name of the workspace.
413
+ # @param name [String] Threat Intelligence Identifier
414
+ # @param threat_intelligence_replace_tags_model
415
+ # [ThreatIntelligenceIndicatorWithoutReadOnlyFields] The threat intelligence
416
+ # entity properties for updating tags
417
+ # @param [Hash{String => String}] A hash of custom headers that will be added
418
+ # to the HTTP request.
419
+ #
420
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
421
+ #
422
+ def replace_tags_async(resource_group_name, operational_insights_resource_provider, workspace_name, name, threat_intelligence_replace_tags_model, custom_headers:nil)
423
+ @client.api_version = '2019-01-01-preview'
424
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
425
+ 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?
426
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
427
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
428
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
429
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
430
+ fail ArgumentError, 'operational_insights_resource_provider is nil' if operational_insights_resource_provider.nil?
431
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
432
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MaxLength': '90'" if !workspace_name.nil? && workspace_name.length > 90
433
+ fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '1'" if !workspace_name.nil? && workspace_name.length < 1
434
+ fail ArgumentError, 'name is nil' if name.nil?
435
+ fail ArgumentError, 'threat_intelligence_replace_tags_model is nil' if threat_intelligence_replace_tags_model.nil?
436
+
437
+
438
+ request_headers = {}
439
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
440
+
441
+ # Set Headers
442
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
443
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
444
+
445
+ # Serialize Request
446
+ request_mapper = Azure::SecurityInsights::Mgmt::V2019_01_01_preview::Models::ThreatIntelligenceIndicatorWithoutReadOnlyFields.mapper()
447
+ request_content = @client.serialize(request_mapper, threat_intelligence_replace_tags_model)
448
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
449
+
450
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{operationalInsightsResourceProvider}/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/{name}/replaceTags'
451
+
452
+ request_url = @base_url || @client.base_url
453
+
454
+ options = {
455
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
456
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'operationalInsightsResourceProvider' => operational_insights_resource_provider,'workspaceName' => workspace_name,'name' => name},
457
+ query_params: {'api-version' => @client.api_version},
458
+ body: request_content,
459
+ headers: request_headers.merge(custom_headers || {}),
460
+ base_url: request_url
461
+ }
462
+ promise = @client.make_request_async(:post, path_template, options)
463
+
464
+ promise = promise.then do |result|
465
+ http_response = result.response
466
+ status_code = http_response.status
467
+ response_content = http_response.body
468
+ unless status_code == 200
469
+ error_model = JSON.load(response_content)
470
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
471
+ end
472
+
473
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
474
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
475
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
476
+ # Deserialize Response
477
+ if status_code == 200
478
+ begin
479
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
480
+ result_mapper = Azure::SecurityInsights::Mgmt::V2019_01_01_preview::Models::ThreatIntelligenceResource.mapper()
481
+ result.body = @client.deserialize(result_mapper, parsed_response)
482
+ rescue Exception => e
483
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
484
+ end
485
+ end
486
+
487
+ result
488
+ end
489
+
490
+ promise.execute
491
+ end
492
+
493
+ end
494
+ end