azure_mgmt_monitor 0.16.0 → 0.16.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-04-01/generated/azure_mgmt_monitor.rb +14 -4
  3. data/lib/2015-04-01/generated/azure_mgmt_monitor/activity_logs.rb +313 -0
  4. data/lib/2015-04-01/generated/azure_mgmt_monitor/autoscale_settings.rb +1 -1
  5. data/lib/2015-04-01/generated/azure_mgmt_monitor/event_categories.rb +113 -0
  6. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/event_category_collection.rb +57 -0
  7. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/event_data.rb +380 -0
  8. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/event_data_collection.rb +99 -0
  9. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/event_level.rb +19 -0
  10. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/http_request_info.rb +79 -0
  11. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/localizable_string.rb +57 -0
  12. data/lib/2015-04-01/generated/azure_mgmt_monitor/models/sender_authorization.rb +71 -0
  13. data/lib/2015-04-01/generated/azure_mgmt_monitor/monitor_management_client.rb +12 -0
  14. data/lib/2015-04-01/generated/azure_mgmt_monitor/operations.rb +1 -1
  15. data/lib/2015-04-01/generated/azure_mgmt_monitor/tenant_activity_logs.rb +339 -0
  16. data/lib/2016-03-01/generated/azure_mgmt_monitor.rb +17 -10
  17. data/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rule_incidents.rb +1 -1
  18. data/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rules.rb +1 -1
  19. data/lib/2016-03-01/generated/azure_mgmt_monitor/log_profiles.rb +1 -1
  20. data/lib/2016-03-01/generated/azure_mgmt_monitor/metric_definitions.rb +133 -0
  21. data/lib/2016-03-01/generated/azure_mgmt_monitor/models/aggregation_type.rb +20 -0
  22. data/lib/2016-03-01/generated/azure_mgmt_monitor/models/localizable_string.rb +57 -0
  23. data/lib/2016-03-01/generated/azure_mgmt_monitor/models/metric_availability.rb +60 -0
  24. data/lib/2016-03-01/generated/azure_mgmt_monitor/models/metric_definition.rb +120 -0
  25. data/lib/2016-03-01/generated/azure_mgmt_monitor/models/metric_definition_collection.rb +56 -0
  26. data/lib/2016-03-01/generated/azure_mgmt_monitor/models/unit.rb +21 -0
  27. data/lib/2016-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +8 -4
  28. data/lib/2016-09-01/generated/azure_mgmt_monitor.rb +9 -3
  29. data/lib/2016-09-01/generated/azure_mgmt_monitor/metrics.rb +172 -0
  30. data/lib/2016-09-01/generated/azure_mgmt_monitor/models/localizable_string.rb +57 -0
  31. data/lib/2016-09-01/generated/azure_mgmt_monitor/models/metric.rb +105 -0
  32. data/lib/2016-09-01/generated/azure_mgmt_monitor/models/metric_collection.rb +55 -0
  33. data/lib/2016-09-01/generated/azure_mgmt_monitor/models/metric_value.rb +104 -0
  34. data/lib/2016-09-01/generated/azure_mgmt_monitor/models/unit.rb +21 -0
  35. data/lib/2016-09-01/generated/azure_mgmt_monitor/monitor_client.rb +4 -0
  36. data/lib/2016-09-01/generated/azure_mgmt_monitor/service_diagnostic_settings_operations.rb +4 -4
  37. data/lib/2017-04-01/generated/azure_mgmt_monitor/action_groups.rb +1 -1
  38. data/lib/2017-04-01/generated/azure_mgmt_monitor/activity_log_alerts.rb +1 -1
  39. data/lib/2017-04-01/generated/azure_mgmt_monitor/models/action_group_resource.rb +1 -1
  40. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor.rb +19 -5
  41. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/diagnostic_settings_category_operations.rb +4 -3
  42. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/diagnostic_settings_operations.rb +8 -5
  43. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/metric_definitions.rb +112 -0
  44. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/metrics.rb +190 -0
  45. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/aggregation_type.rb +20 -0
  46. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/localizable_string.rb +57 -0
  47. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/metadata_value.rb +58 -0
  48. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/metric.rb +105 -0
  49. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/metric_availability.rb +60 -0
  50. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/metric_definition.rb +152 -0
  51. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/metric_definition_collection.rb +56 -0
  52. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/metric_value.rb +104 -0
  53. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/response.rb +98 -0
  54. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/result_type.rb +16 -0
  55. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/time_series_element.rb +79 -0
  56. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/unit.rb +23 -0
  57. data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +11 -3
  58. data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/metric_baseline.rb +1 -1
  59. data/lib/2018-01-01/generated/azure_mgmt_monitor.rb +42 -0
  60. data/lib/2018-01-01/generated/azure_mgmt_monitor/metric_definitions.rb +118 -0
  61. data/lib/2018-01-01/generated/azure_mgmt_monitor/metrics.rb +199 -0
  62. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/aggregation_type.rb +20 -0
  63. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  64. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/localizable_string.rb +57 -0
  65. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metadata_value.rb +58 -0
  66. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metric.rb +105 -0
  67. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metric_availability.rb +60 -0
  68. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metric_definition.rb +184 -0
  69. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metric_definition_collection.rb +56 -0
  70. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metric_value.rb +104 -0
  71. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/response.rb +120 -0
  72. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/result_type.rb +16 -0
  73. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/time_series_element.rb +79 -0
  74. data/lib/2018-01-01/generated/azure_mgmt_monitor/models/unit.rb +23 -0
  75. data/lib/2018-01-01/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  76. data/lib/2018-01-01/generated/azure_mgmt_monitor/monitor_management_client.rb +131 -0
  77. data/lib/2018-03-01/generated/azure_mgmt_monitor.rb +57 -0
  78. data/lib/2018-03-01/generated/azure_mgmt_monitor/action_groups.rb +693 -0
  79. data/lib/2018-03-01/generated/azure_mgmt_monitor/metric_alerts.rb +582 -0
  80. data/lib/2018-03-01/generated/azure_mgmt_monitor/metric_alerts_status.rb +213 -0
  81. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/action_group_list.rb +67 -0
  82. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/action_group_patch_body.rb +68 -0
  83. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/action_group_resource.rb +304 -0
  84. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/automation_runbook_receiver.rb +102 -0
  85. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/azure_app_push_receiver.rb +58 -0
  86. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/azure_function_receiver.rb +80 -0
  87. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/email_receiver.rb +72 -0
  88. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/enable_request.rb +46 -0
  89. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  90. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/itsm_receiver.rb +94 -0
  91. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/logic_app_receiver.rb +69 -0
  92. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_action.rb +65 -0
  93. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_criteria.rb +65 -0
  94. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_resource.rb +226 -0
  95. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_resource_collection.rb +56 -0
  96. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_resource_patch.rb +194 -0
  97. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_single_resource_multiple_metric_criteria.rb +88 -0
  98. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_status.rb +81 -0
  99. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_status_collection.rb +56 -0
  100. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_status_properties.rb +76 -0
  101. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_criteria.rb +122 -0
  102. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_dimension.rb +77 -0
  103. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/receiver_status.rb +17 -0
  104. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/resource.rb +101 -0
  105. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/sms_receiver.rb +83 -0
  106. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/voice_receiver.rb +69 -0
  107. data/lib/2018-03-01/generated/azure_mgmt_monitor/models/webhook_receiver.rb +58 -0
  108. data/lib/2018-03-01/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  109. data/lib/2018-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +138 -0
  110. data/lib/2018-04-16/generated/azure_mgmt_monitor.rb +46 -0
  111. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/action.rb +47 -0
  112. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/alert_severity.rb +19 -0
  113. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/alerting_action.rb +99 -0
  114. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/az_ns_action_group.rb +78 -0
  115. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/conditional_operator.rb +17 -0
  116. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/enabled.rb +16 -0
  117. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
  118. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/log_metric_trigger.rb +83 -0
  119. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/log_search_rule_resource.rb +174 -0
  120. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/log_search_rule_resource_collection.rb +56 -0
  121. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/log_search_rule_resource_patch.rb +67 -0
  122. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/metric_trigger_type.rb +16 -0
  123. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/provisioning_state.rb +18 -0
  124. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/query_type.rb +15 -0
  125. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/resource.rb +101 -0
  126. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/schedule.rb +59 -0
  127. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/source.rb +89 -0
  128. data/lib/2018-04-16/generated/azure_mgmt_monitor/models/trigger_condition.rb +72 -0
  129. data/lib/2018-04-16/generated/azure_mgmt_monitor/module_definition.rb +9 -0
  130. data/lib/2018-04-16/generated/azure_mgmt_monitor/monitor_client.rb +130 -0
  131. data/lib/2018-04-16/generated/azure_mgmt_monitor/scheduled_query_rules.rb +610 -0
  132. data/lib/azure_mgmt_monitor.rb +5 -2
  133. data/lib/profiles/latest/modules/monitor_profile_module.rb +119 -45
  134. data/lib/version.rb +1 -1
  135. metadata +113 -3
@@ -0,0 +1,19 @@
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::V2015_04_01
7
+ module Models
8
+ #
9
+ # Defines values for EventLevel
10
+ #
11
+ module EventLevel
12
+ Critical = "Critical"
13
+ Error = "Error"
14
+ Warning = "Warning"
15
+ Informational = "Informational"
16
+ Verbose = "Verbose"
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,79 @@
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::V2015_04_01
7
+ module Models
8
+ #
9
+ # The Http request info.
10
+ #
11
+ class HttpRequestInfo
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] the client request id.
16
+ attr_accessor :client_request_id
17
+
18
+ # @return [String] the client Ip Address
19
+ attr_accessor :client_ip_address
20
+
21
+ # @return [String] the Http request method.
22
+ attr_accessor :method
23
+
24
+ # @return [String] the Uri.
25
+ attr_accessor :uri
26
+
27
+
28
+ #
29
+ # Mapper for HttpRequestInfo class as Ruby Hash.
30
+ # This will be used for serialization/deserialization.
31
+ #
32
+ def self.mapper()
33
+ {
34
+ client_side_validation: true,
35
+ required: false,
36
+ serialized_name: 'HttpRequestInfo',
37
+ type: {
38
+ name: 'Composite',
39
+ class_name: 'HttpRequestInfo',
40
+ model_properties: {
41
+ client_request_id: {
42
+ client_side_validation: true,
43
+ required: false,
44
+ serialized_name: 'clientRequestId',
45
+ type: {
46
+ name: 'String'
47
+ }
48
+ },
49
+ client_ip_address: {
50
+ client_side_validation: true,
51
+ required: false,
52
+ serialized_name: 'clientIpAddress',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ },
57
+ method: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ serialized_name: 'method',
61
+ type: {
62
+ name: 'String'
63
+ }
64
+ },
65
+ uri: {
66
+ client_side_validation: true,
67
+ required: false,
68
+ serialized_name: 'uri',
69
+ type: {
70
+ name: 'String'
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ end
77
+ end
78
+ end
79
+ 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::V2015_04_01
7
+ module Models
8
+ #
9
+ # The localizable string class.
10
+ #
11
+ class LocalizableString
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] the invariant value.
16
+ attr_accessor :value
17
+
18
+ # @return [String] the locale specific value.
19
+ attr_accessor :localized_value
20
+
21
+
22
+ #
23
+ # Mapper for LocalizableString 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: 'LocalizableString',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'LocalizableString',
34
+ model_properties: {
35
+ value: {
36
+ client_side_validation: true,
37
+ required: true,
38
+ serialized_name: 'value',
39
+ type: {
40
+ name: 'String'
41
+ }
42
+ },
43
+ localized_value: {
44
+ client_side_validation: true,
45
+ required: false,
46
+ serialized_name: 'localizedValue',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ end
55
+ end
56
+ end
57
+ end
@@ -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::V2015_04_01
7
+ module Models
8
+ #
9
+ # the authorization used by the user who has performed the operation that
10
+ # led to this event. This captures the RBAC properties of the event. These
11
+ # usually include the 'action', 'role' and the 'scope'
12
+ #
13
+ class SenderAuthorization
14
+
15
+ include MsRestAzure
16
+
17
+ # @return [String] the permissible actions. For instance:
18
+ # microsoft.support/supporttickets/write
19
+ attr_accessor :action
20
+
21
+ # @return [String] the role of the user. For instance: Subscription Admin
22
+ attr_accessor :role
23
+
24
+ # @return [String] the scope.
25
+ attr_accessor :scope
26
+
27
+
28
+ #
29
+ # Mapper for SenderAuthorization class as Ruby Hash.
30
+ # This will be used for serialization/deserialization.
31
+ #
32
+ def self.mapper()
33
+ {
34
+ client_side_validation: true,
35
+ required: false,
36
+ serialized_name: 'SenderAuthorization',
37
+ type: {
38
+ name: 'Composite',
39
+ class_name: 'SenderAuthorization',
40
+ model_properties: {
41
+ action: {
42
+ client_side_validation: true,
43
+ required: false,
44
+ serialized_name: 'action',
45
+ type: {
46
+ name: 'String'
47
+ }
48
+ },
49
+ role: {
50
+ client_side_validation: true,
51
+ required: false,
52
+ serialized_name: 'role',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ },
57
+ scope: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ serialized_name: 'scope',
61
+ type: {
62
+ name: 'String'
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ end
69
+ end
70
+ end
71
+ end
@@ -34,12 +34,21 @@ module Azure::Monitor::Mgmt::V2015_04_01
34
34
  # is generated and included in each request. Default is true.
35
35
  attr_accessor :generate_client_request_id
36
36
 
37
+ # @return [ActivityLogs] activity_logs
38
+ attr_reader :activity_logs
39
+
37
40
  # @return [AutoscaleSettings] autoscale_settings
38
41
  attr_reader :autoscale_settings
39
42
 
43
+ # @return [EventCategories] event_categories
44
+ attr_reader :event_categories
45
+
40
46
  # @return [Operations] operations
41
47
  attr_reader :operations
42
48
 
49
+ # @return [TenantActivityLogs] tenant_activity_logs
50
+ attr_reader :tenant_activity_logs
51
+
43
52
  #
44
53
  # Creates initializes a new instance of the MonitorManagementClient class.
45
54
  # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
@@ -53,8 +62,11 @@ module Azure::Monitor::Mgmt::V2015_04_01
53
62
  fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
54
63
  @credentials = credentials
55
64
 
65
+ @activity_logs = ActivityLogs.new(self)
56
66
  @autoscale_settings = AutoscaleSettings.new(self)
67
+ @event_categories = EventCategories.new(self)
57
68
  @operations = Operations.new(self)
69
+ @tenant_activity_logs = TenantActivityLogs.new(self)
58
70
  @api_version = '2015-04-01'
59
71
  @accept_language = 'en-US'
60
72
  @long_running_operation_retry_timeout = 30
@@ -5,7 +5,7 @@
5
5
 
6
6
  module Azure::Monitor::Mgmt::V2015_04_01
7
7
  #
8
- # Operations
8
+ # Monitor Management Client
9
9
  #
10
10
  class Operations
11
11
  include MsRestAzure
@@ -0,0 +1,339 @@
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::V2015_04_01
7
+ #
8
+ # Monitor Management Client
9
+ #
10
+ class TenantActivityLogs
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the TenantActivityLogs 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
+ # Gets the Activity Logs for the Tenant.<br>Everything that is applicable to
26
+ # the API to get the Activity Logs for the subscription is applicable to this
27
+ # API (the parameters, $filter, etc.).<br>One thing to point out here is that
28
+ # this API does *not* retrieve the logs at the individual subscription of the
29
+ # tenant but only surfaces the logs that were generated at the tenant level.
30
+ #
31
+ # @param filter [String] Reduces the set of data collected. <br>The **$filter**
32
+ # is very restricted and allows only the following patterns.<br>- List events
33
+ # for a resource group: $filter=eventTimestamp ge '<Start Time>' and
34
+ # eventTimestamp le '<End Time>' and eventChannels eq 'Admin, Operation' and
35
+ # resourceGroupName eq '<ResourceGroupName>'.<br>- List events for resource:
36
+ # $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le '<End Time>'
37
+ # and eventChannels eq 'Admin, Operation' and resourceUri eq
38
+ # '<ResourceURI>'.<br>- List events for a subscription: $filter=eventTimestamp
39
+ # ge '<Start Time>' and eventTimestamp le '<End Time>' and eventChannels eq
40
+ # 'Admin, Operation'.<br>- List events for a resource provider:
41
+ # $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le '<End Time>'
42
+ # and eventChannels eq 'Admin, Operation' and resourceProvider eq
43
+ # '<ResourceProviderName>'.<br>- List events for a correlation Id:
44
+ # api-version=2014-04-01&$filter=eventTimestamp ge
45
+ # '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
46
+ # '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and
47
+ # correlationId eq '<CorrelationID>'.<br>**NOTE**: No other syntax is allowed.
48
+ # @param select [String] Used to fetch events with only the given
49
+ # properties.<br>The **$select** argument is a comma separated list of property
50
+ # names to be returned. Possible values are: *authorization*, *claims*,
51
+ # *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*,
52
+ # *httpRequest*, *level*, *operationId*, *operationName*, *properties*,
53
+ # *resourceGroupName*, *resourceProviderName*, *resourceId*, *status*,
54
+ # *submissionTimestamp*, *subStatus*, *subscriptionId*
55
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
56
+ # will be added to the HTTP request.
57
+ #
58
+ # @return [Array<EventData>] operation results.
59
+ #
60
+ def list(filter:nil, select:nil, custom_headers:nil)
61
+ first_page = list_as_lazy(filter:filter, select:select, custom_headers:custom_headers)
62
+ first_page.get_all_items
63
+ end
64
+
65
+ #
66
+ # Gets the Activity Logs for the Tenant.<br>Everything that is applicable to
67
+ # the API to get the Activity Logs for the subscription is applicable to this
68
+ # API (the parameters, $filter, etc.).<br>One thing to point out here is that
69
+ # this API does *not* retrieve the logs at the individual subscription of the
70
+ # tenant but only surfaces the logs that were generated at the tenant level.
71
+ #
72
+ # @param filter [String] Reduces the set of data collected. <br>The **$filter**
73
+ # is very restricted and allows only the following patterns.<br>- List events
74
+ # for a resource group: $filter=eventTimestamp ge '<Start Time>' and
75
+ # eventTimestamp le '<End Time>' and eventChannels eq 'Admin, Operation' and
76
+ # resourceGroupName eq '<ResourceGroupName>'.<br>- List events for resource:
77
+ # $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le '<End Time>'
78
+ # and eventChannels eq 'Admin, Operation' and resourceUri eq
79
+ # '<ResourceURI>'.<br>- List events for a subscription: $filter=eventTimestamp
80
+ # ge '<Start Time>' and eventTimestamp le '<End Time>' and eventChannels eq
81
+ # 'Admin, Operation'.<br>- List events for a resource provider:
82
+ # $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le '<End Time>'
83
+ # and eventChannels eq 'Admin, Operation' and resourceProvider eq
84
+ # '<ResourceProviderName>'.<br>- List events for a correlation Id:
85
+ # api-version=2014-04-01&$filter=eventTimestamp ge
86
+ # '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
87
+ # '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and
88
+ # correlationId eq '<CorrelationID>'.<br>**NOTE**: No other syntax is allowed.
89
+ # @param select [String] Used to fetch events with only the given
90
+ # properties.<br>The **$select** argument is a comma separated list of property
91
+ # names to be returned. Possible values are: *authorization*, *claims*,
92
+ # *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*,
93
+ # *httpRequest*, *level*, *operationId*, *operationName*, *properties*,
94
+ # *resourceGroupName*, *resourceProviderName*, *resourceId*, *status*,
95
+ # *submissionTimestamp*, *subStatus*, *subscriptionId*
96
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
97
+ # will be added to the HTTP request.
98
+ #
99
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
100
+ #
101
+ def list_with_http_info(filter:nil, select:nil, custom_headers:nil)
102
+ list_async(filter:filter, select:select, custom_headers:custom_headers).value!
103
+ end
104
+
105
+ #
106
+ # Gets the Activity Logs for the Tenant.<br>Everything that is applicable to
107
+ # the API to get the Activity Logs for the subscription is applicable to this
108
+ # API (the parameters, $filter, etc.).<br>One thing to point out here is that
109
+ # this API does *not* retrieve the logs at the individual subscription of the
110
+ # tenant but only surfaces the logs that were generated at the tenant level.
111
+ #
112
+ # @param filter [String] Reduces the set of data collected. <br>The **$filter**
113
+ # is very restricted and allows only the following patterns.<br>- List events
114
+ # for a resource group: $filter=eventTimestamp ge '<Start Time>' and
115
+ # eventTimestamp le '<End Time>' and eventChannels eq 'Admin, Operation' and
116
+ # resourceGroupName eq '<ResourceGroupName>'.<br>- List events for resource:
117
+ # $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le '<End Time>'
118
+ # and eventChannels eq 'Admin, Operation' and resourceUri eq
119
+ # '<ResourceURI>'.<br>- List events for a subscription: $filter=eventTimestamp
120
+ # ge '<Start Time>' and eventTimestamp le '<End Time>' and eventChannels eq
121
+ # 'Admin, Operation'.<br>- List events for a resource provider:
122
+ # $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le '<End Time>'
123
+ # and eventChannels eq 'Admin, Operation' and resourceProvider eq
124
+ # '<ResourceProviderName>'.<br>- List events for a correlation Id:
125
+ # api-version=2014-04-01&$filter=eventTimestamp ge
126
+ # '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
127
+ # '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and
128
+ # correlationId eq '<CorrelationID>'.<br>**NOTE**: No other syntax is allowed.
129
+ # @param select [String] Used to fetch events with only the given
130
+ # properties.<br>The **$select** argument is a comma separated list of property
131
+ # names to be returned. Possible values are: *authorization*, *claims*,
132
+ # *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*,
133
+ # *httpRequest*, *level*, *operationId*, *operationName*, *properties*,
134
+ # *resourceGroupName*, *resourceProviderName*, *resourceId*, *status*,
135
+ # *submissionTimestamp*, *subStatus*, *subscriptionId*
136
+ # @param [Hash{String => String}] A hash of custom headers that will be added
137
+ # to the HTTP request.
138
+ #
139
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
140
+ #
141
+ def list_async(filter:nil, select:nil, custom_headers:nil)
142
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
143
+
144
+
145
+ request_headers = {}
146
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
147
+
148
+ # Set Headers
149
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
150
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
151
+ path_template = 'providers/microsoft.insights/eventtypes/management/values'
152
+
153
+ request_url = @base_url || @client.base_url
154
+
155
+ options = {
156
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
157
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$select' => select},
158
+ headers: request_headers.merge(custom_headers || {}),
159
+ base_url: request_url
160
+ }
161
+ promise = @client.make_request_async(:get, path_template, options)
162
+
163
+ promise = promise.then do |result|
164
+ http_response = result.response
165
+ status_code = http_response.status
166
+ response_content = http_response.body
167
+ unless status_code == 200
168
+ error_model = JSON.load(response_content)
169
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
170
+ end
171
+
172
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
173
+ # Deserialize Response
174
+ if status_code == 200
175
+ begin
176
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
177
+ result_mapper = Azure::Monitor::Mgmt::V2015_04_01::Models::EventDataCollection.mapper()
178
+ result.body = @client.deserialize(result_mapper, parsed_response)
179
+ rescue Exception => e
180
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
181
+ end
182
+ end
183
+
184
+ result
185
+ end
186
+
187
+ promise.execute
188
+ end
189
+
190
+ #
191
+ # Gets the Activity Logs for the Tenant.<br>Everything that is applicable to
192
+ # the API to get the Activity Logs for the subscription is applicable to this
193
+ # API (the parameters, $filter, etc.).<br>One thing to point out here is that
194
+ # this API does *not* retrieve the logs at the individual subscription of the
195
+ # tenant but only surfaces the logs that were generated at the tenant level.
196
+ #
197
+ # @param next_page_link [String] The NextLink from the previous successful call
198
+ # to List operation.
199
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
200
+ # will be added to the HTTP request.
201
+ #
202
+ # @return [EventDataCollection] operation results.
203
+ #
204
+ def list_next(next_page_link, custom_headers:nil)
205
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
206
+ response.body unless response.nil?
207
+ end
208
+
209
+ #
210
+ # Gets the Activity Logs for the Tenant.<br>Everything that is applicable to
211
+ # the API to get the Activity Logs for the subscription is applicable to this
212
+ # API (the parameters, $filter, etc.).<br>One thing to point out here is that
213
+ # this API does *not* retrieve the logs at the individual subscription of the
214
+ # tenant but only surfaces the logs that were generated at the tenant level.
215
+ #
216
+ # @param next_page_link [String] The NextLink from the previous successful call
217
+ # to List operation.
218
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
219
+ # will be added to the HTTP request.
220
+ #
221
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
222
+ #
223
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
224
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
225
+ end
226
+
227
+ #
228
+ # Gets the Activity Logs for the Tenant.<br>Everything that is applicable to
229
+ # the API to get the Activity Logs for the subscription is applicable to this
230
+ # API (the parameters, $filter, etc.).<br>One thing to point out here is that
231
+ # this API does *not* retrieve the logs at the individual subscription of the
232
+ # tenant but only surfaces the logs that were generated at the tenant level.
233
+ #
234
+ # @param next_page_link [String] The NextLink from the previous successful call
235
+ # to List operation.
236
+ # @param [Hash{String => String}] A hash of custom headers that will be added
237
+ # to the HTTP request.
238
+ #
239
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
240
+ #
241
+ def list_next_async(next_page_link, custom_headers:nil)
242
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
243
+
244
+
245
+ request_headers = {}
246
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
247
+
248
+ # Set Headers
249
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
250
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
251
+ path_template = '{nextLink}'
252
+
253
+ request_url = @base_url || @client.base_url
254
+
255
+ options = {
256
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
257
+ skip_encoding_path_params: {'nextLink' => next_page_link},
258
+ headers: request_headers.merge(custom_headers || {}),
259
+ base_url: request_url
260
+ }
261
+ promise = @client.make_request_async(:get, path_template, options)
262
+
263
+ promise = promise.then do |result|
264
+ http_response = result.response
265
+ status_code = http_response.status
266
+ response_content = http_response.body
267
+ unless status_code == 200
268
+ error_model = JSON.load(response_content)
269
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
270
+ end
271
+
272
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
273
+ # Deserialize Response
274
+ if status_code == 200
275
+ begin
276
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
277
+ result_mapper = Azure::Monitor::Mgmt::V2015_04_01::Models::EventDataCollection.mapper()
278
+ result.body = @client.deserialize(result_mapper, parsed_response)
279
+ rescue Exception => e
280
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
281
+ end
282
+ end
283
+
284
+ result
285
+ end
286
+
287
+ promise.execute
288
+ end
289
+
290
+ #
291
+ # Gets the Activity Logs for the Tenant.<br>Everything that is applicable to
292
+ # the API to get the Activity Logs for the subscription is applicable to this
293
+ # API (the parameters, $filter, etc.).<br>One thing to point out here is that
294
+ # this API does *not* retrieve the logs at the individual subscription of the
295
+ # tenant but only surfaces the logs that were generated at the tenant level.
296
+ #
297
+ # @param filter [String] Reduces the set of data collected. <br>The **$filter**
298
+ # is very restricted and allows only the following patterns.<br>- List events
299
+ # for a resource group: $filter=eventTimestamp ge '<Start Time>' and
300
+ # eventTimestamp le '<End Time>' and eventChannels eq 'Admin, Operation' and
301
+ # resourceGroupName eq '<ResourceGroupName>'.<br>- List events for resource:
302
+ # $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le '<End Time>'
303
+ # and eventChannels eq 'Admin, Operation' and resourceUri eq
304
+ # '<ResourceURI>'.<br>- List events for a subscription: $filter=eventTimestamp
305
+ # ge '<Start Time>' and eventTimestamp le '<End Time>' and eventChannels eq
306
+ # 'Admin, Operation'.<br>- List events for a resource provider:
307
+ # $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le '<End Time>'
308
+ # and eventChannels eq 'Admin, Operation' and resourceProvider eq
309
+ # '<ResourceProviderName>'.<br>- List events for a correlation Id:
310
+ # api-version=2014-04-01&$filter=eventTimestamp ge
311
+ # '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
312
+ # '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and
313
+ # correlationId eq '<CorrelationID>'.<br>**NOTE**: No other syntax is allowed.
314
+ # @param select [String] Used to fetch events with only the given
315
+ # properties.<br>The **$select** argument is a comma separated list of property
316
+ # names to be returned. Possible values are: *authorization*, *claims*,
317
+ # *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*,
318
+ # *httpRequest*, *level*, *operationId*, *operationName*, *properties*,
319
+ # *resourceGroupName*, *resourceProviderName*, *resourceId*, *status*,
320
+ # *submissionTimestamp*, *subStatus*, *subscriptionId*
321
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
322
+ # will be added to the HTTP request.
323
+ #
324
+ # @return [EventDataCollection] which provide lazy access to pages of the
325
+ # response.
326
+ #
327
+ def list_as_lazy(filter:nil, select:nil, custom_headers:nil)
328
+ response = list_async(filter:filter, select:select, custom_headers:custom_headers).value!
329
+ unless response.nil?
330
+ page = response.body
331
+ page.next_method = Proc.new do |next_page_link|
332
+ list_next_async(next_page_link, custom_headers:custom_headers)
333
+ end
334
+ page
335
+ end
336
+ end
337
+
338
+ end
339
+ end