class Azure::CDN::Mgmt::V2020_04_15::Models::CustomRule
Defines the common attributes for a custom rule that can be included in a waf policy
Attributes
action[RW]
@return [ActionType] Describes what action to be applied when rule matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect'
enabled_state[RW]
@return [CustomRuleEnabledState] Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. Possible values include: 'Disabled', 'Enabled'
match_conditions[RW]
@return [Array<MatchCondition>] List of match conditions.
name[RW]
@return [String] Defines the name of the custom rule
priority[RW]
@return [Integer] Defines in what order this rule be evaluated in the overall list of custom rules
Public Class Methods
mapper()
click to toggle source
Mapper for CustomRule
class as Ruby Hash. This will be used for serialization/deserialization.
# File lib/2020-04-15/generated/azure_mgmt_cdn/models/custom_rule.rb, line 40 def self.mapper() { client_side_validation: true, required: false, serialized_name: 'CustomRule', type: { name: 'Composite', class_name: 'CustomRule', model_properties: { name: { client_side_validation: true, required: true, serialized_name: 'name', type: { name: 'String' } }, enabled_state: { client_side_validation: true, required: false, serialized_name: 'enabledState', type: { name: 'String' } }, priority: { client_side_validation: true, required: true, serialized_name: 'priority', constraints: { InclusiveMaximum: 1000, InclusiveMinimum: 0 }, type: { name: 'Number' } }, match_conditions: { client_side_validation: true, required: true, serialized_name: 'matchConditions', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'MatchConditionElementType', type: { name: 'Composite', class_name: 'MatchCondition' } } } }, action: { client_side_validation: true, required: true, serialized_name: 'action', type: { name: 'String' } } } } } end