azure_mgmt_monitor 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_monitor/action_groups.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/activity_log_alerts.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/alert_rule_incidents.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/alert_rules.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/autoscale_settings.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/diagnostic_settings_category_operations.rb +201 -0
- data/lib/generated/azure_mgmt_monitor/{service_diagnostic_settings_operations.rb → diagnostic_settings_operations.rb} +135 -79
- data/lib/generated/azure_mgmt_monitor/log_profiles.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/action_group_list.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/action_group_resource.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/activity_log_alert_action_group.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/activity_log_alert_action_list.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/activity_log_alert_all_of_condition.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/activity_log_alert_leaf_condition.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/activity_log_alert_list.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/activity_log_alert_patch_body.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/activity_log_alert_resource.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/alert_rule_resource.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/alert_rule_resource_collection.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/alert_rule_resource_patch.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/autoscale_notification.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/autoscale_profile.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource_collection.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource_patch.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/category_type.rb +16 -0
- data/lib/generated/azure_mgmt_monitor/models/comparison_operation_type.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/condition_operator.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_category_resource.rb +71 -0
- data/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_category_resource_collection.rb +55 -0
- data/lib/generated/azure_mgmt_monitor/models/{service_diagnostic_settings_resource.rb → diagnostic_settings_resource.rb} +15 -39
- data/lib/generated/azure_mgmt_monitor/models/diagnostic_settings_resource_collection.rb +54 -0
- data/lib/generated/azure_mgmt_monitor/models/email_notification.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/email_receiver.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/enable_request.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/error_response.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/incident.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/incident_list_result.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/location_threshold_rule_condition.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/log_profile_collection.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/log_profile_resource.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/log_profile_resource_patch.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/log_settings.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/management_event_aggregation_condition.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/management_event_rule_condition.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/metric_settings.rb +17 -4
- data/lib/generated/azure_mgmt_monitor/models/metric_statistic_type.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/metric_trigger.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/operation.rb +57 -0
- data/lib/generated/azure_mgmt_monitor/models/operation_display.rb +66 -0
- data/lib/generated/azure_mgmt_monitor/models/operation_list_result.rb +66 -0
- data/lib/generated/azure_mgmt_monitor/models/proxy_only_resource.rb +68 -0
- data/lib/generated/azure_mgmt_monitor/models/receiver_status.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/recurrence.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/recurrence_frequency.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/recurrent_schedule.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/retention_policy.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/rule_action.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/rule_condition.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/rule_data_source.rb +3 -2
- data/lib/generated/azure_mgmt_monitor/models/rule_email_action.rb +3 -3
- data/lib/generated/azure_mgmt_monitor/models/rule_management_event_claims_data_source.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/rule_management_event_data_source.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/rule_metric_data_source.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/rule_webhook_action.rb +2 -2
- data/lib/generated/azure_mgmt_monitor/models/scale_action.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/scale_capacity.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/scale_direction.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/scale_rule.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/scale_type.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/sms_receiver.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/threshold_rule_condition.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/time_aggregation_operator.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/time_aggregation_type.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/time_window.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/webhook_notification.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/models/webhook_receiver.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_monitor/monitor_management_client.rb +13 -5
- data/lib/generated/azure_mgmt_monitor/operations.rb +106 -0
- data/lib/generated/azure_mgmt_monitor/version.rb +2 -2
- data/lib/generated/azure_mgmt_monitor.rb +33 -24
- metadata +14 -5
- data/lib/generated/azure_mgmt_monitor/models/service_diagnostic_settings_resource_patch.rb +0 -136
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a719ce2feaf6a97e427d0cacf25c836fa401b2e5
|
|
4
|
+
data.tar.gz: 76b805b52ab75b8d7756219c6230d93d7cb27a44
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb9f28d862b0104b177b8554239f52f8091d0ed95968d524ee578629a3ffbfe6194d6933b39f7cb0b81e7a452d4fc7e7de1a5a3999ec30cce319f31bf69f4feb
|
|
7
|
+
data.tar.gz: 606dd154866d25a3c91b12fcf80d25603a7df5451925fcdaf72dc0384ecd00eee4ecb35bfa01e5281ae6f58738aaca0b5aff0cc1814a32a4ad4fe1f785a2ebe6
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
|
+
# regenerated.
|
|
5
|
+
|
|
6
|
+
module Azure::ARM::Monitor
|
|
7
|
+
#
|
|
8
|
+
# Monitor Management Client
|
|
9
|
+
#
|
|
10
|
+
class DiagnosticSettingsCategoryOperations
|
|
11
|
+
include MsRestAzure
|
|
12
|
+
|
|
13
|
+
#
|
|
14
|
+
# Creates and initializes a new instance of the DiagnosticSettingsCategoryOperations 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 diagnostic settings category for the specified resource.
|
|
26
|
+
#
|
|
27
|
+
# @param resource_uri [String] The identifier of the resource.
|
|
28
|
+
# @param name [String] The name of the diagnostic setting.
|
|
29
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
30
|
+
# will be added to the HTTP request.
|
|
31
|
+
#
|
|
32
|
+
# @return [DiagnosticSettingsCategoryResource] operation results.
|
|
33
|
+
#
|
|
34
|
+
def get(resource_uri, name, custom_headers = nil)
|
|
35
|
+
response = get_async(resource_uri, name, custom_headers).value!
|
|
36
|
+
response.body unless response.nil?
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
#
|
|
40
|
+
# Gets the diagnostic settings category for the specified resource.
|
|
41
|
+
#
|
|
42
|
+
# @param resource_uri [String] The identifier of the resource.
|
|
43
|
+
# @param name [String] The name of the diagnostic setting.
|
|
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 get_with_http_info(resource_uri, name, custom_headers = nil)
|
|
50
|
+
get_async(resource_uri, name, custom_headers).value!
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
#
|
|
54
|
+
# Gets the diagnostic settings category for the specified resource.
|
|
55
|
+
#
|
|
56
|
+
# @param resource_uri [String] The identifier of the resource.
|
|
57
|
+
# @param name [String] The name of the diagnostic setting.
|
|
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 get_async(resource_uri, name, custom_headers = nil)
|
|
64
|
+
fail ArgumentError, 'resource_uri is nil' if resource_uri.nil?
|
|
65
|
+
api_version = '2017-05-01-preview'
|
|
66
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
request_headers = {}
|
|
70
|
+
|
|
71
|
+
# Set Headers
|
|
72
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
73
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
74
|
+
path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories/{name}'
|
|
75
|
+
|
|
76
|
+
request_url = @base_url || @client.base_url
|
|
77
|
+
|
|
78
|
+
options = {
|
|
79
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
80
|
+
path_params: {'resourceUri' => resource_uri,'name' => name},
|
|
81
|
+
query_params: {'api-version' => api_version},
|
|
82
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
83
|
+
base_url: request_url
|
|
84
|
+
}
|
|
85
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
86
|
+
|
|
87
|
+
promise = promise.then do |result|
|
|
88
|
+
http_response = result.response
|
|
89
|
+
status_code = http_response.status
|
|
90
|
+
response_content = http_response.body
|
|
91
|
+
unless status_code == 200
|
|
92
|
+
error_model = JSON.load(response_content)
|
|
93
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
97
|
+
# Deserialize Response
|
|
98
|
+
if status_code == 200
|
|
99
|
+
begin
|
|
100
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
101
|
+
result_mapper = Azure::ARM::Monitor::Models::DiagnosticSettingsCategoryResource.mapper()
|
|
102
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
103
|
+
rescue Exception => e
|
|
104
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
result
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
promise.execute
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
#
|
|
115
|
+
# Lists the diagnostic settings categories for the specified resource.
|
|
116
|
+
#
|
|
117
|
+
# @param resource_uri [String] The identifier of the resource.
|
|
118
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
119
|
+
# will be added to the HTTP request.
|
|
120
|
+
#
|
|
121
|
+
# @return [DiagnosticSettingsCategoryResourceCollection] operation results.
|
|
122
|
+
#
|
|
123
|
+
def list(resource_uri, custom_headers = nil)
|
|
124
|
+
response = list_async(resource_uri, custom_headers).value!
|
|
125
|
+
response.body unless response.nil?
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
#
|
|
129
|
+
# Lists the diagnostic settings categories for the specified resource.
|
|
130
|
+
#
|
|
131
|
+
# @param resource_uri [String] The identifier of the resource.
|
|
132
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
133
|
+
# will be added to the HTTP request.
|
|
134
|
+
#
|
|
135
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
136
|
+
#
|
|
137
|
+
def list_with_http_info(resource_uri, custom_headers = nil)
|
|
138
|
+
list_async(resource_uri, custom_headers).value!
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
#
|
|
142
|
+
# Lists the diagnostic settings categories for the specified resource.
|
|
143
|
+
#
|
|
144
|
+
# @param resource_uri [String] The identifier of the resource.
|
|
145
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
146
|
+
# to the HTTP request.
|
|
147
|
+
#
|
|
148
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
149
|
+
#
|
|
150
|
+
def list_async(resource_uri, custom_headers = nil)
|
|
151
|
+
fail ArgumentError, 'resource_uri is nil' if resource_uri.nil?
|
|
152
|
+
api_version = '2017-05-01-preview'
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
request_headers = {}
|
|
156
|
+
|
|
157
|
+
# Set Headers
|
|
158
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
159
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
160
|
+
path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories'
|
|
161
|
+
|
|
162
|
+
request_url = @base_url || @client.base_url
|
|
163
|
+
|
|
164
|
+
options = {
|
|
165
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
166
|
+
path_params: {'resourceUri' => resource_uri},
|
|
167
|
+
query_params: {'api-version' => api_version},
|
|
168
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
169
|
+
base_url: request_url
|
|
170
|
+
}
|
|
171
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
172
|
+
|
|
173
|
+
promise = promise.then do |result|
|
|
174
|
+
http_response = result.response
|
|
175
|
+
status_code = http_response.status
|
|
176
|
+
response_content = http_response.body
|
|
177
|
+
unless status_code == 200
|
|
178
|
+
error_model = JSON.load(response_content)
|
|
179
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
183
|
+
# Deserialize Response
|
|
184
|
+
if status_code == 200
|
|
185
|
+
begin
|
|
186
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
187
|
+
result_mapper = Azure::ARM::Monitor::Models::DiagnosticSettingsCategoryResourceCollection.mapper()
|
|
188
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
189
|
+
rescue Exception => e
|
|
190
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
result
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
promise.execute
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
end
|
|
201
|
+
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
4
|
# regenerated.
|
|
5
5
|
|
|
@@ -7,11 +7,11 @@ module Azure::ARM::Monitor
|
|
|
7
7
|
#
|
|
8
8
|
# Monitor Management Client
|
|
9
9
|
#
|
|
10
|
-
class
|
|
10
|
+
class DiagnosticSettingsOperations
|
|
11
11
|
include MsRestAzure
|
|
12
12
|
|
|
13
13
|
#
|
|
14
|
-
# Creates and initializes a new instance of the
|
|
14
|
+
# Creates and initializes a new instance of the DiagnosticSettingsOperations class.
|
|
15
15
|
# @param client service class for accessing basic functionality.
|
|
16
16
|
#
|
|
17
17
|
def initialize(client)
|
|
@@ -22,47 +22,48 @@ module Azure::ARM::Monitor
|
|
|
22
22
|
attr_reader :client
|
|
23
23
|
|
|
24
24
|
#
|
|
25
|
-
# Gets the active diagnostic settings for the specified resource.
|
|
26
|
-
# This method will be deprecated in future releases.
|
|
25
|
+
# Gets the active diagnostic settings for the specified resource.
|
|
27
26
|
#
|
|
28
27
|
# @param resource_uri [String] The identifier of the resource.
|
|
28
|
+
# @param name [String] The name of the diagnostic setting.
|
|
29
29
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
30
30
|
# will be added to the HTTP request.
|
|
31
31
|
#
|
|
32
|
-
# @return [
|
|
32
|
+
# @return [DiagnosticSettingsResource] operation results.
|
|
33
33
|
#
|
|
34
|
-
def get(resource_uri, custom_headers = nil)
|
|
35
|
-
response = get_async(resource_uri, custom_headers).value!
|
|
34
|
+
def get(resource_uri, name, custom_headers = nil)
|
|
35
|
+
response = get_async(resource_uri, name, custom_headers).value!
|
|
36
36
|
response.body unless response.nil?
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
#
|
|
40
|
-
# Gets the active diagnostic settings for the specified resource.
|
|
41
|
-
# This method will be deprecated in future releases.
|
|
40
|
+
# Gets the active diagnostic settings for the specified resource.
|
|
42
41
|
#
|
|
43
42
|
# @param resource_uri [String] The identifier of the resource.
|
|
43
|
+
# @param name [String] The name of the diagnostic setting.
|
|
44
44
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
45
45
|
# will be added to the HTTP request.
|
|
46
46
|
#
|
|
47
47
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
48
48
|
#
|
|
49
|
-
def get_with_http_info(resource_uri, custom_headers = nil)
|
|
50
|
-
get_async(resource_uri, custom_headers).value!
|
|
49
|
+
def get_with_http_info(resource_uri, name, custom_headers = nil)
|
|
50
|
+
get_async(resource_uri, name, custom_headers).value!
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
#
|
|
54
|
-
# Gets the active diagnostic settings for the specified resource.
|
|
55
|
-
# This method will be deprecated in future releases.
|
|
54
|
+
# Gets the active diagnostic settings for the specified resource.
|
|
56
55
|
#
|
|
57
56
|
# @param resource_uri [String] The identifier of the resource.
|
|
57
|
+
# @param name [String] The name of the diagnostic setting.
|
|
58
58
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
59
59
|
# to the HTTP request.
|
|
60
60
|
#
|
|
61
61
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
62
62
|
#
|
|
63
|
-
def get_async(resource_uri, custom_headers = nil)
|
|
63
|
+
def get_async(resource_uri, name, custom_headers = nil)
|
|
64
64
|
fail ArgumentError, 'resource_uri is nil' if resource_uri.nil?
|
|
65
|
-
api_version = '
|
|
65
|
+
api_version = '2017-05-01-preview'
|
|
66
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
|
66
67
|
|
|
67
68
|
|
|
68
69
|
request_headers = {}
|
|
@@ -70,13 +71,13 @@ module Azure::ARM::Monitor
|
|
|
70
71
|
# Set Headers
|
|
71
72
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
72
73
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
73
|
-
path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettings/
|
|
74
|
+
path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}'
|
|
74
75
|
|
|
75
76
|
request_url = @base_url || @client.base_url
|
|
76
77
|
|
|
77
78
|
options = {
|
|
78
79
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
79
|
-
path_params: {'resourceUri' => resource_uri},
|
|
80
|
+
path_params: {'resourceUri' => resource_uri,'name' => name},
|
|
80
81
|
query_params: {'api-version' => api_version},
|
|
81
82
|
headers: request_headers.merge(custom_headers || {}),
|
|
82
83
|
base_url: request_url
|
|
@@ -97,7 +98,7 @@ module Azure::ARM::Monitor
|
|
|
97
98
|
if status_code == 200
|
|
98
99
|
begin
|
|
99
100
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
100
|
-
result_mapper = Azure::ARM::Monitor::Models::
|
|
101
|
+
result_mapper = Azure::ARM::Monitor::Models::DiagnosticSettingsResource.mapper()
|
|
101
102
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
102
103
|
rescue Exception => e
|
|
103
104
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
@@ -111,54 +112,55 @@ module Azure::ARM::Monitor
|
|
|
111
112
|
end
|
|
112
113
|
|
|
113
114
|
#
|
|
114
|
-
#
|
|
115
|
-
# **WARNING**: This method will be deprecated in future releases.
|
|
115
|
+
# Creates or updates diagnostic settings for the specified resource.
|
|
116
116
|
#
|
|
117
117
|
# @param resource_uri [String] The identifier of the resource.
|
|
118
|
-
# @param parameters [
|
|
119
|
-
#
|
|
118
|
+
# @param parameters [DiagnosticSettingsResource] Parameters supplied to the
|
|
119
|
+
# operation.
|
|
120
|
+
# @param name [String] The name of the diagnostic setting.
|
|
120
121
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
121
122
|
# will be added to the HTTP request.
|
|
122
123
|
#
|
|
123
|
-
# @return [
|
|
124
|
+
# @return [DiagnosticSettingsResource] operation results.
|
|
124
125
|
#
|
|
125
|
-
def create_or_update(resource_uri, parameters, custom_headers = nil)
|
|
126
|
-
response = create_or_update_async(resource_uri, parameters, custom_headers).value!
|
|
126
|
+
def create_or_update(resource_uri, parameters, name, custom_headers = nil)
|
|
127
|
+
response = create_or_update_async(resource_uri, parameters, name, custom_headers).value!
|
|
127
128
|
response.body unless response.nil?
|
|
128
129
|
end
|
|
129
130
|
|
|
130
131
|
#
|
|
131
|
-
#
|
|
132
|
-
# **WARNING**: This method will be deprecated in future releases.
|
|
132
|
+
# Creates or updates diagnostic settings for the specified resource.
|
|
133
133
|
#
|
|
134
134
|
# @param resource_uri [String] The identifier of the resource.
|
|
135
|
-
# @param parameters [
|
|
136
|
-
#
|
|
135
|
+
# @param parameters [DiagnosticSettingsResource] Parameters supplied to the
|
|
136
|
+
# operation.
|
|
137
|
+
# @param name [String] The name of the diagnostic setting.
|
|
137
138
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
138
139
|
# will be added to the HTTP request.
|
|
139
140
|
#
|
|
140
141
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
141
142
|
#
|
|
142
|
-
def create_or_update_with_http_info(resource_uri, parameters, custom_headers = nil)
|
|
143
|
-
create_or_update_async(resource_uri, parameters, custom_headers).value!
|
|
143
|
+
def create_or_update_with_http_info(resource_uri, parameters, name, custom_headers = nil)
|
|
144
|
+
create_or_update_async(resource_uri, parameters, name, custom_headers).value!
|
|
144
145
|
end
|
|
145
146
|
|
|
146
147
|
#
|
|
147
|
-
#
|
|
148
|
-
# **WARNING**: This method will be deprecated in future releases.
|
|
148
|
+
# Creates or updates diagnostic settings for the specified resource.
|
|
149
149
|
#
|
|
150
150
|
# @param resource_uri [String] The identifier of the resource.
|
|
151
|
-
# @param parameters [
|
|
152
|
-
#
|
|
151
|
+
# @param parameters [DiagnosticSettingsResource] Parameters supplied to the
|
|
152
|
+
# operation.
|
|
153
|
+
# @param name [String] The name of the diagnostic setting.
|
|
153
154
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
154
155
|
# to the HTTP request.
|
|
155
156
|
#
|
|
156
157
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
157
158
|
#
|
|
158
|
-
def create_or_update_async(resource_uri, parameters, custom_headers = nil)
|
|
159
|
+
def create_or_update_async(resource_uri, parameters, name, custom_headers = nil)
|
|
159
160
|
fail ArgumentError, 'resource_uri is nil' if resource_uri.nil?
|
|
160
|
-
api_version = '
|
|
161
|
+
api_version = '2017-05-01-preview'
|
|
161
162
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
|
163
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
|
162
164
|
|
|
163
165
|
|
|
164
166
|
request_headers = {}
|
|
@@ -170,17 +172,17 @@ module Azure::ARM::Monitor
|
|
|
170
172
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
171
173
|
|
|
172
174
|
# Serialize Request
|
|
173
|
-
request_mapper = Azure::ARM::Monitor::Models::
|
|
175
|
+
request_mapper = Azure::ARM::Monitor::Models::DiagnosticSettingsResource.mapper()
|
|
174
176
|
request_content = @client.serialize(request_mapper, parameters)
|
|
175
177
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
|
176
178
|
|
|
177
|
-
path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettings/
|
|
179
|
+
path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}'
|
|
178
180
|
|
|
179
181
|
request_url = @base_url || @client.base_url
|
|
180
182
|
|
|
181
183
|
options = {
|
|
182
184
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
183
|
-
path_params: {'resourceUri' => resource_uri},
|
|
185
|
+
path_params: {'resourceUri' => resource_uri,'name' => name},
|
|
184
186
|
query_params: {'api-version' => api_version},
|
|
185
187
|
body: request_content,
|
|
186
188
|
headers: request_headers.merge(custom_headers || {}),
|
|
@@ -194,7 +196,7 @@ module Azure::ARM::Monitor
|
|
|
194
196
|
response_content = http_response.body
|
|
195
197
|
unless status_code == 200
|
|
196
198
|
error_model = JSON.load(response_content)
|
|
197
|
-
fail
|
|
199
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
198
200
|
end
|
|
199
201
|
|
|
200
202
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
@@ -202,7 +204,7 @@ module Azure::ARM::Monitor
|
|
|
202
204
|
if status_code == 200
|
|
203
205
|
begin
|
|
204
206
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
205
|
-
result_mapper = Azure::ARM::Monitor::Models::
|
|
207
|
+
result_mapper = Azure::ARM::Monitor::Models::DiagnosticSettingsResource.mapper()
|
|
206
208
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
207
209
|
rescue Exception => e
|
|
208
210
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
@@ -216,60 +218,47 @@ module Azure::ARM::Monitor
|
|
|
216
218
|
end
|
|
217
219
|
|
|
218
220
|
#
|
|
219
|
-
#
|
|
220
|
-
# use the CreateOrUpdate method. **WARNING**: This method will be deprecated in
|
|
221
|
-
# future releases.
|
|
221
|
+
# Deletes existing diagnostic settings for the specified resource.
|
|
222
222
|
#
|
|
223
223
|
# @param resource_uri [String] The identifier of the resource.
|
|
224
|
-
# @param
|
|
225
|
-
# [ServiceDiagnosticSettingsResourcePatch] Parameters supplied to the
|
|
226
|
-
# operation.
|
|
224
|
+
# @param name [String] The name of the diagnostic setting.
|
|
227
225
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
228
226
|
# will be added to the HTTP request.
|
|
229
227
|
#
|
|
230
|
-
# @return [ServiceDiagnosticSettingsResource] operation results.
|
|
231
228
|
#
|
|
232
|
-
def
|
|
233
|
-
response =
|
|
234
|
-
|
|
229
|
+
def delete(resource_uri, name, custom_headers = nil)
|
|
230
|
+
response = delete_async(resource_uri, name, custom_headers).value!
|
|
231
|
+
nil
|
|
235
232
|
end
|
|
236
233
|
|
|
237
234
|
#
|
|
238
|
-
#
|
|
239
|
-
# use the CreateOrUpdate method. **WARNING**: This method will be deprecated in
|
|
240
|
-
# future releases.
|
|
235
|
+
# Deletes existing diagnostic settings for the specified resource.
|
|
241
236
|
#
|
|
242
237
|
# @param resource_uri [String] The identifier of the resource.
|
|
243
|
-
# @param
|
|
244
|
-
# [ServiceDiagnosticSettingsResourcePatch] Parameters supplied to the
|
|
245
|
-
# operation.
|
|
238
|
+
# @param name [String] The name of the diagnostic setting.
|
|
246
239
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
247
240
|
# will be added to the HTTP request.
|
|
248
241
|
#
|
|
249
242
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
250
243
|
#
|
|
251
|
-
def
|
|
252
|
-
|
|
244
|
+
def delete_with_http_info(resource_uri, name, custom_headers = nil)
|
|
245
|
+
delete_async(resource_uri, name, custom_headers).value!
|
|
253
246
|
end
|
|
254
247
|
|
|
255
248
|
#
|
|
256
|
-
#
|
|
257
|
-
# use the CreateOrUpdate method. **WARNING**: This method will be deprecated in
|
|
258
|
-
# future releases.
|
|
249
|
+
# Deletes existing diagnostic settings for the specified resource.
|
|
259
250
|
#
|
|
260
251
|
# @param resource_uri [String] The identifier of the resource.
|
|
261
|
-
# @param
|
|
262
|
-
# [ServiceDiagnosticSettingsResourcePatch] Parameters supplied to the
|
|
263
|
-
# operation.
|
|
252
|
+
# @param name [String] The name of the diagnostic setting.
|
|
264
253
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
265
254
|
# to the HTTP request.
|
|
266
255
|
#
|
|
267
256
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
268
257
|
#
|
|
269
|
-
def
|
|
258
|
+
def delete_async(resource_uri, name, custom_headers = nil)
|
|
270
259
|
fail ArgumentError, 'resource_uri is nil' if resource_uri.nil?
|
|
271
|
-
api_version = '
|
|
272
|
-
fail ArgumentError, '
|
|
260
|
+
api_version = '2017-05-01-preview'
|
|
261
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
|
273
262
|
|
|
274
263
|
|
|
275
264
|
request_headers = {}
|
|
@@ -277,15 +266,83 @@ module Azure::ARM::Monitor
|
|
|
277
266
|
# Set Headers
|
|
278
267
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
279
268
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
269
|
+
path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}'
|
|
280
270
|
|
|
281
|
-
|
|
271
|
+
request_url = @base_url || @client.base_url
|
|
282
272
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
273
|
+
options = {
|
|
274
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
275
|
+
path_params: {'resourceUri' => resource_uri,'name' => name},
|
|
276
|
+
query_params: {'api-version' => api_version},
|
|
277
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
278
|
+
base_url: request_url
|
|
279
|
+
}
|
|
280
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
|
281
|
+
|
|
282
|
+
promise = promise.then do |result|
|
|
283
|
+
http_response = result.response
|
|
284
|
+
status_code = http_response.status
|
|
285
|
+
response_content = http_response.body
|
|
286
|
+
unless status_code == 200 || status_code == 204
|
|
287
|
+
error_model = JSON.load(response_content)
|
|
288
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
292
|
+
|
|
293
|
+
result
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
promise.execute
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
#
|
|
300
|
+
# Gets the active diagnostic settings list for the specified resource.
|
|
301
|
+
#
|
|
302
|
+
# @param resource_uri [String] The identifier of the resource.
|
|
303
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
304
|
+
# will be added to the HTTP request.
|
|
305
|
+
#
|
|
306
|
+
# @return [DiagnosticSettingsResourceCollection] operation results.
|
|
307
|
+
#
|
|
308
|
+
def list(resource_uri, custom_headers = nil)
|
|
309
|
+
response = list_async(resource_uri, custom_headers).value!
|
|
310
|
+
response.body unless response.nil?
|
|
311
|
+
end
|
|
287
312
|
|
|
288
|
-
|
|
313
|
+
#
|
|
314
|
+
# Gets the active diagnostic settings list for the specified resource.
|
|
315
|
+
#
|
|
316
|
+
# @param resource_uri [String] The identifier of the resource.
|
|
317
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
318
|
+
# will be added to the HTTP request.
|
|
319
|
+
#
|
|
320
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
321
|
+
#
|
|
322
|
+
def list_with_http_info(resource_uri, custom_headers = nil)
|
|
323
|
+
list_async(resource_uri, custom_headers).value!
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
#
|
|
327
|
+
# Gets the active diagnostic settings list for the specified resource.
|
|
328
|
+
#
|
|
329
|
+
# @param resource_uri [String] The identifier of the resource.
|
|
330
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
331
|
+
# to the HTTP request.
|
|
332
|
+
#
|
|
333
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
334
|
+
#
|
|
335
|
+
def list_async(resource_uri, custom_headers = nil)
|
|
336
|
+
fail ArgumentError, 'resource_uri is nil' if resource_uri.nil?
|
|
337
|
+
api_version = '2017-05-01-preview'
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
request_headers = {}
|
|
341
|
+
|
|
342
|
+
# Set Headers
|
|
343
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
344
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
345
|
+
path_template = '{resourceUri}/providers/microsoft.insights/diagnosticSettings'
|
|
289
346
|
|
|
290
347
|
request_url = @base_url || @client.base_url
|
|
291
348
|
|
|
@@ -293,11 +350,10 @@ module Azure::ARM::Monitor
|
|
|
293
350
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
294
351
|
path_params: {'resourceUri' => resource_uri},
|
|
295
352
|
query_params: {'api-version' => api_version},
|
|
296
|
-
body: request_content,
|
|
297
353
|
headers: request_headers.merge(custom_headers || {}),
|
|
298
354
|
base_url: request_url
|
|
299
355
|
}
|
|
300
|
-
promise = @client.make_request_async(:
|
|
356
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
301
357
|
|
|
302
358
|
promise = promise.then do |result|
|
|
303
359
|
http_response = result.response
|
|
@@ -313,7 +369,7 @@ module Azure::ARM::Monitor
|
|
|
313
369
|
if status_code == 200
|
|
314
370
|
begin
|
|
315
371
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
316
|
-
result_mapper = Azure::ARM::Monitor::Models::
|
|
372
|
+
result_mapper = Azure::ARM::Monitor::Models::DiagnosticSettingsResourceCollection.mapper()
|
|
317
373
|
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
318
374
|
rescue Exception => e
|
|
319
375
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|