azure_mgmt_operational_insights 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/azure_mgmt_operational_insights.rb +8 -0
  4. data/lib/generated/azure_mgmt_operational_insights.rb +72 -0
  5. data/lib/generated/azure_mgmt_operational_insights/data_sources.rb +567 -0
  6. data/lib/generated/azure_mgmt_operational_insights/linked_services.rb +440 -0
  7. data/lib/generated/azure_mgmt_operational_insights/models/core_summary.rb +54 -0
  8. data/lib/generated/azure_mgmt_operational_insights/models/data_source.rb +108 -0
  9. data/lib/generated/azure_mgmt_operational_insights/models/data_source_filter.rb +49 -0
  10. data/lib/generated/azure_mgmt_operational_insights/models/data_source_kind.rb +29 -0
  11. data/lib/generated/azure_mgmt_operational_insights/models/data_source_list_result.rb +94 -0
  12. data/lib/generated/azure_mgmt_operational_insights/models/entity_status.rb +20 -0
  13. data/lib/generated/azure_mgmt_operational_insights/models/intelligence_pack.rb +55 -0
  14. data/lib/generated/azure_mgmt_operational_insights/models/link_target.rb +74 -0
  15. data/lib/generated/azure_mgmt_operational_insights/models/linked_service.rb +83 -0
  16. data/lib/generated/azure_mgmt_operational_insights/models/linked_service_list_result.rb +53 -0
  17. data/lib/generated/azure_mgmt_operational_insights/models/management_group.rb +119 -0
  18. data/lib/generated/azure_mgmt_operational_insights/models/metric_name.rb +54 -0
  19. data/lib/generated/azure_mgmt_operational_insights/models/proxy_resource.rb +84 -0
  20. data/lib/generated/azure_mgmt_operational_insights/models/resource.rb +94 -0
  21. data/lib/generated/azure_mgmt_operational_insights/models/saved_search.rb +121 -0
  22. data/lib/generated/azure_mgmt_operational_insights/models/saved_searches_list_result.rb +63 -0
  23. data/lib/generated/azure_mgmt_operational_insights/models/search_error.rb +54 -0
  24. data/lib/generated/azure_mgmt_operational_insights/models/search_get_schema_response.rb +63 -0
  25. data/lib/generated/azure_mgmt_operational_insights/models/search_highlight.rb +54 -0
  26. data/lib/generated/azure_mgmt_operational_insights/models/search_metadata.rb +221 -0
  27. data/lib/generated/azure_mgmt_operational_insights/models/search_metadata_schema.rb +54 -0
  28. data/lib/generated/azure_mgmt_operational_insights/models/search_parameters.rb +88 -0
  29. data/lib/generated/azure_mgmt_operational_insights/models/search_results_response.rb +84 -0
  30. data/lib/generated/azure_mgmt_operational_insights/models/search_schema_value.rb +114 -0
  31. data/lib/generated/azure_mgmt_operational_insights/models/search_sort.rb +55 -0
  32. data/lib/generated/azure_mgmt_operational_insights/models/search_sort_enum.rb +16 -0
  33. data/lib/generated/azure_mgmt_operational_insights/models/shared_keys.rb +54 -0
  34. data/lib/generated/azure_mgmt_operational_insights/models/sku.rb +45 -0
  35. data/lib/generated/azure_mgmt_operational_insights/models/sku_name_enum.rb +20 -0
  36. data/lib/generated/azure_mgmt_operational_insights/models/storage_account.rb +55 -0
  37. data/lib/generated/azure_mgmt_operational_insights/models/storage_insight.rb +141 -0
  38. data/lib/generated/azure_mgmt_operational_insights/models/storage_insight_list_result.rb +95 -0
  39. data/lib/generated/azure_mgmt_operational_insights/models/storage_insight_state.rb +16 -0
  40. data/lib/generated/azure_mgmt_operational_insights/models/storage_insight_status.rb +55 -0
  41. data/lib/generated/azure_mgmt_operational_insights/models/tag.rb +54 -0
  42. data/lib/generated/azure_mgmt_operational_insights/models/usage_metric.rb +96 -0
  43. data/lib/generated/azure_mgmt_operational_insights/models/workspace.rb +165 -0
  44. data/lib/generated/azure_mgmt_operational_insights/models/workspace_list_management_groups_result.rb +53 -0
  45. data/lib/generated/azure_mgmt_operational_insights/models/workspace_list_result.rb +52 -0
  46. data/lib/generated/azure_mgmt_operational_insights/models/workspace_list_usages_result.rb +53 -0
  47. data/lib/generated/azure_mgmt_operational_insights/module_definition.rb +8 -0
  48. data/lib/generated/azure_mgmt_operational_insights/operational_insights_management_client.rb +143 -0
  49. data/lib/generated/azure_mgmt_operational_insights/saved_searches.rb +513 -0
  50. data/lib/generated/azure_mgmt_operational_insights/storage_insights.rb +560 -0
  51. data/lib/generated/azure_mgmt_operational_insights/version.rb +8 -0
  52. data/lib/generated/azure_mgmt_operational_insights/workspaces.rb +1569 -0
  53. metadata +164 -0
@@ -0,0 +1,96 @@
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::ARM::OperationalInsights
7
+ module Models
8
+ #
9
+ # A metric describing the usage of a resource.
10
+ #
11
+ class UsageMetric
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [MetricName] The name of the metric.
16
+ attr_accessor :name
17
+
18
+ # @return [String] The units used for the metric.
19
+ attr_accessor :unit
20
+
21
+ # @return [Float] The current value of the metric.
22
+ attr_accessor :current_value
23
+
24
+ # @return [Float] The quota limit for the metric.
25
+ attr_accessor :limit
26
+
27
+ # @return [DateTime] The time that the metric's value will reset.
28
+ attr_accessor :next_reset_time
29
+
30
+ # @return [String] The quota period that determines the length of time
31
+ # between value resets.
32
+ attr_accessor :quota_period
33
+
34
+
35
+ #
36
+ # Mapper for UsageMetric class as Ruby Hash.
37
+ # This will be used for serialization/deserialization.
38
+ #
39
+ def self.mapper()
40
+ {
41
+ required: false,
42
+ serialized_name: 'UsageMetric',
43
+ type: {
44
+ name: 'Composite',
45
+ class_name: 'UsageMetric',
46
+ model_properties: {
47
+ name: {
48
+ required: false,
49
+ serialized_name: 'name',
50
+ type: {
51
+ name: 'Composite',
52
+ class_name: 'MetricName'
53
+ }
54
+ },
55
+ unit: {
56
+ required: false,
57
+ serialized_name: 'unit',
58
+ type: {
59
+ name: 'String'
60
+ }
61
+ },
62
+ current_value: {
63
+ required: false,
64
+ serialized_name: 'currentValue',
65
+ type: {
66
+ name: 'Double'
67
+ }
68
+ },
69
+ limit: {
70
+ required: false,
71
+ serialized_name: 'limit',
72
+ type: {
73
+ name: 'Double'
74
+ }
75
+ },
76
+ next_reset_time: {
77
+ required: false,
78
+ serialized_name: 'nextResetTime',
79
+ type: {
80
+ name: 'DateTime'
81
+ }
82
+ },
83
+ quota_period: {
84
+ required: false,
85
+ serialized_name: 'quotaPeriod',
86
+ type: {
87
+ name: 'String'
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ end
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,165 @@
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::ARM::OperationalInsights
7
+ module Models
8
+ #
9
+ # The top level Workspace resource container.
10
+ #
11
+ class Workspace < Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [EntityStatus] The provisioning state of the workspace.
16
+ # Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled',
17
+ # 'Deleting', 'ProvisioningAccount'
18
+ attr_accessor :provisioning_state
19
+
20
+ # @return [String] The source of the workspace. Source defines where the
21
+ # workspace was created. 'Azure' implies it was created in Azure.
22
+ # 'External' implies it was created via the Operational Insights Portal.
23
+ # This value is set on the service side and read-only on the client side.
24
+ attr_accessor :source
25
+
26
+ # @return [String] The ID associated with the workspace. Setting this
27
+ # value at creation time allows the workspace being created to be linked
28
+ # to an existing workspace.
29
+ attr_accessor :customer_id
30
+
31
+ # @return [String] The URL of the Operational Insights portal for this
32
+ # workspace. This value is set on the service side and read-only on the
33
+ # client side.
34
+ attr_accessor :portal_url
35
+
36
+ # @return [Sku] The SKU of the workspace.
37
+ attr_accessor :sku
38
+
39
+ # @return [Integer] The workspace data retention in days. -1 means
40
+ # Unlimited retention for the Unlimited Sku. 730 days is the maximum
41
+ # allowed for all other Skus.
42
+ attr_accessor :retention_in_days
43
+
44
+ # @return [String] The ETag of the workspace.
45
+ attr_accessor :e_tag
46
+
47
+
48
+ #
49
+ # Mapper for Workspace class as Ruby Hash.
50
+ # This will be used for serialization/deserialization.
51
+ #
52
+ def self.mapper()
53
+ {
54
+ required: false,
55
+ serialized_name: 'Workspace',
56
+ type: {
57
+ name: 'Composite',
58
+ class_name: 'Workspace',
59
+ model_properties: {
60
+ id: {
61
+ required: false,
62
+ read_only: true,
63
+ serialized_name: 'id',
64
+ type: {
65
+ name: 'String'
66
+ }
67
+ },
68
+ name: {
69
+ required: false,
70
+ read_only: true,
71
+ serialized_name: 'name',
72
+ type: {
73
+ name: 'String'
74
+ }
75
+ },
76
+ type: {
77
+ required: false,
78
+ read_only: true,
79
+ serialized_name: 'type',
80
+ type: {
81
+ name: 'String'
82
+ }
83
+ },
84
+ location: {
85
+ required: true,
86
+ serialized_name: 'location',
87
+ type: {
88
+ name: 'String'
89
+ }
90
+ },
91
+ tags: {
92
+ required: false,
93
+ serialized_name: 'tags',
94
+ type: {
95
+ name: 'Dictionary',
96
+ value: {
97
+ required: false,
98
+ serialized_name: 'StringElementType',
99
+ type: {
100
+ name: 'String'
101
+ }
102
+ }
103
+ }
104
+ },
105
+ provisioning_state: {
106
+ required: false,
107
+ serialized_name: 'properties.provisioningState',
108
+ type: {
109
+ name: 'String'
110
+ }
111
+ },
112
+ source: {
113
+ required: false,
114
+ serialized_name: 'properties.source',
115
+ type: {
116
+ name: 'String'
117
+ }
118
+ },
119
+ customer_id: {
120
+ required: false,
121
+ serialized_name: 'properties.customerId',
122
+ type: {
123
+ name: 'String'
124
+ }
125
+ },
126
+ portal_url: {
127
+ required: false,
128
+ serialized_name: 'properties.portalUrl',
129
+ type: {
130
+ name: 'String'
131
+ }
132
+ },
133
+ sku: {
134
+ required: false,
135
+ serialized_name: 'properties.sku',
136
+ type: {
137
+ name: 'Composite',
138
+ class_name: 'Sku'
139
+ }
140
+ },
141
+ retention_in_days: {
142
+ required: false,
143
+ serialized_name: 'properties.retentionInDays',
144
+ constraints: {
145
+ InclusiveMaximum: 730,
146
+ InclusiveMinimum: -1
147
+ },
148
+ type: {
149
+ name: 'Number'
150
+ }
151
+ },
152
+ e_tag: {
153
+ required: false,
154
+ serialized_name: 'eTag',
155
+ type: {
156
+ name: 'String'
157
+ }
158
+ }
159
+ }
160
+ }
161
+ }
162
+ end
163
+ end
164
+ end
165
+ end
@@ -0,0 +1,53 @@
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::ARM::OperationalInsights
7
+ module Models
8
+ #
9
+ # The list workspace managmement groups operation response.
10
+ #
11
+ class WorkspaceListManagementGroupsResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<ManagementGroup>] Gets or sets a list of management
16
+ # groups attached to the workspace.
17
+ attr_accessor :value
18
+
19
+
20
+ #
21
+ # Mapper for WorkspaceListManagementGroupsResult class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ required: false,
27
+ serialized_name: 'WorkspaceListManagementGroupsResult',
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'WorkspaceListManagementGroupsResult',
31
+ model_properties: {
32
+ value: {
33
+ required: false,
34
+ serialized_name: 'value',
35
+ type: {
36
+ name: 'Sequence',
37
+ element: {
38
+ required: false,
39
+ serialized_name: 'ManagementGroupElementType',
40
+ type: {
41
+ name: 'Composite',
42
+ class_name: 'ManagementGroup'
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,52 @@
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::ARM::OperationalInsights
7
+ module Models
8
+ #
9
+ # The list workspaces operation response.
10
+ #
11
+ class WorkspaceListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<Workspace>] A list of workspaces.
16
+ attr_accessor :value
17
+
18
+
19
+ #
20
+ # Mapper for WorkspaceListResult class as Ruby Hash.
21
+ # This will be used for serialization/deserialization.
22
+ #
23
+ def self.mapper()
24
+ {
25
+ required: false,
26
+ serialized_name: 'WorkspaceListResult',
27
+ type: {
28
+ name: 'Composite',
29
+ class_name: 'WorkspaceListResult',
30
+ model_properties: {
31
+ value: {
32
+ required: false,
33
+ serialized_name: 'value',
34
+ type: {
35
+ name: 'Sequence',
36
+ element: {
37
+ required: false,
38
+ serialized_name: 'WorkspaceElementType',
39
+ type: {
40
+ name: 'Composite',
41
+ class_name: 'Workspace'
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,53 @@
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::ARM::OperationalInsights
7
+ module Models
8
+ #
9
+ # The list workspace usages operation response.
10
+ #
11
+ class WorkspaceListUsagesResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<UsageMetric>] Gets or sets a list of usage metrics for a
16
+ # workspace.
17
+ attr_accessor :value
18
+
19
+
20
+ #
21
+ # Mapper for WorkspaceListUsagesResult class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ required: false,
27
+ serialized_name: 'WorkspaceListUsagesResult',
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'WorkspaceListUsagesResult',
31
+ model_properties: {
32
+ value: {
33
+ required: false,
34
+ serialized_name: 'value',
35
+ type: {
36
+ name: 'Sequence',
37
+ element: {
38
+ required: false,
39
+ serialized_name: 'UsageMetricElementType',
40
+ type: {
41
+ name: 'Composite',
42
+ class_name: 'UsageMetric'
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,8 @@
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 end
7
+ module Azure::ARM end
8
+ module Azure::ARM::OperationalInsights end
@@ -0,0 +1,143 @@
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::ARM::OperationalInsights
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class OperationalInsightsManagementClient < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] Gets subscription credentials which uniquely identify
21
+ # Microsoft Azure subscription. The subscription ID forms part of the URI
22
+ # for every service call.
23
+ attr_accessor :subscription_id
24
+
25
+ # @return [String] Gets or sets the preferred language for the response.
26
+ attr_accessor :accept_language
27
+
28
+ # @return [Integer] Gets or sets the retry timeout in seconds for Long
29
+ # Running Operations. Default value is 30.
30
+ attr_accessor :long_running_operation_retry_timeout
31
+
32
+ # @return [Boolean] When set to true a unique x-ms-client-request-id value
33
+ # is generated and included in each request. Default is true.
34
+ attr_accessor :generate_client_request_id
35
+
36
+ # @return [LinkedServices] linked_services
37
+ attr_reader :linked_services
38
+
39
+ # @return [DataSources] data_sources
40
+ attr_reader :data_sources
41
+
42
+ # @return [Workspaces] workspaces
43
+ attr_reader :workspaces
44
+
45
+ # @return [StorageInsights] storage_insights
46
+ attr_reader :storage_insights
47
+
48
+ # @return [SavedSearches] saved_searches
49
+ attr_reader :saved_searches
50
+
51
+ #
52
+ # Creates initializes a new instance of the OperationalInsightsManagementClient class.
53
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
54
+ # @param base_url [String] the base URI of the service.
55
+ # @param options [Array] filters to be applied to the HTTP requests.
56
+ #
57
+ def initialize(credentials = nil, base_url = nil, options = nil)
58
+ super(credentials, options)
59
+ @base_url = base_url || 'https://management.azure.com'
60
+
61
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
62
+ @credentials = credentials
63
+
64
+ @linked_services = LinkedServices.new(self)
65
+ @data_sources = DataSources.new(self)
66
+ @workspaces = Workspaces.new(self)
67
+ @storage_insights = StorageInsights.new(self)
68
+ @saved_searches = SavedSearches.new(self)
69
+ @accept_language = 'en-US'
70
+ @long_running_operation_retry_timeout = 30
71
+ @generate_client_request_id = true
72
+ add_telemetry
73
+ end
74
+
75
+ #
76
+ # Makes a request and returns the body of the response.
77
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
78
+ # @param path [String] the path, relative to {base_url}.
79
+ # @param options [Hash{String=>String}] specifying any request options like :body.
80
+ # @return [Hash{String=>String}] containing the body of the response.
81
+ # Example:
82
+ #
83
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
84
+ # path = "/path"
85
+ # options = {
86
+ # body: request_content,
87
+ # query_params: {'api-version' => '2016-02-01'}
88
+ # }
89
+ # result = @client.make_request(:put, path, options)
90
+ #
91
+ def make_request(method, path, options = {})
92
+ result = make_request_with_http_info(method, path, options)
93
+ result.body unless result.nil?
94
+ end
95
+
96
+ #
97
+ # Makes a request and returns the operation response.
98
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
99
+ # @param path [String] the path, relative to {base_url}.
100
+ # @param options [Hash{String=>String}] specifying any request options like :body.
101
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
102
+ #
103
+ def make_request_with_http_info(method, path, options = {})
104
+ result = make_request_async(method, path, options).value!
105
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
106
+ result
107
+ end
108
+
109
+ #
110
+ # Makes a request asynchronously.
111
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
112
+ # @param path [String] the path, relative to {base_url}.
113
+ # @param options [Hash{String=>String}] specifying any request options like :body.
114
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
115
+ #
116
+ def make_request_async(method, path, options = {})
117
+ fail ArgumentError, 'method is nil' if method.nil?
118
+ fail ArgumentError, 'path is nil' if path.nil?
119
+
120
+ request_url = options[:base_url] || @base_url
121
+
122
+ request_headers = @request_headers
123
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
124
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
125
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
126
+
127
+ super(request_url, method, path, options)
128
+ end
129
+
130
+
131
+ private
132
+ #
133
+ # Adds telemetry information.
134
+ #
135
+ def add_telemetry
136
+ sdk_information = 'azure_mgmt_operational_insights'
137
+ if defined? Azure::ARM::OperationalInsights::VERSION
138
+ sdk_information = "#{sdk_information}/#{Azure::ARM::OperationalInsights::VERSION}"
139
+ end
140
+ add_user_agent_information(sdk_information)
141
+ end
142
+ end
143
+ end