azure_mgmt_operational_insights 0.19.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2015-03-20/generated/azure_mgmt_operational_insights.rb +60 -0
  4. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/available_service_tier.rb +124 -0
  5. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/core_summary.rb +57 -0
  6. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/link_target.rb +79 -0
  7. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
  8. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_display.rb +68 -0
  9. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +56 -0
  10. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/proxy_resource.rb +90 -0
  11. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/purge_state.rb +16 -0
  12. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/resource.rb +110 -0
  13. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_search.rb +154 -0
  14. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +68 -0
  15. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb +67 -0
  16. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_metadata.rb +241 -0
  17. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb +57 -0
  18. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_schema_value.rb +123 -0
  19. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_sort.rb +58 -0
  20. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb +16 -0
  21. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/shared_keys.rb +57 -0
  22. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +21 -0
  23. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/storage_account.rb +58 -0
  24. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/storage_insight.rb +154 -0
  25. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb +98 -0
  26. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb +16 -0
  27. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb +58 -0
  28. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/tag.rb +57 -0
  29. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_body.rb +67 -0
  30. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb +85 -0
  31. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_response.rb +47 -0
  32. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_status_response.rb +47 -0
  33. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/module_definition.rb +9 -0
  34. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +151 -0
  35. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operations.rb +109 -0
  36. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/saved_searches.rb +425 -0
  37. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/storage_insights.rb +559 -0
  38. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb +857 -0
  39. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights.rb +56 -0
  40. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb +592 -0
  41. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb +462 -0
  42. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/data_source.rb +117 -0
  43. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/data_source_filter.rb +51 -0
  44. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/data_source_kind.rb +29 -0
  45. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb +98 -0
  46. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/entity_status.rb +20 -0
  47. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/error_response.rb +57 -0
  48. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb +69 -0
  49. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/linked_service.rb +90 -0
  50. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb +56 -0
  51. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/management_group.rb +128 -0
  52. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/metric_name.rb +57 -0
  53. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
  54. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_display.rb +68 -0
  55. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +101 -0
  56. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_status.rb +102 -0
  57. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/proxy_resource.rb +90 -0
  58. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/resource.rb +110 -0
  59. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/shared_keys.rb +57 -0
  60. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/sku.rb +48 -0
  61. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +21 -0
  62. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/usage_metric.rb +103 -0
  63. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace.rb +178 -0
  64. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb +56 -0
  65. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb +55 -0
  66. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb +56 -0
  67. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/module_definition.rb +9 -0
  68. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +239 -0
  69. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/operations.rb +219 -0
  70. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/workspaces.rb +1270 -0
  71. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights.rb +123 -0
  72. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/available_service_tiers.rb +146 -0
  73. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/clusters.rb +959 -0
  74. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/data_exports.rb +473 -0
  75. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb +603 -0
  76. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/deleted_workspaces.rb +211 -0
  77. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/gateways.rb +123 -0
  78. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/intelligence_packs.rb +351 -0
  79. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb +577 -0
  80. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/linked_storage_accounts.rb +490 -0
  81. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/management_groups.rb +130 -0
  82. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/available_service_tier.rb +124 -0
  83. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/azure_entity_resource.rb +75 -0
  84. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster.rb +159 -0
  85. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_entity_status.rb +21 -0
  86. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_error_response.rb +48 -0
  87. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_list_result.rb +98 -0
  88. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_patch.rb +78 -0
  89. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_sku.rb +58 -0
  90. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_sku_name_enum.rb +15 -0
  91. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/core_summary.rb +57 -0
  92. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export.rb +174 -0
  93. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export_error_response.rb +48 -0
  94. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export_list_result.rb +56 -0
  95. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_ingestion_status.rb +20 -0
  96. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source.rb +130 -0
  97. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_filter.rb +61 -0
  98. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_kind.rb +47 -0
  99. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb +98 -0
  100. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_type.rb +19 -0
  101. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_additional_info.rb +59 -0
  102. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_contract.rb +49 -0
  103. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_response.rb +113 -0
  104. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/identity.rb +72 -0
  105. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/identity_type.rb +16 -0
  106. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb +69 -0
  107. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/key_vault_properties.rb +71 -0
  108. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service.rb +120 -0
  109. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service_entity_status.rb +18 -0
  110. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb +55 -0
  111. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_list_result.rb +56 -0
  112. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_resource.rb +95 -0
  113. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/management_group.rb +128 -0
  114. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/metric_name.rb +57 -0
  115. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
  116. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_display.rb +79 -0
  117. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +101 -0
  118. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_status.rb +102 -0
  119. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/private_link_scoped_resource.rb +58 -0
  120. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/proxy_resource.rb +63 -0
  121. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/public_network_access_type.rb +16 -0
  122. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/purge_state.rb +16 -0
  123. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/resource.rb +83 -0
  124. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/saved_search.rb +165 -0
  125. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +55 -0
  126. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb +67 -0
  127. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_metadata.rb +241 -0
  128. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb +57 -0
  129. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_schema_value.rb +123 -0
  130. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_sort.rb +58 -0
  131. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb +16 -0
  132. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/shared_keys.rb +57 -0
  133. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +21 -0
  134. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_account.rb +58 -0
  135. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight.rb +157 -0
  136. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb +98 -0
  137. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb +16 -0
  138. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb +58 -0
  139. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/table.rb +79 -0
  140. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tables_list_result.rb +55 -0
  141. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tag.rb +57 -0
  142. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tracked_resource.rb +92 -0
  143. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/type.rb +16 -0
  144. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/usage_metric.rb +103 -0
  145. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace.rb +214 -0
  146. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_capping.rb +73 -0
  147. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_entity_status.rb +21 -0
  148. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb +56 -0
  149. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb +55 -0
  150. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb +56 -0
  151. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_patch.rb +207 -0
  152. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_body.rb +67 -0
  153. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb +85 -0
  154. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_response.rb +47 -0
  155. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_status_response.rb +47 -0
  156. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_sku.rb +85 -0
  157. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_sku_name_enum.rb +21 -0
  158. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/module_definition.rb +9 -0
  159. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operation_statuses.rb +121 -0
  160. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +207 -0
  161. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operations.rb +220 -0
  162. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/saved_searches.rb +457 -0
  163. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/schema.rb +130 -0
  164. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/shared_keys_operations.rb +238 -0
  165. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/storage_insight_configs.rb +592 -0
  166. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/tables.rb +359 -0
  167. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/usages.rb +130 -0
  168. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/workspace_purge.rb +277 -0
  169. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/workspaces.rb +768 -0
  170. data/lib/azure_mgmt_operational_insights.rb +8 -0
  171. data/lib/module_definition.rb +7 -0
  172. data/lib/profiles/latest/modules/operationalinsights_profile_module.rb +417 -0
  173. data/lib/profiles/latest/operationalinsights_latest_profile_client.rb +40 -0
  174. data/lib/profiles/latest/operationalinsights_module_definition.rb +8 -0
  175. data/lib/version.rb +7 -0
  176. metadata +292 -0
@@ -0,0 +1,56 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2015-11-01-preview/generated/azure_mgmt_operational_insights/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
23
+ autoload :LinkedServices, '2015-11-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb'
24
+ autoload :DataSources, '2015-11-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb'
25
+ autoload :Workspaces, '2015-11-01-preview/generated/azure_mgmt_operational_insights/workspaces.rb'
26
+ autoload :Operations, '2015-11-01-preview/generated/azure_mgmt_operational_insights/operations.rb'
27
+ autoload :OperationalInsightsManagementClient, '2015-11-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb'
28
+
29
+ module Models
30
+ autoload :MetricName, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/metric_name.rb'
31
+ autoload :SharedKeys, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/shared_keys.rb'
32
+ autoload :LinkedServiceListResult, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb'
33
+ autoload :OperationStatus, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_status.rb'
34
+ autoload :OperationDisplay, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_display.rb'
35
+ autoload :UsageMetric, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/usage_metric.rb'
36
+ autoload :OperationListResult, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_list_result.rb'
37
+ autoload :WorkspaceListUsagesResult, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb'
38
+ autoload :DataSourceFilter, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/data_source_filter.rb'
39
+ autoload :ManagementGroup, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/management_group.rb'
40
+ autoload :IntelligencePack, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb'
41
+ autoload :WorkspaceListManagementGroupsResult, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb'
42
+ autoload :Operation, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation.rb'
43
+ autoload :Sku, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/sku.rb'
44
+ autoload :DataSourceListResult, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb'
45
+ autoload :ErrorResponse, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/error_response.rb'
46
+ autoload :WorkspaceListResult, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb'
47
+ autoload :ProxyResource, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/proxy_resource.rb'
48
+ autoload :Resource, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/resource.rb'
49
+ autoload :LinkedService, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/linked_service.rb'
50
+ autoload :DataSource, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/data_source.rb'
51
+ autoload :Workspace, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace.rb'
52
+ autoload :DataSourceKind, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/data_source_kind.rb'
53
+ autoload :SkuNameEnum, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb'
54
+ autoload :EntityStatus, '2015-11-01-preview/generated/azure_mgmt_operational_insights/models/entity_status.rb'
55
+ end
56
+ end
@@ -0,0 +1,592 @@
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::OperationalInsights::Mgmt::V2015_11_01_preview
7
+ #
8
+ # Operational Insights Client
9
+ #
10
+ class DataSources
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the DataSources class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [OperationalInsightsManagementClient] reference to the OperationalInsightsManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Create or update a data source.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group to get.
28
+ # The name is case insensitive.
29
+ # @param workspace_name [String] Name of the Log Analytics Workspace that will
30
+ # contain the datasource
31
+ # @param data_source_name [String] The name of the datasource resource.
32
+ # @param parameters [DataSource] The parameters required to create or update a
33
+ # datasource.
34
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
+ # will be added to the HTTP request.
36
+ #
37
+ # @return [DataSource] operation results.
38
+ #
39
+ def create_or_update(resource_group_name, workspace_name, data_source_name, parameters, custom_headers:nil)
40
+ response = create_or_update_async(resource_group_name, workspace_name, data_source_name, parameters, custom_headers:custom_headers).value!
41
+ response.body unless response.nil?
42
+ end
43
+
44
+ #
45
+ # Create or update a data source.
46
+ #
47
+ # @param resource_group_name [String] The name of the resource group to get.
48
+ # The name is case insensitive.
49
+ # @param workspace_name [String] Name of the Log Analytics Workspace that will
50
+ # contain the datasource
51
+ # @param data_source_name [String] The name of the datasource resource.
52
+ # @param parameters [DataSource] The parameters required to create or update a
53
+ # datasource.
54
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
55
+ # will be added to the HTTP request.
56
+ #
57
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
58
+ #
59
+ def create_or_update_with_http_info(resource_group_name, workspace_name, data_source_name, parameters, custom_headers:nil)
60
+ create_or_update_async(resource_group_name, workspace_name, data_source_name, parameters, custom_headers:custom_headers).value!
61
+ end
62
+
63
+ #
64
+ # Create or update a data source.
65
+ #
66
+ # @param resource_group_name [String] The name of the resource group to get.
67
+ # The name is case insensitive.
68
+ # @param workspace_name [String] Name of the Log Analytics Workspace that will
69
+ # contain the datasource
70
+ # @param data_source_name [String] The name of the datasource resource.
71
+ # @param parameters [DataSource] The parameters required to create or update a
72
+ # datasource.
73
+ # @param [Hash{String => String}] A hash of custom headers that will be added
74
+ # to the HTTP request.
75
+ #
76
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
77
+ #
78
+ def create_or_update_async(resource_group_name, workspace_name, data_source_name, parameters, custom_headers:nil)
79
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
80
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
81
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
82
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
83
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
84
+ fail ArgumentError, 'data_source_name is nil' if data_source_name.nil?
85
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
86
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
87
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
88
+
89
+
90
+ request_headers = {}
91
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
92
+
93
+ # Set Headers
94
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
95
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
96
+
97
+ # Serialize Request
98
+ request_mapper = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::DataSource.mapper()
99
+ request_content = @client.serialize(request_mapper, parameters)
100
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
101
+
102
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}'
103
+
104
+ request_url = @base_url || @client.base_url
105
+
106
+ options = {
107
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
108
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'dataSourceName' => data_source_name,'subscriptionId' => @client.subscription_id},
109
+ query_params: {'api-version' => @client.api_version},
110
+ body: request_content,
111
+ headers: request_headers.merge(custom_headers || {}),
112
+ base_url: request_url
113
+ }
114
+ promise = @client.make_request_async(:put, path_template, options)
115
+
116
+ promise = promise.then do |result|
117
+ http_response = result.response
118
+ status_code = http_response.status
119
+ response_content = http_response.body
120
+ unless status_code == 200 || status_code == 201
121
+ error_model = JSON.load(response_content)
122
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
123
+ end
124
+
125
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
126
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
127
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
128
+ # Deserialize Response
129
+ if status_code == 200
130
+ begin
131
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
132
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::DataSource.mapper()
133
+ result.body = @client.deserialize(result_mapper, parsed_response)
134
+ rescue Exception => e
135
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
136
+ end
137
+ end
138
+ # Deserialize Response
139
+ if status_code == 201
140
+ begin
141
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
142
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::DataSource.mapper()
143
+ result.body = @client.deserialize(result_mapper, parsed_response)
144
+ rescue Exception => e
145
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
146
+ end
147
+ end
148
+
149
+ result
150
+ end
151
+
152
+ promise.execute
153
+ end
154
+
155
+ #
156
+ # Deletes a data source instance.
157
+ #
158
+ # @param resource_group_name [String] The name of the resource group to get.
159
+ # The name is case insensitive.
160
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
161
+ # contains the datasource.
162
+ # @param data_source_name [String] Name of the datasource.
163
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
164
+ # will be added to the HTTP request.
165
+ #
166
+ #
167
+ def delete(resource_group_name, workspace_name, data_source_name, custom_headers:nil)
168
+ response = delete_async(resource_group_name, workspace_name, data_source_name, custom_headers:custom_headers).value!
169
+ nil
170
+ end
171
+
172
+ #
173
+ # Deletes a data source instance.
174
+ #
175
+ # @param resource_group_name [String] The name of the resource group to get.
176
+ # The name is case insensitive.
177
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
178
+ # contains the datasource.
179
+ # @param data_source_name [String] Name of the datasource.
180
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
181
+ # will be added to the HTTP request.
182
+ #
183
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
184
+ #
185
+ def delete_with_http_info(resource_group_name, workspace_name, data_source_name, custom_headers:nil)
186
+ delete_async(resource_group_name, workspace_name, data_source_name, custom_headers:custom_headers).value!
187
+ end
188
+
189
+ #
190
+ # Deletes a data source instance.
191
+ #
192
+ # @param resource_group_name [String] The name of the resource group to get.
193
+ # The name is case insensitive.
194
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
195
+ # contains the datasource.
196
+ # @param data_source_name [String] Name of the datasource.
197
+ # @param [Hash{String => String}] A hash of custom headers that will be added
198
+ # to the HTTP request.
199
+ #
200
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
201
+ #
202
+ def delete_async(resource_group_name, workspace_name, data_source_name, custom_headers:nil)
203
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
204
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
205
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
206
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
207
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
208
+ fail ArgumentError, 'data_source_name is nil' if data_source_name.nil?
209
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
210
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
211
+
212
+
213
+ request_headers = {}
214
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
215
+
216
+ # Set Headers
217
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
218
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
219
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}'
220
+
221
+ request_url = @base_url || @client.base_url
222
+
223
+ options = {
224
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
225
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'dataSourceName' => data_source_name,'subscriptionId' => @client.subscription_id},
226
+ query_params: {'api-version' => @client.api_version},
227
+ headers: request_headers.merge(custom_headers || {}),
228
+ base_url: request_url
229
+ }
230
+ promise = @client.make_request_async(:delete, path_template, options)
231
+
232
+ promise = promise.then do |result|
233
+ http_response = result.response
234
+ status_code = http_response.status
235
+ response_content = http_response.body
236
+ unless status_code == 200 || status_code == 204
237
+ error_model = JSON.load(response_content)
238
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
239
+ end
240
+
241
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
242
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
243
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
244
+
245
+ result
246
+ end
247
+
248
+ promise.execute
249
+ end
250
+
251
+ #
252
+ # Gets a datasource instance.
253
+ #
254
+ # @param resource_group_name [String] The name of the resource group to get.
255
+ # The name is case insensitive.
256
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
257
+ # contains the datasource.
258
+ # @param data_source_name [String] Name of the datasource
259
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
260
+ # will be added to the HTTP request.
261
+ #
262
+ # @return [DataSource] operation results.
263
+ #
264
+ def get(resource_group_name, workspace_name, data_source_name, custom_headers:nil)
265
+ response = get_async(resource_group_name, workspace_name, data_source_name, custom_headers:custom_headers).value!
266
+ response.body unless response.nil?
267
+ end
268
+
269
+ #
270
+ # Gets a datasource instance.
271
+ #
272
+ # @param resource_group_name [String] The name of the resource group to get.
273
+ # The name is case insensitive.
274
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
275
+ # contains the datasource.
276
+ # @param data_source_name [String] Name of the datasource
277
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
278
+ # will be added to the HTTP request.
279
+ #
280
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
281
+ #
282
+ def get_with_http_info(resource_group_name, workspace_name, data_source_name, custom_headers:nil)
283
+ get_async(resource_group_name, workspace_name, data_source_name, custom_headers:custom_headers).value!
284
+ end
285
+
286
+ #
287
+ # Gets a datasource instance.
288
+ #
289
+ # @param resource_group_name [String] The name of the resource group to get.
290
+ # The name is case insensitive.
291
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
292
+ # contains the datasource.
293
+ # @param data_source_name [String] Name of the datasource
294
+ # @param [Hash{String => String}] A hash of custom headers that will be added
295
+ # to the HTTP request.
296
+ #
297
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
298
+ #
299
+ def get_async(resource_group_name, workspace_name, data_source_name, custom_headers:nil)
300
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
301
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
302
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
303
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
304
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
305
+ fail ArgumentError, 'data_source_name is nil' if data_source_name.nil?
306
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
307
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
308
+
309
+
310
+ request_headers = {}
311
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
312
+
313
+ # Set Headers
314
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
315
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
316
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}'
317
+
318
+ request_url = @base_url || @client.base_url
319
+
320
+ options = {
321
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
322
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'dataSourceName' => data_source_name,'subscriptionId' => @client.subscription_id},
323
+ query_params: {'api-version' => @client.api_version},
324
+ headers: request_headers.merge(custom_headers || {}),
325
+ base_url: request_url
326
+ }
327
+ promise = @client.make_request_async(:get, path_template, options)
328
+
329
+ promise = promise.then do |result|
330
+ http_response = result.response
331
+ status_code = http_response.status
332
+ response_content = http_response.body
333
+ unless status_code == 200
334
+ error_model = JSON.load(response_content)
335
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
336
+ end
337
+
338
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
339
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
340
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
341
+ # Deserialize Response
342
+ if status_code == 200
343
+ begin
344
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
345
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::DataSource.mapper()
346
+ result.body = @client.deserialize(result_mapper, parsed_response)
347
+ rescue Exception => e
348
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
349
+ end
350
+ end
351
+
352
+ result
353
+ end
354
+
355
+ promise.execute
356
+ end
357
+
358
+ #
359
+ # Gets the first page of data source instances in a workspace with the link to
360
+ # the next page.
361
+ #
362
+ # @param resource_group_name [String] The name of the resource group to get.
363
+ # The name is case insensitive.
364
+ # @param workspace_name [String] The workspace that contains the data sources.
365
+ # @param filter [String] The filter to apply on the operation.
366
+ # @param skiptoken [String] Starting point of the collection of data source
367
+ # instances.
368
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
369
+ # will be added to the HTTP request.
370
+ #
371
+ # @return [Array<DataSource>] operation results.
372
+ #
373
+ def list_by_workspace(resource_group_name, workspace_name, filter, skiptoken:nil, custom_headers:nil)
374
+ first_page = list_by_workspace_as_lazy(resource_group_name, workspace_name, filter, skiptoken:skiptoken, custom_headers:custom_headers)
375
+ first_page.get_all_items
376
+ end
377
+
378
+ #
379
+ # Gets the first page of data source instances in a workspace with the link to
380
+ # the next page.
381
+ #
382
+ # @param resource_group_name [String] The name of the resource group to get.
383
+ # The name is case insensitive.
384
+ # @param workspace_name [String] The workspace that contains the data sources.
385
+ # @param filter [String] The filter to apply on the operation.
386
+ # @param skiptoken [String] Starting point of the collection of data source
387
+ # instances.
388
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
389
+ # will be added to the HTTP request.
390
+ #
391
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
392
+ #
393
+ def list_by_workspace_with_http_info(resource_group_name, workspace_name, filter, skiptoken:nil, custom_headers:nil)
394
+ list_by_workspace_async(resource_group_name, workspace_name, filter, skiptoken:skiptoken, custom_headers:custom_headers).value!
395
+ end
396
+
397
+ #
398
+ # Gets the first page of data source instances in a workspace with the link to
399
+ # the next page.
400
+ #
401
+ # @param resource_group_name [String] The name of the resource group to get.
402
+ # The name is case insensitive.
403
+ # @param workspace_name [String] The workspace that contains the data sources.
404
+ # @param filter [String] The filter to apply on the operation.
405
+ # @param skiptoken [String] Starting point of the collection of data source
406
+ # instances.
407
+ # @param [Hash{String => String}] A hash of custom headers that will be added
408
+ # to the HTTP request.
409
+ #
410
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
411
+ #
412
+ def list_by_workspace_async(resource_group_name, workspace_name, filter, skiptoken:nil, custom_headers:nil)
413
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
414
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
415
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
416
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
417
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
418
+ fail ArgumentError, 'filter is nil' if filter.nil?
419
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
420
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
421
+
422
+
423
+ request_headers = {}
424
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
425
+
426
+ # Set Headers
427
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
428
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
429
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources'
430
+
431
+ request_url = @base_url || @client.base_url
432
+
433
+ options = {
434
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
435
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id},
436
+ query_params: {'$filter' => filter,'$skiptoken' => skiptoken,'api-version' => @client.api_version},
437
+ headers: request_headers.merge(custom_headers || {}),
438
+ base_url: request_url
439
+ }
440
+ promise = @client.make_request_async(:get, path_template, options)
441
+
442
+ promise = promise.then do |result|
443
+ http_response = result.response
444
+ status_code = http_response.status
445
+ response_content = http_response.body
446
+ unless status_code == 200
447
+ error_model = JSON.load(response_content)
448
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
449
+ end
450
+
451
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
452
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
453
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
454
+ # Deserialize Response
455
+ if status_code == 200
456
+ begin
457
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
458
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::DataSourceListResult.mapper()
459
+ result.body = @client.deserialize(result_mapper, parsed_response)
460
+ rescue Exception => e
461
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
462
+ end
463
+ end
464
+
465
+ result
466
+ end
467
+
468
+ promise.execute
469
+ end
470
+
471
+ #
472
+ # Gets the first page of data source instances in a workspace with the link to
473
+ # the next page.
474
+ #
475
+ # @param next_page_link [String] The NextLink from the previous successful call
476
+ # to List operation.
477
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
478
+ # will be added to the HTTP request.
479
+ #
480
+ # @return [DataSourceListResult] operation results.
481
+ #
482
+ def list_by_workspace_next(next_page_link, custom_headers:nil)
483
+ response = list_by_workspace_next_async(next_page_link, custom_headers:custom_headers).value!
484
+ response.body unless response.nil?
485
+ end
486
+
487
+ #
488
+ # Gets the first page of data source instances in a workspace with the link to
489
+ # the next page.
490
+ #
491
+ # @param next_page_link [String] The NextLink from the previous successful call
492
+ # to List operation.
493
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
494
+ # will be added to the HTTP request.
495
+ #
496
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
497
+ #
498
+ def list_by_workspace_next_with_http_info(next_page_link, custom_headers:nil)
499
+ list_by_workspace_next_async(next_page_link, custom_headers:custom_headers).value!
500
+ end
501
+
502
+ #
503
+ # Gets the first page of data source instances in a workspace with the link to
504
+ # the next page.
505
+ #
506
+ # @param next_page_link [String] The NextLink from the previous successful call
507
+ # to List operation.
508
+ # @param [Hash{String => String}] A hash of custom headers that will be added
509
+ # to the HTTP request.
510
+ #
511
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
512
+ #
513
+ def list_by_workspace_next_async(next_page_link, custom_headers:nil)
514
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
515
+
516
+
517
+ request_headers = {}
518
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
519
+
520
+ # Set Headers
521
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
522
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
523
+ path_template = '{nextLink}'
524
+
525
+ request_url = @base_url || @client.base_url
526
+
527
+ options = {
528
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
529
+ skip_encoding_path_params: {'nextLink' => next_page_link},
530
+ headers: request_headers.merge(custom_headers || {}),
531
+ base_url: request_url
532
+ }
533
+ promise = @client.make_request_async(:get, path_template, options)
534
+
535
+ promise = promise.then do |result|
536
+ http_response = result.response
537
+ status_code = http_response.status
538
+ response_content = http_response.body
539
+ unless status_code == 200
540
+ error_model = JSON.load(response_content)
541
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
542
+ end
543
+
544
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
545
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
546
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
547
+ # Deserialize Response
548
+ if status_code == 200
549
+ begin
550
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
551
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::DataSourceListResult.mapper()
552
+ result.body = @client.deserialize(result_mapper, parsed_response)
553
+ rescue Exception => e
554
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
555
+ end
556
+ end
557
+
558
+ result
559
+ end
560
+
561
+ promise.execute
562
+ end
563
+
564
+ #
565
+ # Gets the first page of data source instances in a workspace with the link to
566
+ # the next page.
567
+ #
568
+ # @param resource_group_name [String] The name of the resource group to get.
569
+ # The name is case insensitive.
570
+ # @param workspace_name [String] The workspace that contains the data sources.
571
+ # @param filter [String] The filter to apply on the operation.
572
+ # @param skiptoken [String] Starting point of the collection of data source
573
+ # instances.
574
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
575
+ # will be added to the HTTP request.
576
+ #
577
+ # @return [DataSourceListResult] which provide lazy access to pages of the
578
+ # response.
579
+ #
580
+ def list_by_workspace_as_lazy(resource_group_name, workspace_name, filter, skiptoken:nil, custom_headers:nil)
581
+ response = list_by_workspace_async(resource_group_name, workspace_name, filter, skiptoken:skiptoken, custom_headers:custom_headers).value!
582
+ unless response.nil?
583
+ page = response.body
584
+ page.next_method = Proc.new do |next_page_link|
585
+ list_by_workspace_next_async(next_page_link, custom_headers:custom_headers)
586
+ end
587
+ page
588
+ end
589
+ end
590
+
591
+ end
592
+ end