azure_mgmt_monitor 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -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::ARM::Monitor
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Microsoft Insights API operation definition.
|
10
|
+
#
|
11
|
+
class Operation
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [String] Operation name: {provider}/{resource}/{operation}
|
17
|
+
attr_accessor :name
|
18
|
+
|
19
|
+
# @return [OperationDisplay] Display metadata associated with the
|
20
|
+
# operation.
|
21
|
+
attr_accessor :display
|
22
|
+
|
23
|
+
|
24
|
+
#
|
25
|
+
# Mapper for Operation class as Ruby Hash.
|
26
|
+
# This will be used for serialization/deserialization.
|
27
|
+
#
|
28
|
+
def self.mapper()
|
29
|
+
{
|
30
|
+
required: false,
|
31
|
+
serialized_name: 'Operation',
|
32
|
+
type: {
|
33
|
+
name: 'Composite',
|
34
|
+
class_name: 'Operation',
|
35
|
+
model_properties: {
|
36
|
+
name: {
|
37
|
+
required: false,
|
38
|
+
serialized_name: 'name',
|
39
|
+
type: {
|
40
|
+
name: 'String'
|
41
|
+
}
|
42
|
+
},
|
43
|
+
display: {
|
44
|
+
required: false,
|
45
|
+
serialized_name: 'display',
|
46
|
+
type: {
|
47
|
+
name: 'Composite',
|
48
|
+
class_name: 'OperationDisplay'
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,66 @@
|
|
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
|
+
module Models
|
8
|
+
#
|
9
|
+
# Display metadata associated with the operation.
|
10
|
+
#
|
11
|
+
class OperationDisplay
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [String] Service provider: Microsoft.Insights
|
17
|
+
attr_accessor :provider
|
18
|
+
|
19
|
+
# @return [String] Resource on which the operation is performed:
|
20
|
+
# AlertRules, Autoscale, etc.
|
21
|
+
attr_accessor :resource
|
22
|
+
|
23
|
+
# @return [String] Operation type: Read, write, delete, etc.
|
24
|
+
attr_accessor :operation
|
25
|
+
|
26
|
+
|
27
|
+
#
|
28
|
+
# Mapper for OperationDisplay class as Ruby Hash.
|
29
|
+
# This will be used for serialization/deserialization.
|
30
|
+
#
|
31
|
+
def self.mapper()
|
32
|
+
{
|
33
|
+
required: false,
|
34
|
+
serialized_name: 'Operation_display',
|
35
|
+
type: {
|
36
|
+
name: 'Composite',
|
37
|
+
class_name: 'OperationDisplay',
|
38
|
+
model_properties: {
|
39
|
+
provider: {
|
40
|
+
required: false,
|
41
|
+
serialized_name: 'provider',
|
42
|
+
type: {
|
43
|
+
name: 'String'
|
44
|
+
}
|
45
|
+
},
|
46
|
+
resource: {
|
47
|
+
required: false,
|
48
|
+
serialized_name: 'resource',
|
49
|
+
type: {
|
50
|
+
name: 'String'
|
51
|
+
}
|
52
|
+
},
|
53
|
+
operation: {
|
54
|
+
required: false,
|
55
|
+
serialized_name: 'operation',
|
56
|
+
type: {
|
57
|
+
name: 'String'
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
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
|
+
module Models
|
8
|
+
#
|
9
|
+
# Result of the request to list Microsoft.Insights operations. It contains
|
10
|
+
# a list of operations and a URL link to get the next set of results.
|
11
|
+
#
|
12
|
+
class OperationListResult
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
include MsRest::JSONable
|
17
|
+
# @return [Array<Operation>] List of operations supported by the
|
18
|
+
# Microsoft.Insights provider.
|
19
|
+
attr_accessor :value
|
20
|
+
|
21
|
+
# @return [String] URL to get the next set of operation list results if
|
22
|
+
# there are any.
|
23
|
+
attr_accessor :next_link
|
24
|
+
|
25
|
+
|
26
|
+
#
|
27
|
+
# Mapper for OperationListResult class as Ruby Hash.
|
28
|
+
# This will be used for serialization/deserialization.
|
29
|
+
#
|
30
|
+
def self.mapper()
|
31
|
+
{
|
32
|
+
required: false,
|
33
|
+
serialized_name: 'OperationListResult',
|
34
|
+
type: {
|
35
|
+
name: 'Composite',
|
36
|
+
class_name: 'OperationListResult',
|
37
|
+
model_properties: {
|
38
|
+
value: {
|
39
|
+
required: false,
|
40
|
+
serialized_name: 'value',
|
41
|
+
type: {
|
42
|
+
name: 'Sequence',
|
43
|
+
element: {
|
44
|
+
required: false,
|
45
|
+
serialized_name: 'OperationElementType',
|
46
|
+
type: {
|
47
|
+
name: 'Composite',
|
48
|
+
class_name: 'Operation'
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
},
|
53
|
+
next_link: {
|
54
|
+
required: false,
|
55
|
+
serialized_name: 'nextLink',
|
56
|
+
type: {
|
57
|
+
name: 'String'
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,68 @@
|
|
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
|
+
module Models
|
8
|
+
#
|
9
|
+
# A proxy only azure resource object
|
10
|
+
#
|
11
|
+
class ProxyOnlyResource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [String] Azure resource Id
|
17
|
+
attr_accessor :id
|
18
|
+
|
19
|
+
# @return [String] Azure resource name
|
20
|
+
attr_accessor :name
|
21
|
+
|
22
|
+
# @return [String] Azure resource type
|
23
|
+
attr_accessor :type
|
24
|
+
|
25
|
+
|
26
|
+
#
|
27
|
+
# Mapper for ProxyOnlyResource class as Ruby Hash.
|
28
|
+
# This will be used for serialization/deserialization.
|
29
|
+
#
|
30
|
+
def self.mapper()
|
31
|
+
{
|
32
|
+
required: false,
|
33
|
+
serialized_name: 'ProxyOnlyResource',
|
34
|
+
type: {
|
35
|
+
name: 'Composite',
|
36
|
+
class_name: 'ProxyOnlyResource',
|
37
|
+
model_properties: {
|
38
|
+
id: {
|
39
|
+
required: false,
|
40
|
+
read_only: true,
|
41
|
+
serialized_name: 'id',
|
42
|
+
type: {
|
43
|
+
name: 'String'
|
44
|
+
}
|
45
|
+
},
|
46
|
+
name: {
|
47
|
+
required: false,
|
48
|
+
read_only: true,
|
49
|
+
serialized_name: 'name',
|
50
|
+
type: {
|
51
|
+
name: 'String'
|
52
|
+
}
|
53
|
+
},
|
54
|
+
type: {
|
55
|
+
required: false,
|
56
|
+
read_only: true,
|
57
|
+
serialized_name: 'type',
|
58
|
+
type: {
|
59
|
+
name: 'String'
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
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
|
|
@@ -24,7 +24,8 @@ module Azure::ARM::Monitor
|
|
24
24
|
attr_accessor :odata.type
|
25
25
|
|
26
26
|
# @return [String] the resource identifier of the resource the rule
|
27
|
-
# monitors.
|
27
|
+
# monitors. **NOTE**: this property cannot be updated for an existing
|
28
|
+
# rule.
|
28
29
|
attr_accessor :resource_uri
|
29
30
|
|
30
31
|
|
@@ -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
|
|
@@ -22,12 +22,12 @@ module Azure::ARM::Monitor
|
|
22
22
|
attr_accessor :odata.type
|
23
23
|
|
24
24
|
# @return [Boolean] Whether the administrators (service and
|
25
|
-
# co-
|
25
|
+
# co-administrators) of the service should be notified when the alert is
|
26
26
|
# activated.
|
27
27
|
attr_accessor :send_to_service_owners
|
28
28
|
|
29
29
|
# @return [Array<String>] the list of administrator's custom email
|
30
|
-
# addresses
|
30
|
+
# addresses to notify of the activation of the alert.
|
31
31
|
attr_accessor :custom_emails
|
32
32
|
|
33
33
|
|
@@ -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
|
|
@@ -21,7 +21,7 @@ module Azure::ARM::Monitor
|
|
21
21
|
|
22
22
|
attr_accessor :odata.type
|
23
23
|
|
24
|
-
# @return [String] the service uri to Post the
|
24
|
+
# @return [String] the service uri to Post the notification when the
|
25
25
|
# alert activates or resolves.
|
26
26
|
attr_accessor :service_uri
|
27
27
|
|
@@ -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
|
|
@@ -34,6 +34,9 @@ module Azure::ARM::Monitor
|
|
34
34
|
# @return [AutoscaleSettings] autoscale_settings
|
35
35
|
attr_reader :autoscale_settings
|
36
36
|
|
37
|
+
# @return [Operations] operations
|
38
|
+
attr_reader :operations
|
39
|
+
|
37
40
|
# @return [AlertRuleIncidents] alert_rule_incidents
|
38
41
|
attr_reader :alert_rule_incidents
|
39
42
|
|
@@ -43,9 +46,12 @@ module Azure::ARM::Monitor
|
|
43
46
|
# @return [LogProfiles] log_profiles
|
44
47
|
attr_reader :log_profiles
|
45
48
|
|
46
|
-
# @return [
|
47
|
-
|
48
|
-
|
49
|
+
# @return [DiagnosticSettingsOperations] diagnostic_settings_operations
|
50
|
+
attr_reader :diagnostic_settings_operations
|
51
|
+
|
52
|
+
# @return [DiagnosticSettingsCategoryOperations]
|
53
|
+
# diagnostic_settings_category_operations
|
54
|
+
attr_reader :diagnostic_settings_category_operations
|
49
55
|
|
50
56
|
# @return [ActionGroups] action_groups
|
51
57
|
attr_reader :action_groups
|
@@ -67,10 +73,12 @@ module Azure::ARM::Monitor
|
|
67
73
|
@credentials = credentials
|
68
74
|
|
69
75
|
@autoscale_settings = AutoscaleSettings.new(self)
|
76
|
+
@operations = Operations.new(self)
|
70
77
|
@alert_rule_incidents = AlertRuleIncidents.new(self)
|
71
78
|
@alert_rules = AlertRules.new(self)
|
72
79
|
@log_profiles = LogProfiles.new(self)
|
73
|
-
@
|
80
|
+
@diagnostic_settings_operations = DiagnosticSettingsOperations.new(self)
|
81
|
+
@diagnostic_settings_category_operations = DiagnosticSettingsCategoryOperations.new(self)
|
74
82
|
@action_groups = ActionGroups.new(self)
|
75
83
|
@activity_log_alerts = ActivityLogAlerts.new(self)
|
76
84
|
@accept_language = 'en-US'
|
@@ -0,0 +1,106 @@
|
|
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 Operations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Operations class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [MonitorManagementClient] reference to the MonitorManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Lists all of the available operations from Microsoft.Insights provider.
|
26
|
+
#
|
27
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
28
|
+
# will be added to the HTTP request.
|
29
|
+
#
|
30
|
+
# @return [OperationListResult] operation results.
|
31
|
+
#
|
32
|
+
def list(custom_headers = nil)
|
33
|
+
response = list_async(custom_headers).value!
|
34
|
+
response.body unless response.nil?
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# Lists all of the available operations from Microsoft.Insights provider.
|
39
|
+
#
|
40
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
41
|
+
# will be added to the HTTP request.
|
42
|
+
#
|
43
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
44
|
+
#
|
45
|
+
def list_with_http_info(custom_headers = nil)
|
46
|
+
list_async(custom_headers).value!
|
47
|
+
end
|
48
|
+
|
49
|
+
#
|
50
|
+
# Lists all of the available operations from Microsoft.Insights provider.
|
51
|
+
#
|
52
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
53
|
+
# to the HTTP request.
|
54
|
+
#
|
55
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
56
|
+
#
|
57
|
+
def list_async(custom_headers = nil)
|
58
|
+
api_version = '2015-04-01'
|
59
|
+
|
60
|
+
|
61
|
+
request_headers = {}
|
62
|
+
|
63
|
+
# Set Headers
|
64
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
65
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
66
|
+
path_template = 'providers/microsoft.insights/operations'
|
67
|
+
|
68
|
+
request_url = @base_url || @client.base_url
|
69
|
+
|
70
|
+
options = {
|
71
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
72
|
+
query_params: {'api-version' => api_version},
|
73
|
+
headers: request_headers.merge(custom_headers || {}),
|
74
|
+
base_url: request_url
|
75
|
+
}
|
76
|
+
promise = @client.make_request_async(:get, path_template, options)
|
77
|
+
|
78
|
+
promise = promise.then do |result|
|
79
|
+
http_response = result.response
|
80
|
+
status_code = http_response.status
|
81
|
+
response_content = http_response.body
|
82
|
+
unless status_code == 200
|
83
|
+
error_model = JSON.load(response_content)
|
84
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
85
|
+
end
|
86
|
+
|
87
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
88
|
+
# Deserialize Response
|
89
|
+
if status_code == 200
|
90
|
+
begin
|
91
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
92
|
+
result_mapper = Azure::ARM::Monitor::Models::OperationListResult.mapper()
|
93
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
94
|
+
rescue Exception => e
|
95
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
result
|
100
|
+
end
|
101
|
+
|
102
|
+
promise.execute
|
103
|
+
end
|
104
|
+
|
105
|
+
end
|
106
|
+
end
|
@@ -1,8 +1,8 @@
|
|
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
|
|
6
6
|
module Azure::ARM::Monitor
|
7
|
-
VERSION = '0.
|
7
|
+
VERSION = '0.13.0'
|
8
8
|
end
|