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,462 @@
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 LinkedServices
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the LinkedServices 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 linked service.
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 linkedServices resource
31
+ # @param linked_service_name [String] Name of the linkedServices resource
32
+ # @param parameters [LinkedService] The parameters required to create or update
33
+ # a linked service.
34
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
35
+ # will be added to the HTTP request.
36
+ #
37
+ # @return [LinkedService] operation results.
38
+ #
39
+ def create_or_update(resource_group_name, workspace_name, linked_service_name, parameters, custom_headers:nil)
40
+ response = create_or_update_async(resource_group_name, workspace_name, linked_service_name, parameters, custom_headers:custom_headers).value!
41
+ response.body unless response.nil?
42
+ end
43
+
44
+ #
45
+ # Create or update a linked service.
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 linkedServices resource
51
+ # @param linked_service_name [String] Name of the linkedServices resource
52
+ # @param parameters [LinkedService] The parameters required to create or update
53
+ # a linked service.
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, linked_service_name, parameters, custom_headers:nil)
60
+ create_or_update_async(resource_group_name, workspace_name, linked_service_name, parameters, custom_headers:custom_headers).value!
61
+ end
62
+
63
+ #
64
+ # Create or update a linked service.
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 linkedServices resource
70
+ # @param linked_service_name [String] Name of the linkedServices resource
71
+ # @param parameters [LinkedService] The parameters required to create or update
72
+ # a linked service.
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, linked_service_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, 'linked_service_name is nil' if linked_service_name.nil?
85
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
86
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
87
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.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::LinkedService.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}/linkedServices/{linkedServiceName}'
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,'linkedServiceName' => linked_service_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::LinkedService.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::LinkedService.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 linked service 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 linkedServices resource
162
+ # @param linked_service_name [String] Name of the linked service.
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, linked_service_name, custom_headers:nil)
168
+ response = delete_async(resource_group_name, workspace_name, linked_service_name, custom_headers:custom_headers).value!
169
+ nil
170
+ end
171
+
172
+ #
173
+ # Deletes a linked service 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 linkedServices resource
179
+ # @param linked_service_name [String] Name of the linked service.
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, linked_service_name, custom_headers:nil)
186
+ delete_async(resource_group_name, workspace_name, linked_service_name, custom_headers:custom_headers).value!
187
+ end
188
+
189
+ #
190
+ # Deletes a linked service 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 linkedServices resource
196
+ # @param linked_service_name [String] Name of the linked service.
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, linked_service_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, 'linked_service_name is nil' if linked_service_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}/linkedServices/{linkedServiceName}'
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,'linkedServiceName' => linked_service_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 linked service 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 linkedServices resource
258
+ # @param linked_service_name [String] Name of the linked service.
259
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
260
+ # will be added to the HTTP request.
261
+ #
262
+ # @return [LinkedService] operation results.
263
+ #
264
+ def get(resource_group_name, workspace_name, linked_service_name, custom_headers:nil)
265
+ response = get_async(resource_group_name, workspace_name, linked_service_name, custom_headers:custom_headers).value!
266
+ response.body unless response.nil?
267
+ end
268
+
269
+ #
270
+ # Gets a linked service 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 linkedServices resource
276
+ # @param linked_service_name [String] Name of the linked service.
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, linked_service_name, custom_headers:nil)
283
+ get_async(resource_group_name, workspace_name, linked_service_name, custom_headers:custom_headers).value!
284
+ end
285
+
286
+ #
287
+ # Gets a linked service 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 linkedServices resource
293
+ # @param linked_service_name [String] Name of the linked service.
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, linked_service_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, 'linked_service_name is nil' if linked_service_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}/linkedServices/{linkedServiceName}'
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,'linkedServiceName' => linked_service_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::LinkedService.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 linked services instances in a workspace.
360
+ #
361
+ # @param resource_group_name [String] The name of the resource group to get.
362
+ # The name is case insensitive.
363
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
364
+ # contains the linked services.
365
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
366
+ # will be added to the HTTP request.
367
+ #
368
+ # @return [LinkedServiceListResult] operation results.
369
+ #
370
+ def list_by_workspace(resource_group_name, workspace_name, custom_headers:nil)
371
+ response = list_by_workspace_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
372
+ response.body unless response.nil?
373
+ end
374
+
375
+ #
376
+ # Gets the linked services instances in a workspace.
377
+ #
378
+ # @param resource_group_name [String] The name of the resource group to get.
379
+ # The name is case insensitive.
380
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
381
+ # contains the linked services.
382
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
383
+ # will be added to the HTTP request.
384
+ #
385
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
386
+ #
387
+ def list_by_workspace_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
388
+ list_by_workspace_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
389
+ end
390
+
391
+ #
392
+ # Gets the linked services instances in a workspace.
393
+ #
394
+ # @param resource_group_name [String] The name of the resource group to get.
395
+ # The name is case insensitive.
396
+ # @param workspace_name [String] Name of the Log Analytics Workspace that
397
+ # contains the linked services.
398
+ # @param [Hash{String => String}] A hash of custom headers that will be added
399
+ # to the HTTP request.
400
+ #
401
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
402
+ #
403
+ def list_by_workspace_async(resource_group_name, workspace_name, custom_headers:nil)
404
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
405
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
406
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
407
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
408
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
409
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
410
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
411
+
412
+
413
+ request_headers = {}
414
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
415
+
416
+ # Set Headers
417
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
418
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
419
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices'
420
+
421
+ request_url = @base_url || @client.base_url
422
+
423
+ options = {
424
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
425
+ path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id},
426
+ query_params: {'api-version' => @client.api_version},
427
+ headers: request_headers.merge(custom_headers || {}),
428
+ base_url: request_url
429
+ }
430
+ promise = @client.make_request_async(:get, path_template, options)
431
+
432
+ promise = promise.then do |result|
433
+ http_response = result.response
434
+ status_code = http_response.status
435
+ response_content = http_response.body
436
+ unless status_code == 200
437
+ error_model = JSON.load(response_content)
438
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
439
+ end
440
+
441
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
442
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
443
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
444
+ # Deserialize Response
445
+ if status_code == 200
446
+ begin
447
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
448
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::LinkedServiceListResult.mapper()
449
+ result.body = @client.deserialize(result_mapper, parsed_response)
450
+ rescue Exception => e
451
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
452
+ end
453
+ end
454
+
455
+ result
456
+ end
457
+
458
+ promise.execute
459
+ end
460
+
461
+ end
462
+ end