azure_mgmt_operational_insights 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 499347fcc590f774fcbf30a35978e605ba33cff7
4
- data.tar.gz: 54d7dcfac667e4adcf70d12d6b86c1ec1f72ba5b
3
+ metadata.gz: 8ccf923c84e7c899b43ce9190343d70c33c8a65a
4
+ data.tar.gz: 5d62c7e5fbeff32c433727fa19eaaa3fd0ff9e04
5
5
  SHA512:
6
- metadata.gz: b4232b21c4c8681eb235d3f294dd9679bdfce21801fd8f0c30de69145b78371646a772c09ee645d419a604cd94deb955c96df76e2c449eb2955d9e47cc13afec
7
- data.tar.gz: 58a4c693f2c2f8192be1fe8d04f69f89f9c4312fb7dae644f831031d7f46343933d62c1fc9dccbb4670efd75f0bfd9b9015205639191dde6c957b6457b0709d8
6
+ metadata.gz: e0ed74755f2f2b0c3875202551b0c4fe2f2a4623375a6df448f95c657aaf0315df3eef90dbf829aeb06072c44f998904b0064bf1f8c09ccf39f234e84660329f
7
+ data.tar.gz: 2592d692ad815936b6ced96b3bde9f8dfc8464452b32917cdbdedd82aaae584df9a79a4ead346b5c478225e5134d39fdee173f15cdbef59911aed9cc1f44315e
@@ -27,30 +27,35 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
27
27
  autoload :OperationalInsightsManagementClient, '2015-03-20/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb'
28
28
 
29
29
  module Models
30
- autoload :SearchError, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_error.rb'
31
- autoload :SearchResultsResponse, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_results_response.rb'
32
- autoload :Operation, '2015-03-20/generated/azure_mgmt_operational_insights/models/operation.rb'
33
30
  autoload :SearchSchemaValue, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_schema_value.rb'
34
- autoload :LinkTarget, '2015-03-20/generated/azure_mgmt_operational_insights/models/link_target.rb'
35
31
  autoload :SearchGetSchemaResponse, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb'
36
- autoload :CoreSummary, '2015-03-20/generated/azure_mgmt_operational_insights/models/core_summary.rb'
32
+ autoload :Operation, '2015-03-20/generated/azure_mgmt_operational_insights/models/operation.rb'
37
33
  autoload :SearchHighlight, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_highlight.rb'
38
- autoload :SearchMetadataSchema, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb'
34
+ autoload :LinkTarget, '2015-03-20/generated/azure_mgmt_operational_insights/models/link_target.rb'
39
35
  autoload :SearchParameters, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_parameters.rb'
40
- autoload :SavedSearch, '2015-03-20/generated/azure_mgmt_operational_insights/models/saved_search.rb'
36
+ autoload :CoreSummary, '2015-03-20/generated/azure_mgmt_operational_insights/models/core_summary.rb'
41
37
  autoload :StorageAccount, '2015-03-20/generated/azure_mgmt_operational_insights/models/storage_account.rb'
42
- autoload :OperationDisplay, '2015-03-20/generated/azure_mgmt_operational_insights/models/operation_display.rb'
38
+ autoload :SearchMetadataSchema, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb'
43
39
  autoload :StorageInsightStatus, '2015-03-20/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb'
44
- autoload :Tag, '2015-03-20/generated/azure_mgmt_operational_insights/models/tag.rb'
45
- autoload :SearchSort, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_sort.rb'
40
+ autoload :SavedSearch, '2015-03-20/generated/azure_mgmt_operational_insights/models/saved_search.rb'
46
41
  autoload :SavedSearchesListResult, '2015-03-20/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb'
42
+ autoload :SearchResultsResponse, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_results_response.rb'
47
43
  autoload :StorageInsightListResult, '2015-03-20/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb'
48
- autoload :SearchMetadata, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_metadata.rb'
49
- autoload :Resource, '2015-03-20/generated/azure_mgmt_operational_insights/models/resource.rb'
50
44
  autoload :OperationListResult, '2015-03-20/generated/azure_mgmt_operational_insights/models/operation_list_result.rb'
45
+ autoload :Resource, '2015-03-20/generated/azure_mgmt_operational_insights/models/resource.rb'
46
+ autoload :SearchSort, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_sort.rb'
51
47
  autoload :ProxyResource, '2015-03-20/generated/azure_mgmt_operational_insights/models/proxy_resource.rb'
48
+ autoload :SearchError, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_error.rb'
49
+ autoload :WorkspacePurgeBodyFilters, '2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb'
50
+ autoload :Tag, '2015-03-20/generated/azure_mgmt_operational_insights/models/tag.rb'
51
+ autoload :WorkspacePurgeBody, '2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_body.rb'
52
+ autoload :OperationDisplay, '2015-03-20/generated/azure_mgmt_operational_insights/models/operation_display.rb'
53
+ autoload :WorkspacePurgeResponse, '2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_response.rb'
54
+ autoload :SearchMetadata, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_metadata.rb'
55
+ autoload :WorkspacePurgeStatusResponse, '2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_status_response.rb'
52
56
  autoload :StorageInsight, '2015-03-20/generated/azure_mgmt_operational_insights/models/storage_insight.rb'
53
57
  autoload :SearchSortEnum, '2015-03-20/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb'
54
58
  autoload :StorageInsightState, '2015-03-20/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb'
59
+ autoload :PurgeState, '2015-03-20/generated/azure_mgmt_operational_insights/models/purge_state.rb'
55
60
  end
56
61
  end
@@ -0,0 +1,16 @@
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
+ module Models
8
+ #
9
+ # Defines values for PurgeState
10
+ #
11
+ module PurgeState
12
+ Pending = "pending"
13
+ Completed = "completed"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,67 @@
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
+ module Models
8
+ #
9
+ # Describes the body of a purge request for an App Insights Workspace
10
+ #
11
+ class WorkspacePurgeBody
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Table from which to purge data.
16
+ attr_accessor :table
17
+
18
+ # @return [Array<WorkspacePurgeBodyFilters>] The set of columns and
19
+ # filters (queries) to run over them to purge the resulting data.
20
+ attr_accessor :filters
21
+
22
+
23
+ #
24
+ # Mapper for WorkspacePurgeBody class as Ruby Hash.
25
+ # This will be used for serialization/deserialization.
26
+ #
27
+ def self.mapper()
28
+ {
29
+ client_side_validation: true,
30
+ required: false,
31
+ serialized_name: 'WorkspacePurgeBody',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'WorkspacePurgeBody',
35
+ model_properties: {
36
+ table: {
37
+ client_side_validation: true,
38
+ required: true,
39
+ serialized_name: 'table',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ filters: {
45
+ client_side_validation: true,
46
+ required: true,
47
+ serialized_name: 'filters',
48
+ type: {
49
+ name: 'Sequence',
50
+ element: {
51
+ client_side_validation: true,
52
+ required: false,
53
+ serialized_name: 'WorkspacePurgeBodyFiltersElementType',
54
+ type: {
55
+ name: 'Composite',
56
+ class_name: 'WorkspacePurgeBodyFilters'
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,72 @@
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
+ module Models
8
+ #
9
+ # User-defined filters to return data which will be purged from the table.
10
+ #
11
+ class WorkspacePurgeBodyFilters
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The column of the table over which the given query
16
+ # should run
17
+ attr_accessor :column
18
+
19
+ # @return [String] A query operator to evaluate over the provided column
20
+ # and value(s).
21
+ attr_accessor :operator
22
+
23
+ # @return the value for the operator to function over. This can be a
24
+ # number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of
25
+ # values.
26
+ attr_accessor :value
27
+
28
+
29
+ #
30
+ # Mapper for WorkspacePurgeBodyFilters class as Ruby Hash.
31
+ # This will be used for serialization/deserialization.
32
+ #
33
+ def self.mapper()
34
+ {
35
+ client_side_validation: true,
36
+ required: false,
37
+ serialized_name: 'WorkspacePurgeBodyFilters',
38
+ type: {
39
+ name: 'Composite',
40
+ class_name: 'WorkspacePurgeBodyFilters',
41
+ model_properties: {
42
+ column: {
43
+ client_side_validation: true,
44
+ required: false,
45
+ serialized_name: 'column',
46
+ type: {
47
+ name: 'String'
48
+ }
49
+ },
50
+ operator: {
51
+ client_side_validation: true,
52
+ required: false,
53
+ serialized_name: 'operator',
54
+ type: {
55
+ name: 'String'
56
+ }
57
+ },
58
+ value: {
59
+ client_side_validation: true,
60
+ required: false,
61
+ serialized_name: 'value',
62
+ type: {
63
+ name: 'Object'
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,47 @@
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
+ module Models
8
+ #
9
+ # Response containing operationId for a specific purge action.
10
+ #
11
+ class WorkspacePurgeResponse
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Id to use when querying for status for a particular
16
+ # purge operation.
17
+ attr_accessor :operation_id
18
+
19
+
20
+ #
21
+ # Mapper for WorkspacePurgeResponse class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ client_side_validation: true,
27
+ required: false,
28
+ serialized_name: 'WorkspacePurgeResponse',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'WorkspacePurgeResponse',
32
+ model_properties: {
33
+ operation_id: {
34
+ client_side_validation: true,
35
+ required: true,
36
+ serialized_name: 'operationId',
37
+ type: {
38
+ name: 'String'
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,47 @@
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
+ module Models
8
+ #
9
+ # Response containing status for a specific purge operation.
10
+ #
11
+ class WorkspacePurgeStatusResponse
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [PurgeState] Status of the operation represented by the
16
+ # requested Id. Possible values include: 'pending', 'completed'
17
+ attr_accessor :status
18
+
19
+
20
+ #
21
+ # Mapper for WorkspacePurgeStatusResponse class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ client_side_validation: true,
27
+ required: false,
28
+ serialized_name: 'WorkspacePurgeStatusResponse',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'WorkspacePurgeStatusResponse',
32
+ model_properties: {
33
+ status: {
34
+ client_side_validation: true,
35
+ required: true,
36
+ serialized_name: 'status',
37
+ type: {
38
+ name: 'String'
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ end
45
+ end
46
+ end
47
+ end
@@ -25,15 +25,24 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
25
25
  # @return [String] Client Api Version.
26
26
  attr_reader :api_version
27
27
 
28
- # @return [String] Gets or sets the preferred language for the response.
28
+ # @return [WorkspacePurgeBody] Describes the body of a request to purge
29
+ # data in a single table of an Log Analytics Workspace
30
+ attr_accessor :body
31
+
32
+ # @return [String] In a purge status request, this is the Id of the
33
+ # operation the status of which is returned.
34
+ attr_accessor :purge_id
35
+
36
+ # @return [String] The preferred language for the response.
29
37
  attr_accessor :accept_language
30
38
 
31
- # @return [Integer] Gets or sets the retry timeout in seconds for Long
32
- # Running Operations. Default value is 30.
39
+ # @return [Integer] The retry timeout in seconds for Long Running
40
+ # Operations. Default value is 30.
33
41
  attr_accessor :long_running_operation_retry_timeout
34
42
 
35
- # @return [Boolean] When set to true a unique x-ms-client-request-id value
36
- # is generated and included in each request. Default is true.
43
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
44
+ # generated. When set to true a unique x-ms-client-request-id value is
45
+ # generated and included in each request. Default is true.
37
46
  attr_accessor :generate_client_request_id
38
47
 
39
48
  # @return [StorageInsights] storage_insights
@@ -137,7 +146,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
137
146
  #
138
147
  def add_telemetry
139
148
  sdk_information = 'azure_mgmt_operational_insights'
140
- sdk_information = "#{sdk_information}/0.16.0"
149
+ sdk_information = "#{sdk_information}/0.17.0"
141
150
  add_user_agent_information(sdk_information)
142
151
  end
143
152
  end
@@ -380,6 +380,211 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
380
380
  promise.execute
381
381
  end
382
382
 
383
+ #
384
+ # Purges data in an Log Analytics workspace by a set of user-defined filters.
385
+ #
386
+ # @param resource_group_name [String] The name of the resource group to get.
387
+ # The name is case insensitive.
388
+ # @param workspace_name [String] Log Analytics workspace name
389
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
390
+ # will be added to the HTTP request.
391
+ #
392
+ # @return [WorkspacePurgeResponse] operation results.
393
+ #
394
+ def purge(resource_group_name, workspace_name, custom_headers:nil)
395
+ response = purge_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
396
+ response.body unless response.nil?
397
+ end
398
+
399
+ #
400
+ # Purges data in an Log Analytics workspace by a set of user-defined filters.
401
+ #
402
+ # @param resource_group_name [String] The name of the resource group to get.
403
+ # The name is case insensitive.
404
+ # @param workspace_name [String] Log Analytics workspace name
405
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
406
+ # will be added to the HTTP request.
407
+ #
408
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
409
+ #
410
+ def purge_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
411
+ purge_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
412
+ end
413
+
414
+ #
415
+ # Purges data in an Log Analytics workspace by a set of user-defined filters.
416
+ #
417
+ # @param resource_group_name [String] The name of the resource group to get.
418
+ # The name is case insensitive.
419
+ # @param workspace_name [String] Log Analytics workspace name
420
+ # @param [Hash{String => String}] A hash of custom headers that will be added
421
+ # to the HTTP request.
422
+ #
423
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
424
+ #
425
+ def purge_async(resource_group_name, workspace_name, custom_headers:nil)
426
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
427
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
428
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
429
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
430
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
431
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
432
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
433
+ fail ArgumentError, '@client.body is nil' if @client.body.nil?
434
+
435
+
436
+ request_headers = {}
437
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
438
+
439
+ # Set Headers
440
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
441
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
442
+
443
+ # Serialize Request
444
+ request_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeBody.mapper()
445
+ request_content = @client.serialize(request_mapper, @client.body)
446
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
447
+
448
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/purge'
449
+
450
+ request_url = @base_url || @client.base_url
451
+
452
+ options = {
453
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
454
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id,'workspaceName' => workspace_name},
455
+ query_params: {'api-version' => @client.api_version},
456
+ body: request_content,
457
+ headers: request_headers.merge(custom_headers || {}),
458
+ base_url: request_url
459
+ }
460
+ promise = @client.make_request_async(:post, path_template, options)
461
+
462
+ promise = promise.then do |result|
463
+ http_response = result.response
464
+ status_code = http_response.status
465
+ response_content = http_response.body
466
+ unless status_code == 202
467
+ error_model = JSON.load(response_content)
468
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
469
+ end
470
+
471
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
472
+ # Deserialize Response
473
+ if status_code == 202
474
+ begin
475
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
476
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeResponse.mapper()
477
+ result.body = @client.deserialize(result_mapper, parsed_response)
478
+ rescue Exception => e
479
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
480
+ end
481
+ end
482
+
483
+ result
484
+ end
485
+
486
+ promise.execute
487
+ end
488
+
489
+ #
490
+ # Gets status of an ongoing purge operation.
491
+ #
492
+ # @param resource_group_name [String] The name of the resource group to get.
493
+ # The name is case insensitive.
494
+ # @param workspace_name [String] Log Analytics workspace name
495
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
496
+ # will be added to the HTTP request.
497
+ #
498
+ # @return [WorkspacePurgeStatusResponse] operation results.
499
+ #
500
+ def get_purge_status(resource_group_name, workspace_name, custom_headers:nil)
501
+ response = get_purge_status_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
502
+ response.body unless response.nil?
503
+ end
504
+
505
+ #
506
+ # Gets status of an ongoing purge operation.
507
+ #
508
+ # @param resource_group_name [String] The name of the resource group to get.
509
+ # The name is case insensitive.
510
+ # @param workspace_name [String] Log Analytics workspace name
511
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
512
+ # will be added to the HTTP request.
513
+ #
514
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
515
+ #
516
+ def get_purge_status_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
517
+ get_purge_status_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
518
+ end
519
+
520
+ #
521
+ # Gets status of an ongoing purge operation.
522
+ #
523
+ # @param resource_group_name [String] The name of the resource group to get.
524
+ # The name is case insensitive.
525
+ # @param workspace_name [String] Log Analytics workspace name
526
+ # @param [Hash{String => String}] A hash of custom headers that will be added
527
+ # to the HTTP request.
528
+ #
529
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
530
+ #
531
+ def get_purge_status_async(resource_group_name, workspace_name, custom_headers:nil)
532
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
533
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
534
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
535
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
536
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
537
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
538
+ fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
539
+ fail ArgumentError, '@client.purge_id is nil' if @client.purge_id.nil?
540
+
541
+
542
+ request_headers = {}
543
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
544
+
545
+ # Set Headers
546
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
547
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
548
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/operations/{purgeId}'
549
+
550
+ request_url = @base_url || @client.base_url
551
+
552
+ options = {
553
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
554
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id,'workspaceName' => workspace_name,'purgeId' => @client.purge_id},
555
+ query_params: {'api-version' => @client.api_version},
556
+ headers: request_headers.merge(custom_headers || {}),
557
+ base_url: request_url
558
+ }
559
+ promise = @client.make_request_async(:get, path_template, options)
560
+
561
+ promise = promise.then do |result|
562
+ http_response = result.response
563
+ status_code = http_response.status
564
+ response_content = http_response.body
565
+ unless status_code == 200
566
+ error_model = JSON.load(response_content)
567
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
568
+ end
569
+
570
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
571
+ # Deserialize Response
572
+ if status_code == 200
573
+ begin
574
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
575
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeStatusResponse.mapper()
576
+ result.body = @client.deserialize(result_mapper, parsed_response)
577
+ rescue Exception => e
578
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
579
+ end
580
+ end
581
+
582
+ result
583
+ end
584
+
585
+ promise.execute
586
+ end
587
+
383
588
  #
384
589
  # Submit a search for a given workspace. The response will contain an id to
385
590
  # track the search. User can use the id to poll the search status and get the
@@ -13,7 +13,8 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
13
13
  include MsRestAzure
14
14
 
15
15
  # @return [SkuNameEnum] The name of the SKU. Possible values include:
16
- # 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'Standalone'
16
+ # 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'PerGB2018',
17
+ # 'Standalone'
17
18
  attr_accessor :name
18
19
 
19
20
 
@@ -14,6 +14,7 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
14
14
  Premium = "Premium"
15
15
  Unlimited = "Unlimited"
16
16
  PerNode = "PerNode"
17
+ PerGB2018 = "PerGB2018"
17
18
  Standalone = "Standalone"
18
19
  end
19
20
  end
@@ -25,15 +25,16 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
25
25
  # @return [String] Client Api Version.
26
26
  attr_reader :api_version
27
27
 
28
- # @return [String] Gets or sets the preferred language for the response.
28
+ # @return [String] The preferred language for the response.
29
29
  attr_accessor :accept_language
30
30
 
31
- # @return [Integer] Gets or sets the retry timeout in seconds for Long
32
- # Running Operations. Default value is 30.
31
+ # @return [Integer] The retry timeout in seconds for Long Running
32
+ # Operations. Default value is 30.
33
33
  attr_accessor :long_running_operation_retry_timeout
34
34
 
35
- # @return [Boolean] When set to true a unique x-ms-client-request-id value
36
- # is generated and included in each request. Default is true.
35
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
36
+ # generated. When set to true a unique x-ms-client-request-id value is
37
+ # generated and included in each request. Default is true.
37
38
  attr_accessor :generate_client_request_id
38
39
 
39
40
  # @return [LinkedServices] linked_services
@@ -137,7 +138,7 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
137
138
  #
138
139
  def add_telemetry
139
140
  sdk_information = 'azure_mgmt_operational_insights'
140
- sdk_information = "#{sdk_information}/0.16.0"
141
+ sdk_information = "#{sdk_information}/0.17.0"
141
142
  add_user_agent_information(sdk_information)
142
143
  end
143
144
  end
@@ -14,26 +14,31 @@ module Azure::OperationalInsights::Profiles::Latest
14
14
  Operations = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Operations
15
15
 
16
16
  module Models
17
- SearchError = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchError
18
- SearchResultsResponse = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchResultsResponse
19
17
  SearchSchemaValue = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchSchemaValue
20
- LinkTarget = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::LinkTarget
21
18
  SearchGetSchemaResponse = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchGetSchemaResponse
22
- CoreSummary = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::CoreSummary
23
19
  SearchHighlight = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchHighlight
24
- SearchMetadataSchema = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchMetadataSchema
20
+ LinkTarget = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::LinkTarget
25
21
  SearchParameters = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchParameters
26
- SavedSearch = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SavedSearch
22
+ CoreSummary = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::CoreSummary
27
23
  StorageAccount = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageAccount
24
+ SearchMetadataSchema = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchMetadataSchema
28
25
  StorageInsightStatus = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsightStatus
29
- Tag = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::Tag
30
- SearchSort = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchSort
26
+ SavedSearch = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SavedSearch
31
27
  SavedSearchesListResult = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SavedSearchesListResult
28
+ SearchResultsResponse = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchResultsResponse
32
29
  StorageInsightListResult = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsightListResult
30
+ SearchSort = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchSort
31
+ SearchError = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchError
32
+ WorkspacePurgeBodyFilters = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeBodyFilters
33
+ Tag = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::Tag
34
+ WorkspacePurgeBody = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeBody
35
+ WorkspacePurgeResponse = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeResponse
33
36
  SearchMetadata = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchMetadata
37
+ WorkspacePurgeStatusResponse = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeStatusResponse
34
38
  StorageInsight = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsight
35
39
  SearchSortEnum = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchSortEnum
36
40
  StorageInsightState = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsightState
41
+ PurgeState = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::PurgeState
37
42
  MetricName = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::MetricName
38
43
  OperationDisplay = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::OperationDisplay
39
44
  UsageMetric = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::UsageMetric
@@ -117,57 +122,69 @@ module Azure::OperationalInsights::Profiles::Latest
117
122
  end
118
123
 
119
124
  class ModelClasses
120
- def search_error
121
- Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchError
122
- end
123
- def search_results_response
124
- Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchResultsResponse
125
- end
126
125
  def search_schema_value
127
126
  Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchSchemaValue
128
127
  end
129
- def link_target
130
- Azure::OperationalInsights::Mgmt::V2015_03_20::Models::LinkTarget
131
- end
132
128
  def search_get_schema_response
133
129
  Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchGetSchemaResponse
134
130
  end
135
- def core_summary
136
- Azure::OperationalInsights::Mgmt::V2015_03_20::Models::CoreSummary
137
- end
138
131
  def search_highlight
139
132
  Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchHighlight
140
133
  end
141
- def search_metadata_schema
142
- Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchMetadataSchema
134
+ def link_target
135
+ Azure::OperationalInsights::Mgmt::V2015_03_20::Models::LinkTarget
143
136
  end
144
137
  def search_parameters
145
138
  Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchParameters
146
139
  end
147
- def saved_search
148
- Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SavedSearch
140
+ def core_summary
141
+ Azure::OperationalInsights::Mgmt::V2015_03_20::Models::CoreSummary
149
142
  end
150
143
  def storage_account
151
144
  Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageAccount
152
145
  end
146
+ def search_metadata_schema
147
+ Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchMetadataSchema
148
+ end
153
149
  def storage_insight_status
154
150
  Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsightStatus
155
151
  end
156
- def tag
157
- Azure::OperationalInsights::Mgmt::V2015_03_20::Models::Tag
158
- end
159
- def search_sort
160
- Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchSort
152
+ def saved_search
153
+ Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SavedSearch
161
154
  end
162
155
  def saved_searches_list_result
163
156
  Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SavedSearchesListResult
164
157
  end
158
+ def search_results_response
159
+ Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchResultsResponse
160
+ end
165
161
  def storage_insight_list_result
166
162
  Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsightListResult
167
163
  end
164
+ def search_sort
165
+ Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchSort
166
+ end
167
+ def search_error
168
+ Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchError
169
+ end
170
+ def workspace_purge_body_filters
171
+ Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeBodyFilters
172
+ end
173
+ def tag
174
+ Azure::OperationalInsights::Mgmt::V2015_03_20::Models::Tag
175
+ end
176
+ def workspace_purge_body
177
+ Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeBody
178
+ end
179
+ def workspace_purge_response
180
+ Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeResponse
181
+ end
168
182
  def search_metadata
169
183
  Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchMetadata
170
184
  end
185
+ def workspace_purge_status_response
186
+ Azure::OperationalInsights::Mgmt::V2015_03_20::Models::WorkspacePurgeStatusResponse
187
+ end
171
188
  def storage_insight
172
189
  Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsight
173
190
  end
@@ -177,6 +194,9 @@ module Azure::OperationalInsights::Profiles::Latest
177
194
  def storage_insight_state
178
195
  Azure::OperationalInsights::Mgmt::V2015_03_20::Models::StorageInsightState
179
196
  end
197
+ def purge_state
198
+ Azure::OperationalInsights::Mgmt::V2015_03_20::Models::PurgeState
199
+ end
180
200
  def metric_name
181
201
  Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::MetricName
182
202
  end
data/lib/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for license information.
4
4
 
5
5
  module Azure::OperationalInsights::Mgmt
6
- VERSION = '0.16.0'
6
+ VERSION = '0.17.0'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_operational_insights
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-12 00:00:00.000000000 Z
11
+ date: 2018-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.10.0
75
+ version: 0.11.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.10.0
82
+ version: 0.11.0
83
83
  description: Microsoft Azure Operational Insights Library for Ruby
84
84
  email: azrubyteam@microsoft.com
85
85
  executables: []
@@ -94,6 +94,7 @@ files:
94
94
  - lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_display.rb
95
95
  - lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_list_result.rb
96
96
  - lib/2015-03-20/generated/azure_mgmt_operational_insights/models/proxy_resource.rb
97
+ - lib/2015-03-20/generated/azure_mgmt_operational_insights/models/purge_state.rb
97
98
  - lib/2015-03-20/generated/azure_mgmt_operational_insights/models/resource.rb
98
99
  - lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_search.rb
99
100
  - lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb
@@ -113,6 +114,10 @@ files:
113
114
  - lib/2015-03-20/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb
114
115
  - lib/2015-03-20/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb
115
116
  - lib/2015-03-20/generated/azure_mgmt_operational_insights/models/tag.rb
117
+ - lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_body.rb
118
+ - lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb
119
+ - lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_response.rb
120
+ - lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_status_response.rb
116
121
  - lib/2015-03-20/generated/azure_mgmt_operational_insights/module_definition.rb
117
122
  - lib/2015-03-20/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb
118
123
  - lib/2015-03-20/generated/azure_mgmt_operational_insights/operations.rb
@@ -180,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
185
  version: '0'
181
186
  requirements: []
182
187
  rubyforge_project:
183
- rubygems_version: 2.6.10
188
+ rubygems_version: 2.5.1
184
189
  signing_key:
185
190
  specification_version: 4
186
191
  summary: Official Ruby client library to consume Microsoft Azure Operational Insights.