azure_mgmt_operational_insights 0.18.0 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +1 -1
  3. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +1 -1
  4. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights.rb +34 -31
  5. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/data_collector_logs.rb +352 -0
  6. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/data_exports.rb +64 -114
  7. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/linked_storage_accounts.rb +18 -9
  8. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/azure_entity_resource.rb +3 -1
  9. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_collector_log.rb +73 -0
  10. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_collector_logs_list_result.rb +56 -0
  11. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export.rb +1 -12
  12. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source.rb +3 -3
  13. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_type.rb +3 -0
  14. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_response.rb +5 -1
  15. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_resource.rb +1 -1
  16. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/proxy_resource.rb +4 -2
  17. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/resource.rb +8 -5
  18. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/saved_search.rb +3 -3
  19. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tracked_resource.rb +4 -1
  20. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +5 -1
  21. data/lib/2020-08-01/generated/azure_mgmt_operational_insights.rb +123 -0
  22. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/available_service_tiers.rb +146 -0
  23. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/clusters.rb +959 -0
  24. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/data_exports.rb +473 -0
  25. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/data_sources.rb +603 -0
  26. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/deleted_workspaces.rb +211 -0
  27. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/gateways.rb +123 -0
  28. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/intelligence_packs.rb +351 -0
  29. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/linked_services.rb +577 -0
  30. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/linked_storage_accounts.rb +481 -0
  31. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/management_groups.rb +130 -0
  32. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/available_service_tier.rb +124 -0
  33. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/azure_entity_resource.rb +77 -0
  34. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/cluster.rb +159 -0
  35. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_entity_status.rb +21 -0
  36. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_error_response.rb +48 -0
  37. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_list_result.rb +98 -0
  38. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_patch.rb +78 -0
  39. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_sku.rb +58 -0
  40. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/cluster_sku_name_enum.rb +15 -0
  41. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/core_summary.rb +57 -0
  42. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_export.rb +163 -0
  43. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_export_error_response.rb +48 -0
  44. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_export_list_result.rb +56 -0
  45. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_ingestion_status.rb +20 -0
  46. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_source.rb +130 -0
  47. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_source_filter.rb +61 -0
  48. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_source_kind.rb +47 -0
  49. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb +98 -0
  50. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/data_source_type.rb +18 -0
  51. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/error_additional_info.rb +59 -0
  52. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/error_contract.rb +49 -0
  53. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/error_response.rb +117 -0
  54. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/identity.rb +72 -0
  55. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/identity_type.rb +16 -0
  56. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb +69 -0
  57. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/key_vault_properties.rb +71 -0
  58. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/linked_service.rb +120 -0
  59. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/linked_service_entity_status.rb +18 -0
  60. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb +55 -0
  61. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_list_result.rb +56 -0
  62. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_resource.rb +95 -0
  63. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/management_group.rb +128 -0
  64. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/metric_name.rb +57 -0
  65. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
  66. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/operation_display.rb +79 -0
  67. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +101 -0
  68. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/operation_status.rb +102 -0
  69. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/private_link_scoped_resource.rb +58 -0
  70. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/proxy_resource.rb +65 -0
  71. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/public_network_access_type.rb +16 -0
  72. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/purge_state.rb +16 -0
  73. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/resource.rb +86 -0
  74. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/saved_search.rb +165 -0
  75. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +55 -0
  76. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb +67 -0
  77. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/search_metadata.rb +241 -0
  78. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb +57 -0
  79. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/search_schema_value.rb +123 -0
  80. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/search_sort.rb +58 -0
  81. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb +16 -0
  82. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/shared_keys.rb +57 -0
  83. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +21 -0
  84. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/storage_account.rb +58 -0
  85. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/storage_insight.rb +157 -0
  86. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb +98 -0
  87. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb +16 -0
  88. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb +58 -0
  89. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/table.rb +79 -0
  90. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/tables_list_result.rb +55 -0
  91. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/tag.rb +57 -0
  92. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/tracked_resource.rb +95 -0
  93. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/type.rb +16 -0
  94. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/usage_metric.rb +103 -0
  95. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace.rb +213 -0
  96. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_capping.rb +72 -0
  97. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_entity_status.rb +21 -0
  98. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb +56 -0
  99. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb +55 -0
  100. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb +56 -0
  101. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_patch.rb +206 -0
  102. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_purge_body.rb +67 -0
  103. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb +85 -0
  104. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_purge_response.rb +47 -0
  105. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_purge_status_response.rb +47 -0
  106. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_sku.rb +85 -0
  107. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/models/workspace_sku_name_enum.rb +21 -0
  108. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/module_definition.rb +9 -0
  109. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/operation_statuses.rb +121 -0
  110. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +207 -0
  111. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/operations.rb +220 -0
  112. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/saved_searches.rb +457 -0
  113. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/schema.rb +130 -0
  114. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/shared_keys_operations.rb +238 -0
  115. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/storage_insight_configs.rb +592 -0
  116. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/tables.rb +359 -0
  117. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/usages.rb +130 -0
  118. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/workspace_purge.rb +277 -0
  119. data/lib/2020-08-01/generated/azure_mgmt_operational_insights/workspaces.rb +768 -0
  120. data/lib/azure_mgmt_operational_insights.rb +2 -1
  121. data/lib/profiles/latest/modules/operationalinsights_profile_module.rb +173 -173
  122. data/lib/version.rb +1 -1
  123. metadata +105 -3
@@ -145,6 +145,8 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
145
145
  response.body unless response.nil?
146
146
  end
147
147
 
148
+ #
149
+ # Create or update a data export.
148
150
  #
149
151
  # @param resource_group_name [String] The name of the resource group. The name
150
152
  # is case insensitive.
@@ -155,73 +157,27 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
155
157
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
156
158
  # will be added to the HTTP request.
157
159
  #
158
- # @return [Concurrent::Promise] promise which provides async access to http
159
- # response.
160
- #
161
- def create_or_update_async(resource_group_name, workspace_name, data_export_name, parameters, custom_headers:nil)
162
- # Send request
163
- promise = begin_create_or_update_async(resource_group_name, workspace_name, data_export_name, parameters, custom_headers:custom_headers)
164
-
165
- promise = promise.then do |response|
166
- # Defining deserialization method.
167
- deserialize_method = lambda do |parsed_response|
168
- result_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::DataExport.mapper()
169
- parsed_response = @client.deserialize(result_mapper, parsed_response)
170
- end
171
-
172
- # Waiting for response.
173
- @client.get_long_running_operation_result(response, deserialize_method)
174
- end
175
-
176
- promise
177
- end
178
-
179
- #
180
- # Gets a data export instance.
181
- #
182
- # @param resource_group_name [String] The name of the resource group. The name
183
- # is case insensitive.
184
- # @param workspace_name [String] The name of the workspace.
185
- # @param data_export_name [String] The data export rule name.
186
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
187
- # will be added to the HTTP request.
188
- #
189
- # @return [DataExport] operation results.
190
- #
191
- def get(resource_group_name, workspace_name, data_export_name, custom_headers:nil)
192
- response = get_async(resource_group_name, workspace_name, data_export_name, custom_headers:custom_headers).value!
193
- response.body unless response.nil?
194
- end
195
-
196
- #
197
- # Gets a data export instance.
198
- #
199
- # @param resource_group_name [String] The name of the resource group. The name
200
- # is case insensitive.
201
- # @param workspace_name [String] The name of the workspace.
202
- # @param data_export_name [String] The data export rule name.
203
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
204
- # will be added to the HTTP request.
205
- #
206
160
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
207
161
  #
208
- def get_with_http_info(resource_group_name, workspace_name, data_export_name, custom_headers:nil)
209
- get_async(resource_group_name, workspace_name, data_export_name, custom_headers:custom_headers).value!
162
+ def create_or_update_with_http_info(resource_group_name, workspace_name, data_export_name, parameters, custom_headers:nil)
163
+ create_or_update_async(resource_group_name, workspace_name, data_export_name, parameters, custom_headers:custom_headers).value!
210
164
  end
211
165
 
212
166
  #
213
- # Gets a data export instance.
167
+ # Create or update a data export.
214
168
  #
215
169
  # @param resource_group_name [String] The name of the resource group. The name
216
170
  # is case insensitive.
217
171
  # @param workspace_name [String] The name of the workspace.
218
172
  # @param data_export_name [String] The data export rule name.
173
+ # @param parameters [DataExport] The parameters required to create or update a
174
+ # data export.
219
175
  # @param [Hash{String => String}] A hash of custom headers that will be added
220
176
  # to the HTTP request.
221
177
  #
222
178
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
223
179
  #
224
- def get_async(resource_group_name, workspace_name, data_export_name, custom_headers:nil)
180
+ def create_or_update_async(resource_group_name, workspace_name, data_export_name, parameters, custom_headers:nil)
225
181
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
226
182
  fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
227
183
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -233,8 +189,12 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
233
189
  fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '4'" if !workspace_name.nil? && workspace_name.length < 4
234
190
  fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$$')).nil?
235
191
  fail ArgumentError, 'data_export_name is nil' if data_export_name.nil?
192
+ fail ArgumentError, "'data_export_name' should satisfy the constraint - 'MaxLength': '63'" if !data_export_name.nil? && data_export_name.length > 63
193
+ fail ArgumentError, "'data_export_name' should satisfy the constraint - 'MinLength': '4'" if !data_export_name.nil? && data_export_name.length < 4
194
+ fail ArgumentError, "'data_export_name' should satisfy the constraint - 'Pattern': '^[A-Za-z][A-Za-z0-9-]+[A-Za-z0-9]$'" if !data_export_name.nil? && data_export_name.match(Regexp.new('^^[A-Za-z][A-Za-z0-9-]+[A-Za-z0-9]$$')).nil?
236
195
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
237
196
  fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
197
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
238
198
 
239
199
 
240
200
  request_headers = {}
@@ -243,6 +203,12 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
243
203
  # Set Headers
244
204
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
245
205
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
206
+
207
+ # Serialize Request
208
+ request_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::DataExport.mapper()
209
+ request_content = @client.serialize(request_mapper, parameters)
210
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
211
+
246
212
  path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}'
247
213
 
248
214
  request_url = @base_url || @client.base_url
@@ -251,16 +217,17 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
251
217
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
252
218
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'dataExportName' => data_export_name},
253
219
  query_params: {'api-version' => @client.api_version},
220
+ body: request_content,
254
221
  headers: request_headers.merge(custom_headers || {}),
255
222
  base_url: request_url
256
223
  }
257
- promise = @client.make_request_async(:get, path_template, options)
224
+ promise = @client.make_request_async(:put, path_template, options)
258
225
 
259
226
  promise = promise.then do |result|
260
227
  http_response = result.response
261
228
  status_code = http_response.status
262
229
  response_content = http_response.body
263
- unless status_code == 200 || status_code == 404
230
+ unless status_code == 200 || status_code == 201
264
231
  error_model = JSON.load(response_content)
265
232
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
266
233
  end
@@ -278,6 +245,16 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
278
245
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
279
246
  end
280
247
  end
248
+ # Deserialize Response
249
+ if status_code == 201
250
+ begin
251
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
252
+ result_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::DataExport.mapper()
253
+ result.body = @client.deserialize(result_mapper, parsed_response)
254
+ rescue Exception => e
255
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
256
+ end
257
+ end
281
258
 
282
259
  result
283
260
  end
@@ -286,7 +263,7 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
286
263
  end
287
264
 
288
265
  #
289
- # Deletes the specified data export in a given workspace..
266
+ # Gets a data export instance.
290
267
  #
291
268
  # @param resource_group_name [String] The name of the resource group. The name
292
269
  # is case insensitive.
@@ -295,14 +272,15 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
295
272
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
296
273
  # will be added to the HTTP request.
297
274
  #
275
+ # @return [DataExport] operation results.
298
276
  #
299
- def delete(resource_group_name, workspace_name, data_export_name, custom_headers:nil)
300
- response = delete_async(resource_group_name, workspace_name, data_export_name, custom_headers:custom_headers).value!
301
- nil
277
+ def get(resource_group_name, workspace_name, data_export_name, custom_headers:nil)
278
+ response = get_async(resource_group_name, workspace_name, data_export_name, custom_headers:custom_headers).value!
279
+ response.body unless response.nil?
302
280
  end
303
281
 
304
282
  #
305
- # Deletes the specified data export in a given workspace..
283
+ # Gets a data export instance.
306
284
  #
307
285
  # @param resource_group_name [String] The name of the resource group. The name
308
286
  # is case insensitive.
@@ -313,12 +291,12 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
313
291
  #
314
292
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
315
293
  #
316
- def delete_with_http_info(resource_group_name, workspace_name, data_export_name, custom_headers:nil)
317
- delete_async(resource_group_name, workspace_name, data_export_name, custom_headers:custom_headers).value!
294
+ def get_with_http_info(resource_group_name, workspace_name, data_export_name, custom_headers:nil)
295
+ get_async(resource_group_name, workspace_name, data_export_name, custom_headers:custom_headers).value!
318
296
  end
319
297
 
320
298
  #
321
- # Deletes the specified data export in a given workspace..
299
+ # Gets a data export instance.
322
300
  #
323
301
  # @param resource_group_name [String] The name of the resource group. The name
324
302
  # is case insensitive.
@@ -329,7 +307,7 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
329
307
  #
330
308
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
331
309
  #
332
- def delete_async(resource_group_name, workspace_name, data_export_name, custom_headers:nil)
310
+ def get_async(resource_group_name, workspace_name, data_export_name, custom_headers:nil)
333
311
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
334
312
  fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
335
313
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -362,13 +340,13 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
362
340
  headers: request_headers.merge(custom_headers || {}),
363
341
  base_url: request_url
364
342
  }
365
- promise = @client.make_request_async(:delete, path_template, options)
343
+ promise = @client.make_request_async(:get, path_template, options)
366
344
 
367
345
  promise = promise.then do |result|
368
346
  http_response = result.response
369
347
  status_code = http_response.status
370
348
  response_content = http_response.body
371
- unless status_code == 200 || status_code == 404
349
+ unless status_code == 200
372
350
  error_model = JSON.load(response_content)
373
351
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
374
352
  end
@@ -376,6 +354,16 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
376
354
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
377
355
  result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
378
356
  result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
357
+ # Deserialize Response
358
+ if status_code == 200
359
+ begin
360
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
361
+ result_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::DataExport.mapper()
362
+ result.body = @client.deserialize(result_mapper, parsed_response)
363
+ rescue Exception => e
364
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
365
+ end
366
+ end
379
367
 
380
368
  result
381
369
  end
@@ -384,57 +372,50 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
384
372
  end
385
373
 
386
374
  #
387
- # Create or update a data export.
375
+ # Deletes the specified data export in a given workspace..
388
376
  #
389
377
  # @param resource_group_name [String] The name of the resource group. The name
390
378
  # is case insensitive.
391
379
  # @param workspace_name [String] The name of the workspace.
392
380
  # @param data_export_name [String] The data export rule name.
393
- # @param parameters [DataExport] The parameters required to create or update a
394
- # data export.
395
381
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
396
382
  # will be added to the HTTP request.
397
383
  #
398
- # @return [DataExport] operation results.
399
384
  #
400
- def begin_create_or_update(resource_group_name, workspace_name, data_export_name, parameters, custom_headers:nil)
401
- response = begin_create_or_update_async(resource_group_name, workspace_name, data_export_name, parameters, custom_headers:custom_headers).value!
402
- response.body unless response.nil?
385
+ def delete(resource_group_name, workspace_name, data_export_name, custom_headers:nil)
386
+ response = delete_async(resource_group_name, workspace_name, data_export_name, custom_headers:custom_headers).value!
387
+ nil
403
388
  end
404
389
 
405
390
  #
406
- # Create or update a data export.
391
+ # Deletes the specified data export in a given workspace..
407
392
  #
408
393
  # @param resource_group_name [String] The name of the resource group. The name
409
394
  # is case insensitive.
410
395
  # @param workspace_name [String] The name of the workspace.
411
396
  # @param data_export_name [String] The data export rule name.
412
- # @param parameters [DataExport] The parameters required to create or update a
413
- # data export.
414
397
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
415
398
  # will be added to the HTTP request.
416
399
  #
417
400
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
418
401
  #
419
- def begin_create_or_update_with_http_info(resource_group_name, workspace_name, data_export_name, parameters, custom_headers:nil)
420
- begin_create_or_update_async(resource_group_name, workspace_name, data_export_name, parameters, custom_headers:custom_headers).value!
402
+ def delete_with_http_info(resource_group_name, workspace_name, data_export_name, custom_headers:nil)
403
+ delete_async(resource_group_name, workspace_name, data_export_name, custom_headers:custom_headers).value!
421
404
  end
422
405
 
423
406
  #
424
- # Create or update a data export.
407
+ # Deletes the specified data export in a given workspace..
425
408
  #
426
409
  # @param resource_group_name [String] The name of the resource group. The name
427
410
  # is case insensitive.
428
411
  # @param workspace_name [String] The name of the workspace.
429
412
  # @param data_export_name [String] The data export rule name.
430
- # @param parameters [DataExport] The parameters required to create or update a
431
- # data export.
432
413
  # @param [Hash{String => String}] A hash of custom headers that will be added
433
414
  # to the HTTP request.
434
415
  #
435
416
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
436
417
  #
437
- def begin_create_or_update_async(resource_group_name, workspace_name, data_export_name, parameters, custom_headers:nil)
418
+ def delete_async(resource_group_name, workspace_name, data_export_name, custom_headers:nil)
438
419
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
439
420
  fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
440
421
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
@@ -446,12 +427,8 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
446
427
  fail ArgumentError, "'workspace_name' should satisfy the constraint - 'MinLength': '4'" if !workspace_name.nil? && workspace_name.length < 4
447
428
  fail ArgumentError, "'workspace_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'" if !workspace_name.nil? && workspace_name.match(Regexp.new('^^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$$')).nil?
448
429
  fail ArgumentError, 'data_export_name is nil' if data_export_name.nil?
449
- fail ArgumentError, "'data_export_name' should satisfy the constraint - 'MaxLength': '63'" if !data_export_name.nil? && data_export_name.length > 63
450
- fail ArgumentError, "'data_export_name' should satisfy the constraint - 'MinLength': '4'" if !data_export_name.nil? && data_export_name.length < 4
451
- fail ArgumentError, "'data_export_name' should satisfy the constraint - 'Pattern': '^[A-Za-z][A-Za-z0-9-]+[A-Za-z0-9]$'" if !data_export_name.nil? && data_export_name.match(Regexp.new('^^[A-Za-z][A-Za-z0-9-]+[A-Za-z0-9]$$')).nil?
452
430
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
453
431
  fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
454
- fail ArgumentError, 'parameters is nil' if parameters.nil?
455
432
 
456
433
 
457
434
  request_headers = {}
@@ -460,12 +437,6 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
460
437
  # Set Headers
461
438
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
462
439
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
463
-
464
- # Serialize Request
465
- request_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::DataExport.mapper()
466
- request_content = @client.serialize(request_mapper, parameters)
467
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
468
-
469
440
  path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}'
470
441
 
471
442
  request_url = @base_url || @client.base_url
@@ -474,17 +445,16 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
474
445
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
475
446
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'dataExportName' => data_export_name},
476
447
  query_params: {'api-version' => @client.api_version},
477
- body: request_content,
478
448
  headers: request_headers.merge(custom_headers || {}),
479
449
  base_url: request_url
480
450
  }
481
- promise = @client.make_request_async(:put, path_template, options)
451
+ promise = @client.make_request_async(:delete, path_template, options)
482
452
 
483
453
  promise = promise.then do |result|
484
454
  http_response = result.response
485
455
  status_code = http_response.status
486
456
  response_content = http_response.body
487
- unless status_code == 200 || status_code == 201
457
+ unless status_code == 200 || status_code == 404
488
458
  error_model = JSON.load(response_content)
489
459
  fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
490
460
  end
@@ -492,26 +462,6 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
492
462
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
493
463
  result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
494
464
  result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
495
- # Deserialize Response
496
- if status_code == 200
497
- begin
498
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
499
- result_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::DataExport.mapper()
500
- result.body = @client.deserialize(result_mapper, parsed_response)
501
- rescue Exception => e
502
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
503
- end
504
- end
505
- # Deserialize Response
506
- if status_code == 201
507
- begin
508
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
509
- result_mapper = Azure::OperationalInsights::Mgmt::V2020_03_01_preview::Models::DataExport.mapper()
510
- result.body = @client.deserialize(result_mapper, parsed_response)
511
- rescue Exception => e
512
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
513
- end
514
- end
515
465
 
516
466
  result
517
467
  end
@@ -29,7 +29,8 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
29
29
  # is case insensitive.
30
30
  # @param workspace_name [String] The name of the workspace.
31
31
  # @param data_source_type [DataSourceType] Linked storage accounts type.
32
- # Possible values include: 'CustomLogs', 'AzureWatson'
32
+ # Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion',
33
+ # 'Alerts'
33
34
  # @param parameters [LinkedStorageAccountsResource] The parameters required to
34
35
  # create or update linked storage accounts.
35
36
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -50,7 +51,8 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
50
51
  # is case insensitive.
51
52
  # @param workspace_name [String] The name of the workspace.
52
53
  # @param data_source_type [DataSourceType] Linked storage accounts type.
53
- # Possible values include: 'CustomLogs', 'AzureWatson'
54
+ # Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion',
55
+ # 'Alerts'
54
56
  # @param parameters [LinkedStorageAccountsResource] The parameters required to
55
57
  # create or update linked storage accounts.
56
58
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
@@ -70,7 +72,8 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
70
72
  # is case insensitive.
71
73
  # @param workspace_name [String] The name of the workspace.
72
74
  # @param data_source_type [DataSourceType] Linked storage accounts type.
73
- # Possible values include: 'CustomLogs', 'AzureWatson'
75
+ # Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion',
76
+ # 'Alerts'
74
77
  # @param parameters [LinkedStorageAccountsResource] The parameters required to
75
78
  # create or update linked storage accounts.
76
79
  # @param [Hash{String => String}] A hash of custom headers that will be added
@@ -158,7 +161,8 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
158
161
  # is case insensitive.
159
162
  # @param workspace_name [String] The name of the workspace.
160
163
  # @param data_source_type [DataSourceType] Linked storage accounts type.
161
- # Possible values include: 'CustomLogs', 'AzureWatson'
164
+ # Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion',
165
+ # 'Alerts'
162
166
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
163
167
  # will be added to the HTTP request.
164
168
  #
@@ -176,7 +180,8 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
176
180
  # is case insensitive.
177
181
  # @param workspace_name [String] The name of the workspace.
178
182
  # @param data_source_type [DataSourceType] Linked storage accounts type.
179
- # Possible values include: 'CustomLogs', 'AzureWatson'
183
+ # Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion',
184
+ # 'Alerts'
180
185
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
181
186
  # will be added to the HTTP request.
182
187
  #
@@ -194,7 +199,8 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
194
199
  # is case insensitive.
195
200
  # @param workspace_name [String] The name of the workspace.
196
201
  # @param data_source_type [DataSourceType] Linked storage accounts type.
197
- # Possible values include: 'CustomLogs', 'AzureWatson'
202
+ # Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion',
203
+ # 'Alerts'
198
204
  # @param [Hash{String => String}] A hash of custom headers that will be added
199
205
  # to the HTTP request.
200
206
  #
@@ -262,7 +268,8 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
262
268
  # is case insensitive.
263
269
  # @param workspace_name [String] The name of the workspace.
264
270
  # @param data_source_type [DataSourceType] Linked storage accounts type.
265
- # Possible values include: 'CustomLogs', 'AzureWatson'
271
+ # Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion',
272
+ # 'Alerts'
266
273
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
267
274
  # will be added to the HTTP request.
268
275
  #
@@ -281,7 +288,8 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
281
288
  # is case insensitive.
282
289
  # @param workspace_name [String] The name of the workspace.
283
290
  # @param data_source_type [DataSourceType] Linked storage accounts type.
284
- # Possible values include: 'CustomLogs', 'AzureWatson'
291
+ # Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion',
292
+ # 'Alerts'
285
293
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
286
294
  # will be added to the HTTP request.
287
295
  #
@@ -299,7 +307,8 @@ module Azure::OperationalInsights::Mgmt::V2020_03_01_preview
299
307
  # is case insensitive.
300
308
  # @param workspace_name [String] The name of the workspace.
301
309
  # @param data_source_type [DataSourceType] Linked storage accounts type.
302
- # Possible values include: 'CustomLogs', 'AzureWatson'
310
+ # Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion',
311
+ # 'Alerts'
303
312
  # @param [Hash{String => String}] A hash of custom headers that will be added
304
313
  # to the HTTP request.
305
314
  #