Microsoft.Network frontDoors/rulesEngines 2020-01-01

The frontDoors/rulesEngines resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a Microsoft.Network/frontDoors/rulesEngines resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.Network/frontDoors/rulesEngines@2020-01-01' = {
  name: 'string'
  properties: {
    rules: [
      {
        action: {
          requestHeaderActions: [
            {
              headerActionType: 'string'
              headerName: 'string'
              value: 'string'
            }
          ]
          responseHeaderActions: [
            {
              headerActionType: 'string'
              headerName: 'string'
              value: 'string'
            }
          ]
          routeConfigurationOverride: {
            @odata.type: 'string'
            // For remaining properties, see RouteConfiguration objects
          }
        }
        matchConditions: [
          {
            negateCondition: bool
            rulesEngineMatchValue: [ 'string' ]
            rulesEngineMatchVariable: 'string'
            rulesEngineOperator: 'string'
            selector: 'string'
            transforms: [ 'string' ]
          }
        ]
        matchProcessingBehavior: 'string'
        name: 'string'
        priority: int
      }
    ]
  }
}

RouteConfiguration objects

Set the @odata.type property to specify the type of object.

For #Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration, use:

  @odata.type: '#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration'
  backendPool: {
    id: 'string'
  }
  cacheConfiguration: {
    cacheDuration: 'string'
    dynamicCompression: 'string'
    queryParameters: 'string'
    queryParameterStripDirective: 'string'
  }
  customForwardingPath: 'string'
  forwardingProtocol: 'string'

For #Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration, use:

  @odata.type: '#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration'
  customFragment: 'string'
  customHost: 'string'
  customPath: 'string'
  customQueryString: 'string'
  redirectProtocol: 'string'
  redirectType: 'string'

Property values

frontDoors/rulesEngines

Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
'Microsoft.Network/frontDoors/rulesEngines'
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
'2020-01-01'
name The resource name

See how to set names and types for child resources in Bicep or JSON ARM templates.
string (required)
properties The JSON object that contains the properties required to create a Rules Engine Configuration. RulesEngineProperties

RulesEngineProperties

Name Description Value
rules A list of rules that define a particular Rules Engine Configuration. RulesEngineRule[]

RulesEngineRule

Name Description Value
action One or more actions that will execute, modifying the request and/or response. RulesEngineAction (required)
matchConditions A list of match conditions that must meet in order for the actions of this rule to run. Having no match conditions means the actions will always run. RulesEngineMatchCondition[]
matchProcessingBehavior If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. 'Continue'
'Stop'
name A name to refer to this specific rule. string (required)
priority A priority assigned to this rule. int (required)

RulesEngineAction

Name Description Value
requestHeaderActions A list of header actions to apply from the request from AFD to the origin. HeaderAction[]
responseHeaderActions A list of header actions to apply from the response from AFD to the client. HeaderAction[]
routeConfigurationOverride Base class for all types of Route. RouteConfiguration

HeaderAction

Name Description Value
headerActionType Which type of manipulation to apply to the header. 'Append'
'Delete'
'Overwrite'
headerName The name of the header this action will apply to. string (required)
value The value to update the given header name with. This value is not used if the actionType is Delete. string

RouteConfiguration

Name Description Value
@odata.type Set the object type #Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration
#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration

ForwardingConfiguration

Name Description Value
@odata.type '#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration'
backendPool Reference to another subresource. SubResource
cacheConfiguration Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. CacheConfiguration
customForwardingPath A custom path used to rewrite resource paths matched by this rule. Leave empty to use incoming path. string
forwardingProtocol Protocol this rule will use when forwarding traffic to backends. 'HttpOnly'
'HttpsOnly'
'MatchRequest'

SubResource

Name Description Value
id Resource ID. string

CacheConfiguration

Name Description Value
cacheDuration The duration for which the content needs to be cached. Allowed format is in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). HTTP requires the value to be no more than a year string
dynamicCompression Whether to use dynamic compression for cached content 'Disabled'
'Enabled'
queryParameters query parameters to include or exclude (comma separated). string
queryParameterStripDirective Treatment of URL query terms when forming the cache key. 'StripAll'
'StripAllExcept'
'StripNone'
'StripOnly'

RedirectConfiguration

Name Description Value
@odata.type '#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration'
customFragment Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #. string
customHost Host to redirect. Leave empty to use the incoming host as the destination host. string
customPath The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path. string
customQueryString The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in {key}={value} format. The first ? and & will be added automatically so do not include them in the front, but do separate multiple query strings with &. string
redirectProtocol The protocol of the destination to where the traffic is redirected 'HttpOnly'
'HttpsOnly'
'MatchRequest'
redirectType The redirect type the rule will use when redirecting traffic. 'Found'
'Moved'
'PermanentRedirect'
'TemporaryRedirect'

RulesEngineMatchCondition

Name Description Value
negateCondition Describes if this is negate condition or not bool
rulesEngineMatchValue Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the variable with the given operator this match condition is considered a match. string[] (required)
rulesEngineMatchVariable Match Variable 'IsMobile'
'PostArgs'
'QueryString'
'RemoteAddr'
'RequestBody'
'RequestFilename'
'RequestFilenameExtension'
'RequestHeader'
'RequestMethod'
'RequestPath'
'RequestScheme'
'RequestUri'
rulesEngineOperator Describes operator to apply to the match condition. 'Any'
'BeginsWith'
'Contains'
'EndsWith'
'Equal'
'GeoMatch'
'GreaterThan'
'GreaterThanOrEqual'
'IPMatch'
'LessThan'
'LessThanOrEqual'
selector Name of selector in RequestHeader or RequestBody to be matched string
transforms List of transforms String array containing any of:
'Lowercase'
'RemoveNulls'
'Trim'
'Uppercase'
'UrlDecode'
'UrlEncode'