azure_mgmt_operational_insights 0.15.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-03-20/generated/azure_mgmt_operational_insights.rb +6 -2
  3. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/core_summary.rb +2 -2
  4. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
  5. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_display.rb +68 -0
  6. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +56 -0
  7. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_search.rb +32 -8
  8. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +1 -1
  9. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb +1 -1
  10. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_metadata.rb +8 -8
  11. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/search_results_response.rb +1 -1
  12. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/models/tag.rb +2 -2
  13. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +8 -1
  14. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/operations.rb +107 -0
  15. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/saved_searches.rb +30 -27
  16. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/storage_insights.rb +33 -30
  17. data/lib/2015-03-20/generated/azure_mgmt_operational_insights/workspaces.rb +28 -26
  18. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights.rb +6 -2
  19. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/data_sources.rb +35 -32
  20. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/linked_services.rb +26 -24
  21. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb +11 -0
  22. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation.rb +59 -0
  23. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_display.rb +68 -0
  24. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/operation_list_result.rb +101 -0
  25. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/resource.rb +1 -1
  26. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/models/workspace.rb +1 -1
  27. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/{azure_log_analytics.rb → operational_insights_management_client.rb} +10 -3
  28. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/operations.rb +215 -0
  29. data/lib/2015-11-01-preview/generated/azure_mgmt_operational_insights/workspaces.rb +178 -63
  30. data/lib/profiles/latest/modules/operationalinsights_profile_module.rb +176 -140
  31. data/lib/profiles/latest/operationalinsights_latest_profile_client.rb +28 -9
  32. data/lib/profiles/latest/operationalinsights_module_definition.rb +0 -1
  33. data/lib/version.rb +1 -1
  34. metadata +12 -4
@@ -19,6 +19,9 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
19
19
  # @return [Boolean] The enabled boolean for the intelligence pack.
20
20
  attr_accessor :enabled
21
21
 
22
+ # @return [String] The display name of the intelligence pack.
23
+ attr_accessor :display_name
24
+
22
25
 
23
26
  #
24
27
  # Mapper for IntelligencePack class as Ruby Hash.
@@ -48,6 +51,14 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
48
51
  type: {
49
52
  name: 'Boolean'
50
53
  }
54
+ },
55
+ display_name: {
56
+ client_side_validation: true,
57
+ required: false,
58
+ serialized_name: 'displayName',
59
+ type: {
60
+ name: 'String'
61
+ }
51
62
  }
52
63
  }
53
64
  }
@@ -0,0 +1,59 @@
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_11_01_preview
7
+ module Models
8
+ #
9
+ # Supported operation of OperationalInsights resource provider.
10
+ #
11
+ class Operation
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Operation name: {provider}/{resource}/{operation}
16
+ attr_accessor :name
17
+
18
+ # @return [OperationDisplay] Display metadata associated with the
19
+ # operation.
20
+ attr_accessor :display
21
+
22
+
23
+ #
24
+ # Mapper for Operation class as Ruby Hash.
25
+ # This will be used for serialization/deserialization.
26
+ #
27
+ def self.mapper()
28
+ {
29
+ client_side_validation: true,
30
+ required: false,
31
+ serialized_name: 'Operation',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'Operation',
35
+ model_properties: {
36
+ name: {
37
+ client_side_validation: true,
38
+ required: false,
39
+ serialized_name: 'name',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ display: {
45
+ client_side_validation: true,
46
+ required: false,
47
+ serialized_name: 'display',
48
+ type: {
49
+ name: 'Composite',
50
+ class_name: 'OperationDisplay'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,68 @@
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_11_01_preview
7
+ module Models
8
+ #
9
+ # Display metadata associated with the operation.
10
+ #
11
+ class OperationDisplay
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Service provider: Microsoft OperationsManagement.
16
+ attr_accessor :provider
17
+
18
+ # @return [String] Resource on which the operation is performed etc.
19
+ attr_accessor :resource
20
+
21
+ # @return [String] Type of operation: get, read, delete, etc.
22
+ attr_accessor :operation
23
+
24
+
25
+ #
26
+ # Mapper for OperationDisplay class as Ruby Hash.
27
+ # This will be used for serialization/deserialization.
28
+ #
29
+ def self.mapper()
30
+ {
31
+ client_side_validation: true,
32
+ required: false,
33
+ serialized_name: 'Operation_display',
34
+ type: {
35
+ name: 'Composite',
36
+ class_name: 'OperationDisplay',
37
+ model_properties: {
38
+ provider: {
39
+ client_side_validation: true,
40
+ required: false,
41
+ serialized_name: 'provider',
42
+ type: {
43
+ name: 'String'
44
+ }
45
+ },
46
+ resource: {
47
+ client_side_validation: true,
48
+ required: false,
49
+ serialized_name: 'resource',
50
+ type: {
51
+ name: 'String'
52
+ }
53
+ },
54
+ operation: {
55
+ client_side_validation: true,
56
+ required: false,
57
+ serialized_name: 'operation',
58
+ type: {
59
+ name: 'String'
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,101 @@
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_11_01_preview
7
+ module Models
8
+ #
9
+ # Result of the request to list solution operations.
10
+ #
11
+ class OperationListResult
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [Array<Operation>] List of solution operations supported by the
17
+ # OperationsManagement resource provider.
18
+ attr_accessor :value
19
+
20
+ # @return [String] URL to get the next set of operation list results if
21
+ # there are any.
22
+ attr_accessor :next_link
23
+
24
+ # return [Proc] with next page method call.
25
+ attr_accessor :next_method
26
+
27
+ #
28
+ # Gets the rest of the items for the request, enabling auto-pagination.
29
+ #
30
+ # @return [Array<Operation>] operation results.
31
+ #
32
+ def get_all_items
33
+ items = @value
34
+ page = self
35
+ while page.next_link != nil do
36
+ page = page.get_next_page
37
+ items.concat(page.value)
38
+ end
39
+ items
40
+ end
41
+
42
+ #
43
+ # Gets the next page of results.
44
+ #
45
+ # @return [OperationListResult] with next page content.
46
+ #
47
+ def get_next_page
48
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
49
+ unless response.nil?
50
+ @next_link = response.body.next_link
51
+ @value = response.body.value
52
+ self
53
+ end
54
+ end
55
+
56
+ #
57
+ # Mapper for OperationListResult class as Ruby Hash.
58
+ # This will be used for serialization/deserialization.
59
+ #
60
+ def self.mapper()
61
+ {
62
+ client_side_validation: true,
63
+ required: false,
64
+ serialized_name: 'OperationListResult',
65
+ type: {
66
+ name: 'Composite',
67
+ class_name: 'OperationListResult',
68
+ model_properties: {
69
+ value: {
70
+ client_side_validation: true,
71
+ required: false,
72
+ serialized_name: 'value',
73
+ type: {
74
+ name: 'Sequence',
75
+ element: {
76
+ client_side_validation: true,
77
+ required: false,
78
+ serialized_name: 'OperationElementType',
79
+ type: {
80
+ name: 'Composite',
81
+ class_name: 'Operation'
82
+ }
83
+ }
84
+ }
85
+ },
86
+ next_link: {
87
+ client_side_validation: true,
88
+ required: false,
89
+ read_only: true,
90
+ serialized_name: 'nextLink',
91
+ type: {
92
+ name: 'String'
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ end
99
+ end
100
+ end
101
+ end
@@ -70,7 +70,7 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
70
70
  },
71
71
  location: {
72
72
  client_side_validation: true,
73
- required: true,
73
+ required: false,
74
74
  serialized_name: 'location',
75
75
  type: {
76
76
  name: 'String'
@@ -87,7 +87,7 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
87
87
  },
88
88
  location: {
89
89
  client_side_validation: true,
90
- required: true,
90
+ required: false,
91
91
  serialized_name: 'location',
92
92
  type: {
93
93
  name: 'String'
@@ -7,7 +7,7 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
7
7
  #
8
8
  # A service client - single point of access to the REST API.
9
9
  #
10
- class AzureLogAnalytics < MsRestAzure::AzureServiceClient
10
+ class OperationalInsightsManagementClient < MsRestAzure::AzureServiceClient
11
11
  include MsRestAzure
12
12
  include MsRestAzure::Serialization
13
13
 
@@ -45,8 +45,11 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
45
45
  # @return [Workspaces] workspaces
46
46
  attr_reader :workspaces
47
47
 
48
+ # @return [Operations] operations
49
+ attr_reader :operations
50
+
48
51
  #
49
- # Creates initializes a new instance of the AzureLogAnalytics class.
52
+ # Creates initializes a new instance of the OperationalInsightsManagementClient class.
50
53
  # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
51
54
  # @param base_url [String] the base URI of the service.
52
55
  # @param options [Array] filters to be applied to the HTTP requests.
@@ -61,6 +64,7 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
61
64
  @linked_services = LinkedServices.new(self)
62
65
  @data_sources = DataSources.new(self)
63
66
  @workspaces = Workspaces.new(self)
67
+ @operations = Operations.new(self)
64
68
  @api_version = '2015-11-01-preview'
65
69
  @accept_language = 'en-US'
66
70
  @long_running_operation_retry_timeout = 30
@@ -114,6 +118,9 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
114
118
  fail ArgumentError, 'path is nil' if path.nil?
115
119
 
116
120
  request_url = options[:base_url] || @base_url
121
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
122
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
123
+ end
117
124
 
118
125
  request_headers = @request_headers
119
126
  request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
@@ -130,7 +137,7 @@ module Azure::OperationalInsights::Mgmt::V2015_11_01_preview
130
137
  #
131
138
  def add_telemetry
132
139
  sdk_information = 'azure_mgmt_operational_insights'
133
- sdk_information = "#{sdk_information}/0.15.2"
140
+ sdk_information = "#{sdk_information}/0.16.0"
134
141
  add_user_agent_information(sdk_information)
135
142
  end
136
143
  end
@@ -0,0 +1,215 @@
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_11_01_preview
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 [Array<Operation>] operation results.
31
+ #
32
+ def list(custom_headers:nil)
33
+ first_page = list_as_lazy(custom_headers:custom_headers)
34
+ first_page.get_all_items
35
+ end
36
+
37
+ #
38
+ # Lists all of the available OperationalInsights Rest API operations.
39
+ #
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
+ #
45
+ def list_with_http_info(custom_headers:nil)
46
+ list_async(custom_headers:custom_headers).value!
47
+ end
48
+
49
+ #
50
+ # Lists all of the available OperationalInsights Rest API operations.
51
+ #
52
+ # @param [Hash{String => String}] A hash of custom headers that will be added
53
+ # to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
+ #
57
+ def list_async(custom_headers:nil)
58
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
59
+
60
+
61
+ request_headers = {}
62
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
63
+
64
+ # Set Headers
65
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
66
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
67
+ path_template = 'providers/Microsoft.OperationalInsights/operations'
68
+
69
+ request_url = @base_url || @client.base_url
70
+
71
+ options = {
72
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
73
+ query_params: {'api-version' => @client.api_version},
74
+ headers: request_headers.merge(custom_headers || {}),
75
+ base_url: request_url
76
+ }
77
+ promise = @client.make_request_async(:get, path_template, options)
78
+
79
+ promise = promise.then do |result|
80
+ http_response = result.response
81
+ status_code = http_response.status
82
+ response_content = http_response.body
83
+ unless status_code == 200
84
+ error_model = JSON.load(response_content)
85
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
86
+ end
87
+
88
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ # Deserialize Response
90
+ if status_code == 200
91
+ begin
92
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
93
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::OperationListResult.mapper()
94
+ result.body = @client.deserialize(result_mapper, parsed_response)
95
+ rescue Exception => e
96
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
97
+ end
98
+ end
99
+
100
+ result
101
+ end
102
+
103
+ promise.execute
104
+ end
105
+
106
+ #
107
+ # Lists all of the available OperationalInsights Rest API operations.
108
+ #
109
+ # @param next_page_link [String] The NextLink from the previous successful call
110
+ # to List operation.
111
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
112
+ # will be added to the HTTP request.
113
+ #
114
+ # @return [OperationListResult] operation results.
115
+ #
116
+ def list_next(next_page_link, custom_headers:nil)
117
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
118
+ response.body unless response.nil?
119
+ end
120
+
121
+ #
122
+ # Lists all of the available OperationalInsights Rest API operations.
123
+ #
124
+ # @param next_page_link [String] The NextLink from the previous successful call
125
+ # to List operation.
126
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
127
+ # will be added to the HTTP request.
128
+ #
129
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
130
+ #
131
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
132
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
133
+ end
134
+
135
+ #
136
+ # Lists all of the available OperationalInsights Rest API operations.
137
+ #
138
+ # @param next_page_link [String] The NextLink from the previous successful call
139
+ # to List operation.
140
+ # @param [Hash{String => String}] A hash of custom headers that will be added
141
+ # to the HTTP request.
142
+ #
143
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
144
+ #
145
+ def list_next_async(next_page_link, custom_headers:nil)
146
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
147
+
148
+
149
+ request_headers = {}
150
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
151
+
152
+ # Set Headers
153
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
154
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
155
+ path_template = '{nextLink}'
156
+
157
+ request_url = @base_url || @client.base_url
158
+
159
+ options = {
160
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
161
+ skip_encoding_path_params: {'nextLink' => next_page_link},
162
+ headers: request_headers.merge(custom_headers || {}),
163
+ base_url: request_url
164
+ }
165
+ promise = @client.make_request_async(:get, path_template, options)
166
+
167
+ promise = promise.then do |result|
168
+ http_response = result.response
169
+ status_code = http_response.status
170
+ response_content = http_response.body
171
+ unless status_code == 200
172
+ error_model = JSON.load(response_content)
173
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
174
+ end
175
+
176
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
177
+ # Deserialize Response
178
+ if status_code == 200
179
+ begin
180
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
181
+ result_mapper = Azure::OperationalInsights::Mgmt::V2015_11_01_preview::Models::OperationListResult.mapper()
182
+ result.body = @client.deserialize(result_mapper, parsed_response)
183
+ rescue Exception => e
184
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
185
+ end
186
+ end
187
+
188
+ result
189
+ end
190
+
191
+ promise.execute
192
+ end
193
+
194
+ #
195
+ # Lists all of the available OperationalInsights Rest API operations.
196
+ #
197
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
198
+ # will be added to the HTTP request.
199
+ #
200
+ # @return [OperationListResult] which provide lazy access to pages of the
201
+ # response.
202
+ #
203
+ def list_as_lazy(custom_headers:nil)
204
+ response = list_async(custom_headers:custom_headers).value!
205
+ unless response.nil?
206
+ page = response.body
207
+ page.next_method = Proc.new do |next_page_link|
208
+ list_next_async(next_page_link, custom_headers:custom_headers)
209
+ end
210
+ page
211
+ end
212
+ end
213
+
214
+ end
215
+ end