azure_mgmt_monitor 0.17.6 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2015-04-01/generated/azure_mgmt_monitor.rb +11 -8
- data/lib/2015-04-01/generated/azure_mgmt_monitor/activity_logs.rb +24 -19
- data/lib/2015-04-01/generated/azure_mgmt_monitor/models/metric_trigger.rb +35 -1
- data/lib/2015-04-01/generated/azure_mgmt_monitor/models/recurrence.rb +9 -9
- data/lib/2015-04-01/generated/azure_mgmt_monitor/models/recurrence_frequency.rb +22 -0
- data/lib/2015-04-01/generated/azure_mgmt_monitor/models/recurrent_schedule.rb +1 -1
- data/lib/2015-04-01/generated/azure_mgmt_monitor/models/scale_rule_metric_dimension.rb +80 -0
- data/lib/2015-04-01/generated/azure_mgmt_monitor/models/scale_rule_metric_dimension_operation_type.rb +16 -0
- data/lib/2015-04-01/generated/azure_mgmt_monitor/models/time_aggregation_type.rb +1 -0
- data/lib/2015-04-01/generated/azure_mgmt_monitor/models/time_window.rb +1 -1
- data/lib/2015-04-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
- data/lib/2015-05-01/generated/azure_mgmt_monitor/application_insights_management_client.rb +1 -1
- data/lib/2016-03-01/generated/azure_mgmt_monitor.rb +14 -14
- data/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rules.rb +21 -21
- data/lib/2016-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +5 -5
- data/lib/2016-09-01/generated/azure_mgmt_monitor/monitor_client.rb +1 -1
- data/lib/2017-04-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
- data/lib/2017-05-01-preview/generated/azure_mgmt_monitor.rb +16 -11
- data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/diagnostic_settings_resource.rb +19 -5
- data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/response.rb +1 -1
- data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/subscription_diagnostic_settings_resource.rb +150 -0
- data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/subscription_diagnostic_settings_resource_collection.rb +57 -0
- data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/subscription_log_settings.rb +59 -0
- data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/subscription_proxy_only_resource.rb +82 -0
- data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +10 -5
- data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/subscription_diagnostic_settings_operations.rb +405 -0
- data/lib/2017-10-01-preview/generated/azure_mgmt_monitor/application_insights_management_client.rb +1 -1
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/baseline_response.rb +1 -1
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/calculate_baseline_response.rb +1 -1
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
- data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/metric_namespaces.rb +1 -1
- data/lib/2017-12-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
- data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metric.rb +2 -1
- data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metric_definition.rb +3 -2
- data/lib/2018-01-01/generated/azure_mgmt_monitor/models/metric_value.rb +3 -4
- data/lib/2018-01-01/generated/azure_mgmt_monitor/models/response.rb +1 -1
- data/lib/2018-01-01/generated/azure_mgmt_monitor/models/unit.rb +4 -0
- data/lib/2018-01-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
- data/lib/2018-03-01/generated/azure_mgmt_monitor.rb +25 -17
- data/lib/2018-03-01/generated/azure_mgmt_monitor/metric_alerts.rb +10 -10
- data/lib/2018-03-01/generated/azure_mgmt_monitor/models/dynamic_metric_criteria.rb +175 -0
- data/lib/2018-03-01/generated/azure_mgmt_monitor/models/dynamic_threshold_failing_periods.rb +61 -0
- data/lib/2018-03-01/generated/azure_mgmt_monitor/models/dynamic_threshold_operator.rb +17 -0
- data/lib/2018-03-01/generated/azure_mgmt_monitor/models/dynamic_threshold_sensitivity.rb +17 -0
- data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_action.rb +3 -3
- data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_criteria.rb +2 -0
- data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_multiple_resource_multiple_metric_criteria.rb +90 -0
- data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_resource.rb +27 -1
- data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_alert_resource_patch.rb +27 -1
- data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_criteria.rb +56 -31
- data/lib/2018-03-01/generated/azure_mgmt_monitor/models/metric_dimension.rb +2 -1
- data/lib/2018-03-01/generated/azure_mgmt_monitor/models/multi_metric_criteria.rb +142 -0
- data/lib/2018-03-01/generated/azure_mgmt_monitor/models/operator.rb +20 -0
- data/lib/2018-03-01/generated/azure_mgmt_monitor/models/webtest_location_availability_criteria.rb +98 -0
- data/lib/2018-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +5 -5
- data/lib/2018-04-16/generated/azure_mgmt_monitor.rb +8 -5
- data/lib/2018-04-16/generated/azure_mgmt_monitor/models/action.rb +1 -0
- data/lib/2018-04-16/generated/azure_mgmt_monitor/models/alerting_action.rb +2 -2
- data/lib/2018-04-16/generated/azure_mgmt_monitor/models/az_ns_action_group.rb +1 -1
- data/lib/2018-04-16/generated/azure_mgmt_monitor/models/criteria.rb +66 -0
- data/lib/2018-04-16/generated/azure_mgmt_monitor/models/dimension.rb +79 -0
- data/lib/2018-04-16/generated/azure_mgmt_monitor/models/log_search_rule_resource.rb +4 -3
- data/lib/2018-04-16/generated/azure_mgmt_monitor/models/log_to_metric_action.rb +71 -0
- data/lib/2018-04-16/generated/azure_mgmt_monitor/models/source.rb +3 -2
- data/lib/2018-04-16/generated/azure_mgmt_monitor/monitor_client.rb +1 -1
- data/lib/2018-06-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
- data/lib/2018-06-17-preview/generated/azure_mgmt_monitor/application_insights_management_client.rb +1 -1
- data/lib/2018-09-01/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
- data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +1 -1
- data/lib/2018-11-27-preview/generated/azure_mgmt_monitor/vminsights.rb +1 -1
- data/lib/2019-03-01/generated/azure_mgmt_monitor.rb +18 -9
- data/lib/2019-03-01/generated/azure_mgmt_monitor/action_groups.rb +1 -1
- data/lib/2019-03-01/generated/azure_mgmt_monitor/baselines.rb +186 -0
- data/lib/2019-03-01/generated/azure_mgmt_monitor/models/baseline_metadata.rb +57 -0
- data/lib/2019-03-01/generated/azure_mgmt_monitor/models/baseline_sensitivity.rb +17 -0
- data/lib/2019-03-01/generated/azure_mgmt_monitor/models/metric_baselines_response.rb +55 -0
- data/lib/2019-03-01/generated/azure_mgmt_monitor/models/metric_single_dimension.rb +57 -0
- data/lib/2019-03-01/generated/azure_mgmt_monitor/models/result_type.rb +16 -0
- data/lib/2019-03-01/generated/azure_mgmt_monitor/models/single_baseline.rb +85 -0
- data/lib/2019-03-01/generated/azure_mgmt_monitor/models/single_metric_baseline.rb +129 -0
- data/lib/2019-03-01/generated/azure_mgmt_monitor/models/time_series_baseline.rb +127 -0
- data/lib/2019-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +5 -1
- data/lib/2019-06-01/generated/azure_mgmt_monitor.rb +45 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/action_groups.rb +707 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/action_group_list.rb +67 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/action_group_patch_body.rb +68 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/action_group_resource.rb +326 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/arm_role_receiver.rb +69 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/automation_runbook_receiver.rb +113 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/azure_app_push_receiver.rb +58 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/azure_function_receiver.rb +91 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/email_receiver.rb +83 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/enable_request.rb +46 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/itsm_receiver.rb +94 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/logic_app_receiver.rb +80 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/receiver_status.rb +17 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/resource.rb +110 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/sms_receiver.rb +83 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/voice_receiver.rb +69 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/models/webhook_receiver.rb +115 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/module_definition.rb +9 -0
- data/lib/2019-06-01/generated/azure_mgmt_monitor/monitor_management_client.rb +131 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor.rb +49 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/azure_monitor_private_link_scope.rb +123 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/azure_monitor_private_link_scope_list_result.rb +102 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/error_additional_info.rb +59 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/error_response_common.rb +93 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/operation_status.rb +102 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_endpoint_connection.rb +100 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_endpoint_connection_list_result.rb +100 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_endpoint_property.rb +46 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_link_resource.rb +95 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_link_resource_list_result.rb +100 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_link_scopes_resource.rb +101 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/private_link_service_connection_state_property.rb +71 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/proxy_resource.rb +71 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/scoped_resource.rb +85 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/scoped_resource_list_result.rb +100 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/models/tags_resource.rb +55 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/module_definition.rb +9 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +148 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_endpoint_connections.rb +641 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_link_resources.rb +346 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_link_scope_operation_status.rb +122 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_link_scoped_resources.rb +638 -0
- data/lib/2019-10-17-preview/generated/azure_mgmt_monitor/private_link_scopes.rb +889 -0
- data/lib/azure_mgmt_monitor.rb +13 -11
- data/lib/profiles/latest/modules/monitor_profile_module.rb +322 -132
- data/lib/profiles/v2019_03_01_hybrid/modules/monitor_profile_module.rb +65 -35
- data/lib/version.rb +1 -1
- metadata +77 -3
@@ -0,0 +1,57 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Monitor::Mgmt::V2017_05_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Represents a collection of subscription diagnostic settings resources.
|
10
|
+
#
|
11
|
+
class SubscriptionDiagnosticSettingsResourceCollection
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<SubscriptionDiagnosticSettingsResource>] The collection
|
16
|
+
# of subscription diagnostic settings resources.
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
|
20
|
+
#
|
21
|
+
# Mapper for SubscriptionDiagnosticSettingsResourceCollection class as
|
22
|
+
# Ruby Hash.
|
23
|
+
# This will be used for serialization/deserialization.
|
24
|
+
#
|
25
|
+
def self.mapper()
|
26
|
+
{
|
27
|
+
client_side_validation: true,
|
28
|
+
required: false,
|
29
|
+
serialized_name: 'SubscriptionDiagnosticSettingsResourceCollection',
|
30
|
+
type: {
|
31
|
+
name: 'Composite',
|
32
|
+
class_name: 'SubscriptionDiagnosticSettingsResourceCollection',
|
33
|
+
model_properties: {
|
34
|
+
value: {
|
35
|
+
client_side_validation: true,
|
36
|
+
required: false,
|
37
|
+
serialized_name: 'value',
|
38
|
+
type: {
|
39
|
+
name: 'Sequence',
|
40
|
+
element: {
|
41
|
+
client_side_validation: true,
|
42
|
+
required: false,
|
43
|
+
serialized_name: 'SubscriptionDiagnosticSettingsResourceElementType',
|
44
|
+
type: {
|
45
|
+
name: 'Composite',
|
46
|
+
class_name: 'SubscriptionDiagnosticSettingsResource'
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,59 @@
|
|
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::V2017_05_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Part of Subscription diagnostic setting. Specifies the settings for a
|
10
|
+
# particular log.
|
11
|
+
#
|
12
|
+
class SubscriptionLogSettings
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [String] Name of a Subscription Diagnostic Log category for a
|
17
|
+
# resource type this setting is applied to.
|
18
|
+
attr_accessor :category
|
19
|
+
|
20
|
+
# @return [Boolean] a value indicating whether this log is enabled.
|
21
|
+
attr_accessor :enabled
|
22
|
+
|
23
|
+
|
24
|
+
#
|
25
|
+
# Mapper for SubscriptionLogSettings class as Ruby Hash.
|
26
|
+
# This will be used for serialization/deserialization.
|
27
|
+
#
|
28
|
+
def self.mapper()
|
29
|
+
{
|
30
|
+
client_side_validation: true,
|
31
|
+
required: false,
|
32
|
+
serialized_name: 'SubscriptionLogSettings',
|
33
|
+
type: {
|
34
|
+
name: 'Composite',
|
35
|
+
class_name: 'SubscriptionLogSettings',
|
36
|
+
model_properties: {
|
37
|
+
category: {
|
38
|
+
client_side_validation: true,
|
39
|
+
required: false,
|
40
|
+
serialized_name: 'category',
|
41
|
+
type: {
|
42
|
+
name: 'String'
|
43
|
+
}
|
44
|
+
},
|
45
|
+
enabled: {
|
46
|
+
client_side_validation: true,
|
47
|
+
required: true,
|
48
|
+
serialized_name: 'enabled',
|
49
|
+
type: {
|
50
|
+
name: 'Boolean'
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/models/subscription_proxy_only_resource.rb
ADDED
@@ -0,0 +1,82 @@
|
|
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::V2017_05_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# A proxy only azure resource object
|
10
|
+
#
|
11
|
+
class SubscriptionProxyOnlyResource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Azure resource Id
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
# @return [String] Azure resource name
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# @return [String] Azure resource type
|
22
|
+
attr_accessor :type
|
23
|
+
|
24
|
+
# @return [String] Location of the resource
|
25
|
+
attr_accessor :location
|
26
|
+
|
27
|
+
|
28
|
+
#
|
29
|
+
# Mapper for SubscriptionProxyOnlyResource class as Ruby Hash.
|
30
|
+
# This will be used for serialization/deserialization.
|
31
|
+
#
|
32
|
+
def self.mapper()
|
33
|
+
{
|
34
|
+
client_side_validation: true,
|
35
|
+
required: false,
|
36
|
+
serialized_name: 'SubscriptionProxyOnlyResource',
|
37
|
+
type: {
|
38
|
+
name: 'Composite',
|
39
|
+
class_name: 'SubscriptionProxyOnlyResource',
|
40
|
+
model_properties: {
|
41
|
+
id: {
|
42
|
+
client_side_validation: true,
|
43
|
+
required: false,
|
44
|
+
read_only: true,
|
45
|
+
serialized_name: 'id',
|
46
|
+
type: {
|
47
|
+
name: 'String'
|
48
|
+
}
|
49
|
+
},
|
50
|
+
name: {
|
51
|
+
client_side_validation: true,
|
52
|
+
required: false,
|
53
|
+
read_only: true,
|
54
|
+
serialized_name: 'name',
|
55
|
+
type: {
|
56
|
+
name: 'String'
|
57
|
+
}
|
58
|
+
},
|
59
|
+
type: {
|
60
|
+
client_side_validation: true,
|
61
|
+
required: false,
|
62
|
+
read_only: true,
|
63
|
+
serialized_name: 'type',
|
64
|
+
type: {
|
65
|
+
name: 'String'
|
66
|
+
}
|
67
|
+
},
|
68
|
+
location: {
|
69
|
+
client_side_validation: true,
|
70
|
+
required: false,
|
71
|
+
serialized_name: 'location',
|
72
|
+
type: {
|
73
|
+
name: 'String'
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -32,19 +32,23 @@ module Azure::Monitor::Mgmt::V2017_05_01_preview
|
|
32
32
|
# generated and included in each request. Default is true.
|
33
33
|
attr_accessor :generate_client_request_id
|
34
34
|
|
35
|
-
# @return [DiagnosticSettingsOperations] diagnostic_settings_operations
|
36
|
-
attr_reader :diagnostic_settings_operations
|
37
|
-
|
38
35
|
# @return [DiagnosticSettingsCategoryOperations]
|
39
36
|
# diagnostic_settings_category_operations
|
40
37
|
attr_reader :diagnostic_settings_category_operations
|
41
38
|
|
39
|
+
# @return [DiagnosticSettingsOperations] diagnostic_settings_operations
|
40
|
+
attr_reader :diagnostic_settings_operations
|
41
|
+
|
42
42
|
# @return [MetricDefinitions] metric_definitions
|
43
43
|
attr_reader :metric_definitions
|
44
44
|
|
45
45
|
# @return [Metrics] metrics
|
46
46
|
attr_reader :metrics
|
47
47
|
|
48
|
+
# @return [SubscriptionDiagnosticSettingsOperations]
|
49
|
+
# subscription_diagnostic_settings_operations
|
50
|
+
attr_reader :subscription_diagnostic_settings_operations
|
51
|
+
|
48
52
|
#
|
49
53
|
# Creates initializes a new instance of the MonitorManagementClient class.
|
50
54
|
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
@@ -58,10 +62,11 @@ module Azure::Monitor::Mgmt::V2017_05_01_preview
|
|
58
62
|
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
59
63
|
@credentials = credentials
|
60
64
|
|
61
|
-
@diagnostic_settings_operations = DiagnosticSettingsOperations.new(self)
|
62
65
|
@diagnostic_settings_category_operations = DiagnosticSettingsCategoryOperations.new(self)
|
66
|
+
@diagnostic_settings_operations = DiagnosticSettingsOperations.new(self)
|
63
67
|
@metric_definitions = MetricDefinitions.new(self)
|
64
68
|
@metrics = Metrics.new(self)
|
69
|
+
@subscription_diagnostic_settings_operations = SubscriptionDiagnosticSettingsOperations.new(self)
|
65
70
|
@api_version = '2017-05-01-preview'
|
66
71
|
@accept_language = 'en-US'
|
67
72
|
@long_running_operation_retry_timeout = 30
|
@@ -134,7 +139,7 @@ module Azure::Monitor::Mgmt::V2017_05_01_preview
|
|
134
139
|
#
|
135
140
|
def add_telemetry
|
136
141
|
sdk_information = 'azure_mgmt_monitor'
|
137
|
-
sdk_information = "#{sdk_information}/0.
|
142
|
+
sdk_information = "#{sdk_information}/0.18.0"
|
138
143
|
add_user_agent_information(sdk_information)
|
139
144
|
end
|
140
145
|
end
|
@@ -0,0 +1,405 @@
|
|
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::V2017_05_01_preview
|
7
|
+
#
|
8
|
+
# Monitor Management Client
|
9
|
+
#
|
10
|
+
class SubscriptionDiagnosticSettingsOperations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the SubscriptionDiagnosticSettingsOperations 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 active subscription diagnostic settings for the specified resource.
|
26
|
+
#
|
27
|
+
# @param subscription_id [String] The subscription id.
|
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 [SubscriptionDiagnosticSettingsResource] operation results.
|
33
|
+
#
|
34
|
+
def get(subscription_id, name, custom_headers:nil)
|
35
|
+
response = get_async(subscription_id, name, custom_headers:custom_headers).value!
|
36
|
+
response.body unless response.nil?
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Gets the active subscription diagnostic settings for the specified resource.
|
41
|
+
#
|
42
|
+
# @param subscription_id [String] The subscription id.
|
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(subscription_id, name, custom_headers:nil)
|
50
|
+
get_async(subscription_id, name, custom_headers:custom_headers).value!
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Gets the active subscription diagnostic settings for the specified resource.
|
55
|
+
#
|
56
|
+
# @param subscription_id [String] The subscription id.
|
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(subscription_id, name, custom_headers:nil)
|
64
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
65
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
66
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
67
|
+
|
68
|
+
|
69
|
+
request_headers = {}
|
70
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
71
|
+
|
72
|
+
# Set Headers
|
73
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
74
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
75
|
+
path_template = 'subscriptions/{subscriptionId}/providers/microsoft.insights/diagnosticSettings/{name}'
|
76
|
+
|
77
|
+
request_url = @base_url || @client.base_url
|
78
|
+
|
79
|
+
options = {
|
80
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
81
|
+
path_params: {'name' => name},
|
82
|
+
skip_encoding_path_params: {'subscriptionId' => subscription_id},
|
83
|
+
query_params: {'api-version' => @client.api_version},
|
84
|
+
headers: request_headers.merge(custom_headers || {}),
|
85
|
+
base_url: request_url
|
86
|
+
}
|
87
|
+
promise = @client.make_request_async(:get, path_template, options)
|
88
|
+
|
89
|
+
promise = promise.then do |result|
|
90
|
+
http_response = result.response
|
91
|
+
status_code = http_response.status
|
92
|
+
response_content = http_response.body
|
93
|
+
unless status_code == 200
|
94
|
+
error_model = JSON.load(response_content)
|
95
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
96
|
+
end
|
97
|
+
|
98
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
99
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
100
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
101
|
+
# Deserialize Response
|
102
|
+
if status_code == 200
|
103
|
+
begin
|
104
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
105
|
+
result_mapper = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::SubscriptionDiagnosticSettingsResource.mapper()
|
106
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
107
|
+
rescue Exception => e
|
108
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
result
|
113
|
+
end
|
114
|
+
|
115
|
+
promise.execute
|
116
|
+
end
|
117
|
+
|
118
|
+
#
|
119
|
+
# Creates or updates subscription diagnostic settings for the specified
|
120
|
+
# resource.
|
121
|
+
#
|
122
|
+
# @param subscription_id [String] The subscription id.
|
123
|
+
# @param parameters [SubscriptionDiagnosticSettingsResource] Parameters
|
124
|
+
# supplied to the operation.
|
125
|
+
# @param name [String] The name of the diagnostic setting.
|
126
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
127
|
+
# will be added to the HTTP request.
|
128
|
+
#
|
129
|
+
# @return [SubscriptionDiagnosticSettingsResource] operation results.
|
130
|
+
#
|
131
|
+
def create_or_update(subscription_id, parameters, name, custom_headers:nil)
|
132
|
+
response = create_or_update_async(subscription_id, parameters, name, custom_headers:custom_headers).value!
|
133
|
+
response.body unless response.nil?
|
134
|
+
end
|
135
|
+
|
136
|
+
#
|
137
|
+
# Creates or updates subscription diagnostic settings for the specified
|
138
|
+
# resource.
|
139
|
+
#
|
140
|
+
# @param subscription_id [String] The subscription id.
|
141
|
+
# @param parameters [SubscriptionDiagnosticSettingsResource] Parameters
|
142
|
+
# supplied to the operation.
|
143
|
+
# @param name [String] The name of the diagnostic setting.
|
144
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
145
|
+
# will be added to the HTTP request.
|
146
|
+
#
|
147
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
148
|
+
#
|
149
|
+
def create_or_update_with_http_info(subscription_id, parameters, name, custom_headers:nil)
|
150
|
+
create_or_update_async(subscription_id, parameters, name, custom_headers:custom_headers).value!
|
151
|
+
end
|
152
|
+
|
153
|
+
#
|
154
|
+
# Creates or updates subscription diagnostic settings for the specified
|
155
|
+
# resource.
|
156
|
+
#
|
157
|
+
# @param subscription_id [String] The subscription id.
|
158
|
+
# @param parameters [SubscriptionDiagnosticSettingsResource] Parameters
|
159
|
+
# supplied to the operation.
|
160
|
+
# @param name [String] The name of the diagnostic setting.
|
161
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
162
|
+
# to the HTTP request.
|
163
|
+
#
|
164
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
165
|
+
#
|
166
|
+
def create_or_update_async(subscription_id, parameters, name, custom_headers:nil)
|
167
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
168
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
169
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
170
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
171
|
+
|
172
|
+
|
173
|
+
request_headers = {}
|
174
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
175
|
+
|
176
|
+
# Set Headers
|
177
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
178
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
179
|
+
|
180
|
+
# Serialize Request
|
181
|
+
request_mapper = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::SubscriptionDiagnosticSettingsResource.mapper()
|
182
|
+
request_content = @client.serialize(request_mapper, parameters)
|
183
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
184
|
+
|
185
|
+
path_template = 'subscriptions/{subscriptionId}/providers/microsoft.insights/diagnosticSettings/{name}'
|
186
|
+
|
187
|
+
request_url = @base_url || @client.base_url
|
188
|
+
|
189
|
+
options = {
|
190
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
191
|
+
path_params: {'name' => name},
|
192
|
+
skip_encoding_path_params: {'subscriptionId' => subscription_id},
|
193
|
+
query_params: {'api-version' => @client.api_version},
|
194
|
+
body: request_content,
|
195
|
+
headers: request_headers.merge(custom_headers || {}),
|
196
|
+
base_url: request_url
|
197
|
+
}
|
198
|
+
promise = @client.make_request_async(:put, path_template, options)
|
199
|
+
|
200
|
+
promise = promise.then do |result|
|
201
|
+
http_response = result.response
|
202
|
+
status_code = http_response.status
|
203
|
+
response_content = http_response.body
|
204
|
+
unless status_code == 200
|
205
|
+
error_model = JSON.load(response_content)
|
206
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
207
|
+
end
|
208
|
+
|
209
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
210
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
211
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
212
|
+
# Deserialize Response
|
213
|
+
if status_code == 200
|
214
|
+
begin
|
215
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
216
|
+
result_mapper = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::SubscriptionDiagnosticSettingsResource.mapper()
|
217
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
218
|
+
rescue Exception => e
|
219
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
result
|
224
|
+
end
|
225
|
+
|
226
|
+
promise.execute
|
227
|
+
end
|
228
|
+
|
229
|
+
#
|
230
|
+
# Deletes existing subscription diagnostic settings for the specified resource.
|
231
|
+
#
|
232
|
+
# @param subscription_id [String] The subscription id.
|
233
|
+
# @param name [String] The name of the diagnostic setting.
|
234
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
235
|
+
# will be added to the HTTP request.
|
236
|
+
#
|
237
|
+
#
|
238
|
+
def delete(subscription_id, name, custom_headers:nil)
|
239
|
+
response = delete_async(subscription_id, name, custom_headers:custom_headers).value!
|
240
|
+
nil
|
241
|
+
end
|
242
|
+
|
243
|
+
#
|
244
|
+
# Deletes existing subscription diagnostic settings for the specified resource.
|
245
|
+
#
|
246
|
+
# @param subscription_id [String] The subscription id.
|
247
|
+
# @param name [String] The name of the diagnostic setting.
|
248
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
249
|
+
# will be added to the HTTP request.
|
250
|
+
#
|
251
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
252
|
+
#
|
253
|
+
def delete_with_http_info(subscription_id, name, custom_headers:nil)
|
254
|
+
delete_async(subscription_id, name, custom_headers:custom_headers).value!
|
255
|
+
end
|
256
|
+
|
257
|
+
#
|
258
|
+
# Deletes existing subscription diagnostic settings for the specified resource.
|
259
|
+
#
|
260
|
+
# @param subscription_id [String] The subscription id.
|
261
|
+
# @param name [String] The name of the diagnostic setting.
|
262
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
263
|
+
# to the HTTP request.
|
264
|
+
#
|
265
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
266
|
+
#
|
267
|
+
def delete_async(subscription_id, name, custom_headers:nil)
|
268
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
269
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
270
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
271
|
+
|
272
|
+
|
273
|
+
request_headers = {}
|
274
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
275
|
+
|
276
|
+
# Set Headers
|
277
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
278
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
279
|
+
path_template = 'subscriptions/{subscriptionId}/providers/microsoft.insights/diagnosticSettings/{name}'
|
280
|
+
|
281
|
+
request_url = @base_url || @client.base_url
|
282
|
+
|
283
|
+
options = {
|
284
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
285
|
+
path_params: {'name' => name},
|
286
|
+
skip_encoding_path_params: {'subscriptionId' => subscription_id},
|
287
|
+
query_params: {'api-version' => @client.api_version},
|
288
|
+
headers: request_headers.merge(custom_headers || {}),
|
289
|
+
base_url: request_url
|
290
|
+
}
|
291
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
292
|
+
|
293
|
+
promise = promise.then do |result|
|
294
|
+
http_response = result.response
|
295
|
+
status_code = http_response.status
|
296
|
+
response_content = http_response.body
|
297
|
+
unless status_code == 200 || status_code == 204
|
298
|
+
error_model = JSON.load(response_content)
|
299
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
300
|
+
end
|
301
|
+
|
302
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
303
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
304
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
305
|
+
|
306
|
+
result
|
307
|
+
end
|
308
|
+
|
309
|
+
promise.execute
|
310
|
+
end
|
311
|
+
|
312
|
+
#
|
313
|
+
# Gets the active subscription diagnostic settings list for the specified
|
314
|
+
# subscriptionId.
|
315
|
+
#
|
316
|
+
# @param subscription_id [String] The subscription id.
|
317
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
318
|
+
# will be added to the HTTP request.
|
319
|
+
#
|
320
|
+
# @return [SubscriptionDiagnosticSettingsResourceCollection] operation results.
|
321
|
+
#
|
322
|
+
def list(subscription_id, custom_headers:nil)
|
323
|
+
response = list_async(subscription_id, custom_headers:custom_headers).value!
|
324
|
+
response.body unless response.nil?
|
325
|
+
end
|
326
|
+
|
327
|
+
#
|
328
|
+
# Gets the active subscription diagnostic settings list for the specified
|
329
|
+
# subscriptionId.
|
330
|
+
#
|
331
|
+
# @param subscription_id [String] The subscription id.
|
332
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
333
|
+
# will be added to the HTTP request.
|
334
|
+
#
|
335
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
336
|
+
#
|
337
|
+
def list_with_http_info(subscription_id, custom_headers:nil)
|
338
|
+
list_async(subscription_id, custom_headers:custom_headers).value!
|
339
|
+
end
|
340
|
+
|
341
|
+
#
|
342
|
+
# Gets the active subscription diagnostic settings list for the specified
|
343
|
+
# subscriptionId.
|
344
|
+
#
|
345
|
+
# @param subscription_id [String] The subscription id.
|
346
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
347
|
+
# to the HTTP request.
|
348
|
+
#
|
349
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
350
|
+
#
|
351
|
+
def list_async(subscription_id, custom_headers:nil)
|
352
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
353
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
354
|
+
|
355
|
+
|
356
|
+
request_headers = {}
|
357
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
358
|
+
|
359
|
+
# Set Headers
|
360
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
361
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
362
|
+
path_template = 'subscriptions/{subscriptionId}/providers/microsoft.insights/diagnosticSettings'
|
363
|
+
|
364
|
+
request_url = @base_url || @client.base_url
|
365
|
+
|
366
|
+
options = {
|
367
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
368
|
+
skip_encoding_path_params: {'subscriptionId' => subscription_id},
|
369
|
+
query_params: {'api-version' => @client.api_version},
|
370
|
+
headers: request_headers.merge(custom_headers || {}),
|
371
|
+
base_url: request_url
|
372
|
+
}
|
373
|
+
promise = @client.make_request_async(:get, path_template, options)
|
374
|
+
|
375
|
+
promise = promise.then do |result|
|
376
|
+
http_response = result.response
|
377
|
+
status_code = http_response.status
|
378
|
+
response_content = http_response.body
|
379
|
+
unless status_code == 200
|
380
|
+
error_model = JSON.load(response_content)
|
381
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
382
|
+
end
|
383
|
+
|
384
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
385
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
386
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
387
|
+
# Deserialize Response
|
388
|
+
if status_code == 200
|
389
|
+
begin
|
390
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
391
|
+
result_mapper = Azure::Monitor::Mgmt::V2017_05_01_preview::Models::SubscriptionDiagnosticSettingsResourceCollection.mapper()
|
392
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
393
|
+
rescue Exception => e
|
394
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
395
|
+
end
|
396
|
+
end
|
397
|
+
|
398
|
+
result
|
399
|
+
end
|
400
|
+
|
401
|
+
promise.execute
|
402
|
+
end
|
403
|
+
|
404
|
+
end
|
405
|
+
end
|