azure_mgmt_monitor 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/azure_mgmt_monitor.rb +5 -0
- data/lib/generated/azure_mgmt_monitor.rb +96 -0
- data/lib/generated/azure_mgmt_monitor/action_groups.rb +579 -0
- data/lib/generated/azure_mgmt_monitor/activity_log_alerts.rb +593 -0
- data/lib/generated/azure_mgmt_monitor/alert_rule_incidents.rb +211 -0
- data/lib/generated/azure_mgmt_monitor/alert_rules.rb +510 -0
- data/lib/generated/azure_mgmt_monitor/autoscale_settings.rb +618 -0
- data/lib/generated/azure_mgmt_monitor/log_profiles.rb +477 -0
- data/lib/generated/azure_mgmt_monitor/models/action_group_list.rb +63 -0
- data/lib/generated/azure_mgmt_monitor/models/action_group_resource.rb +164 -0
- data/lib/generated/azure_mgmt_monitor/models/activity_log_alert_action_group.rb +65 -0
- data/lib/generated/azure_mgmt_monitor/models/activity_log_alert_action_list.rb +54 -0
- data/lib/generated/azure_mgmt_monitor/models/activity_log_alert_all_of_condition.rb +55 -0
- data/lib/generated/azure_mgmt_monitor/models/activity_log_alert_leaf_condition.rb +61 -0
- data/lib/generated/azure_mgmt_monitor/models/activity_log_alert_list.rb +64 -0
- data/lib/generated/azure_mgmt_monitor/models/activity_log_alert_patch_body.rb +65 -0
- data/lib/generated/azure_mgmt_monitor/models/activity_log_alert_resource.rb +147 -0
- data/lib/generated/azure_mgmt_monitor/models/alert_rule_resource.rb +159 -0
- data/lib/generated/azure_mgmt_monitor/models/alert_rule_resource_collection.rb +54 -0
- data/lib/generated/azure_mgmt_monitor/models/alert_rule_resource_patch.rb +131 -0
- data/lib/generated/azure_mgmt_monitor/models/autoscale_notification.rb +78 -0
- data/lib/generated/azure_mgmt_monitor/models/autoscale_profile.rb +101 -0
- data/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource.rb +155 -0
- data/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource_collection.rb +95 -0
- data/lib/generated/azure_mgmt_monitor/models/autoscale_setting_resource_patch.rb +127 -0
- data/lib/generated/azure_mgmt_monitor/models/comparison_operation_type.rb +20 -0
- data/lib/generated/azure_mgmt_monitor/models/condition_operator.rb +18 -0
- data/lib/generated/azure_mgmt_monitor/models/email_notification.rb +75 -0
- data/lib/generated/azure_mgmt_monitor/models/email_receiver.rb +69 -0
- data/lib/generated/azure_mgmt_monitor/models/enable_request.rb +45 -0
- data/lib/generated/azure_mgmt_monitor/models/error_response.rb +55 -0
- data/lib/generated/azure_mgmt_monitor/models/incident.rb +93 -0
- data/lib/generated/azure_mgmt_monitor/models/incident_list_result.rb +53 -0
- data/lib/generated/azure_mgmt_monitor/models/location_threshold_rule_condition.rb +85 -0
- data/lib/generated/azure_mgmt_monitor/models/log_profile_collection.rb +53 -0
- data/lib/generated/azure_mgmt_monitor/models/log_profile_resource.rb +154 -0
- data/lib/generated/azure_mgmt_monitor/models/log_profile_resource_patch.rb +126 -0
- data/lib/generated/azure_mgmt_monitor/models/log_settings.rb +70 -0
- data/lib/generated/azure_mgmt_monitor/models/management_event_aggregation_condition.rb +70 -0
- data/lib/generated/azure_mgmt_monitor/models/management_event_rule_condition.rb +73 -0
- data/lib/generated/azure_mgmt_monitor/models/metric_settings.rb +67 -0
- data/lib/generated/azure_mgmt_monitor/models/metric_statistic_type.rb +18 -0
- data/lib/generated/azure_mgmt_monitor/models/metric_trigger.rb +134 -0
- data/lib/generated/azure_mgmt_monitor/models/receiver_status.rb +17 -0
- data/lib/generated/azure_mgmt_monitor/models/recurrence.rb +62 -0
- data/lib/generated/azure_mgmt_monitor/models/recurrence_frequency.rb +22 -0
- data/lib/generated/azure_mgmt_monitor/models/recurrent_schedule.rb +139 -0
- data/lib/generated/azure_mgmt_monitor/models/retention_policy.rb +60 -0
- data/lib/generated/azure_mgmt_monitor/models/rule_action.rb +48 -0
- data/lib/generated/azure_mgmt_monitor/models/rule_condition.rb +63 -0
- data/lib/generated/azure_mgmt_monitor/models/rule_data_source.rb +58 -0
- data/lib/generated/azure_mgmt_monitor/models/rule_email_action.rb +80 -0
- data/lib/generated/azure_mgmt_monitor/models/rule_management_event_claims_data_source.rb +45 -0
- data/lib/generated/azure_mgmt_monitor/models/rule_management_event_data_source.rb +150 -0
- data/lib/generated/azure_mgmt_monitor/models/rule_metric_data_source.rb +68 -0
- data/lib/generated/azure_mgmt_monitor/models/rule_webhook_action.rb +80 -0
- data/lib/generated/azure_mgmt_monitor/models/scale_action.rb +86 -0
- data/lib/generated/azure_mgmt_monitor/models/scale_capacity.rb +69 -0
- data/lib/generated/azure_mgmt_monitor/models/scale_direction.rb +17 -0
- data/lib/generated/azure_mgmt_monitor/models/scale_rule.rb +57 -0
- data/lib/generated/azure_mgmt_monitor/models/scale_type.rb +17 -0
- data/lib/generated/azure_mgmt_monitor/models/service_diagnostic_settings_resource.rb +163 -0
- data/lib/generated/azure_mgmt_monitor/models/service_diagnostic_settings_resource_patch.rb +135 -0
- data/lib/generated/azure_mgmt_monitor/models/sms_receiver.rb +79 -0
- data/lib/generated/azure_mgmt_monitor/models/threshold_rule_condition.rb +108 -0
- data/lib/generated/azure_mgmt_monitor/models/time_aggregation_operator.rb +19 -0
- data/lib/generated/azure_mgmt_monitor/models/time_aggregation_type.rb +19 -0
- data/lib/generated/azure_mgmt_monitor/models/time_window.rb +104 -0
- data/lib/generated/azure_mgmt_monitor/models/webhook_notification.rb +63 -0
- data/lib/generated/azure_mgmt_monitor/models/webhook_receiver.rb +56 -0
- data/lib/generated/azure_mgmt_monitor/module_definition.rb +8 -0
- data/lib/generated/azure_mgmt_monitor/monitor_management_client.rb +150 -0
- data/lib/generated/azure_mgmt_monitor/service_diagnostic_settings_operations.rb +330 -0
- data/lib/generated/azure_mgmt_monitor/version.rb +8 -0
- metadata +188 -0
@@ -0,0 +1,126 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
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
|
+
# The log profile resource for patch operations.
|
10
|
+
#
|
11
|
+
class LogProfileResourcePatch
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [Hash{String => String}] Resource tags
|
17
|
+
attr_accessor :tags
|
18
|
+
|
19
|
+
# @return [String] the resource id of the storage account to which you
|
20
|
+
# would like to send the Activity Log.
|
21
|
+
attr_accessor :storage_account_id
|
22
|
+
|
23
|
+
# @return [String] The service bus rule ID of the service bus namespace
|
24
|
+
# in which you would like to have Event Hubs created for streaming the
|
25
|
+
# Activity Log. The rule ID is of the format: '{service bus resource
|
26
|
+
# ID}/authorizationrules/{key name}'.
|
27
|
+
attr_accessor :service_bus_rule_id
|
28
|
+
|
29
|
+
# @return [Array<String>] List of regions for which Activity Log events
|
30
|
+
# should be stored or streamed. It is a comma separated list of valid ARM
|
31
|
+
# locations including the 'global' location.
|
32
|
+
attr_accessor :locations
|
33
|
+
|
34
|
+
# @return [Array<String>] the categories of the logs. These categories
|
35
|
+
# are created as is convenient to the user. Some values are: 'Write',
|
36
|
+
# 'Delete', and/or 'Action.'
|
37
|
+
attr_accessor :categories
|
38
|
+
|
39
|
+
# @return [RetentionPolicy] the retention policy for the events in the
|
40
|
+
# log.
|
41
|
+
attr_accessor :retention_policy
|
42
|
+
|
43
|
+
|
44
|
+
#
|
45
|
+
# Mapper for LogProfileResourcePatch class as Ruby Hash.
|
46
|
+
# This will be used for serialization/deserialization.
|
47
|
+
#
|
48
|
+
def self.mapper()
|
49
|
+
{
|
50
|
+
required: false,
|
51
|
+
serialized_name: 'LogProfileResourcePatch',
|
52
|
+
type: {
|
53
|
+
name: 'Composite',
|
54
|
+
class_name: 'LogProfileResourcePatch',
|
55
|
+
model_properties: {
|
56
|
+
tags: {
|
57
|
+
required: false,
|
58
|
+
serialized_name: 'tags',
|
59
|
+
type: {
|
60
|
+
name: 'Dictionary',
|
61
|
+
value: {
|
62
|
+
required: false,
|
63
|
+
serialized_name: 'StringElementType',
|
64
|
+
type: {
|
65
|
+
name: 'String'
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
},
|
70
|
+
storage_account_id: {
|
71
|
+
required: false,
|
72
|
+
serialized_name: 'properties.storageAccountId',
|
73
|
+
type: {
|
74
|
+
name: 'String'
|
75
|
+
}
|
76
|
+
},
|
77
|
+
service_bus_rule_id: {
|
78
|
+
required: false,
|
79
|
+
serialized_name: 'properties.serviceBusRuleId',
|
80
|
+
type: {
|
81
|
+
name: 'String'
|
82
|
+
}
|
83
|
+
},
|
84
|
+
locations: {
|
85
|
+
required: true,
|
86
|
+
serialized_name: 'properties.locations',
|
87
|
+
type: {
|
88
|
+
name: 'Sequence',
|
89
|
+
element: {
|
90
|
+
required: false,
|
91
|
+
serialized_name: 'StringElementType',
|
92
|
+
type: {
|
93
|
+
name: 'String'
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
},
|
98
|
+
categories: {
|
99
|
+
required: true,
|
100
|
+
serialized_name: 'properties.categories',
|
101
|
+
type: {
|
102
|
+
name: 'Sequence',
|
103
|
+
element: {
|
104
|
+
required: false,
|
105
|
+
serialized_name: 'StringElementType',
|
106
|
+
type: {
|
107
|
+
name: 'String'
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
},
|
112
|
+
retention_policy: {
|
113
|
+
required: true,
|
114
|
+
serialized_name: 'properties.retentionPolicy',
|
115
|
+
type: {
|
116
|
+
name: 'Composite',
|
117
|
+
class_name: 'RetentionPolicy'
|
118
|
+
}
|
119
|
+
}
|
120
|
+
}
|
121
|
+
}
|
122
|
+
}
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
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
|
+
# Part of MultiTenantDiagnosticSettings. Specifies the settings for a
|
10
|
+
# particular log.
|
11
|
+
#
|
12
|
+
class LogSettings
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
include MsRest::JSONable
|
17
|
+
# @return [String] Name of a Diagnostic Log category for a resource type
|
18
|
+
# this setting is applied to. To obtain the list of Diagnostic Log
|
19
|
+
# categories for a resource, first perform a GET diagnostic settings
|
20
|
+
# operation.
|
21
|
+
attr_accessor :category
|
22
|
+
|
23
|
+
# @return [Boolean] a value indicating whether this log is enabled.
|
24
|
+
attr_accessor :enabled
|
25
|
+
|
26
|
+
# @return [RetentionPolicy] the retention policy for this log.
|
27
|
+
attr_accessor :retention_policy
|
28
|
+
|
29
|
+
|
30
|
+
#
|
31
|
+
# Mapper for LogSettings class as Ruby Hash.
|
32
|
+
# This will be used for serialization/deserialization.
|
33
|
+
#
|
34
|
+
def self.mapper()
|
35
|
+
{
|
36
|
+
required: false,
|
37
|
+
serialized_name: 'LogSettings',
|
38
|
+
type: {
|
39
|
+
name: 'Composite',
|
40
|
+
class_name: 'LogSettings',
|
41
|
+
model_properties: {
|
42
|
+
category: {
|
43
|
+
required: false,
|
44
|
+
serialized_name: 'category',
|
45
|
+
type: {
|
46
|
+
name: 'String'
|
47
|
+
}
|
48
|
+
},
|
49
|
+
enabled: {
|
50
|
+
required: true,
|
51
|
+
serialized_name: 'enabled',
|
52
|
+
type: {
|
53
|
+
name: 'Boolean'
|
54
|
+
}
|
55
|
+
},
|
56
|
+
retention_policy: {
|
57
|
+
required: false,
|
58
|
+
serialized_name: 'retentionPolicy',
|
59
|
+
type: {
|
60
|
+
name: 'Composite',
|
61
|
+
class_name: 'RetentionPolicy'
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
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
|
+
# How the data that is collected should be combined over time.
|
10
|
+
#
|
11
|
+
class ManagementEventAggregationCondition
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [ConditionOperator] the condition operator. Possible values
|
17
|
+
# include: 'GreaterThan', 'GreaterThanOrEqual', 'LessThan',
|
18
|
+
# 'LessThanOrEqual'
|
19
|
+
attr_accessor :operator
|
20
|
+
|
21
|
+
# @return [Float] The threshold value that activates the alert.
|
22
|
+
attr_accessor :threshold
|
23
|
+
|
24
|
+
# @return [Duration] the period of time (in ISO 8601 duration format)
|
25
|
+
# that is used to monitor alert activity based on the threshold. If
|
26
|
+
# specified then it must be between 5 minutes and 1 day.
|
27
|
+
attr_accessor :window_size
|
28
|
+
|
29
|
+
|
30
|
+
#
|
31
|
+
# Mapper for ManagementEventAggregationCondition class as Ruby Hash.
|
32
|
+
# This will be used for serialization/deserialization.
|
33
|
+
#
|
34
|
+
def self.mapper()
|
35
|
+
{
|
36
|
+
required: false,
|
37
|
+
serialized_name: 'ManagementEventAggregationCondition',
|
38
|
+
type: {
|
39
|
+
name: 'Composite',
|
40
|
+
class_name: 'ManagementEventAggregationCondition',
|
41
|
+
model_properties: {
|
42
|
+
operator: {
|
43
|
+
required: false,
|
44
|
+
serialized_name: 'operator',
|
45
|
+
type: {
|
46
|
+
name: 'Enum',
|
47
|
+
module: 'ConditionOperator'
|
48
|
+
}
|
49
|
+
},
|
50
|
+
threshold: {
|
51
|
+
required: false,
|
52
|
+
serialized_name: 'threshold',
|
53
|
+
type: {
|
54
|
+
name: 'Double'
|
55
|
+
}
|
56
|
+
},
|
57
|
+
window_size: {
|
58
|
+
required: false,
|
59
|
+
serialized_name: 'windowSize',
|
60
|
+
type: {
|
61
|
+
name: 'TimeSpan'
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
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 management event rule condition.
|
10
|
+
#
|
11
|
+
class ManagementEventRuleCondition < RuleCondition
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
|
17
|
+
def initialize
|
18
|
+
@odata.type = "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition"
|
19
|
+
end
|
20
|
+
|
21
|
+
attr_accessor :odata.type
|
22
|
+
|
23
|
+
# @return [ManagementEventAggregationCondition] How the data that is
|
24
|
+
# collected should be combined over time and when the alert is activated.
|
25
|
+
# Note that for management event alerts aggregation is optional – if it
|
26
|
+
# is not provided then any event will cause the alert to activate.
|
27
|
+
attr_accessor :aggregation
|
28
|
+
|
29
|
+
|
30
|
+
#
|
31
|
+
# Mapper for ManagementEventRuleCondition class as Ruby Hash.
|
32
|
+
# This will be used for serialization/deserialization.
|
33
|
+
#
|
34
|
+
def self.mapper()
|
35
|
+
{
|
36
|
+
required: false,
|
37
|
+
serialized_name: 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition',
|
38
|
+
type: {
|
39
|
+
name: 'Composite',
|
40
|
+
class_name: 'ManagementEventRuleCondition',
|
41
|
+
model_properties: {
|
42
|
+
data_source: {
|
43
|
+
required: false,
|
44
|
+
serialized_name: 'dataSource',
|
45
|
+
type: {
|
46
|
+
name: 'Composite',
|
47
|
+
polymorphic_discriminator: 'odata.type',
|
48
|
+
uber_parent: 'RuleDataSource',
|
49
|
+
class_name: 'RuleDataSource'
|
50
|
+
}
|
51
|
+
},
|
52
|
+
odata.type: {
|
53
|
+
required: true,
|
54
|
+
serialized_name: 'odata\\.type',
|
55
|
+
type: {
|
56
|
+
name: 'String'
|
57
|
+
}
|
58
|
+
},
|
59
|
+
aggregation: {
|
60
|
+
required: false,
|
61
|
+
serialized_name: 'aggregation',
|
62
|
+
type: {
|
63
|
+
name: 'Composite',
|
64
|
+
class_name: 'ManagementEventAggregationCondition'
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
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
|
+
# Part of MultiTenantDiagnosticSettings. Specifies the settings for a
|
10
|
+
# particular metric.
|
11
|
+
#
|
12
|
+
class MetricSettings
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
include MsRest::JSONable
|
17
|
+
# @return [Duration] the timegrain of the metric in ISO8601 format.
|
18
|
+
attr_accessor :time_grain
|
19
|
+
|
20
|
+
# @return [Boolean] a value indicating whether this timegrain is enabled.
|
21
|
+
attr_accessor :enabled
|
22
|
+
|
23
|
+
# @return [RetentionPolicy] the retention policy for this timegrain.
|
24
|
+
attr_accessor :retention_policy
|
25
|
+
|
26
|
+
|
27
|
+
#
|
28
|
+
# Mapper for MetricSettings class as Ruby Hash.
|
29
|
+
# This will be used for serialization/deserialization.
|
30
|
+
#
|
31
|
+
def self.mapper()
|
32
|
+
{
|
33
|
+
required: false,
|
34
|
+
serialized_name: 'MetricSettings',
|
35
|
+
type: {
|
36
|
+
name: 'Composite',
|
37
|
+
class_name: 'MetricSettings',
|
38
|
+
model_properties: {
|
39
|
+
time_grain: {
|
40
|
+
required: true,
|
41
|
+
serialized_name: 'timeGrain',
|
42
|
+
type: {
|
43
|
+
name: 'TimeSpan'
|
44
|
+
}
|
45
|
+
},
|
46
|
+
enabled: {
|
47
|
+
required: true,
|
48
|
+
serialized_name: 'enabled',
|
49
|
+
type: {
|
50
|
+
name: 'Boolean'
|
51
|
+
}
|
52
|
+
},
|
53
|
+
retention_policy: {
|
54
|
+
required: false,
|
55
|
+
serialized_name: 'retentionPolicy',
|
56
|
+
type: {
|
57
|
+
name: 'Composite',
|
58
|
+
class_name: 'RetentionPolicy'
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
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
|
+
# Defines values for MetricStatisticType
|
10
|
+
#
|
11
|
+
module MetricStatisticType
|
12
|
+
Average = "Average"
|
13
|
+
Min = "Min"
|
14
|
+
Max = "Max"
|
15
|
+
Sum = "Sum"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,134 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
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
|
+
# The trigger that results in a scaling action.
|
10
|
+
#
|
11
|
+
class MetricTrigger
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [String] the name of the metric that defines what the rule
|
17
|
+
# monitors.
|
18
|
+
attr_accessor :metric_name
|
19
|
+
|
20
|
+
# @return [String] the resource identifier of the resource the rule
|
21
|
+
# monitors.
|
22
|
+
attr_accessor :metric_resource_uri
|
23
|
+
|
24
|
+
# @return [Duration] the granularity of metrics the rule monitors. Must
|
25
|
+
# be one of the predefined values returned from metric definitions for
|
26
|
+
# the metric. Must be between 12 hours and 1 minute.
|
27
|
+
attr_accessor :time_grain
|
28
|
+
|
29
|
+
# @return [MetricStatisticType] the metric statistic type. How the
|
30
|
+
# metrics from multiple instances are combined. Possible values include:
|
31
|
+
# 'Average', 'Min', 'Max', 'Sum'
|
32
|
+
attr_accessor :statistic
|
33
|
+
|
34
|
+
# @return [Duration] the range of time in which instance data is
|
35
|
+
# collected. This value must be greater than the delay in metric
|
36
|
+
# collection, which can vary from resource-to-resource. Must be between
|
37
|
+
# 12 hours and 5 minutes.
|
38
|
+
attr_accessor :time_window
|
39
|
+
|
40
|
+
# @return [TimeAggregationType] time aggregation type. How the data that
|
41
|
+
# is collected should be combined over time. The default value is
|
42
|
+
# Average. Possible values include: 'Average', 'Minimum', 'Maximum',
|
43
|
+
# 'Total', 'Count'
|
44
|
+
attr_accessor :time_aggregation
|
45
|
+
|
46
|
+
# @return [ComparisonOperationType] the operator that is used to compare
|
47
|
+
# the metric data and the threshold. Possible values include: 'Equals',
|
48
|
+
# 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan',
|
49
|
+
# 'LessThanOrEqual'
|
50
|
+
attr_accessor :operator
|
51
|
+
|
52
|
+
# @return [Float] the threshold of the metric that triggers the scale
|
53
|
+
# action.
|
54
|
+
attr_accessor :threshold
|
55
|
+
|
56
|
+
|
57
|
+
#
|
58
|
+
# Mapper for MetricTrigger class as Ruby Hash.
|
59
|
+
# This will be used for serialization/deserialization.
|
60
|
+
#
|
61
|
+
def self.mapper()
|
62
|
+
{
|
63
|
+
required: false,
|
64
|
+
serialized_name: 'MetricTrigger',
|
65
|
+
type: {
|
66
|
+
name: 'Composite',
|
67
|
+
class_name: 'MetricTrigger',
|
68
|
+
model_properties: {
|
69
|
+
metric_name: {
|
70
|
+
required: true,
|
71
|
+
serialized_name: 'metricName',
|
72
|
+
type: {
|
73
|
+
name: 'String'
|
74
|
+
}
|
75
|
+
},
|
76
|
+
metric_resource_uri: {
|
77
|
+
required: true,
|
78
|
+
serialized_name: 'metricResourceUri',
|
79
|
+
type: {
|
80
|
+
name: 'String'
|
81
|
+
}
|
82
|
+
},
|
83
|
+
time_grain: {
|
84
|
+
required: true,
|
85
|
+
serialized_name: 'timeGrain',
|
86
|
+
type: {
|
87
|
+
name: 'TimeSpan'
|
88
|
+
}
|
89
|
+
},
|
90
|
+
statistic: {
|
91
|
+
required: true,
|
92
|
+
serialized_name: 'statistic',
|
93
|
+
type: {
|
94
|
+
name: 'Enum',
|
95
|
+
module: 'MetricStatisticType'
|
96
|
+
}
|
97
|
+
},
|
98
|
+
time_window: {
|
99
|
+
required: true,
|
100
|
+
serialized_name: 'timeWindow',
|
101
|
+
type: {
|
102
|
+
name: 'TimeSpan'
|
103
|
+
}
|
104
|
+
},
|
105
|
+
time_aggregation: {
|
106
|
+
required: true,
|
107
|
+
serialized_name: 'timeAggregation',
|
108
|
+
type: {
|
109
|
+
name: 'Enum',
|
110
|
+
module: 'TimeAggregationType'
|
111
|
+
}
|
112
|
+
},
|
113
|
+
operator: {
|
114
|
+
required: true,
|
115
|
+
serialized_name: 'operator',
|
116
|
+
type: {
|
117
|
+
name: 'Enum',
|
118
|
+
module: 'ComparisonOperationType'
|
119
|
+
}
|
120
|
+
},
|
121
|
+
threshold: {
|
122
|
+
required: true,
|
123
|
+
serialized_name: 'threshold',
|
124
|
+
type: {
|
125
|
+
name: 'Double'
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|