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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f96e90542f1dd2557d8fff77264391640e5d67a1
4
- data.tar.gz: 41f6c8b291315c009504e32cdd45c2a85cd78803
3
+ metadata.gz: 632ce0e54620954bb1de1f7c039ce593906186a0
4
+ data.tar.gz: 1fcbda72af50b464ea0b4e55fc7ebdf43d67e524
5
5
  SHA512:
6
- metadata.gz: 5a35406c67bff3ccd3022d8211adbd08fc6d133e465012dde60fcc0e9636eea744d1c0949e9b422fea6308c6f5f45c0f3b9b239f436d9678887a3e2b03d3745d
7
- data.tar.gz: a349a683c8a98ba71922e2ed47c0e577d6cdf9aeadce71175284c881a89a48c9181e267ba23f56427621e74a96f8250cec595ecaf1a890afe2c92afcc9c9442c
6
+ metadata.gz: 831c8b007c9ff042c38e4fb606ae5d16215d433b560e580da33b64bdbb58bf229116dee018c5e2c70c1181190bf079503f6e1e87be65d2ad3240531ce7da9810
7
+ data.tar.gz: 784d0523638852fe293f1f897479dbe094fc3997fb37fd13efc699b598ae79325d72f1711f1b30fad95e5d531dad65fcbe45b40914f3b18cda201c41ba6b642c
@@ -20,30 +20,40 @@ require '2015-04-01/generated/azure_mgmt_monitor/module_definition'
20
20
  require 'ms_rest_azure'
21
21
 
22
22
  module Azure::Monitor::Mgmt::V2015_04_01
23
+ autoload :ActivityLogs, '2015-04-01/generated/azure_mgmt_monitor/activity_logs.rb'
23
24
  autoload :AutoscaleSettings, '2015-04-01/generated/azure_mgmt_monitor/autoscale_settings.rb'
25
+ autoload :EventCategories, '2015-04-01/generated/azure_mgmt_monitor/event_categories.rb'
24
26
  autoload :Operations, '2015-04-01/generated/azure_mgmt_monitor/operations.rb'
27
+ autoload :TenantActivityLogs, '2015-04-01/generated/azure_mgmt_monitor/tenant_activity_logs.rb'
25
28
  autoload :MonitorManagementClient, '2015-04-01/generated/azure_mgmt_monitor/monitor_management_client.rb'
26
29
 
27
30
  module Models
31
+ autoload :RecurrentSchedule, '2015-04-01/generated/azure_mgmt_monitor/models/recurrent_schedule.rb'
32
+ autoload :Recurrence, '2015-04-01/generated/azure_mgmt_monitor/models/recurrence.rb'
33
+ autoload :SenderAuthorization, '2015-04-01/generated/azure_mgmt_monitor/models/sender_authorization.rb'
34
+ autoload :AutoscaleProfile, '2015-04-01/generated/azure_mgmt_monitor/models/autoscale_profile.rb'
35
+ autoload :EventData, '2015-04-01/generated/azure_mgmt_monitor/models/event_data.rb'
28
36
  autoload :EmailNotification, '2015-04-01/generated/azure_mgmt_monitor/models/email_notification.rb'
37
+ autoload :ErrorResponse, '2015-04-01/generated/azure_mgmt_monitor/models/error_response.rb'
29
38
  autoload :WebhookNotification, '2015-04-01/generated/azure_mgmt_monitor/models/webhook_notification.rb'
30
39
  autoload :ScaleCapacity, '2015-04-01/generated/azure_mgmt_monitor/models/scale_capacity.rb'
31
40
  autoload :AutoscaleNotification, '2015-04-01/generated/azure_mgmt_monitor/models/autoscale_notification.rb'
32
41
  autoload :ScaleAction, '2015-04-01/generated/azure_mgmt_monitor/models/scale_action.rb'
33
42
  autoload :ScaleRule, '2015-04-01/generated/azure_mgmt_monitor/models/scale_rule.rb'
34
- autoload :RecurrentSchedule, '2015-04-01/generated/azure_mgmt_monitor/models/recurrent_schedule.rb'
43
+ autoload :LocalizableString, '2015-04-01/generated/azure_mgmt_monitor/models/localizable_string.rb'
35
44
  autoload :AutoscaleSettingResourcePatch, '2015-04-01/generated/azure_mgmt_monitor/models/autoscale_setting_resource_patch.rb'
36
- autoload :AutoscaleProfile, '2015-04-01/generated/azure_mgmt_monitor/models/autoscale_profile.rb'
45
+ autoload :EventDataCollection, '2015-04-01/generated/azure_mgmt_monitor/models/event_data_collection.rb'
37
46
  autoload :AutoscaleSettingResourceCollection, '2015-04-01/generated/azure_mgmt_monitor/models/autoscale_setting_resource_collection.rb'
38
47
  autoload :MetricTrigger, '2015-04-01/generated/azure_mgmt_monitor/models/metric_trigger.rb'
39
- autoload :ErrorResponse, '2015-04-01/generated/azure_mgmt_monitor/models/error_response.rb'
40
- autoload :Recurrence, '2015-04-01/generated/azure_mgmt_monitor/models/recurrence.rb'
48
+ autoload :EventCategoryCollection, '2015-04-01/generated/azure_mgmt_monitor/models/event_category_collection.rb'
49
+ autoload :HttpRequestInfo, '2015-04-01/generated/azure_mgmt_monitor/models/http_request_info.rb'
41
50
  autoload :OperationDisplay, '2015-04-01/generated/azure_mgmt_monitor/models/operation_display.rb'
42
51
  autoload :TimeWindow, '2015-04-01/generated/azure_mgmt_monitor/models/time_window.rb'
43
52
  autoload :Operation, '2015-04-01/generated/azure_mgmt_monitor/models/operation.rb'
44
53
  autoload :Resource, '2015-04-01/generated/azure_mgmt_monitor/models/resource.rb'
45
54
  autoload :OperationListResult, '2015-04-01/generated/azure_mgmt_monitor/models/operation_list_result.rb'
46
55
  autoload :AutoscaleSettingResource, '2015-04-01/generated/azure_mgmt_monitor/models/autoscale_setting_resource.rb'
56
+ autoload :EventLevel, '2015-04-01/generated/azure_mgmt_monitor/models/event_level.rb'
47
57
  autoload :MetricStatisticType, '2015-04-01/generated/azure_mgmt_monitor/models/metric_statistic_type.rb'
48
58
  autoload :TimeAggregationType, '2015-04-01/generated/azure_mgmt_monitor/models/time_aggregation_type.rb'
49
59
  autoload :ComparisonOperationType, '2015-04-01/generated/azure_mgmt_monitor/models/comparison_operation_type.rb'
@@ -0,0 +1,313 @@
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 ActivityLogs
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the ActivityLogs 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
+ # Provides the list of records from the activity logs.
26
+ #
27
+ # @param filter [String] Reduces the set of data collected.<br>The **$filter**
28
+ # argument is very restricted and allows only the following patterns.<br>-
29
+ # *List events for a resource group*: $filter=eventTimestamp ge
30
+ # '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
31
+ # '2014-07-20T04:36:37.6407898Z' and resourceGroupName eq
32
+ # 'resourceGroupName'.<br>- *List events for resource*: $filter=eventTimestamp
33
+ # ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
34
+ # '2014-07-20T04:36:37.6407898Z' and resourceUri eq 'resourceURI'.<br>- *List
35
+ # events for a subscription in a time range*: $filter=eventTimestamp ge
36
+ # '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
37
+ # '2014-07-20T04:36:37.6407898Z'.<br>- *List events for a resource provider*:
38
+ # $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp
39
+ # le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq
40
+ # 'resourceProviderName'.<br>- *List events for a correlation Id*:
41
+ # $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp
42
+ # le '2014-07-20T04:36:37.6407898Z' and correlationId eq
43
+ # 'correlationID'.<br><br>**NOTE**: No other syntax is allowed.
44
+ # @param select [String] Used to fetch events with only the given
45
+ # properties.<br>The **$select** argument is a comma separated list of property
46
+ # names to be returned. Possible values are: *authorization*, *claims*,
47
+ # *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*,
48
+ # *httpRequest*, *level*, *operationId*, *operationName*, *properties*,
49
+ # *resourceGroupName*, *resourceProviderName*, *resourceId*, *status*,
50
+ # *submissionTimestamp*, *subStatus*, *subscriptionId*
51
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
52
+ # will be added to the HTTP request.
53
+ #
54
+ # @return [Array<EventData>] operation results.
55
+ #
56
+ def list(filter:nil, select:nil, custom_headers:nil)
57
+ first_page = list_as_lazy(filter:filter, select:select, custom_headers:custom_headers)
58
+ first_page.get_all_items
59
+ end
60
+
61
+ #
62
+ # Provides the list of records from the activity logs.
63
+ #
64
+ # @param filter [String] Reduces the set of data collected.<br>The **$filter**
65
+ # argument is very restricted and allows only the following patterns.<br>-
66
+ # *List events for a resource group*: $filter=eventTimestamp ge
67
+ # '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
68
+ # '2014-07-20T04:36:37.6407898Z' and resourceGroupName eq
69
+ # 'resourceGroupName'.<br>- *List events for resource*: $filter=eventTimestamp
70
+ # ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
71
+ # '2014-07-20T04:36:37.6407898Z' and resourceUri eq 'resourceURI'.<br>- *List
72
+ # events for a subscription in a time range*: $filter=eventTimestamp ge
73
+ # '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
74
+ # '2014-07-20T04:36:37.6407898Z'.<br>- *List events for a resource provider*:
75
+ # $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp
76
+ # le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq
77
+ # 'resourceProviderName'.<br>- *List events for a correlation Id*:
78
+ # $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp
79
+ # le '2014-07-20T04:36:37.6407898Z' and correlationId eq
80
+ # 'correlationID'.<br><br>**NOTE**: No other syntax is allowed.
81
+ # @param select [String] Used to fetch events with only the given
82
+ # properties.<br>The **$select** argument is a comma separated list of property
83
+ # names to be returned. Possible values are: *authorization*, *claims*,
84
+ # *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*,
85
+ # *httpRequest*, *level*, *operationId*, *operationName*, *properties*,
86
+ # *resourceGroupName*, *resourceProviderName*, *resourceId*, *status*,
87
+ # *submissionTimestamp*, *subStatus*, *subscriptionId*
88
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
89
+ # will be added to the HTTP request.
90
+ #
91
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
92
+ #
93
+ def list_with_http_info(filter:nil, select:nil, custom_headers:nil)
94
+ list_async(filter:filter, select:select, custom_headers:custom_headers).value!
95
+ end
96
+
97
+ #
98
+ # Provides the list of records from the activity logs.
99
+ #
100
+ # @param filter [String] Reduces the set of data collected.<br>The **$filter**
101
+ # argument is very restricted and allows only the following patterns.<br>-
102
+ # *List events for a resource group*: $filter=eventTimestamp ge
103
+ # '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
104
+ # '2014-07-20T04:36:37.6407898Z' and resourceGroupName eq
105
+ # 'resourceGroupName'.<br>- *List events for resource*: $filter=eventTimestamp
106
+ # ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
107
+ # '2014-07-20T04:36:37.6407898Z' and resourceUri eq 'resourceURI'.<br>- *List
108
+ # events for a subscription in a time range*: $filter=eventTimestamp ge
109
+ # '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
110
+ # '2014-07-20T04:36:37.6407898Z'.<br>- *List events for a resource provider*:
111
+ # $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp
112
+ # le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq
113
+ # 'resourceProviderName'.<br>- *List events for a correlation Id*:
114
+ # $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp
115
+ # le '2014-07-20T04:36:37.6407898Z' and correlationId eq
116
+ # 'correlationID'.<br><br>**NOTE**: No other syntax is allowed.
117
+ # @param select [String] Used to fetch events with only the given
118
+ # properties.<br>The **$select** argument is a comma separated list of property
119
+ # names to be returned. Possible values are: *authorization*, *claims*,
120
+ # *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*,
121
+ # *httpRequest*, *level*, *operationId*, *operationName*, *properties*,
122
+ # *resourceGroupName*, *resourceProviderName*, *resourceId*, *status*,
123
+ # *submissionTimestamp*, *subStatus*, *subscriptionId*
124
+ # @param [Hash{String => String}] A hash of custom headers that will be added
125
+ # to the HTTP request.
126
+ #
127
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
128
+ #
129
+ def list_async(filter:nil, select:nil, custom_headers:nil)
130
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
131
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
132
+
133
+
134
+ request_headers = {}
135
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
136
+
137
+ # Set Headers
138
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
139
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
140
+ path_template = 'subscriptions/{subscriptionId}/providers/microsoft.insights/eventtypes/management/values'
141
+
142
+ request_url = @base_url || @client.base_url
143
+
144
+ options = {
145
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
146
+ path_params: {'subscriptionId' => @client.subscription_id},
147
+ query_params: {'api-version' => @client.api_version,'$filter' => filter,'$select' => select},
148
+ headers: request_headers.merge(custom_headers || {}),
149
+ base_url: request_url
150
+ }
151
+ promise = @client.make_request_async(:get, path_template, options)
152
+
153
+ promise = promise.then do |result|
154
+ http_response = result.response
155
+ status_code = http_response.status
156
+ response_content = http_response.body
157
+ unless status_code == 200
158
+ error_model = JSON.load(response_content)
159
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
160
+ end
161
+
162
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
163
+ # Deserialize Response
164
+ if status_code == 200
165
+ begin
166
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
167
+ result_mapper = Azure::Monitor::Mgmt::V2015_04_01::Models::EventDataCollection.mapper()
168
+ result.body = @client.deserialize(result_mapper, parsed_response)
169
+ rescue Exception => e
170
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
171
+ end
172
+ end
173
+
174
+ result
175
+ end
176
+
177
+ promise.execute
178
+ end
179
+
180
+ #
181
+ # Provides the list of records from the activity logs.
182
+ #
183
+ # @param next_page_link [String] The NextLink from the previous successful call
184
+ # to List operation.
185
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
186
+ # will be added to the HTTP request.
187
+ #
188
+ # @return [EventDataCollection] operation results.
189
+ #
190
+ def list_next(next_page_link, custom_headers:nil)
191
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
192
+ response.body unless response.nil?
193
+ end
194
+
195
+ #
196
+ # Provides the list of records from the activity logs.
197
+ #
198
+ # @param next_page_link [String] The NextLink from the previous successful call
199
+ # to List operation.
200
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
201
+ # will be added to the HTTP request.
202
+ #
203
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
204
+ #
205
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
206
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
207
+ end
208
+
209
+ #
210
+ # Provides the list of records from the activity logs.
211
+ #
212
+ # @param next_page_link [String] The NextLink from the previous successful call
213
+ # to List operation.
214
+ # @param [Hash{String => String}] A hash of custom headers that will be added
215
+ # to the HTTP request.
216
+ #
217
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
218
+ #
219
+ def list_next_async(next_page_link, custom_headers:nil)
220
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
221
+
222
+
223
+ request_headers = {}
224
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
225
+
226
+ # Set Headers
227
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
228
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
229
+ path_template = '{nextLink}'
230
+
231
+ request_url = @base_url || @client.base_url
232
+
233
+ options = {
234
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
235
+ skip_encoding_path_params: {'nextLink' => next_page_link},
236
+ headers: request_headers.merge(custom_headers || {}),
237
+ base_url: request_url
238
+ }
239
+ promise = @client.make_request_async(:get, path_template, options)
240
+
241
+ promise = promise.then do |result|
242
+ http_response = result.response
243
+ status_code = http_response.status
244
+ response_content = http_response.body
245
+ unless status_code == 200
246
+ error_model = JSON.load(response_content)
247
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
248
+ end
249
+
250
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
251
+ # Deserialize Response
252
+ if status_code == 200
253
+ begin
254
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
255
+ result_mapper = Azure::Monitor::Mgmt::V2015_04_01::Models::EventDataCollection.mapper()
256
+ result.body = @client.deserialize(result_mapper, parsed_response)
257
+ rescue Exception => e
258
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
259
+ end
260
+ end
261
+
262
+ result
263
+ end
264
+
265
+ promise.execute
266
+ end
267
+
268
+ #
269
+ # Provides the list of records from the activity logs.
270
+ #
271
+ # @param filter [String] Reduces the set of data collected.<br>The **$filter**
272
+ # argument is very restricted and allows only the following patterns.<br>-
273
+ # *List events for a resource group*: $filter=eventTimestamp ge
274
+ # '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
275
+ # '2014-07-20T04:36:37.6407898Z' and resourceGroupName eq
276
+ # 'resourceGroupName'.<br>- *List events for resource*: $filter=eventTimestamp
277
+ # ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
278
+ # '2014-07-20T04:36:37.6407898Z' and resourceUri eq 'resourceURI'.<br>- *List
279
+ # events for a subscription in a time range*: $filter=eventTimestamp ge
280
+ # '2014-07-16T04:36:37.6407898Z' and eventTimestamp le
281
+ # '2014-07-20T04:36:37.6407898Z'.<br>- *List events for a resource provider*:
282
+ # $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp
283
+ # le '2014-07-20T04:36:37.6407898Z' and resourceProvider eq
284
+ # 'resourceProviderName'.<br>- *List events for a correlation Id*:
285
+ # $filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp
286
+ # le '2014-07-20T04:36:37.6407898Z' and correlationId eq
287
+ # 'correlationID'.<br><br>**NOTE**: No other syntax is allowed.
288
+ # @param select [String] Used to fetch events with only the given
289
+ # properties.<br>The **$select** argument is a comma separated list of property
290
+ # names to be returned. Possible values are: *authorization*, *claims*,
291
+ # *correlationId*, *description*, *eventDataId*, *eventName*, *eventTimestamp*,
292
+ # *httpRequest*, *level*, *operationId*, *operationName*, *properties*,
293
+ # *resourceGroupName*, *resourceProviderName*, *resourceId*, *status*,
294
+ # *submissionTimestamp*, *subStatus*, *subscriptionId*
295
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
296
+ # will be added to the HTTP request.
297
+ #
298
+ # @return [EventDataCollection] which provide lazy access to pages of the
299
+ # response.
300
+ #
301
+ def list_as_lazy(filter:nil, select:nil, custom_headers:nil)
302
+ response = list_async(filter:filter, select:select, custom_headers:custom_headers).value!
303
+ unless response.nil?
304
+ page = response.body
305
+ page.next_method = Proc.new do |next_page_link|
306
+ list_next_async(next_page_link, custom_headers:custom_headers)
307
+ end
308
+ page
309
+ end
310
+ end
311
+
312
+ end
313
+ end
@@ -5,7 +5,7 @@
5
5
 
6
6
  module Azure::Monitor::Mgmt::V2015_04_01
7
7
  #
8
- # AutoscaleSettings
8
+ # Monitor Management Client
9
9
  #
10
10
  class AutoscaleSettings
11
11
  include MsRestAzure
@@ -0,0 +1,113 @@
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 EventCategories
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the EventCategories 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
+ # Get the list of available event categories supported in the Activity Logs
26
+ # Service.<br>The current list includes the following: Administrative,
27
+ # Security, ServiceHealth, Alert, Recommendation, Policy.
28
+ #
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [EventCategoryCollection] operation results.
33
+ #
34
+ def list(custom_headers:nil)
35
+ response = list_async(custom_headers:custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # Get the list of available event categories supported in the Activity Logs
41
+ # Service.<br>The current list includes the following: Administrative,
42
+ # Security, ServiceHealth, Alert, Recommendation, Policy.
43
+ #
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_with_http_info(custom_headers:nil)
50
+ list_async(custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Get the list of available event categories supported in the Activity Logs
55
+ # Service.<br>The current list includes the following: Administrative,
56
+ # Security, ServiceHealth, Alert, Recommendation, Policy.
57
+ #
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_async(custom_headers:nil)
64
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
65
+
66
+
67
+ request_headers = {}
68
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
69
+
70
+ # Set Headers
71
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
72
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
73
+ path_template = 'providers/microsoft.insights/eventcategories'
74
+
75
+ request_url = @base_url || @client.base_url
76
+
77
+ options = {
78
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
79
+ query_params: {'api-version' => @client.api_version},
80
+ headers: request_headers.merge(custom_headers || {}),
81
+ base_url: request_url
82
+ }
83
+ promise = @client.make_request_async(:get, path_template, options)
84
+
85
+ promise = promise.then do |result|
86
+ http_response = result.response
87
+ status_code = http_response.status
88
+ response_content = http_response.body
89
+ unless status_code == 200
90
+ error_model = JSON.load(response_content)
91
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
92
+ end
93
+
94
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
95
+ # Deserialize Response
96
+ if status_code == 200
97
+ begin
98
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
99
+ result_mapper = Azure::Monitor::Mgmt::V2015_04_01::Models::EventCategoryCollection.mapper()
100
+ result.body = @client.deserialize(result_mapper, parsed_response)
101
+ rescue Exception => e
102
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
103
+ end
104
+ end
105
+
106
+ result
107
+ end
108
+
109
+ promise.execute
110
+ end
111
+
112
+ end
113
+ end