Class: Azure::ARM::Insights::Models::MetricTrigger

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/generated/azure_mgmt_insights/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



17
18
19
# File 'lib/generated/azure_mgmt_insights/models/metric_trigger.rb', line 17

def metric_name
  @metric_name
end

#metric_resource_uriString

monitors.

Returns:

  • (String)

    the resource identifier of the resource the rule



21
22
23
# File 'lib/generated/azure_mgmt_insights/models/metric_trigger.rb', line 21

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:



49
50
51
# File 'lib/generated/azure_mgmt_insights/models/metric_trigger.rb', line 49

def operator
  @operator
end

#statisticMetricStatisticType

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

Returns:



31
32
33
# File 'lib/generated/azure_mgmt_insights/models/metric_trigger.rb', line 31

def statistic
  @statistic
end

#thresholdFloat

action.

Returns:

  • (Float)

    the threshold of the metric that triggers the scale



53
54
55
# File 'lib/generated/azure_mgmt_insights/models/metric_trigger.rb', line 53

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:



43
44
45
# File 'lib/generated/azure_mgmt_insights/models/metric_trigger.rb', line 43

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



26
27
28
# File 'lib/generated/azure_mgmt_insights/models/metric_trigger.rb', line 26

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



37
38
39
# File 'lib/generated/azure_mgmt_insights/models/metric_trigger.rb', line 37

def time_window
  @time_window
end

Class Method Details

.mapperObject

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



60
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
# File 'lib/generated/azure_mgmt_insights/models/metric_trigger.rb', line 60

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