azure_mgmt_insights 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_insights.rb +19 -19
  3. data/lib/generated/azure_mgmt_insights/alert_rule_incidents.rb +91 -0
  4. data/lib/generated/azure_mgmt_insights/alert_rules.rb +9 -3
  5. data/lib/generated/azure_mgmt_insights/insights_management_client.rb +8 -13
  6. data/lib/generated/azure_mgmt_insights/log_profiles.rb +10 -10
  7. data/lib/generated/azure_mgmt_insights/models/alert_rule_resource.rb +3 -2
  8. data/lib/generated/azure_mgmt_insights/models/autoscale_notification.rb +2 -2
  9. data/lib/generated/azure_mgmt_insights/models/autoscale_setting_resource.rb +2 -1
  10. data/lib/generated/azure_mgmt_insights/models/email_notification.rb +3 -2
  11. data/lib/generated/azure_mgmt_insights/models/location_threshold_rule_condition.rb +3 -2
  12. data/lib/generated/azure_mgmt_insights/models/log_profile_collection.rb +1 -1
  13. data/lib/generated/azure_mgmt_insights/models/{log_profile_create_or_update_parameters.rb → log_profile_properties.rb} +26 -17
  14. data/lib/generated/azure_mgmt_insights/models/log_profile_resource.rb +16 -7
  15. data/lib/generated/azure_mgmt_insights/models/log_settings.rb +4 -1
  16. data/lib/generated/azure_mgmt_insights/models/management_event_aggregation_condition.rb +2 -2
  17. data/lib/generated/azure_mgmt_insights/models/management_event_rule_condition.rb +7 -4
  18. data/lib/generated/azure_mgmt_insights/models/metric_trigger.rb +8 -8
  19. data/lib/generated/azure_mgmt_insights/models/recurrence.rb +2 -2
  20. data/lib/generated/azure_mgmt_insights/models/recurrent_schedule.rb +43 -6
  21. data/lib/generated/azure_mgmt_insights/models/retention_policy.rb +2 -1
  22. data/lib/generated/azure_mgmt_insights/models/rule_email_action.rb +5 -4
  23. data/lib/generated/azure_mgmt_insights/models/rule_management_event_data_source.rb +3 -2
  24. data/lib/generated/azure_mgmt_insights/models/rule_metric_data_source.rb +3 -2
  25. data/lib/generated/azure_mgmt_insights/models/rule_webhook_action.rb +6 -4
  26. data/lib/generated/azure_mgmt_insights/models/scale_action.rb +6 -6
  27. data/lib/generated/azure_mgmt_insights/models/scale_capacity.rb +2 -1
  28. data/lib/generated/azure_mgmt_insights/models/scale_rule.rb +1 -2
  29. data/lib/generated/azure_mgmt_insights/models/scale_type.rb +17 -0
  30. data/lib/generated/azure_mgmt_insights/models/{service_diagnostic_settings_create_or_update_parameters.rb → service_diagnostic_settings.rb} +22 -16
  31. data/lib/generated/azure_mgmt_insights/models/service_diagnostic_settings_resource.rb +12 -5
  32. data/lib/generated/azure_mgmt_insights/models/threshold_rule_condition.rb +4 -3
  33. data/lib/generated/azure_mgmt_insights/models/time_window.rb +1 -2
  34. data/lib/generated/azure_mgmt_insights/models/webhook_notification.rb +3 -2
  35. data/lib/generated/azure_mgmt_insights/service_diagnostic_settings_operations.rb +7 -7
  36. data/lib/generated/azure_mgmt_insights/version.rb +1 -1
  37. metadata +7 -7
  38. data/lib/generated/azure_mgmt_insights/incidents.rb +0 -117
@@ -0,0 +1,17 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Insights
7
+ module Models
8
+ #
9
+ # Defines values for ScaleType
10
+ #
11
+ module ScaleType
12
+ ChangeCount = "ChangeCount"
13
+ PercentChangeCount = "PercentChangeCount"
14
+ ExactCount = "ExactCount"
15
+ end
16
+ end
17
+ end
@@ -6,58 +6,64 @@
6
6
  module Azure::ARM::Insights
7
7
  module Models
8
8
  #
9
- # Parameters supplied to the Create or Update service configuration.
9
+ # The diagnostic settings for service.
10
10
  #
11
- class ServiceDiagnosticSettingsCreateOrUpdateParameters
11
+ class ServiceDiagnosticSettings
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [String] the resource id of the storage account.
15
+ # @return [String] The resource ID of the storage account to which you
16
+ # would like to send Diagnostic Logs.
16
17
  attr_accessor :storage_account_id
17
18
 
18
- # @return [String] the id of the service bus rule.
19
+ # @return [String] The service bus rule ID of the service bus namespace
20
+ # in which you would like to have Event Hubs created for streaming
21
+ # Diagnostic Logs. The rule ID is of the format: '{service bus resource
22
+ # ID}/authorizationrules/{key name}'.
19
23
  attr_accessor :service_bus_rule_id
20
24
 
21
- # @return [Array<MetricSettings>] the list of metrics.
25
+ # @return [Array<MetricSettings>] the list of metric settings.
22
26
  attr_accessor :metrics
23
27
 
24
- # @return [Array<LogSettings>] the list of logs.
28
+ # @return [Array<LogSettings>] the list of logs settings.
25
29
  attr_accessor :logs
26
30
 
27
- # @return [String] the OMS workspace Id.
31
+ # @return [String] The workspace ID (resource ID of a Log Analytics
32
+ # workspace) for a Log Analytics workspace to which you would like to
33
+ # send Diagnostic Logs. Example:
34
+ # /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
28
35
  attr_accessor :workspace_id
29
36
 
30
37
 
31
38
  #
32
- # Mapper for ServiceDiagnosticSettingsCreateOrUpdateParameters class as
33
- # Ruby Hash.
39
+ # Mapper for ServiceDiagnosticSettings class as Ruby Hash.
34
40
  # This will be used for serialization/deserialization.
35
41
  #
36
42
  def self.mapper()
37
43
  {
38
44
  required: false,
39
- serialized_name: 'ServiceDiagnosticSettingsCreateOrUpdateParameters',
45
+ serialized_name: 'ServiceDiagnosticSettings',
40
46
  type: {
41
47
  name: 'Composite',
42
- class_name: 'ServiceDiagnosticSettingsCreateOrUpdateParameters',
48
+ class_name: 'ServiceDiagnosticSettings',
43
49
  model_properties: {
44
50
  storage_account_id: {
45
51
  required: false,
46
- serialized_name: 'properties.storageAccountId',
52
+ serialized_name: 'storageAccountId',
47
53
  type: {
48
54
  name: 'String'
49
55
  }
50
56
  },
51
57
  service_bus_rule_id: {
52
58
  required: false,
53
- serialized_name: 'properties.serviceBusRuleId',
59
+ serialized_name: 'serviceBusRuleId',
54
60
  type: {
55
61
  name: 'String'
56
62
  }
57
63
  },
58
64
  metrics: {
59
65
  required: false,
60
- serialized_name: 'properties.metrics',
66
+ serialized_name: 'metrics',
61
67
  type: {
62
68
  name: 'Sequence',
63
69
  element: {
@@ -72,7 +78,7 @@ module Azure::ARM::Insights
72
78
  },
73
79
  logs: {
74
80
  required: false,
75
- serialized_name: 'properties.logs',
81
+ serialized_name: 'logs',
76
82
  type: {
77
83
  name: 'Sequence',
78
84
  element: {
@@ -87,7 +93,7 @@ module Azure::ARM::Insights
87
93
  },
88
94
  workspace_id: {
89
95
  required: false,
90
- serialized_name: 'properties.workspaceId',
96
+ serialized_name: 'workspaceId',
91
97
  type: {
92
98
  name: 'String'
93
99
  }
@@ -12,19 +12,26 @@ module Azure::ARM::Insights
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [String] the resource id of the storage account.
15
+ # @return [String] The resource ID of the storage account to which you
16
+ # would like to send Diagnostic Logs.
16
17
  attr_accessor :storage_account_id
17
18
 
18
- # @return [String] the id of the service bus rule.
19
+ # @return [String] The service bus rule ID of the service bus namespace
20
+ # in which you would like to have Event Hubs created for streaming
21
+ # Diagnostic Logs. The rule ID is of the format: '{service bus resource
22
+ # ID}/authorizationrules/{key name}'.
19
23
  attr_accessor :service_bus_rule_id
20
24
 
21
- # @return [Array<MetricSettings>] the list of metrics.
25
+ # @return [Array<MetricSettings>] the list of metric settings.
22
26
  attr_accessor :metrics
23
27
 
24
- # @return [Array<LogSettings>] the list of logs.
28
+ # @return [Array<LogSettings>] the list of logs settings.
25
29
  attr_accessor :logs
26
30
 
27
- # @return [String] the OMS workspace Id.
31
+ # @return [String] The workspace ID (resource ID of a Log Analytics
32
+ # workspace) for a Log Analytics workspace to which you would like to
33
+ # send Diagnostic Logs. Example:
34
+ # /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
28
35
  attr_accessor :workspace_id
29
36
 
30
37
 
@@ -20,7 +20,8 @@ module Azure::ARM::Insights
20
20
  attr_accessor :odata.type
21
21
 
22
22
  # @return [RuleDataSource] the resource from which the rule collects its
23
- # data.
23
+ # data. For this type dataSource will always be of type
24
+ # RuleMetricDataSource.
24
25
  attr_accessor :data_source
25
26
 
26
27
  # @return [ConditionOperator] the operator used to compare the data and
@@ -37,7 +38,7 @@ module Azure::ARM::Insights
37
38
  attr_accessor :window_size
38
39
 
39
40
  # @return [TimeAggregationOperator] the time aggregation operator. How
40
- # the data that is collected should be combined over time. The default
41
+ # the data that are collected should be combined over time. The default
41
42
  # value is the PrimaryAggregationType of the Metric. Possible values
42
43
  # include: 'Average', 'Minimum', 'Maximum', 'Total', 'Last'
43
44
  attr_accessor :time_aggregation
@@ -57,7 +58,7 @@ module Azure::ARM::Insights
57
58
  model_properties: {
58
59
  odata.type: {
59
60
  required: true,
60
- serialized_name: 'odata.type',
61
+ serialized_name: 'odata\\.type',
61
62
  type: {
62
63
  name: 'String'
63
64
  }
@@ -6,8 +6,7 @@
6
6
  module Azure::ARM::Insights
7
7
  module Models
8
8
  #
9
- # A specific date-time for the profile. This element is not used if the
10
- # Recurrence element is used.
9
+ # A specific date-time for the profile.
11
10
  #
12
11
  class TimeWindow
13
12
 
@@ -6,7 +6,7 @@
6
6
  module Azure::ARM::Insights
7
7
  module Models
8
8
  #
9
- # Webhook notification.
9
+ # Webhook notification of an autoscale event.
10
10
  #
11
11
  class WebhookNotification
12
12
 
@@ -15,7 +15,8 @@ module Azure::ARM::Insights
15
15
  # @return [String] the service address to receive the notification.
16
16
  attr_accessor :service_uri
17
17
 
18
- # @return [Hash{String => String}] a property bag of settings.
18
+ # @return [Hash{String => String}] a property bag of settings. This value
19
+ # can be empty.
19
20
  attr_accessor :properties
20
21
 
21
22
 
@@ -113,8 +113,8 @@ module Azure::ARM::Insights
113
113
  # Create or update new diagnostic settings for the specified resource.
114
114
  #
115
115
  # @param resource_uri [String] The identifier of the resource.
116
- # @param parameters [ServiceDiagnosticSettingsCreateOrUpdateParameters]
117
- # Parameters supplied to the operation.
116
+ # @param parameters [ServiceDiagnosticSettings] Parameters supplied to the
117
+ # operation.
118
118
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
119
119
  # will be added to the HTTP request.
120
120
  #
@@ -129,8 +129,8 @@ module Azure::ARM::Insights
129
129
  # Create or update new diagnostic settings for the specified resource.
130
130
  #
131
131
  # @param resource_uri [String] The identifier of the resource.
132
- # @param parameters [ServiceDiagnosticSettingsCreateOrUpdateParameters]
133
- # Parameters supplied to the operation.
132
+ # @param parameters [ServiceDiagnosticSettings] Parameters supplied to the
133
+ # operation.
134
134
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
135
135
  # will be added to the HTTP request.
136
136
  #
@@ -144,8 +144,8 @@ module Azure::ARM::Insights
144
144
  # Create or update new diagnostic settings for the specified resource.
145
145
  #
146
146
  # @param resource_uri [String] The identifier of the resource.
147
- # @param parameters [ServiceDiagnosticSettingsCreateOrUpdateParameters]
148
- # Parameters supplied to the operation.
147
+ # @param parameters [ServiceDiagnosticSettings] Parameters supplied to the
148
+ # operation.
149
149
  # @param [Hash{String => String}] A hash of custom headers that will be added
150
150
  # to the HTTP request.
151
151
  #
@@ -167,7 +167,7 @@ module Azure::ARM::Insights
167
167
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
168
168
 
169
169
  # Serialize Request
170
- request_mapper = ServiceDiagnosticSettingsCreateOrUpdateParameters.mapper()
170
+ request_mapper = ServiceDiagnosticSettings.mapper()
171
171
  request_content = @client.serialize(request_mapper, parameters, 'parameters')
172
172
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
173
173
 
@@ -4,5 +4,5 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::Insights
7
- VERSION = '0.8.0'
7
+ VERSION = '0.9.0'
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_insights
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-16 00:00:00.000000000 Z
11
+ date: 2017-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.6.2
75
+ version: 0.7.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.6.2
82
+ version: 0.7.0
83
83
  description: Microsoft Azure Insights Library for Ruby
84
84
  email: azrubyteam@microsoft.com
85
85
  executables: []
@@ -92,7 +92,6 @@ files:
92
92
  - lib/generated/azure_mgmt_insights/alert_rule_incidents.rb
93
93
  - lib/generated/azure_mgmt_insights/alert_rules.rb
94
94
  - lib/generated/azure_mgmt_insights/autoscale_settings.rb
95
- - lib/generated/azure_mgmt_insights/incidents.rb
96
95
  - lib/generated/azure_mgmt_insights/insights_management_client.rb
97
96
  - lib/generated/azure_mgmt_insights/log_profiles.rb
98
97
  - lib/generated/azure_mgmt_insights/models/alert_rule_resource.rb
@@ -108,7 +107,7 @@ files:
108
107
  - lib/generated/azure_mgmt_insights/models/incident_list_result.rb
109
108
  - lib/generated/azure_mgmt_insights/models/location_threshold_rule_condition.rb
110
109
  - lib/generated/azure_mgmt_insights/models/log_profile_collection.rb
111
- - lib/generated/azure_mgmt_insights/models/log_profile_create_or_update_parameters.rb
110
+ - lib/generated/azure_mgmt_insights/models/log_profile_properties.rb
112
111
  - lib/generated/azure_mgmt_insights/models/log_profile_resource.rb
113
112
  - lib/generated/azure_mgmt_insights/models/log_settings.rb
114
113
  - lib/generated/azure_mgmt_insights/models/management_event_aggregation_condition.rb
@@ -132,7 +131,8 @@ files:
132
131
  - lib/generated/azure_mgmt_insights/models/scale_capacity.rb
133
132
  - lib/generated/azure_mgmt_insights/models/scale_direction.rb
134
133
  - lib/generated/azure_mgmt_insights/models/scale_rule.rb
135
- - lib/generated/azure_mgmt_insights/models/service_diagnostic_settings_create_or_update_parameters.rb
134
+ - lib/generated/azure_mgmt_insights/models/scale_type.rb
135
+ - lib/generated/azure_mgmt_insights/models/service_diagnostic_settings.rb
136
136
  - lib/generated/azure_mgmt_insights/models/service_diagnostic_settings_resource.rb
137
137
  - lib/generated/azure_mgmt_insights/models/threshold_rule_condition.rb
138
138
  - lib/generated/azure_mgmt_insights/models/time_aggregation_operator.rb
@@ -1,117 +0,0 @@
1
- # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
- # Changes may cause incorrect behavior and will be lost if the code is
4
- # regenerated.
5
-
6
- module Azure::ARM::Insights
7
- #
8
- # Composite Swagger for Insights Management Client
9
- #
10
- class Incidents
11
- include Azure::ARM::Insights::Models
12
- include MsRestAzure
13
-
14
- #
15
- # Creates and initializes a new instance of the Incidents class.
16
- # @param client service class for accessing basic functionality.
17
- #
18
- def initialize(client)
19
- @client = client
20
- end
21
-
22
- # @return [InsightsManagementClient] reference to the InsightsManagementClient
23
- attr_reader :client
24
-
25
- #
26
- # Gets a list of incidents associated to an alert rule
27
- #
28
- # @param resource_group_name [String] The name of the resource group.
29
- # @param rule_name [String] The name of the rule.
30
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
- # will be added to the HTTP request.
32
- #
33
- # @return [IncidentListResult] operation results.
34
- #
35
- def list_by_alert_rule(resource_group_name, rule_name, custom_headers = nil)
36
- response = list_by_alert_rule_async(resource_group_name, rule_name, custom_headers).value!
37
- response.body unless response.nil?
38
- end
39
-
40
- #
41
- # Gets a list of incidents associated to an alert rule
42
- #
43
- # @param resource_group_name [String] The name of the resource group.
44
- # @param rule_name [String] The name of the rule.
45
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
46
- # will be added to the HTTP request.
47
- #
48
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
49
- #
50
- def list_by_alert_rule_with_http_info(resource_group_name, rule_name, custom_headers = nil)
51
- list_by_alert_rule_async(resource_group_name, rule_name, custom_headers).value!
52
- end
53
-
54
- #
55
- # Gets a list of incidents associated to an alert rule
56
- #
57
- # @param resource_group_name [String] The name of the resource group.
58
- # @param rule_name [String] The name of the rule.
59
- # @param [Hash{String => String}] A hash of custom headers that will be added
60
- # to the HTTP request.
61
- #
62
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
63
- #
64
- def list_by_alert_rule_async(resource_group_name, rule_name, custom_headers = nil)
65
- fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
66
- fail ArgumentError, 'rule_name is nil' if rule_name.nil?
67
- api_version = '2016-03-01'
68
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
69
-
70
-
71
- request_headers = {}
72
-
73
- # Set Headers
74
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
75
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
76
- path_template = '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}/incidents'
77
-
78
- request_url = @base_url || @client.base_url
79
-
80
- options = {
81
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
82
- path_params: {'resourceGroupName' => resource_group_name,'ruleName' => rule_name,'subscriptionId' => @client.subscription_id},
83
- query_params: {'api-version' => api_version},
84
- headers: request_headers.merge(custom_headers || {}),
85
- base_url: request_url
86
- }
87
- promise = @client.make_request_async(:get, path_template, options)
88
-
89
- promise = promise.then do |result|
90
- http_response = result.response
91
- status_code = http_response.status
92
- response_content = http_response.body
93
- unless status_code == 200
94
- error_model = JSON.load(response_content)
95
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
96
- end
97
-
98
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
99
- # Deserialize Response
100
- if status_code == 200
101
- begin
102
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
103
- result_mapper = IncidentListResult.mapper()
104
- result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
105
- rescue Exception => e
106
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
107
- end
108
- end
109
-
110
- result
111
- end
112
-
113
- promise.execute
114
- end
115
-
116
- end
117
- end