Class: Azure::ARM::Monitor::Models::MetricTrigger

Inherits:
Object
  • Object
show all
Includes:
MsRest::JSONable, MsRestAzure
Defined in:
lib/generated/azure_mgmt_monitor/models/metric_trigger.rb

Overview

The trigger that results in a scaling action.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#metric_nameString

monitors.

Returns:

  • (String)

    the name of the metric that defines what the rule



18
19
20
# File 'lib/generated/azure_mgmt_monitor/models/metric_trigger.rb', line 18

def metric_name
  @metric_name
end

#metric_resource_uriString

monitors.

Returns:

  • (String)

    the resource identifier of the resource the rule



22
23
24
# File 'lib/generated/azure_mgmt_monitor/models/metric_trigger.rb', line 22

def metric_resource_uri
  @metric_resource_uri
end

#operatorComparisonOperationType

the metric data and the threshold. Possible values include: ‘Equals’, ‘NotEquals’, ‘GreaterThan’, ‘GreaterThanOrEqual’, ‘LessThan’, ‘LessThanOrEqual’

Returns:



50
51
52
# File 'lib/generated/azure_mgmt_monitor/models/metric_trigger.rb', line 50

def operator
  @operator
end

#statisticMetricStatisticType

metrics from multiple instances are combined. Possible values include: ‘Average’, ‘Min’, ‘Max’, ‘Sum’

Returns:



32
33
34
# File 'lib/generated/azure_mgmt_monitor/models/metric_trigger.rb', line 32

def statistic
  @statistic
end

#thresholdFloat

action.

Returns:

  • (Float)

    the threshold of the metric that triggers the scale



54
55
56
# File 'lib/generated/azure_mgmt_monitor/models/metric_trigger.rb', line 54

def threshold
  @threshold
end

#time_aggregationTimeAggregationType

is collected should be combined over time. The default value is Average. Possible values include: ‘Average’, ‘Minimum’, ‘Maximum’, ‘Total’, ‘Count’

Returns:



44
45
46
# File 'lib/generated/azure_mgmt_monitor/models/metric_trigger.rb', line 44

def time_aggregation
  @time_aggregation
end

#time_grainDuration

be one of the predefined values returned from metric definitions for the metric. Must be between 12 hours and 1 minute.

Returns:

  • (Duration)

    the granularity of metrics the rule monitors. Must



27
28
29
# File 'lib/generated/azure_mgmt_monitor/models/metric_trigger.rb', line 27

def time_grain
  @time_grain
end

#time_windowDuration

collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes.

Returns:

  • (Duration)

    the range of time in which instance data is



38
39
40
# File 'lib/generated/azure_mgmt_monitor/models/metric_trigger.rb', line 38

def time_window
  @time_window
end

Class Method Details

.mapperObject

Mapper for MetricTrigger class as Ruby Hash. This will be used for serialization/deserialization.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/generated/azure_mgmt_monitor/models/metric_trigger.rb', line 61

def self.mapper()
  {
    required: false,
    serialized_name: 'MetricTrigger',
    type: {
      name: 'Composite',
      class_name: 'MetricTrigger',
      model_properties: {
        metric_name: {
          required: true,
          serialized_name: 'metricName',
          type: {
            name: 'String'
          }
        },
        metric_resource_uri: {
          required: true,
          serialized_name: 'metricResourceUri',
          type: {
            name: 'String'
          }
        },
        time_grain: {
          required: true,
          serialized_name: 'timeGrain',
          type: {
            name: 'TimeSpan'
          }
        },
        statistic: {
          required: true,
          serialized_name: 'statistic',
          type: {
            name: 'Enum',
            module: 'MetricStatisticType'
          }
        },
        time_window: {
          required: true,
          serialized_name: 'timeWindow',
          type: {
            name: 'TimeSpan'
          }
        },
        time_aggregation: {
          required: true,
          serialized_name: 'timeAggregation',
          type: {
            name: 'Enum',
            module: 'TimeAggregationType'
          }
        },
        operator: {
          required: true,
          serialized_name: 'operator',
          type: {
            name: 'Enum',
            module: 'ComparisonOperationType'
          }
        },
        threshold: {
          required: true,
          serialized_name: 'threshold',
          type: {
            name: 'Double'
          }
        }
      }
    }
  }
end