azure_mgmt_operational_insights 0.17.0 → 0.19.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2015-03-20/generated/azure_mgmt_operational_insights.rb +15 -16
  3. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/available_service_tier.rb +124 -0
  4. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation.rb +1 -1
  5. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_display.rb +1 -1
  6. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +3 -3
  7. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/resource.rb +9 -0
  8. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_search.rb +5 -5
  9. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +4 -3
  10. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/{search_highlight.rb → shared_keys.rb} +13 -13
  11. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +21 -0
  12. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb +2 -3
  13. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb +14 -1
  14. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +3 -5
  15. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operations.rb +2 -0
  16. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/saved_searches.rb +69 -175
  17. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/storage_insights.rb +36 -52
  18. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb +319 -169
  19. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights.rb +9 -7
  20. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb +10 -0
  21. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb +8 -0
  22. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb +1 -1
  23. data/lib/{2015-03-20/generated/azure_mgmt_operational_insights/models/search_error.rb → 2015-11-01-preview/generated/azure_mgmt_operational_insights/models/error_response.rb} +11 -11
  24. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +1 -1
  25. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_status.rb +102 -0
  26. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/resource.rb +9 -0
  27. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/sku.rb +2 -2
  28. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +1 -1
  29. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace.rb +9 -10
  30. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb +1 -1
  31. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +95 -1
  32. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/operations.rb +4 -0
  33. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/workspaces.rb +24 -0
  34. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights.rb +123 -0
  35. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/available_service_tiers.rb +146 -0
  36. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/clusters.rb +959 -0
  37. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/data_exports.rb +473 -0
  38. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb +603 -0
  39. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/deleted_workspaces.rb +211 -0
  40. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/gateways.rb +123 -0
  41. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/intelligence_packs.rb +351 -0
  42. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb +577 -0
  43. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/linked_storage_accounts.rb +490 -0
  44. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/management_groups.rb +130 -0
  45. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/available_service_tier.rb +124 -0
  46. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/azure_entity_resource.rb +75 -0
  47. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster.rb +159 -0
  48. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_entity_status.rb +21 -0
  49. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_error_response.rb +48 -0
  50. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_list_result.rb +98 -0
  51. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_patch.rb +78 -0
  52. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_sku.rb +58 -0
  53. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_sku_name_enum.rb +15 -0
  54. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/core_summary.rb +57 -0
  55. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export.rb +174 -0
  56. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export_error_response.rb +48 -0
  57. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export_list_result.rb +56 -0
  58. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_ingestion_status.rb +20 -0
  59. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source.rb +130 -0
  60. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_filter.rb +61 -0
  61. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_kind.rb +47 -0
  62. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb +98 -0
  63. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_type.rb +19 -0
  64. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_additional_info.rb +59 -0
  65. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_contract.rb +49 -0
  66. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_response.rb +113 -0
  67. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/identity.rb +72 -0
  68. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/identity_type.rb +16 -0
  69. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb +69 -0
  70. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/key_vault_properties.rb +71 -0
  71. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service.rb +120 -0
  72. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service_entity_status.rb +18 -0
  73. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb +55 -0
  74. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_list_result.rb +56 -0
  75. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_resource.rb +95 -0
  76. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/management_group.rb +128 -0
  77. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/metric_name.rb +57 -0
  78. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
  79. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_display.rb +79 -0
  80. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +101 -0
  81. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_status.rb +102 -0
  82. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/private_link_scoped_resource.rb +58 -0
  83. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/proxy_resource.rb +63 -0
  84. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/public_network_access_type.rb +16 -0
  85. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/purge_state.rb +16 -0
  86. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/resource.rb +83 -0
  87. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/saved_search.rb +165 -0
  88. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +55 -0
  89. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb +67 -0
  90. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_metadata.rb +241 -0
  91. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb +57 -0
  92. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_schema_value.rb +123 -0
  93. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_sort.rb +58 -0
  94. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb +16 -0
  95. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/shared_keys.rb +57 -0
  96. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +21 -0
  97. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_account.rb +58 -0
  98. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight.rb +157 -0
  99. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb +98 -0
  100. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb +16 -0
  101. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb +58 -0
  102. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/table.rb +79 -0
  103. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tables_list_result.rb +55 -0
  104. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tag.rb +57 -0
  105. data/lib/{2015-03-20/generated/azure_mgmt_operational_insights/models/search_results_response.rb → 2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tracked_resource.rb} +33 -31
  106. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/type.rb +16 -0
  107. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/usage_metric.rb +103 -0
  108. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace.rb +214 -0
  109. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_capping.rb +73 -0
  110. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_entity_status.rb +21 -0
  111. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb +56 -0
  112. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb +55 -0
  113. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb +56 -0
  114. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_patch.rb +207 -0
  115. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_body.rb +67 -0
  116. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb +85 -0
  117. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_response.rb +47 -0
  118. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_status_response.rb +47 -0
  119. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_sku.rb +85 -0
  120. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_sku_name_enum.rb +21 -0
  121. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/module_definition.rb +9 -0
  122. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operation_statuses.rb +121 -0
  123. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +207 -0
  124. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operations.rb +220 -0
  125. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/saved_searches.rb +457 -0
  126. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/schema.rb +130 -0
  127. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/shared_keys_operations.rb +238 -0
  128. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/storage_insight_configs.rb +592 -0
  129. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/tables.rb +359 -0
  130. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/usages.rb +130 -0
  131. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/workspace_purge.rb +277 -0
  132. data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/workspaces.rb +768 -0
  133. data/lib/azure_mgmt_operational_insights.rb +1 -0
  134. data/lib/profiles/latest/modules/operationalinsights_profile_module.rb +291 -145
  135. data/lib/version.rb +1 -1
  136. metadata +109 -9
  137. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_parameters.rb +0 -94
@@ -86,6 +86,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
86
86
  end
87
87
 
88
88
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
90
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
89
91
  # Deserialize Response
90
92
  if status_code == 200
91
93
  begin
@@ -24,56 +24,53 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
24
24
  #
25
25
  # Deletes the specified saved search in a given workspace.
26
26
  #
27
- # @param resource_group_name [String] The name of the resource group to get.
28
- # The name is case insensitive.
29
- # @param workspace_name [String] Log Analytics workspace name
30
- # @param saved_search_name [String] Name of the saved search.
27
+ # @param resource_group_name [String] The Resource Group name.
28
+ # @param workspace_name [String] The Log Analytics Workspace name.
29
+ # @param saved_search_id [String] The id of the saved search.
31
30
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
31
  # will be added to the HTTP request.
33
32
  #
34
33
  #
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!
34
+ def delete(resource_group_name, workspace_name, saved_search_id, custom_headers:nil)
35
+ response = delete_async(resource_group_name, workspace_name, saved_search_id, custom_headers:custom_headers).value!
37
36
  nil
38
37
  end
39
38
 
40
39
  #
41
40
  # Deletes the specified saved search in a given workspace.
42
41
  #
43
- # @param resource_group_name [String] The name of the resource group to get.
44
- # The name is case insensitive.
45
- # @param workspace_name [String] Log Analytics workspace name
46
- # @param saved_search_name [String] Name of the saved search.
42
+ # @param resource_group_name [String] The Resource Group name.
43
+ # @param workspace_name [String] The Log Analytics Workspace name.
44
+ # @param saved_search_id [String] The id of the saved search.
47
45
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
48
46
  # will be added to the HTTP request.
49
47
  #
50
48
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
49
  #
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!
50
+ def delete_with_http_info(resource_group_name, workspace_name, saved_search_id, custom_headers:nil)
51
+ delete_async(resource_group_name, workspace_name, saved_search_id, custom_headers:custom_headers).value!
54
52
  end
55
53
 
56
54
  #
57
55
  # Deletes the specified saved search in a given workspace.
58
56
  #
59
- # @param resource_group_name [String] The name of the resource group to get.
60
- # The name is case insensitive.
61
- # @param workspace_name [String] Log Analytics workspace name
62
- # @param saved_search_name [String] Name of the saved search.
57
+ # @param resource_group_name [String] The Resource Group name.
58
+ # @param workspace_name [String] The Log Analytics Workspace name.
59
+ # @param saved_search_id [String] The id of the saved search.
63
60
  # @param [Hash{String => String}] A hash of custom headers that will be added
64
61
  # to the HTTP request.
65
62
  #
66
63
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
67
64
  #
68
- def delete_async(resource_group_name, workspace_name, saved_search_name, custom_headers:nil)
65
+ def delete_async(resource_group_name, workspace_name, saved_search_id, custom_headers:nil)
66
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
69
67
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
70
68
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
71
69
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
72
70
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
73
71
  fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
74
- fail ArgumentError, 'saved_search_name is nil' if saved_search_name.nil?
72
+ fail ArgumentError, 'saved_search_id is nil' if saved_search_id.nil?
75
73
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
76
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
77
74
 
78
75
 
79
76
  request_headers = {}
@@ -82,13 +79,13 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
82
79
  # Set Headers
83
80
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
84
81
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
85
- path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}'
82
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}'
86
83
 
87
84
  request_url = @base_url || @client.base_url
88
85
 
89
86
  options = {
90
87
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
91
- path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'savedSearchName' => saved_search_name,'subscriptionId' => @client.subscription_id},
88
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'savedSearchId' => saved_search_id},
92
89
  query_params: {'api-version' => @client.api_version},
93
90
  headers: request_headers.merge(custom_headers || {}),
94
91
  base_url: request_url
@@ -105,6 +102,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
105
102
  end
106
103
 
107
104
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
105
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
106
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
108
107
 
109
108
  result
110
109
  end
@@ -115,61 +114,58 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
115
114
  #
116
115
  # Creates or updates a saved search for a given workspace.
117
116
  #
118
- # @param resource_group_name [String] The name of the resource group to get.
119
- # The name is case insensitive.
120
- # @param workspace_name [String] Log Analytics workspace name
121
- # @param saved_search_name [String] The id of the saved search.
117
+ # @param resource_group_name [String] The Resource Group name.
118
+ # @param workspace_name [String] The Log Analytics Workspace name.
119
+ # @param saved_search_id [String] The id of the saved search.
122
120
  # @param parameters [SavedSearch] The parameters required to save a search.
123
121
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
124
122
  # will be added to the HTTP request.
125
123
  #
126
124
  # @return [SavedSearch] operation results.
127
125
  #
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!
126
+ def create_or_update(resource_group_name, workspace_name, saved_search_id, parameters, custom_headers:nil)
127
+ response = create_or_update_async(resource_group_name, workspace_name, saved_search_id, parameters, custom_headers:custom_headers).value!
130
128
  response.body unless response.nil?
131
129
  end
132
130
 
133
131
  #
134
132
  # Creates or updates a saved search for a given workspace.
135
133
  #
136
- # @param resource_group_name [String] The name of the resource group to get.
137
- # The name is case insensitive.
138
- # @param workspace_name [String] Log Analytics workspace name
139
- # @param saved_search_name [String] The id of the saved search.
134
+ # @param resource_group_name [String] The Resource Group name.
135
+ # @param workspace_name [String] The Log Analytics Workspace name.
136
+ # @param saved_search_id [String] The id of the saved search.
140
137
  # @param parameters [SavedSearch] The parameters required to save a search.
141
138
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
142
139
  # will be added to the HTTP request.
143
140
  #
144
141
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
145
142
  #
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!
143
+ def create_or_update_with_http_info(resource_group_name, workspace_name, saved_search_id, parameters, custom_headers:nil)
144
+ create_or_update_async(resource_group_name, workspace_name, saved_search_id, parameters, custom_headers:custom_headers).value!
148
145
  end
149
146
 
150
147
  #
151
148
  # Creates or updates a saved search for a given workspace.
152
149
  #
153
- # @param resource_group_name [String] The name of the resource group to get.
154
- # The name is case insensitive.
155
- # @param workspace_name [String] Log Analytics workspace name
156
- # @param saved_search_name [String] The id of the saved search.
150
+ # @param resource_group_name [String] The Resource Group name.
151
+ # @param workspace_name [String] The Log Analytics Workspace name.
152
+ # @param saved_search_id [String] The id of the saved search.
157
153
  # @param parameters [SavedSearch] The parameters required to save a search.
158
154
  # @param [Hash{String => String}] A hash of custom headers that will be added
159
155
  # to the HTTP request.
160
156
  #
161
157
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
162
158
  #
163
- def create_or_update_async(resource_group_name, workspace_name, saved_search_name, parameters, custom_headers:nil)
159
+ def create_or_update_async(resource_group_name, workspace_name, saved_search_id, parameters, custom_headers:nil)
160
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
164
161
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
165
162
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
166
163
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
167
164
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
168
165
  fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
169
- fail ArgumentError, 'saved_search_name is nil' if saved_search_name.nil?
170
- fail ArgumentError, 'parameters is nil' if parameters.nil?
166
+ fail ArgumentError, 'saved_search_id is nil' if saved_search_id.nil?
171
167
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
172
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
168
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
173
169
 
174
170
 
175
171
  request_headers = {}
@@ -184,13 +180,13 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
184
180
  request_content = @client.serialize(request_mapper, parameters)
185
181
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
186
182
 
187
- path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}'
183
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}'
188
184
 
189
185
  request_url = @base_url || @client.base_url
190
186
 
191
187
  options = {
192
188
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
193
- path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'savedSearchName' => saved_search_name,'subscriptionId' => @client.subscription_id},
189
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'savedSearchId' => saved_search_id},
194
190
  query_params: {'api-version' => @client.api_version},
195
191
  body: request_content,
196
192
  headers: request_headers.merge(custom_headers || {}),
@@ -208,6 +204,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
208
204
  end
209
205
 
210
206
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
207
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
208
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
211
209
  # Deserialize Response
212
210
  if status_code == 200
213
211
  begin
@@ -228,57 +226,54 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
228
226
  #
229
227
  # Gets the specified saved search for a given workspace.
230
228
  #
231
- # @param resource_group_name [String] The name of the resource group to get.
232
- # The name is case insensitive.
233
- # @param workspace_name [String] Log Analytics workspace name
234
- # @param saved_search_name [String] The id of the saved search.
229
+ # @param resource_group_name [String] The Resource Group name.
230
+ # @param workspace_name [String] The Log Analytics Workspace name.
231
+ # @param saved_search_id [String] The id of the saved search.
235
232
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
236
233
  # will be added to the HTTP request.
237
234
  #
238
235
  # @return [SavedSearch] operation results.
239
236
  #
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!
237
+ def get(resource_group_name, workspace_name, saved_search_id, custom_headers:nil)
238
+ response = get_async(resource_group_name, workspace_name, saved_search_id, custom_headers:custom_headers).value!
242
239
  response.body unless response.nil?
243
240
  end
244
241
 
245
242
  #
246
243
  # Gets the specified saved search for a given workspace.
247
244
  #
248
- # @param resource_group_name [String] The name of the resource group to get.
249
- # The name is case insensitive.
250
- # @param workspace_name [String] Log Analytics workspace name
251
- # @param saved_search_name [String] The id of the saved search.
245
+ # @param resource_group_name [String] The Resource Group name.
246
+ # @param workspace_name [String] The Log Analytics Workspace name.
247
+ # @param saved_search_id [String] The id of the saved search.
252
248
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
253
249
  # will be added to the HTTP request.
254
250
  #
255
251
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
256
252
  #
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!
253
+ def get_with_http_info(resource_group_name, workspace_name, saved_search_id, custom_headers:nil)
254
+ get_async(resource_group_name, workspace_name, saved_search_id, custom_headers:custom_headers).value!
259
255
  end
260
256
 
261
257
  #
262
258
  # Gets the specified saved search for a given workspace.
263
259
  #
264
- # @param resource_group_name [String] The name of the resource group to get.
265
- # The name is case insensitive.
266
- # @param workspace_name [String] Log Analytics workspace name
267
- # @param saved_search_name [String] The id of the saved search.
260
+ # @param resource_group_name [String] The Resource Group name.
261
+ # @param workspace_name [String] The Log Analytics Workspace name.
262
+ # @param saved_search_id [String] The id of the saved search.
268
263
  # @param [Hash{String => String}] A hash of custom headers that will be added
269
264
  # to the HTTP request.
270
265
  #
271
266
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
272
267
  #
273
- def get_async(resource_group_name, workspace_name, saved_search_name, custom_headers:nil)
268
+ def get_async(resource_group_name, workspace_name, saved_search_id, custom_headers:nil)
269
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
274
270
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
275
271
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
276
272
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
277
273
  fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
278
274
  fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
279
- fail ArgumentError, 'saved_search_name is nil' if saved_search_name.nil?
275
+ fail ArgumentError, 'saved_search_id is nil' if saved_search_id.nil?
280
276
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
281
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
282
277
 
283
278
 
284
279
  request_headers = {}
@@ -287,13 +282,13 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
287
282
  # Set Headers
288
283
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
289
284
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
290
- path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}'
285
+ path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}'
291
286
 
292
287
  request_url = @base_url || @client.base_url
293
288
 
294
289
  options = {
295
290
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
296
- path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'savedSearchName' => saved_search_name,'subscriptionId' => @client.subscription_id},
291
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'savedSearchId' => saved_search_id},
297
292
  query_params: {'api-version' => @client.api_version},
298
293
  headers: request_headers.merge(custom_headers || {}),
299
294
  base_url: request_url
@@ -310,6 +305,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
310
305
  end
311
306
 
312
307
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
308
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
309
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
313
310
  # Deserialize Response
314
311
  if status_code == 200
315
312
  begin
@@ -330,9 +327,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
330
327
  #
331
328
  # Gets the saved searches for a given Log Analytics Workspace
332
329
  #
333
- # @param resource_group_name [String] The name of the resource group to get.
334
- # The name is case insensitive.
335
- # @param workspace_name [String] Log Analytics workspace name
330
+ # @param resource_group_name [String] The Resource Group name.
331
+ # @param workspace_name [String] The Log Analytics Workspace name.
336
332
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
337
333
  # will be added to the HTTP request.
338
334
  #
@@ -346,9 +342,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
346
342
  #
347
343
  # Gets the saved searches for a given Log Analytics Workspace
348
344
  #
349
- # @param resource_group_name [String] The name of the resource group to get.
350
- # The name is case insensitive.
351
- # @param workspace_name [String] Log Analytics workspace name
345
+ # @param resource_group_name [String] The Resource Group name.
346
+ # @param workspace_name [String] The Log Analytics Workspace name.
352
347
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
353
348
  # will be added to the HTTP request.
354
349
  #
@@ -361,9 +356,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
361
356
  #
362
357
  # Gets the saved searches for a given Log Analytics Workspace
363
358
  #
364
- # @param resource_group_name [String] The name of the resource group to get.
365
- # The name is case insensitive.
366
- # @param workspace_name [String] Log Analytics workspace name
359
+ # @param resource_group_name [String] The Resource Group name.
360
+ # @param workspace_name [String] The Log Analytics Workspace name.
367
361
  # @param [Hash{String => String}] A hash of custom headers that will be added
368
362
  # to the HTTP request.
369
363
  #
@@ -408,6 +402,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
408
402
  end
409
403
 
410
404
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
405
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
406
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
411
407
  # Deserialize Response
412
408
  if status_code == 200
413
409
  begin
@@ -425,107 +421,5 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
425
421
  promise.execute
426
422
  end
427
423
 
428
- #
429
- # Gets the results from a saved search for a given workspace.
430
- #
431
- # @param resource_group_name [String] The name of the resource group to get.
432
- # The name is case insensitive.
433
- # @param workspace_name [String] Log Analytics workspace name
434
- # @param saved_search_name [String] The name of the saved search.
435
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
436
- # will be added to the HTTP request.
437
- #
438
- # @return [SearchResultsResponse] operation results.
439
- #
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!
442
- response.body unless response.nil?
443
- end
444
-
445
- #
446
- # Gets the results from a saved search for a given workspace.
447
- #
448
- # @param resource_group_name [String] The name of the resource group to get.
449
- # The name is case insensitive.
450
- # @param workspace_name [String] Log Analytics workspace name
451
- # @param saved_search_name [String] The name of the saved search.
452
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
453
- # will be added to the HTTP request.
454
- #
455
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
456
- #
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!
459
- end
460
-
461
- #
462
- # Gets the results from a saved search for a given workspace.
463
- #
464
- # @param resource_group_name [String] The name of the resource group to get.
465
- # The name is case insensitive.
466
- # @param workspace_name [String] Log Analytics workspace name
467
- # @param saved_search_name [String] The name of the saved search.
468
- # @param [Hash{String => String}] A hash of custom headers that will be added
469
- # to the HTTP request.
470
- #
471
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
472
- #
473
- def get_results_async(resource_group_name, workspace_name, saved_search_name, custom_headers:nil)
474
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
475
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
476
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
477
- fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
478
- fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
479
- fail ArgumentError, 'saved_search_name is nil' if saved_search_name.nil?
480
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
481
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
482
-
483
-
484
- request_headers = {}
485
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
486
-
487
- # Set Headers
488
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
489
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
490
- path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}/results'
491
-
492
- request_url = @base_url || @client.base_url
493
-
494
- options = {
495
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
496
- path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'savedSearchName' => saved_search_name,'subscriptionId' => @client.subscription_id},
497
- query_params: {'api-version' => @client.api_version},
498
- headers: request_headers.merge(custom_headers || {}),
499
- base_url: request_url
500
- }
501
- promise = @client.make_request_async(:get, path_template, options)
502
-
503
- promise = promise.then do |result|
504
- http_response = result.response
505
- status_code = http_response.status
506
- response_content = http_response.body
507
- unless status_code == 200
508
- error_model = JSON.load(response_content)
509
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
510
- end
511
-
512
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
513
- # Deserialize Response
514
- if status_code == 200
515
- begin
516
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
517
- result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchResultsResponse.mapper()
518
- result.body = @client.deserialize(result_mapper, parsed_response)
519
- rescue Exception => e
520
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
521
- end
522
- end
523
-
524
- result
525
- end
526
-
527
- promise.execute
528
- end
529
-
530
424
  end
531
425
  end