azure_mgmt_operational_insights 0.15.2 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights.rb +18 -10
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/available_service_tier.rb +124 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/core_summary.rb +2 -2
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_display.rb +68 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +56 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/purge_state.rb +16 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/resource.rb +9 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_search.rb +37 -13
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +3 -2
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb +1 -1
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_metadata.rb +8 -8
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/{search_highlight.rb → shared_keys.rb} +13 -13
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +21 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb +2 -3
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/tag.rb +2 -2
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_body.rb +67 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb +85 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_response.rb +47 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/workspace_purge_status_response.rb +47 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +24 -10
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operations.rb +109 -0
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/saved_searches.rb +78 -181
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/storage_insights.rb +69 -82
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb +476 -119
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights.rb +14 -8
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb +45 -32
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb +34 -24
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb +1 -1
- 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
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb +11 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_display.rb +68 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +101 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_status.rb +102 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/resource.rb +10 -1
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/sku.rb +2 -1
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +2 -1
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace.rb +10 -11
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb +1 -1
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +239 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/operations.rb +219 -0
- data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/workspaces.rb +202 -63
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights.rb +123 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/available_service_tiers.rb +146 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/clusters.rb +959 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/data_exports.rb +523 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb +603 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/deleted_workspaces.rb +211 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/gateways.rb +123 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/intelligence_packs.rb +351 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb +577 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/linked_storage_accounts.rb +481 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/management_groups.rb +130 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/available_service_tier.rb +124 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/azure_entity_resource.rb +75 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster.rb +159 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_entity_status.rb +21 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_error_response.rb +48 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_list_result.rb +98 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_patch.rb +78 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_sku.rb +58 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/cluster_sku_name_enum.rb +15 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/core_summary.rb +57 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export.rb +174 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export_error_response.rb +48 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_export_list_result.rb +56 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_ingestion_status.rb +20 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source.rb +130 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_filter.rb +61 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_kind.rb +47 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb +98 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/data_source_type.rb +16 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_additional_info.rb +59 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_contract.rb +49 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/error_response.rb +113 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/identity.rb +72 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/identity_type.rb +16 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb +69 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/key_vault_properties.rb +71 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service.rb +120 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service_entity_status.rb +18 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb +55 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_list_result.rb +56 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/linked_storage_accounts_resource.rb +95 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/management_group.rb +128 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/metric_name.rb +57 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_display.rb +79 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +101 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/operation_status.rb +102 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/private_link_scoped_resource.rb +58 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/proxy_resource.rb +63 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/public_network_access_type.rb +16 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/purge_state.rb +16 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/resource.rb +83 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/saved_search.rb +165 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +55 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb +67 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_metadata.rb +241 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb +57 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_schema_value.rb +123 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_sort.rb +58 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb +16 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/shared_keys.rb +57 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +21 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_account.rb +58 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight.rb +157 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb +98 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb +16 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb +58 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/table.rb +79 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tables_list_result.rb +55 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/tag.rb +57 -0
- 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
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/type.rb +16 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/usage_metric.rb +103 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace.rb +214 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_capping.rb +73 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_entity_status.rb +21 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb +56 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb +55 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb +56 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_patch.rb +207 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_body.rb +67 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_body_filters.rb +85 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_response.rb +47 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_purge_status_response.rb +47 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_sku.rb +85 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/models/workspace_sku_name_enum.rb +21 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/module_definition.rb +9 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operation_statuses.rb +121 -0
- data/lib/{2015-11-01-preview/generated/azure_mgmt_operational_insights/azure_log_analytics.rb → 2020-03-01-preview/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb} +89 -19
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/operations.rb +220 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/saved_searches.rb +457 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/schema.rb +130 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/shared_keys_operations.rb +238 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/storage_insight_configs.rb +592 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/tables.rb +359 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/usages.rb +130 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/workspace_purge.rb +277 -0
- data/lib/2020-03-01-preview/generated/azure_mgmt_operational_insights/workspaces.rb +768 -0
- data/lib/azure_mgmt_operational_insights.rb +1 -0
- data/lib/profiles/latest/modules/operationalinsights_profile_module.rb +382 -180
- data/lib/profiles/latest/operationalinsights_latest_profile_client.rb +28 -9
- data/lib/profiles/latest/operationalinsights_module_definition.rb +0 -1
- data/lib/version.rb +1 -1
- metadata +123 -10
- data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_parameters.rb +0 -94
@@ -17,23 +17,30 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
|
|
17
17
|
# @return Credentials needed for the client to connect to Azure.
|
18
18
|
attr_reader :credentials
|
19
19
|
|
20
|
-
# @return [String]
|
21
|
-
# Microsoft Azure subscription. The subscription ID forms part of the URI
|
22
|
-
# for every service call.
|
20
|
+
# @return [String] The Subscription ID.
|
23
21
|
attr_accessor :subscription_id
|
24
22
|
|
25
|
-
# @return [String]
|
23
|
+
# @return [String] The client API version.
|
26
24
|
attr_reader :api_version
|
27
25
|
|
28
|
-
# @return [
|
26
|
+
# @return [WorkspacePurgeBody] Describes the body of a request to purge
|
27
|
+
# data in a single table of an Log Analytics Workspace
|
28
|
+
attr_accessor :body
|
29
|
+
|
30
|
+
# @return [String] In a purge status request, this is the Id of the
|
31
|
+
# operation the status of which is returned.
|
32
|
+
attr_accessor :purge_id
|
33
|
+
|
34
|
+
# @return [String] The preferred language for the response.
|
29
35
|
attr_accessor :accept_language
|
30
36
|
|
31
|
-
# @return [Integer]
|
32
|
-
#
|
37
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
38
|
+
# Operations. Default value is 30.
|
33
39
|
attr_accessor :long_running_operation_retry_timeout
|
34
40
|
|
35
|
-
# @return [Boolean]
|
36
|
-
#
|
41
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
42
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
43
|
+
# generated and included in each request. Default is true.
|
37
44
|
attr_accessor :generate_client_request_id
|
38
45
|
|
39
46
|
# @return [StorageInsights] storage_insights
|
@@ -45,6 +52,9 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
|
|
45
52
|
# @return [SavedSearches] saved_searches
|
46
53
|
attr_reader :saved_searches
|
47
54
|
|
55
|
+
# @return [Operations] operations
|
56
|
+
attr_reader :operations
|
57
|
+
|
48
58
|
#
|
49
59
|
# Creates initializes a new instance of the OperationalInsightsManagementClient class.
|
50
60
|
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
@@ -61,6 +71,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
|
|
61
71
|
@storage_insights = StorageInsights.new(self)
|
62
72
|
@workspaces = Workspaces.new(self)
|
63
73
|
@saved_searches = SavedSearches.new(self)
|
74
|
+
@operations = Operations.new(self)
|
64
75
|
@api_version = '2015-03-20'
|
65
76
|
@accept_language = 'en-US'
|
66
77
|
@long_running_operation_retry_timeout = 30
|
@@ -114,6 +125,9 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
|
|
114
125
|
fail ArgumentError, 'path is nil' if path.nil?
|
115
126
|
|
116
127
|
request_url = options[:base_url] || @base_url
|
128
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
129
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
130
|
+
end
|
117
131
|
|
118
132
|
request_headers = @request_headers
|
119
133
|
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
@@ -130,7 +144,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
|
|
130
144
|
#
|
131
145
|
def add_telemetry
|
132
146
|
sdk_information = 'azure_mgmt_operational_insights'
|
133
|
-
sdk_information = "#{sdk_information}/0.
|
147
|
+
sdk_information = "#{sdk_information}/0.18.0"
|
134
148
|
add_user_agent_information(sdk_information)
|
135
149
|
end
|
136
150
|
end
|
@@ -0,0 +1,109 @@
|
|
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
|
+
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?
|
91
|
+
# Deserialize Response
|
92
|
+
if status_code == 200
|
93
|
+
begin
|
94
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
95
|
+
result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::OperationListResult.mapper()
|
96
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
97
|
+
rescue Exception => e
|
98
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
result
|
103
|
+
end
|
104
|
+
|
105
|
+
promise.execute
|
106
|
+
end
|
107
|
+
|
108
|
+
end
|
109
|
+
end
|
@@ -24,70 +24,68 @@ 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
|
28
|
-
# The
|
29
|
-
# @param
|
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,
|
36
|
-
response = delete_async(resource_group_name, workspace_name,
|
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
|
44
|
-
# The
|
45
|
-
# @param
|
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,
|
53
|
-
delete_async(resource_group_name, workspace_name,
|
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
|
60
|
-
# The
|
61
|
-
# @param
|
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,
|
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, '
|
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 = {}
|
77
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
80
78
|
|
81
79
|
# Set Headers
|
82
80
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
83
81
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
84
|
-
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{
|
82
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}'
|
85
83
|
|
86
84
|
request_url = @base_url || @client.base_url
|
87
85
|
|
88
86
|
options = {
|
89
87
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
90
|
-
path_params: {'
|
88
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'savedSearchId' => saved_search_id},
|
91
89
|
query_params: {'api-version' => @client.api_version},
|
92
90
|
headers: request_headers.merge(custom_headers || {}),
|
93
91
|
base_url: request_url
|
@@ -104,6 +102,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
|
|
104
102
|
end
|
105
103
|
|
106
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?
|
107
107
|
|
108
108
|
result
|
109
109
|
end
|
@@ -114,83 +114,79 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
|
|
114
114
|
#
|
115
115
|
# Creates or updates a saved search for a given workspace.
|
116
116
|
#
|
117
|
-
# @param resource_group_name [String] The
|
118
|
-
# The
|
119
|
-
# @param
|
120
|
-
# @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.
|
121
120
|
# @param parameters [SavedSearch] The parameters required to save a search.
|
122
121
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
123
122
|
# will be added to the HTTP request.
|
124
123
|
#
|
125
124
|
# @return [SavedSearch] operation results.
|
126
125
|
#
|
127
|
-
def create_or_update(resource_group_name, workspace_name,
|
128
|
-
response = create_or_update_async(resource_group_name, workspace_name,
|
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!
|
129
128
|
response.body unless response.nil?
|
130
129
|
end
|
131
130
|
|
132
131
|
#
|
133
132
|
# Creates or updates a saved search for a given workspace.
|
134
133
|
#
|
135
|
-
# @param resource_group_name [String] The
|
136
|
-
# The
|
137
|
-
# @param
|
138
|
-
# @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.
|
139
137
|
# @param parameters [SavedSearch] The parameters required to save a search.
|
140
138
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
141
139
|
# will be added to the HTTP request.
|
142
140
|
#
|
143
141
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
144
142
|
#
|
145
|
-
def create_or_update_with_http_info(resource_group_name, workspace_name,
|
146
|
-
create_or_update_async(resource_group_name, workspace_name,
|
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!
|
147
145
|
end
|
148
146
|
|
149
147
|
#
|
150
148
|
# Creates or updates a saved search for a given workspace.
|
151
149
|
#
|
152
|
-
# @param resource_group_name [String] The
|
153
|
-
# The
|
154
|
-
# @param
|
155
|
-
# @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.
|
156
153
|
# @param parameters [SavedSearch] The parameters required to save a search.
|
157
154
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
158
155
|
# to the HTTP request.
|
159
156
|
#
|
160
157
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
161
158
|
#
|
162
|
-
def create_or_update_async(resource_group_name, workspace_name,
|
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?
|
163
161
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
164
162
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
165
163
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
166
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?
|
167
165
|
fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
|
168
|
-
fail ArgumentError, '
|
169
|
-
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
166
|
+
fail ArgumentError, 'saved_search_id is nil' if saved_search_id.nil?
|
170
167
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
171
|
-
fail ArgumentError, '
|
168
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
172
169
|
|
173
170
|
|
174
171
|
request_headers = {}
|
172
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
175
173
|
|
176
174
|
# Set Headers
|
177
175
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
178
176
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
179
177
|
|
180
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
181
|
-
|
182
178
|
# Serialize Request
|
183
179
|
request_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SavedSearch.mapper()
|
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/{
|
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: {'
|
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,71 +226,69 @@ 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
|
232
|
-
# The
|
233
|
-
# @param
|
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,
|
241
|
-
response = get_async(resource_group_name, workspace_name,
|
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
|
249
|
-
# The
|
250
|
-
# @param
|
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,
|
258
|
-
get_async(resource_group_name, workspace_name,
|
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
|
265
|
-
# The
|
266
|
-
# @param
|
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,
|
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, '
|
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 = {}
|
280
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
285
281
|
|
286
282
|
# Set Headers
|
287
283
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
288
284
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
289
|
-
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{
|
285
|
+
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}'
|
290
286
|
|
291
287
|
request_url = @base_url || @client.base_url
|
292
288
|
|
293
289
|
options = {
|
294
290
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
295
|
-
path_params: {'
|
291
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'savedSearchId' => saved_search_id},
|
296
292
|
query_params: {'api-version' => @client.api_version},
|
297
293
|
headers: request_headers.merge(custom_headers || {}),
|
298
294
|
base_url: request_url
|
@@ -309,6 +305,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
|
|
309
305
|
end
|
310
306
|
|
311
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?
|
312
310
|
# Deserialize Response
|
313
311
|
if status_code == 200
|
314
312
|
begin
|
@@ -329,46 +327,43 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
|
|
329
327
|
#
|
330
328
|
# Gets the saved searches for a given Log Analytics Workspace
|
331
329
|
#
|
332
|
-
# @param resource_group_name [String] The
|
333
|
-
# The
|
334
|
-
# @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.
|
335
332
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
336
333
|
# will be added to the HTTP request.
|
337
334
|
#
|
338
335
|
# @return [SavedSearchesListResult] operation results.
|
339
336
|
#
|
340
|
-
def list_by_workspace(resource_group_name, workspace_name, custom_headers
|
341
|
-
response = list_by_workspace_async(resource_group_name, workspace_name, custom_headers).value!
|
337
|
+
def list_by_workspace(resource_group_name, workspace_name, custom_headers:nil)
|
338
|
+
response = list_by_workspace_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
|
342
339
|
response.body unless response.nil?
|
343
340
|
end
|
344
341
|
|
345
342
|
#
|
346
343
|
# Gets the saved searches for a given Log Analytics Workspace
|
347
344
|
#
|
348
|
-
# @param resource_group_name [String] The
|
349
|
-
# The
|
350
|
-
# @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.
|
351
347
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
352
348
|
# will be added to the HTTP request.
|
353
349
|
#
|
354
350
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
355
351
|
#
|
356
|
-
def list_by_workspace_with_http_info(resource_group_name, workspace_name, custom_headers
|
357
|
-
list_by_workspace_async(resource_group_name, workspace_name, custom_headers).value!
|
352
|
+
def list_by_workspace_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
|
353
|
+
list_by_workspace_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
|
358
354
|
end
|
359
355
|
|
360
356
|
#
|
361
357
|
# Gets the saved searches for a given Log Analytics Workspace
|
362
358
|
#
|
363
|
-
# @param resource_group_name [String] The
|
364
|
-
# The
|
365
|
-
# @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.
|
366
361
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
367
362
|
# to the HTTP request.
|
368
363
|
#
|
369
364
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
370
365
|
#
|
371
|
-
def list_by_workspace_async(resource_group_name, workspace_name, custom_headers
|
366
|
+
def list_by_workspace_async(resource_group_name, workspace_name, custom_headers:nil)
|
372
367
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
373
368
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
374
369
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -379,6 +374,7 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
|
|
379
374
|
|
380
375
|
|
381
376
|
request_headers = {}
|
377
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
382
378
|
|
383
379
|
# Set Headers
|
384
380
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -406,6 +402,8 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
|
|
406
402
|
end
|
407
403
|
|
408
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?
|
409
407
|
# Deserialize Response
|
410
408
|
if status_code == 200
|
411
409
|
begin
|
@@ -423,106 +421,5 @@ module Azure::OperationalInsights::Mgmt::V2015_03_20
|
|
423
421
|
promise.execute
|
424
422
|
end
|
425
423
|
|
426
|
-
#
|
427
|
-
# Gets the results from a saved search for a given workspace.
|
428
|
-
#
|
429
|
-
# @param resource_group_name [String] The name of the resource group to get.
|
430
|
-
# The name is case insensitive.
|
431
|
-
# @param workspace_name [String] Log Analytics workspace name
|
432
|
-
# @param saved_search_name [String] The name of the saved search.
|
433
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
434
|
-
# will be added to the HTTP request.
|
435
|
-
#
|
436
|
-
# @return [SearchResultsResponse] operation results.
|
437
|
-
#
|
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
|
-
response.body unless response.nil?
|
441
|
-
end
|
442
|
-
|
443
|
-
#
|
444
|
-
# Gets the results from a saved search for a given workspace.
|
445
|
-
#
|
446
|
-
# @param resource_group_name [String] The name of the resource group to get.
|
447
|
-
# The name is case insensitive.
|
448
|
-
# @param workspace_name [String] Log Analytics workspace name
|
449
|
-
# @param saved_search_name [String] The name of the saved search.
|
450
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
451
|
-
# will be added to the HTTP request.
|
452
|
-
#
|
453
|
-
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
454
|
-
#
|
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
|
-
end
|
458
|
-
|
459
|
-
#
|
460
|
-
# Gets the results from a saved search for a given workspace.
|
461
|
-
#
|
462
|
-
# @param resource_group_name [String] The name of the resource group to get.
|
463
|
-
# The name is case insensitive.
|
464
|
-
# @param workspace_name [String] Log Analytics workspace name
|
465
|
-
# @param saved_search_name [String] The name of the saved search.
|
466
|
-
# @param [Hash{String => String}] A hash of custom headers that will be added
|
467
|
-
# to the HTTP request.
|
468
|
-
#
|
469
|
-
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
470
|
-
#
|
471
|
-
def get_results_async(resource_group_name, workspace_name, saved_search_name, custom_headers = nil)
|
472
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
473
|
-
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
474
|
-
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
475
|
-
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
476
|
-
fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
|
477
|
-
fail ArgumentError, 'saved_search_name is nil' if saved_search_name.nil?
|
478
|
-
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
479
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
480
|
-
|
481
|
-
|
482
|
-
request_headers = {}
|
483
|
-
|
484
|
-
# Set Headers
|
485
|
-
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
486
|
-
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
487
|
-
path_template = 'subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}/results'
|
488
|
-
|
489
|
-
request_url = @base_url || @client.base_url
|
490
|
-
|
491
|
-
options = {
|
492
|
-
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
493
|
-
path_params: {'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'savedSearchName' => saved_search_name,'subscriptionId' => @client.subscription_id},
|
494
|
-
query_params: {'api-version' => @client.api_version},
|
495
|
-
headers: request_headers.merge(custom_headers || {}),
|
496
|
-
base_url: request_url
|
497
|
-
}
|
498
|
-
promise = @client.make_request_async(:get, path_template, options)
|
499
|
-
|
500
|
-
promise = promise.then do |result|
|
501
|
-
http_response = result.response
|
502
|
-
status_code = http_response.status
|
503
|
-
response_content = http_response.body
|
504
|
-
unless status_code == 200
|
505
|
-
error_model = JSON.load(response_content)
|
506
|
-
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
507
|
-
end
|
508
|
-
|
509
|
-
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
510
|
-
# Deserialize Response
|
511
|
-
if status_code == 200
|
512
|
-
begin
|
513
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
514
|
-
result_mapper = Azure::OperationalInsights::Mgmt::V2015_03_20::Models::SearchResultsResponse.mapper()
|
515
|
-
result.body = @client.deserialize(result_mapper, parsed_response)
|
516
|
-
rescue Exception => e
|
517
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
518
|
-
end
|
519
|
-
end
|
520
|
-
|
521
|
-
result
|
522
|
-
end
|
523
|
-
|
524
|
-
promise.execute
|
525
|
-
end
|
526
|
-
|
527
424
|
end
|
528
425
|
end
|