azure_mgmt_monitor 0.17.6 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-04-01/generated/azure_mgmt_monitor.rb +11 -8
  3. data/lib/2015-04-01/generated/azure_mgmt_monitor/activity_logs.rb +24 -19
  4. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/metric_trigger.rb +35 -1
  5. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/recurrence.rb +9 -9
  6. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/recurrence_frequency.rb +22 -0
  7. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/recurrent_schedule.rb +1 -1
  8. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/scale_rule_metric_dimension.rb +80 -0
  9. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/scale_rule_metric_dimension_operation_type.rb +16 -0
  10. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/time_aggregation_type.rb +1 -0
  11. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/time_window.rb +1 -1
  12. data/lib/2015-04-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  13. data/lib/2015-05-01/generated/azure_mgmt_monitor/application_insights_management_client.rb +1 -1
  14. data/lib/2016-03-01/generated/azure_mgmt_monitor.rb +14 -14
  15. data/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rules.rb +21 -21
  16. data/lib/2016-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +5 -5
  17. data/lib/2016-09-01/generated/azure_mgmt_monitor/monitor_client.rb +1 -1
  18. data/lib/2017-04-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  19. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor.rb +16 -11
  20. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/diagnostic_settings_resource.rb +19 -5
  21. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/response.rb +1 -1
  22. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/subscription_diagnostic_settings_resource.rb +150 -0
  23. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/subscription_diagnostic_settings_resource_collection.rb +57 -0
  24. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/subscription_log_settings.rb +59 -0
  25. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/subscription_proxy_only_resource.rb +82 -0
  26. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +10 -5
  27. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/subscription_diagnostic_settings_operations.rb +405 -0
  28. data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/application_insights_management_client.rb +1 -1
  29. data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/baseline_response.rb +1 -1
  30. data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/calculate_baseline_response.rb +1 -1
  31. data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  32. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/metric_namespaces.rb +1 -1
  33. data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  34. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metric.rb +2 -1
  35. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metric_definition.rb +3 -2
  36. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metric_value.rb +3 -4
  37. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/response.rb +1 -1
  38. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/unit.rb +4 -0
  39. data/lib/2018-01-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  40. data/lib/2018-03-01/generated/azure_mgmt_monitor.rb +25 -17
  41. data/lib/2018-03-01/generated/azure_mgmt_monitor/metric_alerts.rb +10 -10
  42. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/dynamic_metric_criteria.rb +175 -0
  43. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/dynamic_threshold_failing_periods.rb +61 -0
  44. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/dynamic_threshold_operator.rb +17 -0
  45. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/dynamic_threshold_sensitivity.rb +17 -0
  46. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_action.rb +3 -3
  47. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_criteria.rb +2 -0
  48. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_multiple_resource_multiple_metric_criteria.rb +90 -0
  49. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_resource.rb +27 -1
  50. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_resource_patch.rb +27 -1
  51. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_criteria.rb +56 -31
  52. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_dimension.rb +2 -1
  53. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/multi_metric_criteria.rb +142 -0
  54. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/operator.rb +20 -0
  55. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/webtest_location_availability_criteria.rb +98 -0
  56. data/lib/2018-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +5 -5
  57. data/lib/2018-04-16/generated/azure_mgmt_monitor.rb +8 -5
  58. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/action.rb +1 -0
  59. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/alerting_action.rb +2 -2
  60. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/az_ns_action_group.rb +1 -1
  61. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/criteria.rb +66 -0
  62. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/dimension.rb +79 -0
  63. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/log_search_rule_resource.rb +4 -3
  64. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/log_to_metric_action.rb +71 -0
  65. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/source.rb +3 -2
  66. data/lib/2018-04-16/generated/azure_mgmt_monitor/monitor_client.rb +1 -1
  67. data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  68. data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/application_insights_management_client.rb +1 -1
  69. data/lib/2018-09-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  70. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
  71. data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/vminsights.rb +1 -1
  72. data/lib/2019-03-01/generated/azure_mgmt_monitor.rb +18 -9
  73. data/lib/2019-03-01/generated/azure_mgmt_monitor/action_groups.rb +1 -1
  74. data/lib/2019-03-01/generated/azure_mgmt_monitor/baselines.rb +186 -0
  75. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/baseline_metadata.rb +57 -0
  76. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/baseline_sensitivity.rb +17 -0
  77. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/metric_baselines_response.rb +55 -0
  78. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/metric_single_dimension.rb +57 -0
  79. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/result_type.rb +16 -0
  80. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/single_baseline.rb +85 -0
  81. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/single_metric_baseline.rb +129 -0
  82. data/lib/2019-03-01/generated/azure_mgmt_monitor/models/time_series_baseline.rb +127 -0
  83. data/lib/2019-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +5 -1
  84. data/lib/2019-06-01/generated/azure_mgmt_monitor.rb +45 -0
  85. data/lib/2019-06-01/generated/azure_mgmt_monitor/action_groups.rb +707 -0
  86. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/action_group_list.rb +67 -0
  87. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/action_group_patch_body.rb +68 -0
  88. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/action_group_resource.rb +326 -0
  89. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/arm_role_receiver.rb +69 -0
  90. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/automation_runbook_receiver.rb +113 -0
  91. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/azure_app_push_receiver.rb +58 -0
  92. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/azure_function_receiver.rb +91 -0
  93. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/email_receiver.rb +83 -0
  94. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/enable_request.rb +46 -0
  95. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  96. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/itsm_receiver.rb +94 -0
  97. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/logic_app_receiver.rb +80 -0
  98. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/receiver_status.rb +17 -0
  99. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/resource.rb +110 -0
  100. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/sms_receiver.rb +83 -0
  101. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/voice_receiver.rb +69 -0
  102. data/lib/2019-06-01/generated/azure_mgmt_monitor/models/webhook_receiver.rb +115 -0
  103. data/lib/2019-06-01/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  104. data/lib/2019-06-01/generated/azure_mgmt_monitor/monitor_management_client.rb +131 -0
  105. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor.rb +49 -0
  106. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/azure_monitor_private_link_scope.rb +123 -0
  107. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/azure_monitor_private_link_scope_list_result.rb +102 -0
  108. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/error_additional_info.rb +59 -0
  109. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  110. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/error_response_common.rb +93 -0
  111. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/operation_status.rb +102 -0
  112. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_endpoint_connection.rb +100 -0
  113. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_endpoint_connection_list_result.rb +100 -0
  114. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_endpoint_property.rb +46 -0
  115. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_link_resource.rb +95 -0
  116. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_link_resource_list_result.rb +100 -0
  117. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_link_scopes_resource.rb +101 -0
  118. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_link_service_connection_state_property.rb +71 -0
  119. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/proxy_resource.rb +71 -0
  120. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/scoped_resource.rb +85 -0
  121. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/scoped_resource_list_result.rb +100 -0
  122. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/tags_resource.rb +55 -0
  123. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  124. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +148 -0
  125. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_endpoint_connections.rb +641 -0
  126. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_link_resources.rb +346 -0
  127. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_link_scope_operation_status.rb +122 -0
  128. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_link_scoped_resources.rb +638 -0
  129. data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_link_scopes.rb +889 -0
  130. data/lib/azure_mgmt_monitor.rb +13 -11
  131. data/lib/profiles/latest/modules/monitor_profile_module.rb +322 -132
  132. data/lib/profiles/v2019_03_01_hybrid/modules/monitor_profile_module.rb +65 -35
  133. data/lib/version.rb +1 -1
  134. metadata +77 -3
@@ -23,7 +23,7 @@ module Azure::Monitor::Mgmt::V2018_04_16
23
23
  # @return [DateTime] Last time the rule was updated in IS08601 format.
24
24
  attr_accessor :last_updated_time
25
25
 
26
- # @return [ProvisioningState] Provisioning state of the scheduledquery
26
+ # @return [ProvisioningState] Provisioning state of the scheduled query
27
27
  # rule. Possible values include: 'Succeeded', 'Deploying', 'Canceled',
28
28
  # 'Failed'
29
29
  attr_accessor :provisioning_state
@@ -31,7 +31,8 @@ module Azure::Monitor::Mgmt::V2018_04_16
31
31
  # @return [Source] Data Source against which rule will Query Data
32
32
  attr_accessor :source
33
33
 
34
- # @return [Schedule] Schedule (Frequnecy, Time Window) for rule.
34
+ # @return [Schedule] Schedule (Frequency, Time Window) for rule. Required
35
+ # for action type - AlertingAction
35
36
  attr_accessor :schedule
36
37
 
37
38
  # @return [Action] Action needs to be taken on rule execution.
@@ -147,7 +148,7 @@ module Azure::Monitor::Mgmt::V2018_04_16
147
148
  },
148
149
  schedule: {
149
150
  client_side_validation: true,
150
- required: true,
151
+ required: false,
151
152
  serialized_name: 'properties.schedule',
152
153
  type: {
153
154
  name: 'Composite',
@@ -0,0 +1,71 @@
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::Monitor::Mgmt::V2018_04_16
7
+ module Models
8
+ #
9
+ # Specify action need to be taken when rule type is converting log to
10
+ # metric
11
+ #
12
+ class LogToMetricAction < Action
13
+
14
+ include MsRestAzure
15
+
16
+
17
+ def initialize
18
+ @odatatype = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction"
19
+ end
20
+
21
+ attr_accessor :odatatype
22
+
23
+ # @return [Array<Criteria>] Criteria of Metric
24
+ attr_accessor :criteria
25
+
26
+
27
+ #
28
+ # Mapper for LogToMetricAction class as Ruby Hash.
29
+ # This will be used for serialization/deserialization.
30
+ #
31
+ def self.mapper()
32
+ {
33
+ client_side_validation: true,
34
+ required: false,
35
+ serialized_name: 'Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction',
36
+ type: {
37
+ name: 'Composite',
38
+ class_name: 'LogToMetricAction',
39
+ model_properties: {
40
+ odatatype: {
41
+ client_side_validation: true,
42
+ required: true,
43
+ serialized_name: 'odata\\.type',
44
+ type: {
45
+ name: 'String'
46
+ }
47
+ },
48
+ criteria: {
49
+ client_side_validation: true,
50
+ required: true,
51
+ serialized_name: 'criteria',
52
+ type: {
53
+ name: 'Sequence',
54
+ element: {
55
+ client_side_validation: true,
56
+ required: false,
57
+ serialized_name: 'CriteriaElementType',
58
+ type: {
59
+ name: 'Composite',
60
+ class_name: 'Criteria'
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ end
69
+ end
70
+ end
71
+ end
@@ -12,7 +12,8 @@ module Azure::Monitor::Mgmt::V2018_04_16
12
12
 
13
13
  include MsRestAzure
14
14
 
15
- # @return [String] Log search query.
15
+ # @return [String] Log search query. Required for action type -
16
+ # AlertingAction
16
17
  attr_accessor :query
17
18
 
18
19
  # @return [Array<String>] List of Resource referred into query
@@ -42,7 +43,7 @@ module Azure::Monitor::Mgmt::V2018_04_16
42
43
  model_properties: {
43
44
  query: {
44
45
  client_side_validation: true,
45
- required: true,
46
+ required: false,
46
47
  serialized_name: 'query',
47
48
  type: {
48
49
  name: 'String'
@@ -124,7 +124,7 @@ module Azure::Monitor::Mgmt::V2018_04_16
124
124
  #
125
125
  def add_telemetry
126
126
  sdk_information = 'azure_mgmt_monitor'
127
- sdk_information = "#{sdk_information}/0.17.6"
127
+ sdk_information = "#{sdk_information}/0.18.0"
128
128
  add_user_agent_information(sdk_information)
129
129
  end
130
130
  end
@@ -129,7 +129,7 @@ module Azure::Monitor::Mgmt::V2018_06_01_preview
129
129
  #
130
130
  def add_telemetry
131
131
  sdk_information = 'azure_mgmt_monitor'
132
- sdk_information = "#{sdk_information}/0.17.6"
132
+ sdk_information = "#{sdk_information}/0.18.0"
133
133
  add_user_agent_information(sdk_information)
134
134
  end
135
135
  end
@@ -124,7 +124,7 @@ module Azure::Monitor::Mgmt::V2018_06_17_preview
124
124
  #
125
125
  def add_telemetry
126
126
  sdk_information = 'azure_mgmt_monitor'
127
- sdk_information = "#{sdk_information}/0.17.6"
127
+ sdk_information = "#{sdk_information}/0.18.0"
128
128
  add_user_agent_information(sdk_information)
129
129
  end
130
130
  end
@@ -128,7 +128,7 @@ module Azure::Monitor::Mgmt::V2018_09_01
128
128
  #
129
129
  def add_telemetry
130
130
  sdk_information = 'azure_mgmt_monitor'
131
- sdk_information = "#{sdk_information}/0.17.6"
131
+ sdk_information = "#{sdk_information}/0.18.0"
132
132
  add_user_agent_information(sdk_information)
133
133
  end
134
134
  end
@@ -121,7 +121,7 @@ module Azure::Monitor::Mgmt::V2018_11_27_preview
121
121
  #
122
122
  def add_telemetry
123
123
  sdk_information = 'azure_mgmt_monitor'
124
- sdk_information = "#{sdk_information}/0.17.6"
124
+ sdk_information = "#{sdk_information}/0.18.0"
125
125
  add_user_agent_information(sdk_information)
126
126
  end
127
127
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  module Azure::Monitor::Mgmt::V2018_11_27_preview
7
7
  #
8
- # API to manage VM Insights Onboarding
8
+ # Monitor Management Client
9
9
  #
10
10
  class VMInsights
11
11
  include MsRestAzure
@@ -21,25 +21,34 @@ require 'ms_rest_azure'
21
21
 
22
22
  module Azure::Monitor::Mgmt::V2019_03_01
23
23
  autoload :ActionGroups, '2019-03-01/generated/azure_mgmt_monitor/action_groups.rb'
24
+ autoload :Baselines, '2019-03-01/generated/azure_mgmt_monitor/baselines.rb'
24
25
  autoload :MonitorManagementClient, '2019-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb'
25
26
 
26
27
  module Models
27
- autoload :LogicAppReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/logic_app_receiver.rb'
28
- autoload :Resource, '2019-03-01/generated/azure_mgmt_monitor/models/resource.rb'
29
- autoload :AzureFunctionReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/azure_function_receiver.rb'
30
- autoload :SmsReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/sms_receiver.rb'
31
28
  autoload :ArmRoleReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/arm_role_receiver.rb'
32
- autoload :ItsmReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/itsm_receiver.rb'
33
- autoload :AzureAppPushReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/azure_app_push_receiver.rb'
34
- autoload :VoiceReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/voice_receiver.rb'
29
+ autoload :EmailReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/email_receiver.rb'
35
30
  autoload :ActionGroupList, '2019-03-01/generated/azure_mgmt_monitor/models/action_group_list.rb'
36
31
  autoload :WebhookReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/webhook_receiver.rb'
37
32
  autoload :EnableRequest, '2019-03-01/generated/azure_mgmt_monitor/models/enable_request.rb'
38
- autoload :EmailReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/email_receiver.rb'
33
+ autoload :AzureAppPushReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/azure_app_push_receiver.rb'
39
34
  autoload :ErrorResponse, '2019-03-01/generated/azure_mgmt_monitor/models/error_response.rb'
40
- autoload :AutomationRunbookReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/automation_runbook_receiver.rb'
35
+ autoload :VoiceReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/voice_receiver.rb'
41
36
  autoload :ActionGroupPatchBody, '2019-03-01/generated/azure_mgmt_monitor/models/action_group_patch_body.rb'
37
+ autoload :AzureFunctionReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/azure_function_receiver.rb'
38
+ autoload :MetricSingleDimension, '2019-03-01/generated/azure_mgmt_monitor/models/metric_single_dimension.rb'
39
+ autoload :SmsReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/sms_receiver.rb'
40
+ autoload :SingleBaseline, '2019-03-01/generated/azure_mgmt_monitor/models/single_baseline.rb'
41
+ autoload :AutomationRunbookReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/automation_runbook_receiver.rb'
42
+ autoload :BaselineMetadata, '2019-03-01/generated/azure_mgmt_monitor/models/baseline_metadata.rb'
43
+ autoload :Resource, '2019-03-01/generated/azure_mgmt_monitor/models/resource.rb'
44
+ autoload :TimeSeriesBaseline, '2019-03-01/generated/azure_mgmt_monitor/models/time_series_baseline.rb'
45
+ autoload :LogicAppReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/logic_app_receiver.rb'
46
+ autoload :SingleMetricBaseline, '2019-03-01/generated/azure_mgmt_monitor/models/single_metric_baseline.rb'
47
+ autoload :ItsmReceiver, '2019-03-01/generated/azure_mgmt_monitor/models/itsm_receiver.rb'
48
+ autoload :MetricBaselinesResponse, '2019-03-01/generated/azure_mgmt_monitor/models/metric_baselines_response.rb'
42
49
  autoload :ActionGroupResource, '2019-03-01/generated/azure_mgmt_monitor/models/action_group_resource.rb'
43
50
  autoload :ReceiverStatus, '2019-03-01/generated/azure_mgmt_monitor/models/receiver_status.rb'
51
+ autoload :BaselineSensitivity, '2019-03-01/generated/azure_mgmt_monitor/models/baseline_sensitivity.rb'
52
+ autoload :ResultType, '2019-03-01/generated/azure_mgmt_monitor/models/result_type.rb'
44
53
  end
45
54
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  module Azure::Monitor::Mgmt::V2019_03_01
7
7
  #
8
- # ActionGroups
8
+ # Monitor Management Client
9
9
  #
10
10
  class ActionGroups
11
11
  include MsRestAzure
@@ -0,0 +1,186 @@
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::Monitor::Mgmt::V2019_03_01
7
+ #
8
+ # Monitor Management Client
9
+ #
10
+ class Baselines
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Baselines class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [MonitorManagementClient] reference to the MonitorManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # **Lists the metric baseline values for a resource**.
26
+ #
27
+ # @param resource_uri [String] The identifier of the resource.
28
+ # @param metricnames [String] The names of the metrics (comma separated) to
29
+ # retrieve.
30
+ # @param metricnamespace [String] Metric namespace to query metric definitions
31
+ # for.
32
+ # @param timespan [String] The timespan of the query. It is a string with the
33
+ # following format 'startDateTime_ISO/endDateTime_ISO'.
34
+ # @param interval [Duration] The interval (i.e. timegrain) of the query.
35
+ # @param aggregation [String] The list of aggregation types (comma separated)
36
+ # to retrieve.
37
+ # @param sensitivities [String] The list of sensitivities (comma separated) to
38
+ # retrieve.
39
+ # @param filter [String] The **$filter** is used to reduce the set of metric
40
+ # data returned.<br>Example:<br>Metric contains metadata A, B and C.<br>-
41
+ # Return all time series of C where A = a1 and B = b1 or b2<br>**$filter=A eq
42
+ # ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid
43
+ # variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B =
44
+ # ‘b2’**<br>This is invalid because the logical or operator cannot separate two
45
+ # different metadata names.<br>- Return all time series where A = a1, B = b1
46
+ # and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return
47
+ # all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq
48
+ # ‘*’**.
49
+ # @param result_type [ResultType] Allows retrieving only metadata of the
50
+ # baseline. On data request all information is retrieved. Possible values
51
+ # include: 'Data', 'Metadata'
52
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
+ # will be added to the HTTP request.
54
+ #
55
+ # @return [MetricBaselinesResponse] operation results.
56
+ #
57
+ def list(resource_uri, metricnames:nil, metricnamespace:nil, timespan:nil, interval:nil, aggregation:nil, sensitivities:nil, filter:nil, result_type:nil, custom_headers:nil)
58
+ response = list_async(resource_uri, metricnames:metricnames, metricnamespace:metricnamespace, timespan:timespan, interval:interval, aggregation:aggregation, sensitivities:sensitivities, filter:filter, result_type:result_type, custom_headers:custom_headers).value!
59
+ response.body unless response.nil?
60
+ end
61
+
62
+ #
63
+ # **Lists the metric baseline values for a resource**.
64
+ #
65
+ # @param resource_uri [String] The identifier of the resource.
66
+ # @param metricnames [String] The names of the metrics (comma separated) to
67
+ # retrieve.
68
+ # @param metricnamespace [String] Metric namespace to query metric definitions
69
+ # for.
70
+ # @param timespan [String] The timespan of the query. It is a string with the
71
+ # following format 'startDateTime_ISO/endDateTime_ISO'.
72
+ # @param interval [Duration] The interval (i.e. timegrain) of the query.
73
+ # @param aggregation [String] The list of aggregation types (comma separated)
74
+ # to retrieve.
75
+ # @param sensitivities [String] The list of sensitivities (comma separated) to
76
+ # retrieve.
77
+ # @param filter [String] The **$filter** is used to reduce the set of metric
78
+ # data returned.<br>Example:<br>Metric contains metadata A, B and C.<br>-
79
+ # Return all time series of C where A = a1 and B = b1 or b2<br>**$filter=A eq
80
+ # ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid
81
+ # variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B =
82
+ # ‘b2’**<br>This is invalid because the logical or operator cannot separate two
83
+ # different metadata names.<br>- Return all time series where A = a1, B = b1
84
+ # and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return
85
+ # all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq
86
+ # ‘*’**.
87
+ # @param result_type [ResultType] Allows retrieving only metadata of the
88
+ # baseline. On data request all information is retrieved. Possible values
89
+ # include: 'Data', 'Metadata'
90
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
91
+ # will be added to the HTTP request.
92
+ #
93
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
94
+ #
95
+ def list_with_http_info(resource_uri, metricnames:nil, metricnamespace:nil, timespan:nil, interval:nil, aggregation:nil, sensitivities:nil, filter:nil, result_type:nil, custom_headers:nil)
96
+ list_async(resource_uri, metricnames:metricnames, metricnamespace:metricnamespace, timespan:timespan, interval:interval, aggregation:aggregation, sensitivities:sensitivities, filter:filter, result_type:result_type, custom_headers:custom_headers).value!
97
+ end
98
+
99
+ #
100
+ # **Lists the metric baseline values for a resource**.
101
+ #
102
+ # @param resource_uri [String] The identifier of the resource.
103
+ # @param metricnames [String] The names of the metrics (comma separated) to
104
+ # retrieve.
105
+ # @param metricnamespace [String] Metric namespace to query metric definitions
106
+ # for.
107
+ # @param timespan [String] The timespan of the query. It is a string with the
108
+ # following format 'startDateTime_ISO/endDateTime_ISO'.
109
+ # @param interval [Duration] The interval (i.e. timegrain) of the query.
110
+ # @param aggregation [String] The list of aggregation types (comma separated)
111
+ # to retrieve.
112
+ # @param sensitivities [String] The list of sensitivities (comma separated) to
113
+ # retrieve.
114
+ # @param filter [String] The **$filter** is used to reduce the set of metric
115
+ # data returned.<br>Example:<br>Metric contains metadata A, B and C.<br>-
116
+ # Return all time series of C where A = a1 and B = b1 or b2<br>**$filter=A eq
117
+ # ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid
118
+ # variant:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B =
119
+ # ‘b2’**<br>This is invalid because the logical or operator cannot separate two
120
+ # different metadata names.<br>- Return all time series where A = a1, B = b1
121
+ # and C = c1:<br>**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**<br>- Return
122
+ # all time series where A = a1<br>**$filter=A eq ‘a1’ and B eq ‘*’ and C eq
123
+ # ‘*’**.
124
+ # @param result_type [ResultType] Allows retrieving only metadata of the
125
+ # baseline. On data request all information is retrieved. Possible values
126
+ # include: 'Data', 'Metadata'
127
+ # @param [Hash{String => String}] A hash of custom headers that will be added
128
+ # to the HTTP request.
129
+ #
130
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
131
+ #
132
+ def list_async(resource_uri, metricnames:nil, metricnamespace:nil, timespan:nil, interval:nil, aggregation:nil, sensitivities:nil, filter:nil, result_type:nil, custom_headers:nil)
133
+ fail ArgumentError, 'resource_uri is nil' if resource_uri.nil?
134
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
135
+
136
+
137
+ request_headers = {}
138
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
139
+
140
+ # Set Headers
141
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
142
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
143
+ path_template = '{resourceUri}/providers/microsoft.insights/metricBaselines'
144
+
145
+ request_url = @base_url || @client.base_url
146
+
147
+ options = {
148
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
149
+ skip_encoding_path_params: {'resourceUri' => resource_uri},
150
+ query_params: {'metricnames' => metricnames,'metricnamespace' => metricnamespace,'timespan' => timespan,'interval' => interval,'aggregation' => aggregation,'sensitivities' => sensitivities,'$filter' => filter,'resultType' => result_type,'api-version' => @client.api_version},
151
+ headers: request_headers.merge(custom_headers || {}),
152
+ base_url: request_url
153
+ }
154
+ promise = @client.make_request_async(:get, path_template, options)
155
+
156
+ promise = promise.then do |result|
157
+ http_response = result.response
158
+ status_code = http_response.status
159
+ response_content = http_response.body
160
+ unless status_code == 200
161
+ error_model = JSON.load(response_content)
162
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
163
+ end
164
+
165
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
166
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
167
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
168
+ # Deserialize Response
169
+ if status_code == 200
170
+ begin
171
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
172
+ result_mapper = Azure::Monitor::Mgmt::V2019_03_01::Models::MetricBaselinesResponse.mapper()
173
+ result.body = @client.deserialize(result_mapper, parsed_response)
174
+ rescue Exception => e
175
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
176
+ end
177
+ end
178
+
179
+ result
180
+ end
181
+
182
+ promise.execute
183
+ end
184
+
185
+ end
186
+ end
@@ -0,0 +1,57 @@
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::Monitor::Mgmt::V2019_03_01
7
+ module Models
8
+ #
9
+ # Represents a baseline metadata value.
10
+ #
11
+ class BaselineMetadata
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Name of the baseline metadata.
16
+ attr_accessor :name
17
+
18
+ # @return [String] Value of the baseline metadata.
19
+ attr_accessor :value
20
+
21
+
22
+ #
23
+ # Mapper for BaselineMetadata class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ client_side_validation: true,
29
+ required: false,
30
+ serialized_name: 'BaselineMetadata',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'BaselineMetadata',
34
+ model_properties: {
35
+ name: {
36
+ client_side_validation: true,
37
+ required: true,
38
+ serialized_name: 'name',
39
+ type: {
40
+ name: 'String'
41
+ }
42
+ },
43
+ value: {
44
+ client_side_validation: true,
45
+ required: true,
46
+ serialized_name: 'value',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ end
55
+ end
56
+ end
57
+ end