azure_mgmt_operational_insights 0.15.2 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-03-20/generated/azure_mgmt_operational_insights.rb +6 -2
  3. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/core_summary.rb +2 -2
  4. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
  5. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_display.rb +68 -0
  6. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +56 -0
  7. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_search.rb +32 -8
  8. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +1 -1
  9. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb +1 -1
  10. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_metadata.rb +8 -8
  11. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_results_response.rb +1 -1
  12. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/tag.rb +2 -2
  13. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +8 -1
  14. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operations.rb +107 -0
  15. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/saved_searches.rb +30 -27
  16. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/storage_insights.rb +33 -30
  17. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb +28 -26
  18. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights.rb +6 -2
  19. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb +35 -32
  20. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb +26 -24
  21. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb +11 -0
  22. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
  23. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_display.rb +68 -0
  24. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +101 -0
  25. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/resource.rb +1 -1
  26. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace.rb +1 -1
  27. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/{azure_log_analytics.rb → operational_insights_management_client.rb} +10 -3
  28. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/operations.rb +215 -0
  29. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/workspaces.rb +178 -63
  30. data/lib/profiles/latest/modules/operationalinsights_profile_module.rb +176 -140
  31. data/lib/profiles/latest/operationalinsights_latest_profile_client.rb +28 -9
  32. data/lib/profiles/latest/operationalinsights_module_definition.rb +0 -1
  33. data/lib/version.rb +1 -1
  34. metadata +12 -4
@@ -45,6 +45,9 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
45
45
  # @return [SavedSearches] saved_searches
46
46
  attr_reader :saved_searches
47
47
 
48
+ # @return [Operations] operations
49
+ attr_reader :operations
50
+
48
51
  #
49
52
  # Creates initializes a new instance of the OperationalInsightsManagementClient class.
50
53
  # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
@@ -61,6 +64,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
61
64
  @storage_insights = StorageInsights.new(self)
62
65
  @workspaces = Workspaces.new(self)
63
66
  @saved_searches = SavedSearches.new(self)
67
+ @operations = Operations.new(self)
64
68
  @api_version = '2015-03-20'
65
69
  @accept_language = 'en-US'
66
70
  @long_running_operation_retry_timeout = 30
@@ -114,6 +118,9 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
114
118
  fail ArgumentError, 'path is nil' if path.nil?
115
119
 
116
120
  request_url = options[:base_url] || @base_url
121
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
122
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
123
+ end
117
124
 
118
125
  request_headers = @request_headers
119
126
  request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
@@ -130,7 +137,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
130
137
  #
131
138
  def add_telemetry
132
139
  sdk_information = 'azure_mgmt_operational_insights'
133
- sdk_information = "#{sdk_information}/0.15.2"
140
+ sdk_information = "#{sdk_information}/0.16.0"
134
141
  add_user_agent_information(sdk_information)
135
142
  end
136
143
  end
@@ -0,0 +1,107 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::OperationalInsights::Mgmt::V2015_03_20
7
+ #
8
+ # Operational Insights Client
9
+ #
10
+ class Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [OperationalInsightsManagementClient] reference to the OperationalInsightsManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists all of the available OperationalInsights Rest API operations.
26
+ #
27
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
28
+ # will be added to the HTTP request.
29
+ #
30
+ # @return [OperationListResult] operation results.
31
+ #
32
+ def list(custom_headers:nil)
33
+ response = list_async(custom_headers:custom_headers).value!
34
+ response.body unless response.nil?
35
+ end
36
+
37
+ #
38
+ # Lists all of the available OperationalInsights Rest API operations.
39
+ #
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
+ #
45
+ def list_with_http_info(custom_headers:nil)
46
+ list_async(custom_headers:custom_headers).value!
47
+ end
48
+
49
+ #
50
+ # Lists all of the available OperationalInsights Rest API operations.
51
+ #
52
+ # @param [Hash{String => String}] A hash of custom headers that will be added
53
+ # to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
+ #
57
+ def list_async(custom_headers:nil)
58
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
59
+
60
+
61
+ request_headers = {}
62
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
63
+
64
+ # Set Headers
65
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
66
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
67
+ path_template = 'providers/Microsoft.OperationalInsights/operations'
68
+
69
+ request_url = @base_url || @client.base_url
70
+
71
+ options = {
72
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
73
+ query_params: {'api-version' => @client.api_version},
74
+ headers: request_headers.merge(custom_headers || {}),
75
+ base_url: request_url
76
+ }
77
+ promise = @client.make_request_async(:get, path_template, options)
78
+
79
+ promise = promise.then do |result|
80
+ http_response = result.response
81
+ status_code = http_response.status
82
+ response_content = http_response.body
83
+ unless status_code == 200
84
+ error_model = JSON.load(response_content)
85
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
86
+ end
87
+
88
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ # Deserialize Response
90
+ if status_code == 200
91
+ begin
92
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
93
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::OperationListResult.mapper()
94
+ result.body = @client.deserialize(result_mapper, parsed_response)
95
+ rescue Exception => e
96
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
97
+ end
98
+ end
99
+
100
+ result
101
+ end
102
+
103
+ promise.execute
104
+ end
105
+
106
+ end
107
+ end
@@ -32,8 +32,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
32
32
  # will be added to the HTTP request.
33
33
  #
34
34
  #
35
- def delete(resource_group_name, workspace_name, saved_search_name, custom_headers = nil)
36
- response = delete_async(resource_group_name, workspace_name, saved_search_name, custom_headers).value!
35
+ def delete(resource_group_name, workspace_name, saved_search_name, custom_headers:nil)
36
+ response = delete_async(resource_group_name, workspace_name, saved_search_name, custom_headers:custom_headers).value!
37
37
  nil
38
38
  end
39
39
 
@@ -49,8 +49,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
49
49
  #
50
50
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
51
  #
52
- def delete_with_http_info(resource_group_name, workspace_name, saved_search_name, custom_headers = nil)
53
- delete_async(resource_group_name, workspace_name, saved_search_name, custom_headers).value!
52
+ def delete_with_http_info(resource_group_name, workspace_name, saved_search_name, custom_headers:nil)
53
+ delete_async(resource_group_name, workspace_name, saved_search_name, custom_headers:custom_headers).value!
54
54
  end
55
55
 
56
56
  #
@@ -65,7 +65,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
65
65
  #
66
66
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
67
67
  #
68
- def delete_async(resource_group_name, workspace_name, saved_search_name, custom_headers = nil)
68
+ def delete_async(resource_group_name, workspace_name, saved_search_name, custom_headers:nil)
69
69
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
70
70
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
71
71
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -77,6 +77,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
77
77
 
78
78
 
79
79
  request_headers = {}
80
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
80
81
 
81
82
  # Set Headers
82
83
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -124,8 +125,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
124
125
  #
125
126
  # @return [SavedSearch] operation results.
126
127
  #
127
- def create_or_update(resource_group_name, workspace_name, saved_search_name, parameters, custom_headers = nil)
128
- response = create_or_update_async(resource_group_name, workspace_name, saved_search_name, parameters, custom_headers).value!
128
+ def create_or_update(resource_group_name, workspace_name, saved_search_name, parameters, custom_headers:nil)
129
+ response = create_or_update_async(resource_group_name, workspace_name, saved_search_name, parameters, custom_headers:custom_headers).value!
129
130
  response.body unless response.nil?
130
131
  end
131
132
 
@@ -142,8 +143,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
142
143
  #
143
144
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
144
145
  #
145
- def create_or_update_with_http_info(resource_group_name, workspace_name, saved_search_name, parameters, custom_headers = nil)
146
- create_or_update_async(resource_group_name, workspace_name, saved_search_name, parameters, custom_headers).value!
146
+ def create_or_update_with_http_info(resource_group_name, workspace_name, saved_search_name, parameters, custom_headers:nil)
147
+ create_or_update_async(resource_group_name, workspace_name, saved_search_name, parameters, custom_headers:custom_headers).value!
147
148
  end
148
149
 
149
150
  #
@@ -159,7 +160,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
159
160
  #
160
161
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
161
162
  #
162
- def create_or_update_async(resource_group_name, workspace_name, saved_search_name, parameters, custom_headers = nil)
163
+ def create_or_update_async(resource_group_name, workspace_name, saved_search_name, parameters, custom_headers:nil)
163
164
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
164
165
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
165
166
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -172,13 +173,12 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
172
173
 
173
174
 
174
175
  request_headers = {}
176
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
175
177
 
176
178
  # Set Headers
177
179
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
178
180
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
179
181
 
180
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
181
-
182
182
  # Serialize Request
183
183
  request_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SavedSearch.mapper()
184
184
  request_content = @client.serialize(request_mapper, parameters)
@@ -237,8 +237,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
237
237
  #
238
238
  # @return [SavedSearch] operation results.
239
239
  #
240
- def get(resource_group_name, workspace_name, saved_search_name, custom_headers = nil)
241
- response = get_async(resource_group_name, workspace_name, saved_search_name, custom_headers).value!
240
+ def get(resource_group_name, workspace_name, saved_search_name, custom_headers:nil)
241
+ response = get_async(resource_group_name, workspace_name, saved_search_name, custom_headers:custom_headers).value!
242
242
  response.body unless response.nil?
243
243
  end
244
244
 
@@ -254,8 +254,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
254
254
  #
255
255
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
256
256
  #
257
- def get_with_http_info(resource_group_name, workspace_name, saved_search_name, custom_headers = nil)
258
- get_async(resource_group_name, workspace_name, saved_search_name, custom_headers).value!
257
+ def get_with_http_info(resource_group_name, workspace_name, saved_search_name, custom_headers:nil)
258
+ get_async(resource_group_name, workspace_name, saved_search_name, custom_headers:custom_headers).value!
259
259
  end
260
260
 
261
261
  #
@@ -270,7 +270,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
270
270
  #
271
271
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
272
272
  #
273
- def get_async(resource_group_name, workspace_name, saved_search_name, custom_headers = nil)
273
+ def get_async(resource_group_name, workspace_name, saved_search_name, custom_headers:nil)
274
274
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
275
275
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
276
276
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -282,6 +282,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
282
282
 
283
283
 
284
284
  request_headers = {}
285
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
285
286
 
286
287
  # Set Headers
287
288
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -337,8 +338,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
337
338
  #
338
339
  # @return [SavedSearchesListResult] operation results.
339
340
  #
340
- def list_by_workspace(resource_group_name, workspace_name, custom_headers = nil)
341
- response = list_by_workspace_async(resource_group_name, workspace_name, custom_headers).value!
341
+ def list_by_workspace(resource_group_name, workspace_name, custom_headers:nil)
342
+ response = list_by_workspace_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
342
343
  response.body unless response.nil?
343
344
  end
344
345
 
@@ -353,8 +354,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
353
354
  #
354
355
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
355
356
  #
356
- def list_by_workspace_with_http_info(resource_group_name, workspace_name, custom_headers = nil)
357
- list_by_workspace_async(resource_group_name, workspace_name, custom_headers).value!
357
+ def list_by_workspace_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
358
+ list_by_workspace_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
358
359
  end
359
360
 
360
361
  #
@@ -368,7 +369,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
368
369
  #
369
370
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
370
371
  #
371
- def list_by_workspace_async(resource_group_name, workspace_name, custom_headers = nil)
372
+ def list_by_workspace_async(resource_group_name, workspace_name, custom_headers:nil)
372
373
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
373
374
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
374
375
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -379,6 +380,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
379
380
 
380
381
 
381
382
  request_headers = {}
383
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
382
384
 
383
385
  # Set Headers
384
386
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -435,8 +437,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
435
437
  #
436
438
  # @return [SearchResultsResponse] operation results.
437
439
  #
438
- def get_results(resource_group_name, workspace_name, saved_search_name, custom_headers = nil)
439
- response = get_results_async(resource_group_name, workspace_name, saved_search_name, custom_headers).value!
440
+ def get_results(resource_group_name, workspace_name, saved_search_name, custom_headers:nil)
441
+ response = get_results_async(resource_group_name, workspace_name, saved_search_name, custom_headers:custom_headers).value!
440
442
  response.body unless response.nil?
441
443
  end
442
444
 
@@ -452,8 +454,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
452
454
  #
453
455
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
454
456
  #
455
- def get_results_with_http_info(resource_group_name, workspace_name, saved_search_name, custom_headers = nil)
456
- get_results_async(resource_group_name, workspace_name, saved_search_name, custom_headers).value!
457
+ def get_results_with_http_info(resource_group_name, workspace_name, saved_search_name, custom_headers:nil)
458
+ get_results_async(resource_group_name, workspace_name, saved_search_name, custom_headers:custom_headers).value!
457
459
  end
458
460
 
459
461
  #
@@ -468,7 +470,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
468
470
  #
469
471
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
470
472
  #
471
- def get_results_async(resource_group_name, workspace_name, saved_search_name, custom_headers = nil)
473
+ def get_results_async(resource_group_name, workspace_name, saved_search_name, custom_headers:nil)
472
474
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
473
475
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
474
476
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -480,6 +482,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
480
482
 
481
483
 
482
484
  request_headers = {}
485
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
483
486
 
484
487
  # Set Headers
485
488
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -37,8 +37,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
37
37
  #
38
38
  # @return [StorageInsight] operation results.
39
39
  #
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!
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:custom_headers).value!
42
42
  response.body unless response.nil?
43
43
  end
44
44
 
@@ -58,8 +58,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
58
58
  #
59
59
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
60
60
  #
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!
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:custom_headers).value!
63
63
  end
64
64
 
65
65
  #
@@ -78,7 +78,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
78
78
  #
79
79
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
80
80
  #
81
- def create_or_update_async(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers = nil)
81
+ def create_or_update_async(resource_group_name, workspace_name, storage_insight_name, parameters, custom_headers:nil)
82
82
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
83
83
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
84
84
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -91,13 +91,12 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
91
91
 
92
92
 
93
93
  request_headers = {}
94
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
94
95
 
95
96
  # Set Headers
96
97
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
97
98
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
98
99
 
99
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
100
-
101
100
  # Serialize Request
102
101
  request_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsight.mapper()
103
102
  request_content = @client.serialize(request_mapper, parameters)
@@ -168,8 +167,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
168
167
  #
169
168
  # @return [StorageInsight] operation results.
170
169
  #
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!
170
+ def get(resource_group_name, workspace_name, storage_insight_name, custom_headers:nil)
171
+ response = get_async(resource_group_name, workspace_name, storage_insight_name, custom_headers:custom_headers).value!
173
172
  response.body unless response.nil?
174
173
  end
175
174
 
@@ -187,8 +186,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
187
186
  #
188
187
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
189
188
  #
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!
189
+ def get_with_http_info(resource_group_name, workspace_name, storage_insight_name, custom_headers:nil)
190
+ get_async(resource_group_name, workspace_name, storage_insight_name, custom_headers:custom_headers).value!
192
191
  end
193
192
 
194
193
  #
@@ -205,7 +204,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
205
204
  #
206
205
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
207
206
  #
208
- def get_async(resource_group_name, workspace_name, storage_insight_name, custom_headers = nil)
207
+ def get_async(resource_group_name, workspace_name, storage_insight_name, custom_headers:nil)
209
208
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
210
209
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
211
210
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -217,6 +216,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
217
216
 
218
217
 
219
218
  request_headers = {}
219
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
220
220
 
221
221
  # Set Headers
222
222
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -274,8 +274,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
274
274
  # will be added to the HTTP request.
275
275
  #
276
276
  #
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!
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:custom_headers).value!
279
279
  nil
280
280
  end
281
281
 
@@ -293,8 +293,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
293
293
  #
294
294
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
295
295
  #
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!
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:custom_headers).value!
298
298
  end
299
299
 
300
300
  #
@@ -311,7 +311,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
311
311
  #
312
312
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
313
313
  #
314
- def delete_async(resource_group_name, workspace_name, storage_insight_name, custom_headers = nil)
314
+ def delete_async(resource_group_name, workspace_name, storage_insight_name, custom_headers:nil)
315
315
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
316
316
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
317
317
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -323,6 +323,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
323
323
 
324
324
 
325
325
  request_headers = {}
326
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
326
327
 
327
328
  # Set Headers
328
329
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -369,8 +370,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
369
370
  #
370
371
  # @return [Array<StorageInsight>] operation results.
371
372
  #
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)
373
+ def list_by_workspace(resource_group_name, workspace_name, custom_headers:nil)
374
+ first_page = list_by_workspace_as_lazy(resource_group_name, workspace_name, custom_headers:custom_headers)
374
375
  first_page.get_all_items
375
376
  end
376
377
 
@@ -386,8 +387,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
386
387
  #
387
388
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
388
389
  #
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!
390
+ def list_by_workspace_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
391
+ list_by_workspace_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
391
392
  end
392
393
 
393
394
  #
@@ -402,7 +403,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
402
403
  #
403
404
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
404
405
  #
405
- def list_by_workspace_async(resource_group_name, workspace_name, custom_headers = nil)
406
+ def list_by_workspace_async(resource_group_name, workspace_name, custom_headers:nil)
406
407
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
407
408
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
408
409
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
@@ -413,6 +414,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
413
414
 
414
415
 
415
416
  request_headers = {}
417
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
416
418
 
417
419
  # Set Headers
418
420
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -467,8 +469,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
467
469
  #
468
470
  # @return [StorageInsightListResult] operation results.
469
471
  #
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!
472
+ def list_by_workspace_next(next_page_link, custom_headers:nil)
473
+ response = list_by_workspace_next_async(next_page_link, custom_headers:custom_headers).value!
472
474
  response.body unless response.nil?
473
475
  end
474
476
 
@@ -482,8 +484,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
482
484
  #
483
485
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
484
486
  #
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!
487
+ def list_by_workspace_next_with_http_info(next_page_link, custom_headers:nil)
488
+ list_by_workspace_next_async(next_page_link, custom_headers:custom_headers).value!
487
489
  end
488
490
 
489
491
  #
@@ -496,11 +498,12 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
496
498
  #
497
499
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
498
500
  #
499
- def list_by_workspace_next_async(next_page_link, custom_headers = nil)
501
+ def list_by_workspace_next_async(next_page_link, custom_headers:nil)
500
502
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
501
503
 
502
504
 
503
505
  request_headers = {}
506
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
504
507
 
505
508
  # Set Headers
506
509
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -557,12 +560,12 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
557
560
  # @return [StorageInsightListResult] which provide lazy access to pages of the
558
561
  # response.
559
562
  #
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!
563
+ def list_by_workspace_as_lazy(resource_group_name, workspace_name, custom_headers:nil)
564
+ response = list_by_workspace_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
562
565
  unless response.nil?
563
566
  page = response.body
564
567
  page.next_method = Proc.new do |next_page_link|
565
- list_by_workspace_next_async(next_page_link, custom_headers)
568
+ list_by_workspace_next_async(next_page_link, custom_headers:custom_headers)
566
569
  end
567
570
  page
568
571
  end