class Azure::ARM::Insights::Models::LocationThresholdRuleCondition

A rule condition based on a certain number of locations failing.

Attributes

data_source[RW]

@return [RuleDataSource] the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.

failed_location_count[RW]

@return [Integer] the number of locations that must fail to activate the alert.

odata[RW]
window_size[RW]

@return [Duration] the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.

Public Class Methods

mapper() click to toggle source

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

# File lib/generated/azure_mgmt_insights/models/location_threshold_rule_condition.rb, line 41
def self.mapper()
  {
    required: false,
    serialized_name: 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition',
    type: {
      name: 'Composite',
      class_name: 'LocationThresholdRuleCondition',
      model_properties: {
        odata.type: {
          required: true,
          serialized_name: 'odata\\.type',
          type: {
            name: 'String'
          }
        },
        data_source: {
          required: false,
          serialized_name: 'dataSource',
          type: {
            name: 'Composite',
            polymorphic_discriminator: 'odata.type',
            uber_parent: 'RuleDataSource',
            class_name: 'RuleDataSource'
          }
        },
        window_size: {
          required: false,
          serialized_name: 'windowSize',
          type: {
            name: 'TimeSpan'
          }
        },
        failed_location_count: {
          required: true,
          serialized_name: 'failedLocationCount',
          type: {
            name: 'Number'
          }
        }
      }
    }
  }
end
new() click to toggle source
# File lib/generated/azure_mgmt_insights/models/location_threshold_rule_condition.rb, line 16
def initialize
  @odata.type = "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition"
end