azure_mgmt_operational_insights 0.15.2 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2015-03-20/generated/azure_mgmt_operational_insights.rb +18 -10
  3. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/available_service_tier.rb +124 -0
  4. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/core_summary.rb +2 -2
  5. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
  6. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_display.rb +68 -0
  7. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +56 -0
  8. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/purge_state.rb +16 -0
  9. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/resource.rb +9 -0
  10. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_search.rb +37 -13
  11. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +3 -2
  12. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb +1 -1
  13. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_metadata.rb +8 -8
  14. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/{search_highlight.rb → shared_keys.rb} +13 -13
  15. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +21 -0
  16. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb +2 -3
  17. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/tag.rb +2 -2
  18. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_body.rb +67 -0
  19. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb +85 -0
  20. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_response.rb +47 -0
  21. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_status_response.rb +47 -0
  22. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +24 -10
  23. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operations.rb +109 -0
  24. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/saved_searches.rb +78 -181
  25. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/storage_insights.rb +69 -82
  26. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb +476 -119
  27. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights.rb +14 -8
  28. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb +45 -32
  29. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb +34 -24
  30. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb +1 -1
  31. data/lib/{2015-03-20/generated/azure_mgmt_operational_insights/models/search_error.rb → 2015-11-01-preview/generated/azure_mgmt_operational_insights/models/error_response.rb} +11 -11
  32. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb +11 -0
  33. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
  34. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_display.rb +68 -0
  35. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +101 -0
  36. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_status.rb +102 -0
  37. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/resource.rb +10 -1
  38. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/sku.rb +2 -1
  39. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +2 -1
  40. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace.rb +10 -11
  41. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb +1 -1
  42. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +239 -0
  43. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/operations.rb +219 -0
  44. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/workspaces.rb +202 -63
  45. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights.rb +123 -0
  46. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/available_service_tiers.rb +146 -0
  47. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/clusters.rb +959 -0
  48. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/data_exports.rb +523 -0
  49. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb +603 -0
  50. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/deleted_workspaces.rb +211 -0
  51. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/gateways.rb +123 -0
  52. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/intelligence_packs.rb +351 -0
  53. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb +577 -0
  54. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/linked_storage_accounts.rb +481 -0
  55. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/management_groups.rb +130 -0
  56. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/available_service_tier.rb +124 -0
  57. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/azure_entity_resource.rb +75 -0
  58. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster.rb +159 -0
  59. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_entity_status.rb +21 -0
  60. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_error_response.rb +48 -0
  61. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_list_result.rb +98 -0
  62. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_patch.rb +78 -0
  63. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_sku.rb +58 -0
  64. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_sku_name_enum.rb +15 -0
  65. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/core_summary.rb +57 -0
  66. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export.rb +174 -0
  67. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export_error_response.rb +48 -0
  68. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export_list_result.rb +56 -0
  69. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_ingestion_status.rb +20 -0
  70. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source.rb +130 -0
  71. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_filter.rb +61 -0
  72. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_kind.rb +47 -0
  73. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb +98 -0
  74. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_type.rb +16 -0
  75. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_additional_info.rb +59 -0
  76. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_contract.rb +49 -0
  77. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_response.rb +113 -0
  78. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/identity.rb +72 -0
  79. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/identity_type.rb +16 -0
  80. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb +69 -0
  81. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/key_vault_properties.rb +71 -0
  82. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service.rb +120 -0
  83. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service_entity_status.rb +18 -0
  84. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb +55 -0
  85. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_list_result.rb +56 -0
  86. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_resource.rb +95 -0
  87. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/management_group.rb +128 -0
  88. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/metric_name.rb +57 -0
  89. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
  90. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_display.rb +79 -0
  91. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +101 -0
  92. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_status.rb +102 -0
  93. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/private_link_scoped_resource.rb +58 -0
  94. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/proxy_resource.rb +63 -0
  95. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/public_network_access_type.rb +16 -0
  96. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/purge_state.rb +16 -0
  97. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/resource.rb +83 -0
  98. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/saved_search.rb +165 -0
  99. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +55 -0
  100. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb +67 -0
  101. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_metadata.rb +241 -0
  102. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb +57 -0
  103. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_schema_value.rb +123 -0
  104. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_sort.rb +58 -0
  105. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb +16 -0
  106. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/shared_keys.rb +57 -0
  107. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +21 -0
  108. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_account.rb +58 -0
  109. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight.rb +157 -0
  110. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb +98 -0
  111. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb +16 -0
  112. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb +58 -0
  113. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/table.rb +79 -0
  114. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tables_list_result.rb +55 -0
  115. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tag.rb +57 -0
  116. data/lib/{2015-03-20/generated/azure_mgmt_operational_insights/models/search_results_response.rb → 2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tracked_resource.rb} +33 -31
  117. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/type.rb +16 -0
  118. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/usage_metric.rb +103 -0
  119. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace.rb +214 -0
  120. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_capping.rb +73 -0
  121. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_entity_status.rb +21 -0
  122. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb +56 -0
  123. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb +55 -0
  124. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb +56 -0
  125. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_patch.rb +207 -0
  126. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_body.rb +67 -0
  127. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb +85 -0
  128. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_response.rb +47 -0
  129. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_status_response.rb +47 -0
  130. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_sku.rb +85 -0
  131. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_sku_name_enum.rb +21 -0
  132. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/module_definition.rb +9 -0
  133. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operation_statuses.rb +121 -0
  134. data/lib/{2015-11-01-preview/generated/azure_mgmt_operational_insights/azure_log_analytics.rb → 2020-03-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb} +89 -19
  135. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operations.rb +220 -0
  136. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/saved_searches.rb +457 -0
  137. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/schema.rb +130 -0
  138. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/shared_keys_operations.rb +238 -0
  139. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/storage_insight_configs.rb +592 -0
  140. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/tables.rb +359 -0
  141. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/usages.rb +130 -0
  142. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/workspace_purge.rb +277 -0
  143. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/workspaces.rb +768 -0
  144. data/lib/azure_mgmt_operational_insights.rb +1 -0
  145. data/lib/profiles/latest/modules/operationalinsights_profile_module.rb +382 -180
  146. data/lib/profiles/latest/operationalinsights_latest_profile_client.rb +28 -9
  147. data/lib/profiles/latest/operationalinsights_module_definition.rb +0 -1
  148. data/lib/version.rb +1 -1
  149. metadata +123 -10
  150. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_parameters.rb +0 -94
@@ -24,10 +24,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
24
24
  #
25
25
  # Create or update a storage insight.
26
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] Log Analytics Workspace name that will contain
30
- # the storageInsightsConfigs resource
27
+ # @param resource_group_name [String] The Resource Group name.
28
+ # @param workspace_name [String] The Log Analytics Workspace name.
31
29
  # @param storage_insight_name [String] Name of the storageInsightsConfigs
32
30
  # resource
33
31
  # @param parameters [StorageInsight] The parameters required to create or
@@ -37,18 +35,16 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
37
35
  #
38
36
  # @return [StorageInsight] operation results.
39
37
  #
40
- def create_or_update(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers = nil)
41
- response = create_or_update_async(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers).value!
38
+ def create_or_update(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers:nil)
39
+ response = create_or_update_async(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers:custom_headers).value!
42
40
  response.body unless response.nil?
43
41
  end
44
42
 
45
43
  #
46
44
  # Create or update a storage insight.
47
45
  #
48
- # @param resource_group_name [String] The name of the resource group to get.
49
- # The name is case insensitive.
50
- # @param workspace_name [String] Log Analytics Workspace name that will contain
51
- # the storageInsightsConfigs resource
46
+ # @param resource_group_name [String] The Resource Group name.
47
+ # @param workspace_name [String] The Log Analytics Workspace name.
52
48
  # @param storage_insight_name [String] Name of the storageInsightsConfigs
53
49
  # resource
54
50
  # @param parameters [StorageInsight] The parameters required to create or
@@ -58,17 +54,15 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
58
54
  #
59
55
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
60
56
  #
61
- def create_or_update_with_http_info(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers = nil)
62
- create_or_update_async(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers).value!
57
+ def create_or_update_with_http_info(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers:nil)
58
+ create_or_update_async(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers:custom_headers).value!
63
59
  end
64
60
 
65
61
  #
66
62
  # Create or update a storage insight.
67
63
  #
68
- # @param resource_group_name [String] The name of the resource group to get.
69
- # The name is case insensitive.
70
- # @param workspace_name [String] Log Analytics Workspace name that will contain
71
- # the storageInsightsConfigs resource
64
+ # @param resource_group_name [String] The Resource Group name.
65
+ # @param workspace_name [String] The Log Analytics Workspace name.
72
66
  # @param storage_insight_name [String] Name of the storageInsightsConfigs
73
67
  # resource
74
68
  # @param parameters [StorageInsight] The parameters required to create or
@@ -78,7 +72,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
78
72
  #
79
73
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
80
74
  #
81
- def create_or_update_async(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers = nil)
75
+ def create_or_update_async(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers:nil)
82
76
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
83
77
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
84
78
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -91,13 +85,12 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
91
85
 
92
86
 
93
87
  request_headers = {}
88
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
94
89
 
95
90
  # Set Headers
96
91
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
97
92
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
98
93
 
99
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
100
-
101
94
  # Serialize Request
102
95
  request_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsight.mapper()
103
96
  request_content = @client.serialize(request_mapper, parameters)
@@ -127,6 +120,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
127
120
  end
128
121
 
129
122
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
123
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
124
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
130
125
  # Deserialize Response
131
126
  if status_code == 201
132
127
  begin
@@ -157,10 +152,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
157
152
  #
158
153
  # Gets a storage insight instance.
159
154
  #
160
- # @param resource_group_name [String] The name of the resource group to get.
161
- # The name is case insensitive.
162
- # @param workspace_name [String] Log Analytics Workspace name that contains the
163
- # storageInsightsConfigs resource
155
+ # @param resource_group_name [String] The Resource Group name.
156
+ # @param workspace_name [String] The Log Analytics Workspace name.
164
157
  # @param storage_insight_name [String] Name of the storageInsightsConfigs
165
158
  # resource
166
159
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -168,18 +161,16 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
168
161
  #
169
162
  # @return [StorageInsight] operation results.
170
163
  #
171
- def get(resource_group_name, workspace_name, storage_insight_name, custom_headers = nil)
172
- response = get_async(resource_group_name, workspace_name, storage_insight_name, custom_headers).value!
164
+ def get(resource_group_name, workspace_name, storage_insight_name, custom_headers:nil)
165
+ response = get_async(resource_group_name, workspace_name, storage_insight_name, custom_headers:custom_headers).value!
173
166
  response.body unless response.nil?
174
167
  end
175
168
 
176
169
  #
177
170
  # Gets a storage insight instance.
178
171
  #
179
- # @param resource_group_name [String] The name of the resource group to get.
180
- # The name is case insensitive.
181
- # @param workspace_name [String] Log Analytics Workspace name that contains the
182
- # storageInsightsConfigs resource
172
+ # @param resource_group_name [String] The Resource Group name.
173
+ # @param workspace_name [String] The Log Analytics Workspace name.
183
174
  # @param storage_insight_name [String] Name of the storageInsightsConfigs
184
175
  # resource
185
176
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -187,17 +178,15 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
187
178
  #
188
179
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
189
180
  #
190
- def get_with_http_info(resource_group_name, workspace_name, storage_insight_name, custom_headers = nil)
191
- get_async(resource_group_name, workspace_name, storage_insight_name, custom_headers).value!
181
+ def get_with_http_info(resource_group_name, workspace_name, storage_insight_name, custom_headers:nil)
182
+ get_async(resource_group_name, workspace_name, storage_insight_name, custom_headers:custom_headers).value!
192
183
  end
193
184
 
194
185
  #
195
186
  # Gets a storage insight instance.
196
187
  #
197
- # @param resource_group_name [String] The name of the resource group to get.
198
- # The name is case insensitive.
199
- # @param workspace_name [String] Log Analytics Workspace name that contains the
200
- # storageInsightsConfigs resource
188
+ # @param resource_group_name [String] The Resource Group name.
189
+ # @param workspace_name [String] The Log Analytics Workspace name.
201
190
  # @param storage_insight_name [String] Name of the storageInsightsConfigs
202
191
  # resource
203
192
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -205,7 +194,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
205
194
  #
206
195
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
207
196
  #
208
- def get_async(resource_group_name, workspace_name, storage_insight_name, custom_headers = nil)
197
+ def get_async(resource_group_name, workspace_name, storage_insight_name, custom_headers:nil)
209
198
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
210
199
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
211
200
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -217,6 +206,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
217
206
 
218
207
 
219
208
  request_headers = {}
209
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
220
210
 
221
211
  # Set Headers
222
212
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -244,6 +234,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
244
234
  end
245
235
 
246
236
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
237
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
238
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
247
239
  # Deserialize Response
248
240
  if status_code == 200
249
241
  begin
@@ -264,28 +256,24 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
264
256
  #
265
257
  # Deletes a storageInsightsConfigs resource
266
258
  #
267
- # @param resource_group_name [String] The name of the resource group to get.
268
- # The name is case insensitive.
269
- # @param workspace_name [String] Log Analytics Workspace name that contains the
270
- # storageInsightsConfigs resource
259
+ # @param resource_group_name [String] The Resource Group name.
260
+ # @param workspace_name [String] The Log Analytics Workspace name.
271
261
  # @param storage_insight_name [String] Name of the storageInsightsConfigs
272
262
  # resource
273
263
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
274
264
  # will be added to the HTTP request.
275
265
  #
276
266
  #
277
- def delete(resource_group_name, workspace_name, storage_insight_name, custom_headers = nil)
278
- response = delete_async(resource_group_name, workspace_name, storage_insight_name, custom_headers).value!
267
+ def delete(resource_group_name, workspace_name, storage_insight_name, custom_headers:nil)
268
+ response = delete_async(resource_group_name, workspace_name, storage_insight_name, custom_headers:custom_headers).value!
279
269
  nil
280
270
  end
281
271
 
282
272
  #
283
273
  # Deletes a storageInsightsConfigs resource
284
274
  #
285
- # @param resource_group_name [String] The name of the resource group to get.
286
- # The name is case insensitive.
287
- # @param workspace_name [String] Log Analytics Workspace name that contains the
288
- # storageInsightsConfigs resource
275
+ # @param resource_group_name [String] The Resource Group name.
276
+ # @param workspace_name [String] The Log Analytics Workspace name.
289
277
  # @param storage_insight_name [String] Name of the storageInsightsConfigs
290
278
  # resource
291
279
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -293,17 +281,15 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
293
281
  #
294
282
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
295
283
  #
296
- def delete_with_http_info(resource_group_name, workspace_name, storage_insight_name, custom_headers = nil)
297
- delete_async(resource_group_name, workspace_name, storage_insight_name, custom_headers).value!
284
+ def delete_with_http_info(resource_group_name, workspace_name, storage_insight_name, custom_headers:nil)
285
+ delete_async(resource_group_name, workspace_name, storage_insight_name, custom_headers:custom_headers).value!
298
286
  end
299
287
 
300
288
  #
301
289
  # Deletes a storageInsightsConfigs resource
302
290
  #
303
- # @param resource_group_name [String] The name of the resource group to get.
304
- # The name is case insensitive.
305
- # @param workspace_name [String] Log Analytics Workspace name that contains the
306
- # storageInsightsConfigs resource
291
+ # @param resource_group_name [String] The Resource Group name.
292
+ # @param workspace_name [String] The Log Analytics Workspace name.
307
293
  # @param storage_insight_name [String] Name of the storageInsightsConfigs
308
294
  # resource
309
295
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -311,7 +297,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
311
297
  #
312
298
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
313
299
  #
314
- def delete_async(resource_group_name, workspace_name, storage_insight_name, custom_headers = nil)
300
+ def delete_async(resource_group_name, workspace_name, storage_insight_name, custom_headers:nil)
315
301
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
316
302
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
317
303
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -323,6 +309,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
323
309
 
324
310
 
325
311
  request_headers = {}
312
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
326
313
 
327
314
  # Set Headers
328
315
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -350,6 +337,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
350
337
  end
351
338
 
352
339
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
340
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
341
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
353
342
 
354
343
  result
355
344
  end
@@ -360,49 +349,43 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
360
349
  #
361
350
  # Lists the storage insight instances within a workspace
362
351
  #
363
- # @param resource_group_name [String] The name of the resource group to get.
364
- # The name is case insensitive.
365
- # @param workspace_name [String] Log Analytics Workspace name that will contain
366
- # the storageInsightsConfigs resource
352
+ # @param resource_group_name [String] The Resource Group name.
353
+ # @param workspace_name [String] The Log Analytics Workspace name.
367
354
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
368
355
  # will be added to the HTTP request.
369
356
  #
370
357
  # @return [Array<StorageInsight>] operation results.
371
358
  #
372
- def list_by_workspace(resource_group_name, workspace_name, custom_headers = nil)
373
- first_page = list_by_workspace_as_lazy(resource_group_name, workspace_name, custom_headers)
359
+ def list_by_workspace(resource_group_name, workspace_name, custom_headers:nil)
360
+ first_page = list_by_workspace_as_lazy(resource_group_name, workspace_name, custom_headers:custom_headers)
374
361
  first_page.get_all_items
375
362
  end
376
363
 
377
364
  #
378
365
  # Lists the storage insight instances within a workspace
379
366
  #
380
- # @param resource_group_name [String] The name of the resource group to get.
381
- # The name is case insensitive.
382
- # @param workspace_name [String] Log Analytics Workspace name that will contain
383
- # the storageInsightsConfigs resource
367
+ # @param resource_group_name [String] The Resource Group name.
368
+ # @param workspace_name [String] The Log Analytics Workspace name.
384
369
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
385
370
  # will be added to the HTTP request.
386
371
  #
387
372
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
388
373
  #
389
- def list_by_workspace_with_http_info(resource_group_name, workspace_name, custom_headers = nil)
390
- list_by_workspace_async(resource_group_name, workspace_name, custom_headers).value!
374
+ def list_by_workspace_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
375
+ list_by_workspace_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
391
376
  end
392
377
 
393
378
  #
394
379
  # Lists the storage insight instances within a workspace
395
380
  #
396
- # @param resource_group_name [String] The name of the resource group to get.
397
- # The name is case insensitive.
398
- # @param workspace_name [String] Log Analytics Workspace name that will contain
399
- # the storageInsightsConfigs resource
381
+ # @param resource_group_name [String] The Resource Group name.
382
+ # @param workspace_name [String] The Log Analytics Workspace name.
400
383
  # @param [Hash{String => String}] A hash of custom headers that will be added
401
384
  # to the HTTP request.
402
385
  #
403
386
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
404
387
  #
405
- def list_by_workspace_async(resource_group_name, workspace_name, custom_headers = nil)
388
+ def list_by_workspace_async(resource_group_name, workspace_name, custom_headers:nil)
406
389
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
407
390
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
408
391
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -413,6 +396,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
413
396
 
414
397
 
415
398
  request_headers = {}
399
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
416
400
 
417
401
  # Set Headers
418
402
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -440,6 +424,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
440
424
  end
441
425
 
442
426
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
427
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
428
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
443
429
  # Deserialize Response
444
430
  if status_code == 200
445
431
  begin
@@ -467,8 +453,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
467
453
  #
468
454
  # @return [StorageInsightListResult] operation results.
469
455
  #
470
- def list_by_workspace_next(next_page_link, custom_headers = nil)
471
- response = list_by_workspace_next_async(next_page_link, custom_headers).value!
456
+ def list_by_workspace_next(next_page_link, custom_headers:nil)
457
+ response = list_by_workspace_next_async(next_page_link, custom_headers:custom_headers).value!
472
458
  response.body unless response.nil?
473
459
  end
474
460
 
@@ -482,8 +468,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
482
468
  #
483
469
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
484
470
  #
485
- def list_by_workspace_next_with_http_info(next_page_link, custom_headers = nil)
486
- list_by_workspace_next_async(next_page_link, custom_headers).value!
471
+ def list_by_workspace_next_with_http_info(next_page_link, custom_headers:nil)
472
+ list_by_workspace_next_async(next_page_link, custom_headers:custom_headers).value!
487
473
  end
488
474
 
489
475
  #
@@ -496,11 +482,12 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
496
482
  #
497
483
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
498
484
  #
499
- def list_by_workspace_next_async(next_page_link, custom_headers = nil)
485
+ def list_by_workspace_next_async(next_page_link, custom_headers:nil)
500
486
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
501
487
 
502
488
 
503
489
  request_headers = {}
490
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
504
491
 
505
492
  # Set Headers
506
493
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -527,6 +514,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
527
514
  end
528
515
 
529
516
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
517
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
518
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
530
519
  # Deserialize Response
531
520
  if status_code == 200
532
521
  begin
@@ -547,22 +536,20 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
547
536
  #
548
537
  # Lists the storage insight instances within a workspace
549
538
  #
550
- # @param resource_group_name [String] The name of the resource group to get.
551
- # The name is case insensitive.
552
- # @param workspace_name [String] Log Analytics Workspace name that will contain
553
- # the storageInsightsConfigs resource
539
+ # @param resource_group_name [String] The Resource Group name.
540
+ # @param workspace_name [String] The Log Analytics Workspace name.
554
541
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
555
542
  # will be added to the HTTP request.
556
543
  #
557
544
  # @return [StorageInsightListResult] which provide lazy access to pages of the
558
545
  # response.
559
546
  #
560
- def list_by_workspace_as_lazy(resource_group_name, workspace_name, custom_headers = nil)
561
- response = list_by_workspace_async(resource_group_name, workspace_name, custom_headers).value!
547
+ def list_by_workspace_as_lazy(resource_group_name, workspace_name, custom_headers:nil)
548
+ response = list_by_workspace_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
562
549
  unless response.nil?
563
550
  page = response.body
564
551
  page.next_method = Proc.new do |next_page_link|
565
- list_by_workspace_next_async(next_page_link, custom_headers)
552
+ list_by_workspace_next_async(next_page_link, custom_headers:custom_headers)
566
553
  end
567
554
  page
568
555
  end
@@ -31,8 +31,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
31
31
  #
32
32
  # @return [Array] operation results.
33
33
  #
34
- def list_link_targets(custom_headers = nil)
35
- response = list_link_targets_async(custom_headers).value!
34
+ def list_link_targets(custom_headers:nil)
35
+ response = list_link_targets_async(custom_headers:custom_headers).value!
36
36
  response.body unless response.nil?
37
37
  end
38
38
 
@@ -46,8 +46,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
46
46
  #
47
47
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
48
  #
49
- def list_link_targets_with_http_info(custom_headers = nil)
50
- list_link_targets_async(custom_headers).value!
49
+ def list_link_targets_with_http_info(custom_headers:nil)
50
+ list_link_targets_async(custom_headers:custom_headers).value!
51
51
  end
52
52
 
53
53
  #
@@ -60,12 +60,13 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
60
60
  #
61
61
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
62
  #
63
- def list_link_targets_async(custom_headers = nil)
63
+ def list_link_targets_async(custom_headers:nil)
64
64
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
65
65
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
66
66
 
67
67
 
68
68
  request_headers = {}
69
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
69
70
 
70
71
  # Set Headers
71
72
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -93,6 +94,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
93
94
  end
94
95
 
95
96
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
97
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
98
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
96
99
  # Deserialize Response
97
100
  if status_code == 200
98
101
  begin
@@ -129,46 +132,43 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
129
132
  #
130
133
  # Gets the schema for a given workspace.
131
134
  #
132
- # @param resource_group_name [String] The name of the resource group to get.
133
- # The name is case insensitive.
134
- # @param workspace_name [String] Log Analytics workspace name
135
+ # @param resource_group_name [String] The Resource Group name.
136
+ # @param workspace_name [String] The Log Analytics Workspace name.
135
137
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
136
138
  # will be added to the HTTP request.
137
139
  #
138
140
  # @return [SearchGetSchemaResponse] operation results.
139
141
  #
140
- def get_schema(resource_group_name, workspace_name, custom_headers = nil)
141
- response = get_schema_async(resource_group_name, workspace_name, custom_headers).value!
142
+ def get_schema(resource_group_name, workspace_name, custom_headers:nil)
143
+ response = get_schema_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
142
144
  response.body unless response.nil?
143
145
  end
144
146
 
145
147
  #
146
148
  # Gets the schema for a given workspace.
147
149
  #
148
- # @param resource_group_name [String] The name of the resource group to get.
149
- # The name is case insensitive.
150
- # @param workspace_name [String] Log Analytics workspace name
150
+ # @param resource_group_name [String] The Resource Group name.
151
+ # @param workspace_name [String] The Log Analytics Workspace name.
151
152
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
152
153
  # will be added to the HTTP request.
153
154
  #
154
155
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
155
156
  #
156
- def get_schema_with_http_info(resource_group_name, workspace_name, custom_headers = nil)
157
- get_schema_async(resource_group_name, workspace_name, custom_headers).value!
157
+ def get_schema_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
158
+ get_schema_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
158
159
  end
159
160
 
160
161
  #
161
162
  # Gets the schema for a given workspace.
162
163
  #
163
- # @param resource_group_name [String] The name of the resource group to get.
164
- # The name is case insensitive.
165
- # @param workspace_name [String] Log Analytics workspace name
164
+ # @param resource_group_name [String] The Resource Group name.
165
+ # @param workspace_name [String] The Log Analytics Workspace name.
166
166
  # @param [Hash{String => String}] A hash of custom headers that will be added
167
167
  # to the HTTP request.
168
168
  #
169
169
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
170
170
  #
171
- def get_schema_async(resource_group_name, workspace_name, custom_headers = nil)
171
+ def get_schema_async(resource_group_name, workspace_name, custom_headers:nil)
172
172
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
173
173
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
174
174
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -179,6 +179,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
179
179
 
180
180
 
181
181
  request_headers = {}
182
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
182
183
 
183
184
  # Set Headers
184
185
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -206,6 +207,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
206
207
  end
207
208
 
208
209
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
210
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
211
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
209
212
  # Deserialize Response
210
213
  if status_code == 200
211
214
  begin
@@ -224,131 +227,199 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
224
227
  end
225
228
 
226
229
  #
227
- # Submit a search for a given workspace. The response will contain an id to
228
- # track the search. User can use the id to poll the search status and get the
229
- # full search result later if the search takes long time to finish.
230
+ # Purges data in an Log Analytics workspace by a set of user-defined filters.
231
+ #
232
+ # In order to manage system resources, purge requests are throttled at 50
233
+ # requests per hour. You should batch the execution of purge requests by
234
+ # sending a single command whose predicate includes all user identities that
235
+ # require purging. Use the in operator to specify multiple identities. You
236
+ # should run the query prior to using for a purge request to verify that the
237
+ # results are expected.
230
238
  #
231
- # @param resource_group_name [String] The name of the resource group to get.
232
- # The name is case insensitive.
233
- # @param workspace_name [String] Log Analytics workspace name
234
- # @param parameters [SearchParameters] The parameters required to execute a
235
- # search query.
239
+ # @param resource_group_name [String] The Resource Group name.
240
+ # @param workspace_name [String] The Log Analytics Workspace name.
236
241
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
237
242
  # will be added to the HTTP request.
238
243
  #
239
- # @return [SearchResultsResponse] operation results.
244
+ # @return [WorkspacePurgeResponse] operation results.
240
245
  #
241
- def get_search_results(resource_group_name, workspace_name, parameters, custom_headers = nil)
242
- response = get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers).value!
246
+ def purge(resource_group_name, workspace_name, custom_headers:nil)
247
+ response = purge_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
243
248
  response.body unless response.nil?
244
249
  end
245
250
 
246
251
  #
247
- # @param resource_group_name [String] The name of the resource group to get.
248
- # The name is case insensitive.
249
- # @param workspace_name [String] Log Analytics workspace name
250
- # @param parameters [SearchParameters] The parameters required to execute a
251
- # search query.
252
+ # Purges data in an Log Analytics workspace by a set of user-defined filters.
253
+ #
254
+ # In order to manage system resources, purge requests are throttled at 50
255
+ # requests per hour. You should batch the execution of purge requests by
256
+ # sending a single command whose predicate includes all user identities that
257
+ # require purging. Use the in operator to specify multiple identities. You
258
+ # should run the query prior to using for a purge request to verify that the
259
+ # results are expected.
260
+ #
261
+ # @param resource_group_name [String] The Resource Group name.
262
+ # @param workspace_name [String] The Log Analytics Workspace name.
252
263
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
253
264
  # will be added to the HTTP request.
254
265
  #
255
- # @return [Concurrent::Promise] promise which provides async access to http
256
- # response.
266
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
267
+ #
268
+ def purge_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
269
+ purge_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
270
+ end
271
+
272
+ #
273
+ # Purges data in an Log Analytics workspace by a set of user-defined filters.
257
274
  #
258
- def get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers = nil)
259
- # Send request
260
- promise = begin_get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers)
275
+ # In order to manage system resources, purge requests are throttled at 50
276
+ # requests per hour. You should batch the execution of purge requests by
277
+ # sending a single command whose predicate includes all user identities that
278
+ # require purging. Use the in operator to specify multiple identities. You
279
+ # should run the query prior to using for a purge request to verify that the
280
+ # results are expected.
281
+ #
282
+ # @param resource_group_name [String] The Resource Group name.
283
+ # @param workspace_name [String] The Log Analytics Workspace name.
284
+ # @param [Hash{String => String}] A hash of custom headers that will be added
285
+ # to the HTTP request.
286
+ #
287
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
288
+ #
289
+ def purge_async(resource_group_name, workspace_name, custom_headers:nil)
290
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
291
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
292
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
293
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
294
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
295
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
296
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
297
+ fail ArgumentError, '@client.body is nil' if @client.body.nil?
298
+
299
+
300
+ request_headers = {}
301
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
302
+
303
+ # Set Headers
304
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
305
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
306
+
307
+ # Serialize Request
308
+ request_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeBody.mapper()
309
+ request_content = @client.serialize(request_mapper, @client.body)
310
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
311
+
312
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/purge'
313
+
314
+ request_url = @base_url || @client.base_url
315
+
316
+ options = {
317
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
318
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id,'workspaceName' => workspace_name},
319
+ query_params: {'api-version' => @client.api_version},
320
+ body: request_content,
321
+ headers: request_headers.merge(custom_headers || {}),
322
+ base_url: request_url
323
+ }
324
+ promise = @client.make_request_async(:post, path_template, options)
261
325
 
262
- promise = promise.then do |response|
263
- # Defining deserialization method.
264
- deserialize_method = lambda do |parsed_response|
265
- result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchResultsResponse.mapper()
266
- parsed_response = @client.deserialize(result_mapper, parsed_response)
326
+ promise = promise.then do |result|
327
+ http_response = result.response
328
+ status_code = http_response.status
329
+ response_content = http_response.body
330
+ unless status_code == 202
331
+ error_model = JSON.load(response_content)
332
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
267
333
  end
268
334
 
269
- # Waiting for response.
270
- @client.get_long_running_operation_result(response, deserialize_method)
335
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
336
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
337
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
338
+ # Deserialize Response
339
+ if status_code == 202
340
+ begin
341
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
342
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeResponse.mapper()
343
+ result.body = @client.deserialize(result_mapper, parsed_response)
344
+ rescue Exception => e
345
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
346
+ end
347
+ end
348
+
349
+ result
271
350
  end
272
351
 
273
- promise
352
+ promise.execute
274
353
  end
275
354
 
276
355
  #
277
- # Gets updated search results for a given search query.
356
+ # Gets status of an ongoing purge operation.
278
357
  #
279
- # @param resource_group_name [String] The name of the resource group to get.
280
- # The name is case insensitive.
281
- # @param workspace_name [String] Log Analytics workspace name
282
- # @param id [String] The id of the search that will have results updated. You
283
- # can get the id from the response of the GetResults call.
358
+ # @param resource_group_name [String] The Resource Group name.
359
+ # @param workspace_name [String] The Log Analytics Workspace name.
284
360
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
285
361
  # will be added to the HTTP request.
286
362
  #
287
- # @return [SearchResultsResponse] operation results.
363
+ # @return [WorkspacePurgeStatusResponse] operation results.
288
364
  #
289
- def update_search_results(resource_group_name, workspace_name, id, custom_headers = nil)
290
- response = update_search_results_async(resource_group_name, workspace_name, id, custom_headers).value!
365
+ def get_purge_status(resource_group_name, workspace_name, custom_headers:nil)
366
+ response = get_purge_status_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
291
367
  response.body unless response.nil?
292
368
  end
293
369
 
294
370
  #
295
- # Gets updated search results for a given search query.
371
+ # Gets status of an ongoing purge operation.
296
372
  #
297
- # @param resource_group_name [String] The name of the resource group to get.
298
- # The name is case insensitive.
299
- # @param workspace_name [String] Log Analytics workspace name
300
- # @param id [String] The id of the search that will have results updated. You
301
- # can get the id from the response of the GetResults call.
373
+ # @param resource_group_name [String] The Resource Group name.
374
+ # @param workspace_name [String] The Log Analytics Workspace name.
302
375
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
303
376
  # will be added to the HTTP request.
304
377
  #
305
378
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
306
379
  #
307
- def update_search_results_with_http_info(resource_group_name, workspace_name, id, custom_headers = nil)
308
- update_search_results_async(resource_group_name, workspace_name, id, custom_headers).value!
380
+ def get_purge_status_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
381
+ get_purge_status_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
309
382
  end
310
383
 
311
384
  #
312
- # Gets updated search results for a given search query.
385
+ # Gets status of an ongoing purge operation.
313
386
  #
314
- # @param resource_group_name [String] The name of the resource group to get.
315
- # The name is case insensitive.
316
- # @param workspace_name [String] Log Analytics workspace name
317
- # @param id [String] The id of the search that will have results updated. You
318
- # can get the id from the response of the GetResults call.
387
+ # @param resource_group_name [String] The Resource Group name.
388
+ # @param workspace_name [String] The Log Analytics Workspace name.
319
389
  # @param [Hash{String => String}] A hash of custom headers that will be added
320
390
  # to the HTTP request.
321
391
  #
322
392
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
323
393
  #
324
- def update_search_results_async(resource_group_name, workspace_name, id, custom_headers = nil)
394
+ def get_purge_status_async(resource_group_name, workspace_name, custom_headers:nil)
325
395
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
326
396
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
327
397
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
328
398
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
329
- fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
330
- fail ArgumentError, 'id is nil' if id.nil?
331
399
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
332
400
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
401
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
402
+ fail ArgumentError, '@client.purge_id is nil' if @client.purge_id.nil?
333
403
 
334
404
 
335
405
  request_headers = {}
406
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
336
407
 
337
408
  # Set Headers
338
409
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
339
410
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
340
- path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/search/{id}'
411
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/operations/{purgeId}'
341
412
 
342
413
  request_url = @base_url || @client.base_url
343
414
 
344
415
  options = {
345
416
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
346
- path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'id' => id,'subscriptionId' => @client.subscription_id},
417
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id,'workspaceName' => workspace_name,'purgeId' => @client.purge_id},
347
418
  query_params: {'api-version' => @client.api_version},
348
419
  headers: request_headers.merge(custom_headers || {}),
349
420
  base_url: request_url
350
421
  }
351
- promise = @client.make_request_async(:post, path_template, options)
422
+ promise = @client.make_request_async(:get, path_template, options)
352
423
 
353
424
  promise = promise.then do |result|
354
425
  http_response = result.response
@@ -360,11 +431,13 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
360
431
  end
361
432
 
362
433
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
434
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
435
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
363
436
  # Deserialize Response
364
437
  if status_code == 200
365
438
  begin
366
439
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
367
- result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchResultsResponse.mapper()
440
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeStatusResponse.mapper()
368
441
  result.body = @client.deserialize(result_mapper, parsed_response)
369
442
  rescue Exception => e
370
443
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -378,112 +451,396 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
378
451
  end
379
452
 
380
453
  #
381
- # Submit a search for a given workspace. The response will contain an id to
382
- # track the search. User can use the id to poll the search status and get the
383
- # full search result later if the search takes long time to finish.
454
+ # Gets the shared keys for a Log Analytics Workspace. These keys are used to
455
+ # connect Microsoft Operational Insights agents to the workspace.
384
456
  #
385
- # @param resource_group_name [String] The name of the resource group to get.
386
- # The name is case insensitive.
387
- # @param workspace_name [String] Log Analytics workspace name
388
- # @param parameters [SearchParameters] The parameters required to execute a
389
- # search query.
457
+ # @param resource_group_name [String] The Resource Group name.
458
+ # @param workspace_name [String] The Log Analytics Workspace name.
390
459
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
391
460
  # will be added to the HTTP request.
392
461
  #
393
- # @return [SearchResultsResponse] operation results.
462
+ # @return [SharedKeys] operation results.
394
463
  #
395
- def begin_get_search_results(resource_group_name, workspace_name, parameters, custom_headers = nil)
396
- response = begin_get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers).value!
464
+ def list_keys(resource_group_name, workspace_name, custom_headers:nil)
465
+ response = list_keys_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
397
466
  response.body unless response.nil?
398
467
  end
399
468
 
400
469
  #
401
- # Submit a search for a given workspace. The response will contain an id to
402
- # track the search. User can use the id to poll the search status and get the
403
- # full search result later if the search takes long time to finish.
470
+ # Gets the shared keys for a Log Analytics Workspace. These keys are used to
471
+ # connect Microsoft Operational Insights agents to the workspace.
404
472
  #
405
- # @param resource_group_name [String] The name of the resource group to get.
406
- # The name is case insensitive.
407
- # @param workspace_name [String] Log Analytics workspace name
408
- # @param parameters [SearchParameters] The parameters required to execute a
409
- # search query.
473
+ # @param resource_group_name [String] The Resource Group name.
474
+ # @param workspace_name [String] The Log Analytics Workspace name.
410
475
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
411
476
  # will be added to the HTTP request.
412
477
  #
413
478
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
414
479
  #
415
- def begin_get_search_results_with_http_info(resource_group_name, workspace_name, parameters, custom_headers = nil)
416
- begin_get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers).value!
480
+ def list_keys_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
481
+ list_keys_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
417
482
  end
418
483
 
419
484
  #
420
- # Submit a search for a given workspace. The response will contain an id to
421
- # track the search. User can use the id to poll the search status and get the
422
- # full search result later if the search takes long time to finish.
485
+ # Gets the shared keys for a Log Analytics Workspace. These keys are used to
486
+ # connect Microsoft Operational Insights agents to the workspace.
423
487
  #
424
- # @param resource_group_name [String] The name of the resource group to get.
425
- # The name is case insensitive.
426
- # @param workspace_name [String] Log Analytics workspace name
427
- # @param parameters [SearchParameters] The parameters required to execute a
428
- # search query.
488
+ # @param resource_group_name [String] The Resource Group name.
489
+ # @param workspace_name [String] The Log Analytics Workspace name.
429
490
  # @param [Hash{String => String}] A hash of custom headers that will be added
430
491
  # to the HTTP request.
431
492
  #
432
493
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
433
494
  #
434
- def begin_get_search_results_async(resource_group_name, workspace_name, parameters, custom_headers = nil)
495
+ def list_keys_async(resource_group_name, workspace_name, custom_headers:nil)
496
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
435
497
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
436
498
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
437
499
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
438
500
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
439
501
  fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
440
- fail ArgumentError, 'parameters is nil' if parameters.nil?
441
502
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
503
+
504
+
505
+ request_headers = {}
506
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
507
+
508
+ # Set Headers
509
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
510
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
511
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/listKeys'
512
+
513
+ request_url = @base_url || @client.base_url
514
+
515
+ options = {
516
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
517
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name},
518
+ query_params: {'api-version' => @client.api_version},
519
+ headers: request_headers.merge(custom_headers || {}),
520
+ base_url: request_url
521
+ }
522
+ promise = @client.make_request_async(:post, path_template, options)
523
+
524
+ promise = promise.then do |result|
525
+ http_response = result.response
526
+ status_code = http_response.status
527
+ response_content = http_response.body
528
+ unless status_code == 200
529
+ error_model = JSON.load(response_content)
530
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
531
+ end
532
+
533
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
534
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
535
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
536
+ # Deserialize Response
537
+ if status_code == 200
538
+ begin
539
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
540
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SharedKeys.mapper()
541
+ result.body = @client.deserialize(result_mapper, parsed_response)
542
+ rescue Exception => e
543
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
544
+ end
545
+ end
546
+
547
+ result
548
+ end
549
+
550
+ promise.execute
551
+ end
552
+
553
+ #
554
+ # Regenerates the shared keys for a Log Analytics Workspace. These keys are
555
+ # used to connect Microsoft Operational Insights agents to the workspace.
556
+ #
557
+ # @param resource_group_name [String] The Resource Group name.
558
+ # @param workspace_name [String] The Log Analytics Workspace name.
559
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
560
+ # will be added to the HTTP request.
561
+ #
562
+ # @return [SharedKeys] operation results.
563
+ #
564
+ def regenerate_shared_keys(resource_group_name, workspace_name, custom_headers:nil)
565
+ response = regenerate_shared_keys_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
566
+ response.body unless response.nil?
567
+ end
568
+
569
+ #
570
+ # Regenerates the shared keys for a Log Analytics Workspace. These keys are
571
+ # used to connect Microsoft Operational Insights agents to the workspace.
572
+ #
573
+ # @param resource_group_name [String] The Resource Group name.
574
+ # @param workspace_name [String] The Log Analytics Workspace name.
575
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
576
+ # will be added to the HTTP request.
577
+ #
578
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
579
+ #
580
+ def regenerate_shared_keys_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
581
+ regenerate_shared_keys_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
582
+ end
583
+
584
+ #
585
+ # Regenerates the shared keys for a Log Analytics Workspace. These keys are
586
+ # used to connect Microsoft Operational Insights agents to the workspace.
587
+ #
588
+ # @param resource_group_name [String] The Resource Group name.
589
+ # @param workspace_name [String] The Log Analytics Workspace name.
590
+ # @param [Hash{String => String}] A hash of custom headers that will be added
591
+ # to the HTTP request.
592
+ #
593
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
594
+ #
595
+ def regenerate_shared_keys_async(resource_group_name, workspace_name, custom_headers:nil)
442
596
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
597
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
598
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
599
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
600
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
601
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
602
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
443
603
 
444
604
 
445
605
  request_headers = {}
606
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
446
607
 
447
608
  # Set Headers
448
609
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
449
610
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
611
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/regenerateSharedKey'
612
+
613
+ request_url = @base_url || @client.base_url
450
614
 
615
+ options = {
616
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
617
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name},
618
+ query_params: {'api-version' => @client.api_version},
619
+ headers: request_headers.merge(custom_headers || {}),
620
+ base_url: request_url
621
+ }
622
+ promise = @client.make_request_async(:post, path_template, options)
623
+
624
+ promise = promise.then do |result|
625
+ http_response = result.response
626
+ status_code = http_response.status
627
+ response_content = http_response.body
628
+ unless status_code == 200
629
+ error_model = JSON.load(response_content)
630
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
631
+ end
632
+
633
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
634
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
635
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
636
+ # Deserialize Response
637
+ if status_code == 200
638
+ begin
639
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
640
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SharedKeys.mapper()
641
+ result.body = @client.deserialize(result_mapper, parsed_response)
642
+ rescue Exception => e
643
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
644
+ end
645
+ end
646
+
647
+ result
648
+ end
649
+
650
+ promise.execute
651
+ end
652
+
653
+ #
654
+ # Delete a Log Analytics gateway.
655
+ #
656
+ # @param resource_group_name [String] The Resource Group name.
657
+ # @param workspace_name [String] The Log Analytics Workspace name.
658
+ # @param gateway_id [String] The Log Analytics gateway Id.
659
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
660
+ # will be added to the HTTP request.
661
+ #
662
+ #
663
+ def delete_gateways(resource_group_name, workspace_name, gateway_id, custom_headers:nil)
664
+ response = delete_gateways_async(resource_group_name, workspace_name, gateway_id, custom_headers:custom_headers).value!
665
+ nil
666
+ end
667
+
668
+ #
669
+ # Delete a Log Analytics gateway.
670
+ #
671
+ # @param resource_group_name [String] The Resource Group name.
672
+ # @param workspace_name [String] The Log Analytics Workspace name.
673
+ # @param gateway_id [String] The Log Analytics gateway Id.
674
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
675
+ # will be added to the HTTP request.
676
+ #
677
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
678
+ #
679
+ def delete_gateways_with_http_info(resource_group_name, workspace_name, gateway_id, custom_headers:nil)
680
+ delete_gateways_async(resource_group_name, workspace_name, gateway_id, custom_headers:custom_headers).value!
681
+ end
682
+
683
+ #
684
+ # Delete a Log Analytics gateway.
685
+ #
686
+ # @param resource_group_name [String] The Resource Group name.
687
+ # @param workspace_name [String] The Log Analytics Workspace name.
688
+ # @param gateway_id [String] The Log Analytics gateway Id.
689
+ # @param [Hash{String => String}] A hash of custom headers that will be added
690
+ # to the HTTP request.
691
+ #
692
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
693
+ #
694
+ def delete_gateways_async(resource_group_name, workspace_name, gateway_id, custom_headers:nil)
695
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
696
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
697
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
698
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
699
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
700
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
701
+ fail ArgumentError, 'gateway_id is nil' if gateway_id.nil?
702
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
703
+
704
+
705
+ request_headers = {}
451
706
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
452
707
 
453
- # Serialize Request
454
- request_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchParameters.mapper()
455
- request_content = @client.serialize(request_mapper, parameters)
456
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
708
+ # Set Headers
709
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
710
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
711
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/gateways/{gatewayId}'
712
+
713
+ request_url = @base_url || @client.base_url
714
+
715
+ options = {
716
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
717
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'gatewayId' => gateway_id},
718
+ query_params: {'api-version' => @client.api_version},
719
+ headers: request_headers.merge(custom_headers || {}),
720
+ base_url: request_url
721
+ }
722
+ promise = @client.make_request_async(:delete, path_template, options)
723
+
724
+ promise = promise.then do |result|
725
+ http_response = result.response
726
+ status_code = http_response.status
727
+ response_content = http_response.body
728
+ unless status_code == 200
729
+ error_model = JSON.load(response_content)
730
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
731
+ end
732
+
733
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
734
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
735
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
457
736
 
458
- path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/search'
737
+ result
738
+ end
739
+
740
+ promise.execute
741
+ end
742
+
743
+ #
744
+ # Gets the available service tiers for the workspace.
745
+ #
746
+ # @param resource_group_name [String] The Resource Group name.
747
+ # @param workspace_name [String] The Log Analytics Workspace name.
748
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
749
+ # will be added to the HTTP request.
750
+ #
751
+ # @return [Array] operation results.
752
+ #
753
+ def available_service_tiers(resource_group_name, workspace_name, custom_headers:nil)
754
+ response = available_service_tiers_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
755
+ response.body unless response.nil?
756
+ end
757
+
758
+ #
759
+ # Gets the available service tiers for the workspace.
760
+ #
761
+ # @param resource_group_name [String] The Resource Group name.
762
+ # @param workspace_name [String] The Log Analytics Workspace name.
763
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
764
+ # will be added to the HTTP request.
765
+ #
766
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
767
+ #
768
+ def available_service_tiers_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
769
+ available_service_tiers_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
770
+ end
771
+
772
+ #
773
+ # Gets the available service tiers for the workspace.
774
+ #
775
+ # @param resource_group_name [String] The Resource Group name.
776
+ # @param workspace_name [String] The Log Analytics Workspace name.
777
+ # @param [Hash{String => String}] A hash of custom headers that will be added
778
+ # to the HTTP request.
779
+ #
780
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
781
+ #
782
+ def available_service_tiers_async(resource_group_name, workspace_name, custom_headers:nil)
783
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
784
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
785
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
786
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
787
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
788
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
789
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
790
+
791
+
792
+ request_headers = {}
793
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
794
+
795
+ # Set Headers
796
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
797
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
798
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/availableServiceTiers'
459
799
 
460
800
  request_url = @base_url || @client.base_url
461
801
 
462
802
  options = {
463
803
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
464
- path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'subscriptionId' => @client.subscription_id},
804
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name},
465
805
  query_params: {'api-version' => @client.api_version},
466
- body: request_content,
467
806
  headers: request_headers.merge(custom_headers || {}),
468
807
  base_url: request_url
469
808
  }
470
- promise = @client.make_request_async(:post, path_template, options)
809
+ promise = @client.make_request_async(:get, path_template, options)
471
810
 
472
811
  promise = promise.then do |result|
473
812
  http_response = result.response
474
813
  status_code = http_response.status
475
814
  response_content = http_response.body
476
- unless status_code == 200 || status_code == 202
815
+ unless status_code == 200
477
816
  error_model = JSON.load(response_content)
478
817
  fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
479
818
  end
480
819
 
481
820
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
821
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
822
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
482
823
  # Deserialize Response
483
824
  if status_code == 200
484
825
  begin
485
826
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
486
- result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchResultsResponse.mapper()
827
+ result_mapper = {
828
+ client_side_validation: true,
829
+ required: false,
830
+ serialized_name: 'parsed_response',
831
+ type: {
832
+ name: 'Sequence',
833
+ element: {
834
+ client_side_validation: true,
835
+ required: false,
836
+ serialized_name: 'AvailableServiceTierElementType',
837
+ type: {
838
+ name: 'Composite',
839
+ class_name: 'AvailableServiceTier'
840
+ }
841
+ }
842
+ }
843
+ }
487
844
  result.body = @client.deserialize(result_mapper, parsed_response)
488
845
  rescue Exception => e
489
846
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)